diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-03 20:08:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-03 22:35:13 +0100 |
commit | dc3bf32307085fee3cbbedfeb72ee10dc130d04c (patch) | |
tree | d8be0fdebbf165508ceede3789d50f855a0d313c /Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h | |
parent | 545ec334f00791c39b0e7497a89e9e5001336c0e (diff) | |
download | serenity-dc3bf32307085fee3cbbedfeb72ee10dc130d04c.zip |
LibWeb: Add barebones CanvasGradient object
Also add the CanvasRenderingContext2D APIs to go along with it.
Note that it can't be used for anything yet.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h index f7713a0633..4e902bbd83 100644 --- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h +++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h @@ -14,6 +14,7 @@ #include <LibGfx/Path.h> #include <LibWeb/Bindings/Wrappable.h> #include <LibWeb/DOM/ExceptionOr.h> +#include <LibWeb/HTML/CanvasGradient.h> #include <LibWeb/Layout/InlineNode.h> #include <LibWeb/Layout/LineBox.h> @@ -83,6 +84,10 @@ public: RefPtr<TextMetrics> measure_text(String const& text); + NonnullRefPtr<CanvasGradient> create_radial_gradient(double x0, double y0, double r0, double x1, double y1, double r1); + NonnullRefPtr<CanvasGradient> create_linear_gradient(double x0, double y0, double x1, double y1); + NonnullRefPtr<CanvasGradient> create_conic_gradient(double start_angle, double x, double y); + private: explicit CanvasRenderingContext2D(HTMLCanvasElement&); |