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
commit b1adabdac4
Notes: sideshowbarker 2024-07-17 00:47:29 +09:00

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);