Inheritance
Implements
Annotations
  • @DomName('CanvasRenderingContext2D')

Static Properties

instanceRuntimeType Type

@Deprecated("Internal Use Only"), read-only

Constructors

CanvasRenderingContext2D.internal_()

Properties

backingStorePixelRatio double

Deprecated always returns 1.0

@deprecated, @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation'), @Experimental(), read-only
canvas CanvasElement

@DocsEditable(), @DomName('CanvasRenderingContext2D.canvas'), @Experimental(), read-only
currentTransform Matrix

@DocsEditable(), @DomName('CanvasRenderingContext2D.currentTransform'), @Experimental(), read / write
direction String

@DocsEditable(), @DomName('CanvasRenderingContext2D.direction'), @Experimental(), read / write
fillStyle Object

@DocsEditable(), @DomName('CanvasRenderingContext2D.fillStyle'), read / write
filter String

@DocsEditable(), @DomName('CanvasRenderingContext2D.filter'), @Experimental(), read / write
font String

@DocsEditable(), @DomName('CanvasRenderingContext2D.font'), read / write
globalAlpha num

@DocsEditable(), @DomName('CanvasRenderingContext2D.globalAlpha'), read / write
globalCompositeOperation String

@DocsEditable(), @DomName('CanvasRenderingContext2D.globalCompositeOperation'), read / write
imageSmoothingEnabled bool

Whether images and patterns on this canvas will be smoothed when this canvas is scaled.

@DocsEditable(), @DomName('CanvasRenderingContext2D.imageSmoothingEnabled'), @Experimental(), read / write
lineCap String

@DocsEditable(), @DomName('CanvasRenderingContext2D.lineCap'), read / write
lineDashOffset num

@DocsEditable(), @DomName('CanvasRenderingContext2D.lineDashOffset'), read / write
lineJoin String

@DocsEditable(), @DomName('CanvasRenderingContext2D.lineJoin'), read / write
lineWidth num

@DocsEditable(), @DomName('CanvasRenderingContext2D.lineWidth'), read / write
miterLimit num

@DocsEditable(), @DomName('CanvasRenderingContext2D.miterLimit'), read / write
shadowBlur num

@DocsEditable(), @DomName('CanvasRenderingContext2D.shadowBlur'), read / write
shadowColor String

@DocsEditable(), @DomName('CanvasRenderingContext2D.shadowColor'), read / write
shadowOffsetX num

@DocsEditable(), @DomName('CanvasRenderingContext2D.shadowOffsetX'), read / write
shadowOffsetY num

@DocsEditable(), @DomName('CanvasRenderingContext2D.shadowOffsetY'), read / write
strokeStyle Object

@DocsEditable(), @DomName('CanvasRenderingContext2D.strokeStyle'), read / write
textAlign String

@DocsEditable(), @DomName('CanvasRenderingContext2D.textAlign'), read / write
textBaseline String

@DocsEditable(), @DomName('CanvasRenderingContext2D.textBaseline'), read / write
hashCode int

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

addHitRegion([Map options ]) → void

arc(num x, num y, num radius, num startAngle, num endAngle, [ bool anticlockwise = false ]) → void

@DomName('CanvasRenderingContext2D.arc')
arcTo(num x1, num y1, num x2, num y2, num radius) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.arcTo')
beginPath() → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.beginPath')
bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.bezierCurveTo')
clearHitRegions() → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.clearHitRegions'), @Experimental()
clearRect(num x, num y, num width, num height) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.clearRect')
clip([path_OR_winding, String winding ]) → void

closePath() → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.closePath')
createImageData(imagedata_OR_sw, [ num sh ]) ImageData

createImageDataFromImageData(ImageData imagedata) ImageData

@DocsEditable(), @DomName('CanvasRenderingContext2D.createImageDataFromImageData')
createLinearGradient(num x0, num y0, num x1, num y1) CanvasGradient

@DocsEditable(), @DomName('CanvasRenderingContext2D.createLinearGradient')
createPattern(Object image, String repetitionType) CanvasPattern

@DocsEditable(), @DomName('CanvasRenderingContext2D.createPattern')
createPatternFromImage(ImageElement image, String repetitionType) CanvasPattern

@DomName('CanvasRenderingContext2D.createPatternFromImage')
createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) CanvasGradient

