diff options
author | Lukas Lihotzki <lukas@lihotzki.de> | 2025-03-26 13:12:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-26 12:12:44 +0000 |
commit | 251eeb2c2dee8aa91b69d7f451b1a1a7607a3bd1 (patch) | |
tree | 369165369cb932d19b88b9d7269bbec8a0f30432 /components/script_bindings | |
parent | f0ea3c6150ba4e2523ed07f7f3864cfa6c88772f (diff) | |
download | servo-251eeb2c2dee8aa91b69d7f451b1a1a7607a3bd1.tar.gz servo-251eeb2c2dee8aa91b69d7f451b1a1a7607a3bd1.zip |
Add `Path2D` (#35783)
Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
Diffstat (limited to 'components/script_bindings')
-rw-r--r-- | components/script_bindings/webidls/CanvasRenderingContext2D.webidl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/components/script_bindings/webidls/CanvasRenderingContext2D.webidl b/components/script_bindings/webidls/CanvasRenderingContext2D.webidl index 4479d068186..92f61126859 100644 --- a/components/script_bindings/webidls/CanvasRenderingContext2D.webidl +++ b/components/script_bindings/webidls/CanvasRenderingContext2D.webidl @@ -117,15 +117,15 @@ interface mixin CanvasDrawPath { // path API (see also CanvasPath) undefined beginPath(); undefined fill(optional CanvasFillRule fillRule = "nonzero"); - //void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); + undefined fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); undefined stroke(); - //void stroke(Path2D path); + undefined stroke(Path2D path); undefined clip(optional CanvasFillRule fillRule = "nonzero"); - //void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); + undefined clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); - //boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, - // optional CanvasFillRule fillRule = "nonzero"); + boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, + optional CanvasFillRule fillRule = "nonzero"); //boolean isPointInStroke(unrestricted double x, unrestricted double y); //boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); }; @@ -262,3 +262,12 @@ interface ImageData { [Throws] readonly attribute Uint8ClampedArray data; //readonly attribute PredefinedColorSpace colorSpace; }; + +[Exposed=(Window,Worker)] +interface Path2D { + constructor(); + constructor(Path2D other); + constructor(DOMString pathString); + undefined addPath(Path2D path/*, SVGMatrix? transformation*/); +}; +Path2D includes CanvasPath; |