mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibWeb: Teach CRC2D to draw Path2Ds :^)
This commit is contained in:
parent
389f1ee6f5
commit
6644f3ab44
3 changed files with 41 additions and 10 deletions
|
@ -64,13 +64,13 @@ public:
|
|||
|
||||
void begin_path();
|
||||
void stroke();
|
||||
void stroke(Path2D const& path);
|
||||
|
||||
void fill_text(String const&, float x, float y, Optional<double> max_width);
|
||||
void stroke_text(String const&, float x, float y, Optional<double> max_width);
|
||||
|
||||
// FIXME: We should only have one fill(), really. Fix the wrapper generator!
|
||||
void fill(Gfx::Painter::WindingRule);
|
||||
void fill(String const& fill_rule);
|
||||
void fill(Path2D& path, String const& fill_rule);
|
||||
|
||||
RefPtr<ImageData> create_image_data(int width, int height) const;
|
||||
DOM::ExceptionOr<RefPtr<ImageData>> get_image_data(int x, int y, int width, int height) const;
|
||||
|
@ -118,6 +118,9 @@ private:
|
|||
HTMLCanvasElement& canvas_element();
|
||||
HTMLCanvasElement const& canvas_element() const;
|
||||
|
||||
void stroke_internal(Gfx::Path const&);
|
||||
void fill_internal(Gfx::Path&, String const& fill_rule);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#drawing-state
|
||||
struct DrawingState {
|
||||
Gfx::AffineTransform transform;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue