# class CanvasRenderContext

#### package lime.graphics

Available on all platforms

### Constructor

###

`new ()`

### Variables

###

`read onlybackingStorePixelRatio:Float`

###

`canvas:Dynamic`

###

`fillStyle:Dynamic`

###

`font:String`

###

`globalAlpha:Float`

###

`globalCompositeOperation:String`

###

`imageSmoothingEnabled:Bool`

###

`lineCap:String`

###

`lineDash:Array<Dynamic>`

###

`lineDashOffset:Float`

###

`lineJoin:String`

###

`lineWidth:Float`

###

`miterLimit:Float`

###

`shadowBlur:Float`

###

`shadowColor:String`

###

`shadowOffsetX:Float`

###

`shadowOffsetY:Float`

###

`strokeStyle:Dynamic`

###

`textAlign:String`

###

`textBaseline:String`

### Methods

###

`arc (x:Float, y:Float, radius:Float, startAngle:Float, endAngle:Float, anticlockwise:Bool):Void`

###

`arcTo (x1:Float, y1:Float, x2:Float, y2:Float, radius:Float):Void`

###

`beginPath ():Void`

###

`bezierCurveTo (cp1x:Float, cp1y:Float, cp2x:Float, cp2y:Float, x:Float, y:Float):Void`

###

`clearRect (x:Float, y:Float, width:Float, height:Float):Void`

###

`clearShadow ():Void`

###

`clip ():Void`

###

`closePath ():Void`

###

`createDynamicImageData (sw:Float, sh:Float):Dynamic`

`createDynamicImageData (dynamicImageData:Dynamic):Dynamic`

###

`createLinearGradient (x0:Float, y0:Float, x1:Float, y1:Float):Dynamic`

###

`createPattern (image:Dynamic, repetitionType:String):Dynamic`

`createPattern (canvas:Dynamic, repetitionType:String):Dynamic`

###

`createRadialGradient (x0:Float, y0:Float, r0:Float, x1:Float, y1:Float, r1:Float):Dynamic`

###

`drawImage (element:Dynamic, sx:Float, sy:Float, ?sw:Float, ?sh:Float, ?dx:Float, ?dy:Float, ?dw:Float, ?dh:Float):Void`

###

`drawImageFromRect (image:Dynamic, ?sx:Float, ?sy:Float, ?sw:Float, ?sh:Float, ?dx:Float, ?dy:Float, ?dw:Float, ?dh:Float, ?compositeOperation:String):Void`

###

`fill ():Void`

###

`fillRect (x:Float, y:Float, width:Float, height:Float):Void`

###

`fillText (text:String, x:Float, y:Float, ?maxWidth:Float):Void`

###

`getDynamicImageData (sx:Float, sy:Float, sw:Float, sh:Float):Dynamic`

###

`getDynamicImageDataHD (sx:Float, sy:Float, sw:Float, sh:Float):Dynamic`

###

`getLineDash ():Array<Float>`

###

`isPointInPath (x:Float, y:Float):Bool`

###

`lineTo (x:Float, y:Float):Void`

###

`measureText (text:String):Dynamic`

###

`moveTo (x:Float, y:Float):Void`

###

`putDynamicImageData (dynamicImageData:Dynamic, dx:Float, dy:Float, dirtyX:Float, dirtyY:Float, dirtyWidth:Float, dirtyHeight:Float):Void`

`putDynamicImageData (dynamicImageData:Dynamic, dx:Float, dy:Float):Void`

###

`putDynamicImageDataHD (dynamicImageData:Dynamic, dx:Float, dy:Float, dirtyX:Float, dirtyY:Float, dirtyWidth:Float, dirtyHeight:Float):Void`

`putDynamicImageDataHD (dynamicImageData:Dynamic, dx:Float, dy:Float):Void`

###

`quadraticCurveTo (cpx:Float, cpy:Float, x:Float, y:Float):Void`

###

`rect (x:Float, y:Float, width:Float, height:Float):Void`

###

`restore ():Void`

###

`rotate (angle:Float):Void`

###

`save ():Void`

###

`scale (sx:Float, sy:Float):Void`

###

`setAlpha (alpha:Float):Void`

###

`setCompositeOperation (compositeOperation:String):Void`

###

`setFillColor (c:Float, m:Float, y:Float, k:Float, a:Float):Void`

`setFillColor (color:String, ?alpha:Float):Void`

`setFillColor (grayLevel:Float, ?alpha:Float):Void`

`setFillColor (r:Float, g:Float, b:Float, a:Float):Void`

###

`setLineCap (cap:String):Void`

###

`setLineDash (dash:Array<Float>):Void`

###

`setLineJoin (join:String):Void`

###

`setLineWidth (width:Float):Void`

###

`setMiterLimit (limit:Float):Void`

###

`setShadow (width:Float, height:Float, blur:Float, c:Float, m:Float, y:Float, k:Float, a:Float):Void`

`setShadow (width:Float, height:Float, blur:Float, ?color:String, ?alpha:Float):Void`

`setShadow (width:Float, height:Float, blur:Float, grayLevel:Float, ?alpha:Float):Void`

`setShadow (width:Float, height:Float, blur:Float, r:Float, g:Float, b:Float, a:Float):Void`

###

`setStrokeColor (c:Float, m:Float, y:Float, k:Float, a:Float):Void`

`setStrokeColor (color:String, ?alpha:Float):Void`

`setStrokeColor (grayLevel:Float, ?alpha:Float):Void`

`setStrokeColor (r:Float, g:Float, b:Float, a:Float):Void`

###

`setTransform (m11:Float, m12:Float, m21:Float, m22:Float, dx:Float, dy:Float):Void`

###

`stroke ():Void`

###

`strokeRect (x:Float, y:Float, width:Float, height:Float, ?lineWidth:Float):Void`

###

`strokeText (text:String, x:Float, y:Float, ?maxWidth:Float):Void`

###

`transform (m11:Float, m12:Float, m21:Float, m22:Float, dx:Float, dy:Float):Void`

###

`translate (tx:Float, ty:Float):Void`