mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +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));
|
||||
for (u32 i = 0; i < header.count; i++) {
|
||||
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;
|
||||
}
|
||||
|
@ -430,9 +430,9 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
|||
}
|
||||
case Command::OutlineFillRectangles: {
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue