1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

LibWeb: Add canvas context2d roundRect

This commit is contained in:
Bastiaan van der Plaat 2023-10-16 17:29:08 +02:00 committed by Andreas Kling
parent efadee7e6e
commit b640747116
7 changed files with 231 additions and 4 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <LibGfx/Path.h>
#include <LibWeb/Geometry/DOMPointReadOnly.h>
#include <LibWeb/HTML/Canvas/CanvasState.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
@ -25,6 +26,7 @@ public:
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(double x, double y, double w, double h);
WebIDL::ExceptionOr<void> round_rect(double x, double y, double w, double h, Variant<double, Geometry::DOMPointInit, Vector<Variant<double, Geometry::DOMPointInit>>> radii = { 0 });
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);