1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 07:18:13 +00:00

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

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