@DocsEditable(), @DomName('CanvasRenderingContext2D.createRadialGradient')
drawFocusIfNeeded(element_OR_path, [ Element element ]) → void

drawImage(CanvasImageSource source, num destX, num destY) → void

Draws an image from a CanvasImageSource to this canvas.

@DomName('CanvasRenderingContext2D.drawImage')
drawImageScaled(CanvasImageSource source, num destX, num destY, num destWidth, num destHeight) → void

Draws an image from a CanvasImageSource to an area of this canvas.

@DomName('CanvasRenderingContext2D.drawImage')
drawImageScaledFromSource(CanvasImageSource source, num sourceX, num sourceY, num sourceWidth, num sourceHeight, num destX, num destY, num destWidth, num destHeight) → void

Draws an image from a CanvasImageSource to an area of this canvas.

@DomName('CanvasRenderingContext2D.drawImage')
drawImageToRect(CanvasImageSource source, Rectangle destRect, { Rectangle sourceRect }) → void

Draws an image from a CanvasImageSource to an area of this canvas.

@DomName('CanvasRenderingContext2D.drawImage')
ellipse(num x, num y, num radiusX, num radiusY, num rotation, num startAngle, num endAngle, bool anticlockwise) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.ellipse'), @Experimental()
fill([path_OR_winding, String winding ]) → void

fillRect(num x, num y, num width, num height) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.fillRect')
fillText(String text, num x, num y, [ num maxWidth ]) → void

getContextAttributes() → dynamic

@DocsEditable(), @DomName('CanvasRenderingContext2D.getContextAttributes'), @Experimental()
getImageData(num sx, num sy, num sw, num sh) ImageData

@DocsEditable(), @DomName('CanvasRenderingContext2D.getImageData')
getLineDash() List<num>

@DomName('CanvasRenderingContext2D.getLineDash'), @SupportedBrowser(SupportedBrowser.CHROME), @SupportedBrowser(SupportedBrowser.IE, '11'), @SupportedBrowser(SupportedBrowser.SAFARI), @Unstable()
isContextLost() bool

@DocsEditable(), @DomName('CanvasRenderingContext2D.isContextLost'), @Experimental()
isPointInPath(path_OR_x, num x_OR_y, [ winding_OR_y, String winding ]) bool

isPointInStroke(path_OR_x, num x_OR_y, [ num y ]) bool

lineTo(num x, num y) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.lineTo')
measureText(String text) TextMetrics

@DocsEditable(), @DomName('CanvasRenderingContext2D.measureText')
moveTo(num x, num y) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.moveTo')
putImageData(ImageData imagedata, num dx, num dy, [ num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight ]) → void

quadraticCurveTo(num cpx, num cpy, num x, num y) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.quadraticCurveTo')
rect(num x, num y, num width, num height) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.rect')
removeHitRegion(String id) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.removeHitRegion'), @Experimental()
resetTransform() → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.resetTransform'), @Experimental()
restore() → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.restore')
rotate(num angle) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.rotate')
save() → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.save')
scale(num x, num y) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.scale')
scrollPathIntoView([Path2D path ]) → void

setFillColorHsl(int h, num s, num l, [ num a = 1 ]) → void

Sets the color used inside shapes. h is in degrees, 0-360. s, l are in percent, 0-100. a is 0-1.

setFillColorRgb(int r, int g, int b, [ num a = 1 ]) → void

Sets the color used inside shapes. r, g, b are 0-255, a is 0-1.

setLineDash(List<num> dash) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.setLineDash')
setStrokeColorHsl(int h, num s, num l, [ num a = 1 ]) → void

Sets the color used for stroking shapes. h is in degrees, 0-360. s, l are in percent, 0-100. a is 0-1.

setStrokeColorRgb(int r, int g, int b, [ num a = 1 ]) → void

Sets the color used for stroking shapes. r, g, b are 0-255, a is 0-1.

setTransform(num a, num b, num c, num d, num e, num f) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.setTransform')
stroke([Path2D path ]) → void

strokeRect(num x, num y, num width, num height) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.strokeRect')
strokeText(String text, num x, num y, [ num maxWidth ]) → void

transform(num a, num b, num c, num d, num e, num f) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.transform')
translate(num x, num y) → void

@DocsEditable(), @DomName('CanvasRenderingContext2D.translate')
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns the result of the JavaScript objects toString method.

inherited