mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Add some basic path drawing functionality to the canvas element
This patch adds the following methods to CanvasRenderingContext2D: - beginPath() - moveTo(x, y) - lineTo(x, y) - closePath() - stroke() We also add the lineWidth property. :^)
This commit is contained in:
parent
60c2e41079
commit
0d93e249c3
6 changed files with 163 additions and 0 deletions
|
@ -51,6 +51,13 @@ private:
|
|||
static void fill_style_setter(JS::Interpreter&, JS::Value);
|
||||
static JS::Value stroke_style_getter(JS::Interpreter&);
|
||||
static void stroke_style_setter(JS::Interpreter&, JS::Value);
|
||||
static JS::Value line_width_getter(JS::Interpreter&);
|
||||
static void line_width_setter(JS::Interpreter&, JS::Value);
|
||||
static JS::Value begin_path(JS::Interpreter&);
|
||||
static JS::Value close_path(JS::Interpreter&);
|
||||
static JS::Value stroke(JS::Interpreter&);
|
||||
static JS::Value move_to(JS::Interpreter&);
|
||||
static JS::Value line_to(JS::Interpreter&);
|
||||
|
||||
NonnullRefPtr<CanvasRenderingContext2D> m_impl;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue