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:
parent
e56764bd74
commit
242acfcbae
1 changed files with 3 additions and 5 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue