Skip to content

Path2D

Values

addPath

Adds to the path the path given by the argument. Read more on MDN

let addPath: (
WebAPI.CanvasAPI.path2D,
~path: WebAPI.CanvasAPI.path2D,
~transform: WebAPI.DOMAPI.domMatrix2DInit=?,
) => unit

arc

let arc: (
WebAPI.CanvasAPI.path2D,
~x: float,
~y: float,
~radius: float,
~startAngle: float,
~endAngle: float,
~counterclockwise: bool=?,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float float option< bool >

Return type

unit

arcTo

let arcTo: (
WebAPI.CanvasAPI.path2D,
~x1: float,
~y1: float,
~x2: float,
~y2: float,
~radius: float,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float float

Return type

unit

bezierCurveTo

let bezierCurveTo: (
WebAPI.CanvasAPI.path2D,
~cp1x: float,
~cp1y: float,
~cp2x: float,
~cp2y: float,
~x: float,
~y: float,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float float float

Return type

unit

closePath

let closePath: WebAPI.CanvasAPI.path2D => unit

Parameters

WebAPI.CanvasAPI.path2D

Return type

unit

ellipse

let ellipse: (
WebAPI.CanvasAPI.path2D,
~x: float,
~y: float,
~radiusX: float,
~radiusY: float,
~rotation: float,
~startAngle: float,
~endAngle: float,
~counterclockwise: bool=?,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float float float float option< bool >

Return type

unit

lineTo

let lineTo: (WebAPI.CanvasAPI.path2D, ~x: float, ~y: float) => unit

Parameters

WebAPI.CanvasAPI.path2D float float

Return type

unit

make

let make: (
~path: WebAPI.CanvasAPI.path2D=?,
) => WebAPI.CanvasAPI.path2D

Parameters

option< WebAPI.CanvasAPI.path2D >

Return type

WebAPI.CanvasAPI.path2D

make2

let make2: (~path: string=?) => WebAPI.CanvasAPI.path2D

Parameters

option< string >

Return type

WebAPI.CanvasAPI.path2D

moveTo

let moveTo: (WebAPI.CanvasAPI.path2D, ~x: float, ~y: float) => unit

Parameters

WebAPI.CanvasAPI.path2D float float

Return type

unit

quadraticCurveTo

let quadraticCurveTo: (
WebAPI.CanvasAPI.path2D,
~cpx: float,
~cpy: float,
~x: float,
~y: float,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float

Return type

unit

rect

let rect: (
WebAPI.CanvasAPI.path2D,
~x: float,
~y: float,
~w: float,
~h: float,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float

Return type

unit

roundRect

let roundRect: (
WebAPI.CanvasAPI.path2D,
~x: float,
~y: float,
~w: float,
~h: float,
~radii_: array<float>=?,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float option< array< float > >

Return type

unit

roundRect2

let roundRect2: (
WebAPI.CanvasAPI.path2D,
~x: float,
~y: float,
~w: float,
~h: float,
~radii_: array<float>=?,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float option< array< float > >

Return type

unit

roundRect3

let roundRect3: (
WebAPI.CanvasAPI.path2D,
~x: float,
~y: float,
~w: float,
~h: float,
~radii_: array<float>=?,
) => unit

Parameters

WebAPI.CanvasAPI.path2D float float float float option< array< float > >

Return type

unit