Module Canvas.Canvas2d
module type CompositeType = { ... };
module Composite: CompositeType;
module type LineCapType = { ... };
module LineCap: LineCapType;
module type LineJoinType = { ... };
module LineJoin: LineJoinType;
type image('a)
=
;|
Number : image(float)
|
ImageData : image(Webapi__Dom__Image.t)
type style(_)
=
;|
String : style(string)
|
Gradient : style(gradient)
|
Pattern : style(pattern)
let save: t => unit;
let restore: t => unit;
let scale: x:float => y:float => t => unit;
let rotate: float => t => unit;
let translate: x:float => y:float => t => unit;
let transform: m11:float => m12:float => m21:float => m22:float => dx:float => dy:float => t => unit;
let setTransform: m11:float => m12:float => m21:float => m22:float => dx:float => dy:float => t => unit;
let globalAlpha: t => float => unit;
let globalCompositeOperation: t => Composite.t => unit;
let lineWidth: t => float => unit;
let lineCap: t => LineCap.t => unit;
let lineJoin: t => LineJoin.t => unit;
let miterLimit: t => float => unit;
let setFillStyle: t => 'a => unit;
let setStrokeStyle: t => 'a => unit;
let setStrokeStyle: t => style('a) => 'a => unit;
let setFillStyle: t => style('a) => 'a => unit;
let reifyStyle: 'a => (style('b), 'b);
let shadowOffsetX: t => float => unit;
let shadowOffsetY: t => float => unit;
let shadowBlur: t => float => unit;
let shadowColor: t => string => unit;
let createLinearGradient: x0:float => y0:float => x1:float => y1:float => t => gradient;
let createRadialGradient: x0:float => y0:float => x1:float => y1:float => r0:float => r1:float => t => gradient;
let addColorStop: float => string => gradient => unit;
let createPattern: t => Dom.element => [ `repeat | `repeatX | `repeatY | `noRepeat ] => pattern;
let beginPath: t => unit;
let closePath: t => unit;
let fill: t => unit;
let stroke: t => unit;
let clip: t => unit;
let moveTo: x:float => y:float => t => unit;
let lineTo: x:float => y:float => t => unit;
let quadraticCurveTo: cp1x:float => cp1y:float => x:float => y:float => t => unit;
let bezierCurveTo: cp1x:float => cp1y:float => cp2x:float => cp2y:float => x:float => y:float => t => unit;
let arcTo: x1:float => y1:float => x2:float => y2:float => r:float => t => unit;
let arc: x:float => y:float => r:float => startAngle:float => endAngle:float => anticw:bool => t => unit;
let rect: x:float => y:float => w:float => h:float => t => unit;
let isPointInPath: x:float => y:float => t => bool;
let font: t => string => unit;
let textAlign: t => string => unit;
let textBaseline: t => string => unit;
let fillText: string => x:float => y:float => ?maxWidth:float => t => unit;
let strokeText: string => x:float => y:float => ?maxWidth:float => t => unit;
let measureText: string => t => measureText;
let width: measureText => float;
let fillRect: x:float => y:float => w:float => h:float => t => unit;
let strokeRect: x:float => y:float => w:float => h:float => t => unit;
let clearRect: x:float => y:float => w:float => h:float => t => unit;
let createImageDataCoords: t => width:float => height:float => Webapi__Dom__Image.t;
let createImageDataFromImage: t => Webapi__Dom__Image.t => Webapi__Dom__Image.t;
let getImageData: t => sx:float => sy:float => sw:float => sh:float => Webapi__Dom__Image.t;
let putImageData: t => imageData:Webapi__Dom__Image.t => dx:float => dy:float => unit;
let putImageDataWithDirtyRect: t => imageData:Webapi__Dom__Image.t => dx:float => dy:float => dirtyX:float => dirtyY:float => dirtyWidth:float => dirtyHeight:float => unit;