To get an object of this interface, call getContext()
on a canvas element
, supplying "2d" as the argument:
Documentation CanvasRenderingContext2D by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
Variables
Methods
arc(x:Float, y:Float, radius:Float, startAngle:Float, endAngle:Float, anticlockwise:Bool = false):Void
Throws:
null | DOMError |
---|
clip(path:Path2D, winding:CanvasWindingRule = NONZERO):Void
clip(winding:CanvasWindingRule = NONZERO):Void
createImageData(imagedata:ImageData):ImageData
createImageData(sw:Float, sh:Float):ImageData
Throws:
null | DOMError |
---|
createPattern(image:ImageElement, repetition:String):CanvasPattern
createPattern(image:ImageElement, repetition:String):CanvasPattern
createPattern(image:CanvasElement, repetition:String):CanvasPattern
createPattern(image:VideoElement, repetition:String):CanvasPattern
createPattern(image:ImageBitmap, repetition:String):CanvasPattern
Throws:
null | DOMError |
---|
createRadialGradient(x0:Float, y0:Float, r0:Float, x1:Float, y1:Float, r1:Float):CanvasGradient
Throws:
null | DOMError |
---|
drawImage(image:ImageElement, sx:Float, sy:Float, sw:Float, sh:Float, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:ImageElement, dx:Float, dy:Float):Void
drawImage(image:CanvasElement, dx:Float, dy:Float):Void
drawImage(image:VideoElement, dx:Float, dy:Float):Void
drawImage(image:ImageBitmap, dx:Float, dy:Float):Void
drawImage(image:ImageElement, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:CanvasElement, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:VideoElement, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:ImageBitmap, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:ImageElement, sx:Float, sy:Float, sw:Float, sh:Float, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:CanvasElement, sx:Float, sy:Float, sw:Float, sh:Float, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:VideoElement, sx:Float, sy:Float, sw:Float, sh:Float, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:ImageBitmap, sx:Float, sy:Float, sw:Float, sh:Float, dx:Float, dy:Float, dw:Float, dh:Float):Void
drawImage(image:ImageElement, dx:Float, dy:Float):Void
drawImage(image:ImageElement, dx:Float, dy:Float, dw:Float, dh:Float):Void
Throws:
null | DOMError |
---|
ellipse(x:Float, y:Float, radiusX:Float, radiusY:Float, rotation:Float, startAngle:Float, endAngle:Float, anticlockwise:Bool = false):Void
Throws:
null | DOMError |
---|