1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:37:34 +00:00

LibGfx: Support scaling in AntiAliasingPainter::draw_circle()

Previously the painter would crash if scaling was enabled.
This commit is contained in:
MacDue 2022-03-19 00:29:22 +00:00 committed by Linus Groh
parent 6edea1d59f
commit 3c0e17f29f
3 changed files with 10 additions and 6 deletions

View file

@ -145,11 +145,12 @@ public:
IntRect clip_rect() const { return state().clip_rect; }
int scale() const { return state().scale; }
protected:
IntPoint translation() const { return state().translation; }
IntRect to_physical(IntRect const& r) const { return r.translated(translation()) * scale(); }
IntPoint to_physical(IntPoint const& p) const { return p.translated(translation()) * scale(); }
int scale() const { return state().scale; }
void set_physical_pixel_with_draw_op(u32& pixel, Color const&);
void fill_physical_scanline_with_draw_op(int y, int x, int width, Color const& color);
void fill_rect_with_draw_op(IntRect const&, Color);