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
Notes: sideshowbarker 2024-07-17 17:04:35 +09:00

View file

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