mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
LibGfx: Apply translation and scale to Painter::draw_triangle()
This commit is contained in:
parent
e56764bd74
commit
242acfcbae
Notes:
sideshowbarker
2024-07-18 04:15:24 +09:00
Author: https://github.com/Granddave Commit: https://github.com/SerenityOS/serenity/commit/242acfcbae4 Pull-request: https://github.com/SerenityOS/serenity/pull/9835 Issue: https://github.com/SerenityOS/serenity/issues/9827 Reviewed-by: https://github.com/TobyAsE Reviewed-by: https://github.com/mustafaquraish ✅
@ -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…
Reference in New Issue
Block a user