1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

LibGfx: Fix off-by-one in path rasterizer

The start/end is inclusive so it's + 1 to the start to fill
`full_converage_count` pixels.
This commit is contained in:
MacDue 2024-01-06 00:37:14 +00:00 committed by Andreas Kling
parent 13a4fb0325
commit b1adabdac4

View file

@ -400,7 +400,7 @@ void EdgeFlagPathRasterizer<SamplesPerPixel>::write_scanline(Painter& painter, i
}
});
if (full_converage_count > 0)
fast_fill_solid_color_span(painter, scanline, edge_extent.max_x - full_converage_count, edge_extent.max_x, color);
fast_fill_solid_color_span(painter, scanline, edge_extent.max_x - full_converage_count + 1, edge_extent.max_x, color);
};
switch_on_color_or_function(
color_or_function, write_scanline_with_fast_fills, write_scanline_pixelwise);