1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:17:35 +00:00

LibGfx: Fix draw_anti_aliased_line() for steep lines with "OnlyEnds"

Regression from ab794a199b.
This commit is contained in:
Andreas Kling 2022-03-19 22:31:06 +01:00
parent e07ec02470
commit 6b5f0d11ce

View file

@ -89,7 +89,7 @@ void Gfx::AntiAliasingPainter::draw_anti_aliased_line(FloatPoint const& actual_f
if (steep) { if (steep) {
for (int x = xpxl1 + 1; x <= xpxl2 - 1; ++x) { for (int x = xpxl1 + 1; x <= xpxl2 - 1; ++x) {
if constexpr (policy == AntiAliasPolicy::OnlyEnds) { if constexpr (policy == AntiAliasPolicy::OnlyEnds) {
plot(integer_part(intery), x, one_minus_fractional_part(intery)); plot(integer_part(intery), x, 1);
} else { } else {
plot(integer_part(intery), x, one_minus_fractional_part(intery)); plot(integer_part(intery), x, one_minus_fractional_part(intery));
} }