# Class type Dom_html.canvasRenderingContext2D

    class type canvasRenderingContext2D = object .. end

    method canvas : canvasElement Js.t Js.readonly_prop

    method save : unit Js.meth

    method restore : unit Js.meth

    method scale : float -> float -> unit Js.meth

    method rotate : float -> unit Js.meth

    method translate : float -> float -> unit Js.meth

    method transform : float -> float -> float -> float -> float -> float -> unit Js.meth

    method setTransform : float -> float -> float -> float -> float -> float -> unit Js.meth

    method globalAlpha : Js.float_prop

    method globalCompositeOperation : Js.js_string Js.t Js.prop

    method strokeStyle : Js.js_string Js.t Js.writeonly_prop

    method strokeStyle_gradient : canvasGradient Js.t Js.writeonly_prop

    method strokeStyle_pattern : canvasPattern Js.t Js.writeonly_prop

    method fillStyle : Js.js_string Js.t Js.writeonly_prop

    method fillStyle_gradient : canvasGradient Js.t Js.writeonly_prop

    method fillStyle_pattern : canvasPattern Js.t Js.writeonly_prop

    method createLinearGradient : float -> float -> float -> float -> canvasGradient Js.t Js.meth

    method createRadialGradient : float ->
           float ->
           float -> float -> float -> float -> canvasGradient Js.t Js.meth

    method createPattern : imageElement Js.t ->
           Js.js_string Js.t -> canvasPattern Js.t Js.meth

    method createPattern_fromCanvas : canvasElement Js.t ->
           Js.js_string Js.t -> canvasPattern Js.t Js.meth

    method createPattern_fromVideo : videoElement Js.t ->
           Js.js_string Js.t -> canvasPattern Js.t Js.meth

    method lineWidth : Js.float_prop

    method lineCap : Js.js_string Js.t Js.prop

    method lineJoin : Js.js_string Js.t Js.prop

    method miterLimit : Js.float_prop

    method shadowOffsetX : Js.float_prop

    method shadowOffsetY : Js.float_prop

    method shadowBlur : Js.float_prop

    method shadowColor : Js.js_string Js.t Js.prop

    method clearRect : float -> float -> float -> float -> unit Js.meth

    method fillRect : float -> float -> float -> float -> unit Js.meth

    method strokeRect : float -> float -> float -> float -> unit Js.meth

    method beginPath : unit Js.meth

    method closePath : unit Js.meth

    method moveTo : float -> float -> unit Js.meth

    method lineTo : float -> float -> unit Js.meth

    method quadraticCurveTo : float -> float -> float -> float -> unit Js.meth

    method bezierCurveTo : float -> float -> float -> float -> float -> float -> unit Js.meth

    method arcTo : float -> float -> float -> float -> float -> unit Js.meth

    method rect : float -> float -> float -> float -> unit Js.meth

    method arc : float -> float -> float -> float -> float -> bool Js.t -> unit Js.meth

    method fill : unit Js.meth

    method stroke : unit Js.meth

    method clip : unit Js.meth

    method isPointInPath : float -> float -> bool Js.t Js.meth

    method drawFocusRing : 'a.
             (#element as 'a) Js.t ->
             float -> float -> bool Js.t -> bool Js.t Js.meth

    method font : Js.js_string Js.t Js.prop

    method textAlign : Js.js_string Js.t Js.prop

    method textBaseline : Js.js_string Js.t Js.prop

    method fillText : Js.js_string Js.t -> float -> float -> unit Js.meth

    method fillText_withWidth : Js.js_string Js.t -> float -> float -> float -> unit Js.meth

    method strokeText : Js.js_string Js.t -> float -> float -> unit Js.meth

    method strokeText_withWidth : Js.js_string Js.t -> float -> float -> float -> unit Js.meth

    method measureText : Js.js_string Js.t -> textMetrics Js.t Js.meth

    method drawImage : imageElement Js.t -> float -> float -> unit Js.meth

    method drawImage_withSize : imageElement Js.t ->
           float -> float -> float -> float -> unit Js.meth

    method drawImage_full : imageElement Js.t ->
           float ->
           float -> float -> float -> float -> float -> float -> float -> unit Js.meth

    method drawImage_fromCanvas : canvasElement Js.t -> float -> float -> unit Js.meth

    method drawImage_fromCanvasWithSize : canvasElement Js.t ->
           float -> float -> float -> float -> unit Js.meth

    method drawImage_fullFromCanvas : canvasElement Js.t ->
           float ->
           float -> float -> float -> float -> float -> float -> float -> unit Js.meth

    method drawImage_fromVideoWithVideo : videoElement Js.t -> float -> float -> unit Js.meth

    method drawImage_fromVideoWithSize : videoElement Js.t ->
           float -> float -> float -> float -> unit Js.meth

    method drawImage_fullFromVideo : videoElement Js.t ->
           float ->
           float -> float -> float -> float -> float -> float -> float -> unit Js.meth

    method createImageData : int -> int -> imageData Js.t Js.meth

    method getImageData : float -> float -> float -> float -> imageData Js.t Js.meth

    method putImageData : imageData Js.t -> float -> float -> unit Js.meth