diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Canvas')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h index 0f0e773256..d65da16932 100644 --- a/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h +++ b/Userland/Libraries/LibWeb/HTML/Canvas/CanvasFillStrokeStyles.h @@ -10,6 +10,7 @@ #include <AK/String.h> #include <LibWeb/HTML/Canvas/CanvasState.h> +#include <LibWeb/HTML/CanvasGradient.h> namespace Web::HTML { @@ -41,6 +42,21 @@ public: return my_drawing_state().stroke_style.to_string(); } + NonnullRefPtr<CanvasGradient> create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1) + { + return CanvasGradient::create_radial(x0, y0, r0, x1, y1, r1); + } + + NonnullRefPtr<CanvasGradient> create_linear_gradient(double x0, double y0, double x1, double y1) + { + return CanvasGradient::create_linear(x0, y0, x1, y1); + } + + NonnullRefPtr<CanvasGradient> create_conic_gradient(double start_angle, double x, double y) + { + return CanvasGradient::create_conic(start_angle, x, y); + } + protected: CanvasFillStrokeStyles() = default; |