IndigoCanvasRenderingContext2D

indigo.facades.IndigoCanvasRenderingContext2D
class IndigoCanvasRenderingContext2D extends CanvasRenderingContext2D

Attributes

Graph
Supertypes
class CanvasRenderingContext2D
class Object
trait Any
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double): Unit

Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).

Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).

Attributes

Inherited from:
CanvasRenderingContext2D
def arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, anticlockwise: Boolean): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double): Unit

Adds an arc with the given control points and radius, connected to the previous point by a straight line.

Adds an arc with the given control points and radius, connected to the previous point by a straight line.

Attributes

Inherited from:
CanvasRenderingContext2D
def beginPath(): Unit

Starts a new path by resetting the list of sub-paths. Call this method when you want to create a new path.

Starts a new path by resetting the list of sub-paths. Call this method when you want to create a new path.

Attributes

Inherited from:
CanvasRenderingContext2D
def bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def clearRect(x: Double, y: Double, w: Double, h: Double): Unit

Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black.

Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black.

Attributes

Inherited from:
CanvasRenderingContext2D
def clip(fillRule: String): Unit

Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only. For an example, see Clipping paths in the Canvas tutorial.

Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only. For an example, see Clipping paths in the Canvas tutorial.

Attributes

Inherited from:
CanvasRenderingContext2D
def closePath(): Unit

Tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.

Tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.

Attributes

Inherited from:
CanvasRenderingContext2D
def createImageData(imageDataOrSw: Any, sh: Double): ImageData

Creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are transparent black.

Creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are transparent black.

Attributes

Inherited from:
CanvasRenderingContext2D
def createLinearGradient(x0: Double, y0: Double, x1: Double, y1: Double): CanvasGradient

Attributes

Inherited from:
CanvasRenderingContext2D
def createPattern(image: HTMLElement, repetition: String): CanvasPattern

Attributes

Inherited from:
CanvasRenderingContext2D
def createRadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, r1: Double): CanvasGradient

Attributes

Inherited from:
CanvasRenderingContext2D
def drawImage(image: HTMLElement, offsetX: Double, offsetY: Double, width: Double, height: Double, canvasOffsetX: Double, canvasOffsetY: Double, canvasImageWidth: Double, canvasImageHeight: Double): Unit

Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.

Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.

Attributes

Inherited from:
CanvasRenderingContext2D
def ellipse(x: Double, y: Double, radiusX: Double, radiusY: Double, rotation: Double, startAngle: Double, endAngle: Double, anticlockwise: Boolean): Unit

The ellipse() method creates an elliptical arc centered at (x, y) with the radii radiusX and radiusY. The path starts at startAngle and ends at endAngle, and travels in the direction given by anticlockwise (defaulting to clockwise).

The ellipse() method creates an elliptical arc centered at (x, y) with the radii radiusX and radiusY. The path starts at startAngle and ends at endAngle, and travels in the direction given by anticlockwise (defaulting to clockwise).

Attributes

Inherited from:
CanvasRenderingContext2D
def fill(): Unit

Fills the subpaths with the current fill style.

Fills the subpaths with the current fill style.

Attributes

Inherited from:
CanvasRenderingContext2D
def fillRect(x: Double, y: Double, w: Double, h: Double): Unit

Draws a filled rectangle at (x, y) position whose size is determined by width and height.

Draws a filled rectangle at (x, y) position whose size is determined by width and height.

Attributes

