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

LibWeb: Add CanvasPath arcTo support

Adds initial CanvasPath arcTo support for 2D rendering contexts
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-arcto
This commit is contained in:
Gabriel Nava 2023-09-17 05:15:21 -07:00 committed by Andreas Kling
parent 7cb80c67d8
commit 9a61041941
5 changed files with 94 additions and 7 deletions

View file

@ -153,6 +153,8 @@ public:
elliptical_arc_to(point, { radius, radius }, 0, large_arc, sweep);
}
FloatPoint last_point();
void close();
void close_all_subpaths();
@ -192,7 +194,7 @@ public:
Path copy_transformed(AffineTransform const&) const;
void add_path(Path const&);
void ensure_subpath(FloatPoint point);
DeprecatedString to_deprecated_string() const;
Path stroke_to_fill(float thickness) const;
@ -217,6 +219,7 @@ private:
Optional<Vector<FloatLine>> m_split_lines {};
Optional<Gfx::FloatRect> m_bounding_box;
bool m_need_new_subpath = { true };
};
}