1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:57:44 +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

@ -23,6 +23,7 @@ public:
void line_to(float x, float y);
void quadratic_curve_to(float cx, float cy, float x, float y);
void bezier_curve_to(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y);
WebIDL::ExceptionOr<void> arc_to(double x1, double y1, double x2, double y2, double radius);
void rect(float x, float y, float width, float height);
WebIDL::ExceptionOr<void> arc(float x, float y, float radius, float start_angle, float end_angle, bool counter_clockwise);
WebIDL::ExceptionOr<void> ellipse(float x, float y, float radius_x, float radius_y, float rotation, float start_angle, float end_angle, bool counter_clockwise);