1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:17:44 +00:00

LibWeb: Implement the CanvasRenderingContext2D::rect path method

This method adds a rectangle to the current 2D path.
This commit is contained in:
Idan Horowitz 2021-04-14 23:29:14 +03:00 committed by Andreas Kling
parent 4c0937225e
commit aab99d5945
5 changed files with 46 additions and 0 deletions

View file

@ -33,6 +33,7 @@
#include <LibGfx/Painter.h>
#include <LibGfx/Path.h>
#include <LibWeb/Bindings/Wrappable.h>
#include <LibWeb/DOM/ExceptionOr.h>
namespace Web::HTML {
@ -73,6 +74,7 @@ public:
void move_to(float x, float y);
void line_to(float x, float y);
void quadratic_curve_to(float cx, float cy, float x, float y);
void rect(float x, float y, float width, float height);
void stroke();
// FIXME: We should only have one fill(), really. Fix the wrapper generator!