mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibGfx/TinyVG: Don't move fill/stroke styles that are used in a loop
This commit is contained in:
parent
bebfb81c85
commit
fb61082a6c
1 changed files with 3 additions and 3 deletions
|
@ -380,7 +380,7 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
||||||
auto header = TRY(reader.read_fill_command_header(style_type));
|
auto header = TRY(reader.read_fill_command_header(style_type));
|
||||||
for (u32 i = 0; i < header.count; i++) {
|
for (u32 i = 0; i < header.count; i++) {
|
||||||
TRY(draw_commands.try_append(DrawCommand {
|
TRY(draw_commands.try_append(DrawCommand {
|
||||||
rectangle_to_path(TRY(reader.read_rectangle())), move(header.style) }));
|
rectangle_to_path(TRY(reader.read_rectangle())), header.style }));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -430,9 +430,9 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
||||||
}
|
}
|
||||||
case Command::OutlineFillRectangles: {
|
case Command::OutlineFillRectangles: {
|
||||||
auto header = TRY(reader.read_outline_fill_command_header(style_type));
|
auto header = TRY(reader.read_outline_fill_command_header(style_type));
|
||||||
for (u32 i = 0; i < header.count - 1; i++) {
|
for (u32 i = 0; i < header.count; i++) {
|
||||||
TRY(draw_commands.try_append(DrawCommand {
|
TRY(draw_commands.try_append(DrawCommand {
|
||||||
rectangle_to_path(TRY(reader.read_rectangle())), move(header.fill_style), move(header.line_style), header.line_width }));
|
rectangle_to_path(TRY(reader.read_rectangle())), header.fill_style, header.line_style, header.line_width }));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue