LibGfx: Apply translation and scale to Painter::draw_triangle()

This commit is contained in:
David Isaksson 2021-09-05 12:25:02 +02:00 committed by Andreas Kling
parent e56764bd74
commit 242acfcbae
Notes: sideshowbarker 2024-07-18 04:15:24 +09:00

View File

@ -668,11 +668,9 @@ void Painter::draw_bitmap(const IntPoint& p, const GlyphBitmap& bitmap, Color co
void Painter::draw_triangle(const IntPoint& a, const IntPoint& b, const IntPoint& c, Color color)
{
VERIFY(scale() == 1); // FIXME: Add scaling support.
IntPoint p0(a);
IntPoint p1(b);
IntPoint p2(c);
IntPoint p0(to_physical(a));
IntPoint p1(to_physical(b));
IntPoint p2(to_physical(c));
// sort points from top to bottom
if (p0.y() > p1.y())