From 8444eeb90cbf8c202e7eea0527cb3ef29d99236b Mon Sep 17 00:00:00 2001 From: Yoya Date: Sat, 29 Oct 2016 00:46:29 +0900 Subject: [PATCH] fixing to line_style for DefineShape4 & DefineMorphShape2 lack of reading width field. --- src/swf_line_style.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/swf_line_style.c b/src/swf_line_style.c index 8643b9d..6c5de34 100644 --- a/src/swf_line_style.c +++ b/src/swf_line_style.c @@ -17,6 +17,7 @@ swf_line_style_parse(bitstream_t *bs, swf_line_style_t *line_style, swf_rgba_parse(bs, &(line_style->rgba_morph)); } else if (tag->code == 83 || tag->code == 84) { // DefineShape4 || DefineMorphShape2 + line_style->width = bitstream_getbytesLE(bs, 2); if (tag->code == 84) { // DefineMorphShape2 line_style->width_morph = bitstream_getbytesLE(bs, 2); } @@ -72,6 +73,7 @@ swf_line_style_build(bitstream_t *bs, swf_line_style_t *line_style, swf_rgba_build(bs, &(line_style->rgba_morph)); } else if (tag->code == 83 || tag->code == 84) { // DefineShape4 || DefineMorphShape2 + bitstream_putbytesLE(bs, line_style->width, 2); if (tag->code == 84) { // DefineMorphShape2 bitstream_putbytesLE(bs, line_style->width_morph, 2); } @@ -121,6 +123,8 @@ swf_line_style_print(swf_line_style_t *line_style, int indent_depth, swf_rgba_print(&(line_style->rgba_morph), indent_depth); } else if (tag->code == 83 || tag->code == 84) { // DefineShape4 || DefineMorphShape2 + print_indent(indent_depth); + printf("width=%d\n", line_style->width); if (tag->code == 84) { // DefineMorphShape2 print_indent(indent_depth); printf("width_morph=%d\n", line_style->width_morph); -- 2.11.0