mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
LibGfx: Add Painter::draw_triangle_wave()
This patch adds support for drawing triangular waves. For now those can only be horizontal, but as they are intended for underlining text, it's an okay way to handle this.
This commit is contained in:
parent
7b51102495
commit
0277118cb4
2 changed files with 21 additions and 0 deletions
|
@ -59,6 +59,7 @@ public:
|
|||
void set_pixel(IntPoint const&, Color);
|
||||
void set_pixel(int x, int y, Color color) { set_pixel({ x, y }, color); }
|
||||
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);
|
||||
void draw_cubic_bezier_curve(IntPoint const& control_point_0, IntPoint const& control_point_1, IntPoint const&, IntPoint const&, Color, int thickness = 1, LineStyle style = LineStyle::Solid);
|
||||
void draw_elliptical_arc(IntPoint const& p1, IntPoint const& p2, IntPoint const& center, FloatPoint const& radii, float x_axis_rotation, float theta_1, float theta_delta, Color, int thickness = 1, LineStyle style = LineStyle::Solid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue