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

LibGfx: Add alternate_color to draw_line

This alternate_color can be used when drawing dashed lines to have two
alternating Colors.
This commit is contained in:
Tobias Christiansen 2021-08-05 16:34:03 +02:00 committed by Ali Mohammad Pur
parent 4a57a4a0b3
commit 61a1122c2d
2 changed files with 14 additions and 2 deletions

View file

@ -51,7 +51,7 @@ public:
void draw_ellipse_intersecting(const IntRect&, Color, int thickness = 1);
void set_pixel(const IntPoint&, Color);
void set_pixel(int x, int y, Color color) { set_pixel({ x, y }, color); }
void draw_line(const IntPoint&, const IntPoint&, Color, int thickness = 1, LineStyle style = LineStyle::Solid);
void draw_line(const IntPoint&, const IntPoint&, Color, int thickness = 1, LineStyle style = LineStyle::Solid, Color alternate_color = Color::Transparent);
void draw_quadratic_bezier_curve(const IntPoint& control_point, const IntPoint&, const IntPoint&, Color, int thickness = 1, LineStyle style = LineStyle::Solid);
void draw_elliptical_arc(const IntPoint& p1, const IntPoint& p2, const IntPoint& center, const FloatPoint& radii, float x_axis_rotation, float theta_1, float theta_delta, Color, int thickness = 1, LineStyle style = LineStyle::Solid);
void blit(const IntPoint&, const Gfx::Bitmap&, const IntRect& src_rect, float opacity = 1.0f, bool apply_alpha = true);