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

LibGfx: Add AA dotted horizontal/vertical lines

This adds simple dotted lines (horizontal/vertical only for now).

There's a little number fudging added in to make sure the final
dot is always drawn at the endpoint (for lines with at least a
handful of dots).
This commit is contained in:
MacDue 2022-06-18 01:40:24 +01:00 committed by Linus Groh
parent 50c88e5e3a
commit 6139fc5c87
2 changed files with 46 additions and 0 deletions

View file

@ -71,6 +71,8 @@ private:
Range draw_ellipse_part(IntPoint a_rect, int radius_a, int radius_b, Color, bool flip_x_and_y, Optional<Range> x_clip, BlendMode blend_mode);
void draw_dotted_line(IntPoint, IntPoint, Gfx::Color, int thickness);
enum class AntiAliasPolicy {
OnlyEnds,
Full,