CanvasDrawPath.idl 1.2 KB

12345678910111213141516171819202122232425
  1. #import <HTML/Path2D.idl>
  2. // https://html.spec.whatwg.org/multipage/canvas.html#canvasfillrule
  3. enum CanvasFillRule { "nonzero", "evenodd" };
  4. // https://html.spec.whatwg.org/multipage/canvas.html#canvasdrawpath
  5. interface mixin CanvasDrawPath {
  6. undefined beginPath();
  7. // FIXME: `DOMString` should be `CanvasFillRule`
  8. undefined fill(optional DOMString fillRule = "nonzero");
  9. // FIXME: `DOMString` should be `CanvasFillRule`
  10. undefined fill(Path2D path, optional DOMString fillRule = "nonzero");
  11. undefined stroke();
  12. undefined stroke(Path2D path);
  13. // FIXME: Replace this with these two definitions:
  14. // undefined clip(optional CanvasFillRule fillRule = "nonzero");
  15. // undefined clip(Path2D path, optional CanvasFillRule fillRule = "nonzero");
  16. undefined clip();
  17. // FIXME: boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero");
  18. // FIXME: boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero");
  19. // FIXME: boolean isPointInStroke(unrestricted double x, unrestricted double y);
  20. // FIXME: boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
  21. };