1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:27:45 +00:00

LibGfx: Add Painter::get_pixel()

This is required to do some painting tricks in LibWeb, this has to be
added to the painter so it can apply the paint translation first.
This commit is contained in:
MacDue 2022-06-15 21:05:58 +01:00 committed by Linus Groh
parent 4f311d1660
commit 81a3ec0692
2 changed files with 20 additions and 10 deletions

View file

@ -59,6 +59,7 @@ public:
void draw_ellipse_intersecting(IntRect const&, Color, int thickness = 1);
void set_pixel(IntPoint const&, Color, bool blend = false);
void set_pixel(int x, int y, Color color, bool blend = false) { set_pixel({ x, y }, color, blend); }
Optional<Color> get_pixel(IntPoint const&);
void draw_line(IntPoint const&, IntPoint const&, Color, int thickness = 1, LineStyle style = LineStyle::Solid, Color alternate_color = Color::Transparent);
void draw_triangle_wave(IntPoint const&, IntPoint const&, Color color, int amplitude, int thickness = 1);
void draw_quadratic_bezier_curve(IntPoint const& control_point, IntPoint const&, IntPoint const&, Color, int thickness = 1, LineStyle style = LineStyle::Solid);