Inherited from:
CanvasRenderingContext2D
def fillText(text: String, x: Double, y: Double, maxWidth: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def getImageData(sx: Double, sy: Double, sw: Double, sh: Double): ImageData

Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.

Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.

Attributes

Inherited from:
CanvasRenderingContext2D
def getLineDash(): Array[Double]

Returns a dash list array containing an even number of non-negative numbers.

Returns a dash list array containing an even number of non-negative numbers.

Attributes

Inherited from:
CanvasRenderingContext2D
def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPointInPath(x: Double, y: Double): Boolean

Reports whether or not the specified point is contained in the current path.

Reports whether or not the specified point is contained in the current path.

Attributes

Inherited from:
CanvasRenderingContext2D
def isPointInPath(x: Double, y: Double, fillRule: String): Boolean

Attributes

Inherited from:
CanvasRenderingContext2D
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def lineTo(x: Double, y: Double): Unit

Connects the last point in the subpath to the x, y coordinates with a straight line.

Connects the last point in the subpath to the x, y coordinates with a straight line.

Attributes

Inherited from:
CanvasRenderingContext2D
def measureText(text: String): TextMetrics

Attributes

Inherited from:
CanvasRenderingContext2D
def moveTo(x: Double, y: Double): Unit

Moves the starting point of a new subpath to the (x, y) coordinates.

Moves the starting point of a new subpath to the (x, y) coordinates.

Attributes

Inherited from:
CanvasRenderingContext2D
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def putImageData(imagedata: ImageData, dx: Double, dy: Double, dirtyX: Double, dirtyY: Double, dirtyWidth: Double, dirtyHeight: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def rect(x: Double, y: Double, w: Double, h: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def restore(): Unit

Restores the drawing style state to the last element on the 'state stack' saved by save().

Restores the drawing style state to the last element on the 'state stack' saved by save().

Attributes

Inherited from:
CanvasRenderingContext2D
def rotate(angle: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def save(): Unit

Saves the current drawing style state using a stack so you can revert any change you make to it using restore().

Saves the current drawing style state using a stack so you can revert any change you make to it using restore().

Attributes

Inherited from:
CanvasRenderingContext2D
def scale(x: Double, y: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def setLineDash(segments: Array[Double]): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def setTransform(m11: Double, m12: Double, m21: Double, m22: Double, dx: Double, dy: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def stroke(): Unit

Strokes the subpaths with the current stroke style.

Strokes the subpaths with the current stroke style.

Attributes

Inherited from:
CanvasRenderingContext2D
def strokeRect(x: Double, y: Double, w: Double, h: Double): Unit

Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.

Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.

Attributes

Inherited from:
CanvasRenderingContext2D
def strokeText(text: String, x: Double, y: Double, maxWidth: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def toLocaleString(): String

Attributes

Inherited from:
Object
def transform(m11: Double, m12: Double, m21: Double, m22: Double, dx: Double, dy: Double): Unit

Attributes

Inherited from:
CanvasRenderingContext2D
def translate(x: Double, y: Double): Unit

Moves the origin point of the context to (x, y).

Moves the origin point of the context to (x, y).

Attributes

Inherited from:
CanvasRenderingContext2D
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

var direction: String

Text direction, left to right, right to left

Text direction, left to right, right to left

"ltr" || "rtl" || "inherit"

Attributes

Inherited fields

var canvas: HTMLCanvasElement

Back-reference to the canvas element for which this context was created. Read only.

Back-reference to the canvas element for which this context was created. Read only.

Attributes

Inherited from:
CanvasRenderingContext2D
var fillStyle: Any

A CSS color, a CanvasGradient or CanvasPattern, to use as a fill.

A CSS color, a CanvasGradient or CanvasPattern, to use as a fill.

Attributes

Inherited from:
CanvasRenderingContext2D
var font: String

Default value 10px sans-serif

Default value 10px sans-serif

Attributes

Inherited from:
CanvasRenderingContext2D
var globalAlpha: Double

Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).

Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).

Attributes

Inherited from:
CanvasRenderingContext2D

With globalAlpha applied this sets how shapes and images are drawn onto the existing bitmap. Possible values: source-atop source-in source-out source-over (default) destination-atop destination-in destination-out destination-over lighter darker copy xor

With globalAlpha applied this sets how shapes and images are drawn onto the existing bitmap. Possible values: source-atop source-in source-out source-over (default) destination-atop destination-in destination-out destination-over lighter darker copy xor

Attributes

Inherited from:
CanvasRenderingContext2D
var imageSmoothingEnabled: Boolean

A boolean value indicating whether to smooth scaled images or not. The default value is true.

A boolean value indicating whether to smooth scaled images or not. The default value is true.

Attributes

Inherited from:
CanvasRenderingContext2D
var lineCap: String

Type of endings on the end of lines. Possible values: butt (default), round, square

Type of endings on the end of lines. Possible values: butt (default), round, square

Attributes

Inherited from:
CanvasRenderingContext2D
var lineDashOffset: Double

Specifies where to start a dasharray on a line.

Specifies where to start a dasharray on a line.

Attributes

Inherited from:
CanvasRenderingContext2D
var lineJoin: String

Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default)

Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default)

Attributes

Inherited from:
CanvasRenderingContext2D
var lineWidth: Double

Width of lines. Default 1.0

Width of lines. Default 1.0

Attributes

Inherited from:
CanvasRenderingContext2D
var miterLimit: Double

Default 10

Default 10

Attributes

Inherited from:
CanvasRenderingContext2D
var shadowBlur: Double

Specifies the blurring effect. Default 0

Specifies the blurring effect. Default 0

Attributes

Inherited from:
CanvasRenderingContext2D
var shadowColor: String

Color of the shadow. Default fully-transparent black.

Color of the shadow. Default fully-transparent black.

Attributes

Inherited from:
CanvasRenderingContext2D
var shadowOffsetX: Double

Horizontal distance the shadow will be offset. Default 0.

Horizontal distance the shadow will be offset. Default 0.

Attributes

Inherited from:
CanvasRenderingContext2D
var shadowOffsetY: Double

Vertical distance the shadow will be offset. Default 0.

Vertical distance the shadow will be offset. Default 0.

Attributes

Inherited from:
CanvasRenderingContext2D

A CSS color, a CanvasGradient or CanvasPattern, to use as a line around shapes.

A CSS color, a CanvasGradient or CanvasPattern, to use as a line around shapes.

Attributes

Inherited from:
CanvasRenderingContext2D
var textAlign: String

Possible values: start (default), end, left, right or center.

Possible values: start (default), end, left, right or center.

Attributes

Inherited from:
CanvasRenderingContext2D
var textBaseline: String

Possible values: top, hanging, middle, alphabetic (default), ideographic, bottom

Possible values: top, hanging, middle, alphabetic (default), ideographic, bottom

Attributes

Inherited from:
CanvasRenderingContext2D