A display object supporting basic vector drawing functionality. In its current state, the main use of this class is to provide a range of forms that can be used as masks.

### Hierarchy

- DisplayObjectContainer
  - Canvas

## Index

### Constructors

- constructor

### Properties

- alpha
- base
- blendMode
- bounds
- filter
- height
- is3D
- mask
- maskInverted
- name
- numChildren
- parent
- pivotX
- pivotY
- requiresRedraw
- root
- rotation
- scale
- scaleX
- scaleY
- skewX
- skewY
- stage
- touchGroup
- touchable
- transformationMatrix
- transformationMatrix3D
- useHandCursor
- visible
- width
- x
- y

### Methods

- addChild
- addChildAt
- addEventListener
- alignPivot
- beginFill
- broadcastEvent
- broadcastEventWith
- clear
- contains
- dispatchEvent
- dispatchEventWith
- dispose
- drawCircle
- drawEllipse
- drawPolygon
- drawRectangle
- drawToBitmapData
- endFill
- getBounds
- getChildAt
- getChildByName
- getChildIndex
- getTransformationMatrix
- getTransformationMatrix3D
- get_alpha
- get_base
- get_blendMode
- get_bounds
- get_filter
- get_height
- get_is3D
- get_mask
- get_maskInverted
- get_name
- get_numChildren
- get_parent
- get_pivotX
- get_pivotY
- get_requiresRedraw
- get_root
- get_rotation
- get_scale
- get_scaleX
- get_scaleY
- get_skewX
- get_skewY
- get_stage
- get_touchGroup
- get_touchable
- get_transformationMatrix
- get_transformationMatrix3D
- get_useHandCursor
- get_visible
- get_width
- get_x
- get_y
- globalToLocal
- globalToLocal3D
- hasEventListener
- hitTest
- hitTestMask
- local3DToGlobal
- localToGlobal
- removeChild
- removeChildAt
- removeChildren
- removeEventListener
- removeEventListeners
- removeFromParent
- render
- setChildIndex
- setRequiresRedraw
- set_alpha
- set_blendMode
- set_filter
- set_height
- set_mask
- set_maskInverted
- set_name
- set_pivotX
- set_pivotY
- set_rotation
- set_scale
- set_scaleX
- set_scaleY
- set_skewX
- set_skewY
- set_touchGroup
- set_touchable
- set_transformationMatrix
- set_useHandCursor
- set_visible
- set_width
- set_x
- set_y
- sortChildren
- swapChildren
- swapChildrenAt

## Constructors

### constructor

- new Canvas(): Canvas

- Overrides EventDispatcher.constructor

  - Defined in lib/starling/display/Canvas.d.ts:12

  Creates a new (empty) Canvas. Call one or more of the 'draw' methods to add content.

  #### Returns Canvas

## Properties

### alpha

alpha: number

Inherited from DisplayObject.alpha

- Defined in lib/starling/display/DisplayObject.d.ts:331

The opacity of the object. 0 = transparent, 1 = opaque. @default 1

### base

base: DisplayObject

Inherited from DisplayObject.base

- Defined in lib/starling/display/DisplayObject.d.ts:417

The topmost object in the display tree the object is part of.

### blendMode

blendMode: string

Inherited from DisplayObject.blendMode

- Defined in lib/starling/display/DisplayObject.d.ts:348

The blend mode determines how the object is blended with the objects underneath.

default

  auto

see

  starling.display.BlendMode

### bounds

bounds: Rectangle

Inherited from DisplayObject.bounds

- Defined in lib/starling/display/DisplayObject.d.ts:259

The bounds of the object relative to the local coordinates of the parent.

### filter

filter: FragmentFilter

Inherited from DisplayObject.filter

- Defined in lib/starling/display/DisplayObject.d.ts:371

The filter that is attached to the display object. The `starling.filters` package contains several classes that define specific filters you can use. To combine several filters, assign an instance of the `FilterChain` class; to remove all filters, assign `null`.

Beware that a filter instance may only be used on one object at a time! Furthermore, when you remove or replace a filter, it is NOT disposed automatically (since you might want to reuse it on a different object).

@default null @see starling.filters.FragmentFilter @see starling.filters.FilterChain

### height

height: number

Inherited from DisplayObject.height

- Defined in lib/starling/display/DisplayObject.d.ts:272

The height of the object in pixels. Note that for objects in a 3D space (connected to a Sprite3D), this value might not be accurate until the object is part of the display list.

### is3D

is3D: boolean

Inherited from DisplayObject.is3D

- Defined in lib/starling/display/DisplayObject.d.ts:249

Indicates if this object or any of its parents is a 'Sprite3D' object.

### mask

mask: DisplayObject

Inherited from DisplayObject.mask

- Defined in lib/starling/display/DisplayObject.d.ts:403

The display object that acts as a mask for the current object. Assign `null` to remove it.

A pixel of the masked display object will only be drawn if it is within one of the mask's polygons. Texture pixels and alpha values of the mask are not taken into account. The mask object itself is never visible.

If the mask is part of the display list, masking will occur at exactly the location it occupies on the stage. If it is not, the mask will be placed in the local coordinate system of the target object (as if it was one of its children).

For rectangular masks, you can use simple quads; for other forms (like circles or arbitrary shapes) it is recommended to use a 'Canvas' instance.

Note: a mask will typically cause at least two additional draw calls: one to draw the mask to the stencil buffer and one to erase it. However, if the mask object is an instance of `starling.display.Quad` and is aligned parallel to the stage axes, rendering will be optimized: instead of using the stencil buffer, the object will be clipped using the scissor rectangle. That's faster and reduces the number of draw calls, so make use of this when possible.

Note: AIR apps require the `depthAndStencil` node in the application descriptor XMLs to be enabled! Otherwise, stencil masking won't work.

@see Canvas @default null

### maskInverted

maskInverted: boolean

Inherited from DisplayObject.maskInverted

- Defined in lib/starling/display/DisplayObject.d.ts:408

Indicates if the masked region of this object is set to be inverted.

### name

name: string

Inherited from DisplayObject.name

- Defined in lib/starling/display/DisplayObject.d.ts:354

The name of the display object (default: null). Used by 'getChildByName()' of display object containers.

### numChildren

numChildren: number

Inherited from DisplayObjectContainer.numChildren

- Defined in lib/starling/display/DisplayObjectContainer.d.ts:116

The number of children of this container.

### parent

parent: DisplayObjectContainer

Inherited from DisplayObject.parent

- Defined in lib/starling/display/DisplayObject.d.ts:413

The display object container that contains this display object.

### pivotX

pivotX: number

Inherited from DisplayObject.pivotX

- Defined in lib/starling/display/DisplayObject.d.ts:287

The x coordinate of the object's origin in its own coordinate space (default: 0).

### pivotY

pivotY: number

Inherited from DisplayObject.pivotY

- Defined in lib/starling/display/DisplayObject.d.ts:292

The y coordinate of the object's origin in its own coordinate space (default: 0).

### requiresRedraw

requiresRedraw: boolean

Inherited from DisplayObject.requiresRedraw

- Defined in lib/starling/display/DisplayObject.d.ts:199

Indicates if the object needs to be redrawn in the upcoming frame, i.e. if it has changed its location relative to the stage or some other aspect of its appearance since it was last rendered.

### root

root: DisplayObject

Inherited from DisplayObject.root

- Defined in lib/starling/display/DisplayObject.d.ts:423

The root object the display object is connected to (i.e. an instance of the class that was passed to the Starling constructor), or null if the object is not connected to the stage.

### rotation

rotation: number

Inherited from DisplayObject.rotation

- Defined in lib/starling/display/DisplayObject.d.ts:326

The rotation of the object in radians. (In Starling, all angles are measured in radians.)

### scale

scale: number

Inherited from DisplayObject.scale

- Defined in lib/starling/display/DisplayObject.d.ts:310

Sets both 'scaleX' and 'scaleY' to the same value. The getter simply returns the value of 'scaleX' (even if the scaling values are different). @default 1

### scaleX

scaleX: number

Inherited from DisplayObject.scaleX

- Defined in lib/starling/display/DisplayObject.d.ts:298

The horizontal scale factor. '1' means no scale, negative values flip the object.

default

  1

### scaleY

scaleY: number

Inherited from DisplayObject.scaleY

- Defined in lib/starling/display/DisplayObject.d.ts:304

The vertical scale factor. '1' means no scale, negative values flip the object.

default

  1

### skewX

skewX: number

Inherited from DisplayObject.skewX

- Defined in lib/starling/display/DisplayObject.d.ts:315

The horizontal skew angle in radians.

### skewY

skewY: number

Inherited from DisplayObject.skewY

- Defined in lib/starling/display/DisplayObject.d.ts:320

The vertical skew angle in radians.

### stage

stage: Stage

Inherited from DisplayObject.stage

- Defined in lib/starling/display/DisplayObject.d.ts:428

The stage the display object is connected to, or null if it is not connected to the stage.

### touchGroup

touchGroup: boolean

Inherited from DisplayObjectContainer.touchGroup

- Defined in lib/starling/display/DisplayObjectContainer.d.ts:123

If a container is a 'touchGroup', it will act as a single touchable object. Touch events will have the container as target, not the touched child. (Similar to 'mouseChildren' in the classic display list, but with inverted logic.)

default

  false

### touchable

touchable: boolean

Inherited from DisplayObject.touchable

- Defined in lib/starling/display/DisplayObject.d.ts:341

Indicates if this object (and its children) will receive touch events.

### transformationMatrix

transformationMatrix: Matrix

Inherited from DisplayObject.transformationMatrix

- Defined in lib/starling/display/DisplayObject.d.ts:235

The transformation matrix of the object relative to its parent.

If you assign a custom transformation matrix, Starling will try to figure out suitable values for `x, y, scaleX, scaleY,` and `rotation`. However, if the matrix was created in a different way, this might not be possible. In that case, Starling will apply the matrix, but not update the corresponding properties.

CAUTION: not a copy, but the actual object!

### transformationMatrix3D

transformationMatrix3D: Matrix3D

Inherited from DisplayObject.transformationMatrix3D

- Defined in lib/starling/display/DisplayObject.d.ts:245

The 3D transformation matrix of the object relative to its parent.

For 2D objects, this property returns just a 3D version of the 2D transformation matrix. Only the 'Sprite3D' class supports real 3D transformations.

CAUTION: not a copy, but the actual object!

### useHandCursor

useHandCursor: boolean

Inherited from DisplayObject.useHandCursor

- Defined in lib/starling/display/DisplayObject.d.ts:254

Indicates if the mouse cursor should transform into a hand while it's over the sprite.

default

  false

### visible

visible: boolean

Inherited from DisplayObject.visible

- Defined in lib/starling/display/DisplayObject.d.ts:336

The visibility of the object. An invisible object will be untouchable.

### width

width: number

Inherited from DisplayObject.width

- Defined in lib/starling/display/DisplayObject.d.ts:265

The width of the object in pixels. Note that for objects in a 3D space (connected to a Sprite3D), this value might not be accurate until the object is part of the display list.

### x

x: number

Inherited from DisplayObject.x

- Defined in lib/starling/display/DisplayObject.d.ts:277

The x coordinate of the object relative to the local coordinates of the parent.

### y

y: number

Inherited from DisplayObject.y

- Defined in lib/starling/display/DisplayObject.d.ts:282

The y coordinate of the object relative to the local coordinates of the parent.

## Methods

### addChild

- addChild(child: DisplayObject): DisplayObject

- Inherited from DisplayObjectContainer.addChild

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:54

  Adds a child to the container. It will be at the frontmost position.

  #### Parameters

  - ##### child: DisplayObject

  #### Returns DisplayObject

### addChildAt

- addChildAt(child: DisplayObject, index: number): DisplayObject

- Inherited from DisplayObjectContainer.addChildAt

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:57

  Adds a child to the container at a certain index.

  #### Parameters

  - ##### child: DisplayObject

  - ##### index: number

  #### Returns DisplayObject

### addEventListener

- addEventListener(type: string, listener: Function): void

- Inherited from DisplayObject.addEventListener

  Overrides EventDispatcher.addEventListener

  - Defined in lib/starling/display/DisplayObject.d.ts:216
  inheritdoc

  #### Parameters

  - ##### type: string

  - ##### listener: Function

  #### Returns void

### alignPivot

- alignPivot(horizontalAlign?: string, verticalAlign?: string): void

- Inherited from DisplayObject.alignPivot

  - Defined in lib/starling/display/DisplayObject.d.ts:142

  Moves the pivot point to a certain position within the local coordinate system of the object. If you pass no arguments, it will be centered.

  #### Parameters

  - ##### Optional horizontalAlign: string

  - ##### Optional verticalAlign: string

  #### Returns void

### beginFill

- beginFill(color?: number, alpha?: number): void

- - Defined in lib/starling/display/Canvas.d.ts:36

  Specifies a simple one-color fill that subsequent calls to drawing methods (such as `drawCircle()`) will use.

  #### Parameters

  - ##### Optional color: number

  - ##### Optional alpha: number

  #### Returns void

### broadcastEvent

- broadcastEvent(event: Event): void

- Inherited from DisplayObjectContainer.broadcastEvent

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:109

  Dispatches an event on all children (recursively). The event must not bubble.

  #### Parameters

  - ##### event: Event

  #### Returns void

### broadcastEventWith

- broadcastEventWith(eventType: string, data?: any): void

- Inherited from DisplayObjectContainer.broadcastEventWith

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:113

  Dispatches an event with the given parameters on all children (recursively). The method uses an internal pool of event objects to avoid allocations.

  #### Parameters

  - ##### eventType: string

  - ##### Optional data: any

  #### Returns void

### clear

- clear(): void

- - Defined in lib/starling/display/Canvas.d.ts:42

  Removes all existing vertices.

  #### Returns void

### contains

- contains(child: DisplayObject): boolean

- Inherited from DisplayObjectContainer.contains

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:95

  Determines if a certain object is a child of the container (recursively).

  #### Parameters

  - ##### child: DisplayObject

  #### Returns boolean

### dispatchEvent

- dispatchEvent(event: Event): void

- Inherited from EventDispatcher.dispatchEvent

  - Defined in lib/starling/events/EventDispatcher.d.ts:45

  Dispatches an event to all objects that have registered listeners for its type. If an event with enabled 'bubble' property is dispatched to a display object, it will travel up along the line of parents, until it either hits the root object or someone stops its propagation manually.

  #### Parameters

  - ##### event: Event

  #### Returns void

### dispatchEventWith

- dispatchEventWith(type: string, bubbles?: boolean, data?: any): void

- Inherited from EventDispatcher.dispatchEventWith

  - Defined in lib/starling/events/EventDispatcher.d.ts:50

  Dispatches an event with the given parameters to all objects that have registered listeners for the given type. The method uses an internal pool of event objects to avoid allocations.

  #### Parameters

  - ##### type: string

  - ##### Optional bubbles: boolean

  - ##### Optional data: any

  #### Returns void

### dispose

- dispose(): void

- Overrides DisplayObjectContainer.dispose

  - Defined in lib/starling/display/Canvas.d.ts:17
  inheritdoc

  #### Returns void

### drawCircle

- drawCircle(x: number, y: number, radius: number): void

- - Defined in lib/starling/display/Canvas.d.ts:23

  Draws a circle.

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### radius: number

  #### Returns void

### drawEllipse

- drawEllipse(x: number, y: number, width: number, height: number): void

- - Defined in lib/starling/display/Canvas.d.ts:26

  Draws an ellipse.

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### width: number

  - ##### height: number

  #### Returns void

### drawPolygon

- drawPolygon(polygon: Polygon): void

- - Defined in lib/starling/display/Canvas.d.ts:32

  Draws an arbitrary polygon.

  #### Parameters

  - ##### polygon: Polygon

  #### Returns void

### drawRectangle

- drawRectangle(x: number, y: number, width: number, height: number): void

- - Defined in lib/starling/display/Canvas.d.ts:29

  Draws a rectangle.

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### width: number

  - ##### height: number

  #### Returns void

### drawToBitmapData

- drawToBitmapData(out?: BitmapData, color?: number, alpha?: number): BitmapData

- Inherited from DisplayObject.drawToBitmapData

  - Defined in lib/starling/display/DisplayObject.d.ts:157

  Draws the object into a BitmapData object.

  This is achieved by drawing the object into the back buffer and then copying the pixels of the back buffer into a texture. This also means that the returned bitmap data cannot be bigger than the current viewPort.

  @param out If you pass null, the object will be created for you. If you pass a BitmapData object, it should have the size of the object bounds, multiplied by the current contentScaleFactor. @param color The RGB color value with which the bitmap will be initialized. @param alpha The alpha value with which the bitmap will be initialized.

  #### Parameters

  - ##### Optional out: BitmapData

  - ##### Optional color: number

  - ##### Optional alpha: number

  #### Returns BitmapData

### endFill

- endFill(): void

- - Defined in lib/starling/display/Canvas.d.ts:39

  Resets the color to 'white' and alpha to '1'.

  #### Returns void

### getBounds

- getBounds(targetSpace: DisplayObject, out?: Rectangle): Rectangle

- Inherited from DisplayObjectContainer.getBounds

  Overrides DisplayObject.getBounds

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:100
  inheritdoc

  #### Parameters

  - ##### targetSpace: DisplayObject

  - ##### Optional out: Rectangle

  #### Returns Rectangle

### getChildAt

- getChildAt(index: number): DisplayObject

- Inherited from DisplayObjectContainer.getChildAt

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:73

  Returns a child object at a certain index. If you pass a negative index, '-1' will return the last child, '-2' the second to last child, etc.

  #### Parameters

  - ##### index: number

  #### Returns DisplayObject

### getChildByName

- getChildByName(name: string): DisplayObject

- Inherited from DisplayObjectContainer.getChildByName

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:76

  Returns a child object with a certain name (non-recursively).

  #### Parameters

  - ##### name: string

  #### Returns DisplayObject

### getChildIndex

- getChildIndex(child: DisplayObject): number

- Inherited from DisplayObjectContainer.getChildIndex

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:79

  Returns the index of a child within the container, or "-1" if it is not found.

  #### Parameters

  - ##### child: DisplayObject

  #### Returns number

### getTransformationMatrix

- getTransformationMatrix(targetSpace: DisplayObject, out?: Matrix): Matrix

- Inherited from DisplayObject.getTransformationMatrix

  - Defined in lib/starling/display/DisplayObject.d.ts:105

  Creates a matrix that represents the transformation from the local coordinate system to another. If you pass an `out`-matrix, the result will be stored in this matrix instead of creating a new object.

  #### Parameters

  - ##### targetSpace: DisplayObject

  - ##### Optional out: Matrix

  #### Returns Matrix

### getTransformationMatrix3D

- getTransformationMatrix3D(targetSpace: DisplayObject, out?: Matrix3D): Matrix3D

- Inherited from DisplayObject.getTransformationMatrix3D

  - Defined in lib/starling/display/DisplayObject.d.ts:166

  Creates a matrix that represents the transformation from the local coordinate system to another. This method supports three dimensional objects created via 'Sprite3D'. If you pass an `out`-matrix, the result will be stored in this matrix instead of creating a new object.

  #### Parameters

  - ##### targetSpace: DisplayObject

  - ##### Optional out: Matrix3D

  #### Returns Matrix3D

### Protected get_alpha

- get_alpha(): number

- Inherited from DisplayObject.get_alpha

  - Defined in lib/starling/display/DisplayObject.d.ts:332

  #### Returns number

### Protected get_base

- get_base(): DisplayObject

- Inherited from DisplayObject.get_base

  - Defined in lib/starling/display/DisplayObject.d.ts:418

  #### Returns DisplayObject

### Protected get_blendMode

- get_blendMode(): string

- Inherited from DisplayObject.get_blendMode

  - Defined in lib/starling/display/DisplayObject.d.ts:349

  #### Returns string

### Protected get_bounds

- get_bounds(): Rectangle

- Inherited from DisplayObject.get_bounds

  - Defined in lib/starling/display/DisplayObject.d.ts:260

  #### Returns Rectangle

### Protected get_filter

- get_filter(): FragmentFilter

- Inherited from DisplayObject.get_filter

  - Defined in lib/starling/display/DisplayObject.d.ts:372

  #### Returns FragmentFilter

### Protected get_height

- get_height(): number

- Inherited from DisplayObject.get_height

  - Defined in lib/starling/display/DisplayObject.d.ts:273

  #### Returns number

### Protected get_is3D

- get_is3D(): boolean

- Inherited from DisplayObject.get_is3D

  - Defined in lib/starling/display/DisplayObject.d.ts:250

  #### Returns boolean

### Protected get_mask

- get_mask(): DisplayObject

- Inherited from DisplayObject.get_mask

  - Defined in lib/starling/display/DisplayObject.d.ts:404

  #### Returns DisplayObject

### Protected get_maskInverted

- get_maskInverted(): boolean

- Inherited from DisplayObject.get_maskInverted

  - Defined in lib/starling/display/DisplayObject.d.ts:409

  #### Returns boolean

### Protected get_name

- get_name(): string

- Inherited from DisplayObject.get_name

  - Defined in lib/starling/display/DisplayObject.d.ts:355

  #### Returns string

### Protected get_numChildren

- get_numChildren(): number

- Inherited from DisplayObjectContainer.get_numChildren

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:117

  #### Returns number

### Protected get_parent

- get_parent(): DisplayObjectContainer

- Inherited from DisplayObject.get_parent

  - Defined in lib/starling/display/DisplayObject.d.ts:414

  #### Returns DisplayObjectContainer

### Protected get_pivotX

- get_pivotX(): number

- Inherited from DisplayObject.get_pivotX

  - Defined in lib/starling/display/DisplayObject.d.ts:288

  #### Returns number

### Protected get_pivotY

- get_pivotY(): number

- Inherited from DisplayObject.get_pivotY

  - Defined in lib/starling/display/DisplayObject.d.ts:293

  #### Returns number

### Protected get_requiresRedraw

- get_requiresRedraw(): boolean

- Inherited from DisplayObject.get_requiresRedraw

  - Defined in lib/starling/display/DisplayObject.d.ts:200

  #### Returns boolean

### Protected get_root

- get_root(): DisplayObject

- Inherited from DisplayObject.get_root

  - Defined in lib/starling/display/DisplayObject.d.ts:424

  #### Returns DisplayObject

### Protected get_rotation

- get_rotation(): number

- Inherited from DisplayObject.get_rotation

  - Defined in lib/starling/display/DisplayObject.d.ts:327

  #### Returns number

### Protected get_scale

- get_scale(): number

- Inherited from DisplayObject.get_scale

  - Defined in lib/starling/display/DisplayObject.d.ts:311

  #### Returns number

### Protected get_scaleX

- get_scaleX(): number

- Inherited from DisplayObject.get_scaleX

  - Defined in lib/starling/display/DisplayObject.d.ts:299

  #### Returns number

### Protected get_scaleY

- get_scaleY(): number

- Inherited from DisplayObject.get_scaleY

  - Defined in lib/starling/display/DisplayObject.d.ts:305

  #### Returns number

### Protected get_skewX

- get_skewX(): number

- Inherited from DisplayObject.get_skewX

  - Defined in lib/starling/display/DisplayObject.d.ts:316

  #### Returns number

### Protected get_skewY

- get_skewY(): number

- Inherited from DisplayObject.get_skewY

  - Defined in lib/starling/display/DisplayObject.d.ts:321

  #### Returns number

### Protected get_stage

- get_stage(): Stage

- Inherited from DisplayObject.get_stage

  - Defined in lib/starling/display/DisplayObject.d.ts:429

  #### Returns Stage

### Protected get_touchGroup

- get_touchGroup(): boolean

- Inherited from DisplayObjectContainer.get_touchGroup

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:124

  #### Returns boolean

### Protected get_touchable

- get_touchable(): boolean

- Inherited from DisplayObject.get_touchable

  - Defined in lib/starling/display/DisplayObject.d.ts:342

  #### Returns boolean

### Protected get_transformationMatrix

- get_transformationMatrix(): Matrix

- Inherited from DisplayObject.get_transformationMatrix

  - Defined in lib/starling/display/DisplayObject.d.ts:236

  #### Returns Matrix

### Protected get_transformationMatrix3D

- get_transformationMatrix3D(): Matrix3D

- Inherited from DisplayObject.get_transformationMatrix3D

  - Defined in lib/starling/display/DisplayObject.d.ts:246

  #### Returns Matrix3D

### Protected get_useHandCursor

- get_useHandCursor(): boolean

- Inherited from DisplayObject.get_useHandCursor

  - Defined in lib/starling/display/DisplayObject.d.ts:255

  #### Returns boolean

### Protected get_visible

- get_visible(): boolean

- Inherited from DisplayObject.get_visible

  - Defined in lib/starling/display/DisplayObject.d.ts:337

  #### Returns boolean

### Protected get_width

- get_width(): number

- Inherited from DisplayObject.get_width

  - Defined in lib/starling/display/DisplayObject.d.ts:266

  #### Returns number

### Protected get_x

- get_x(): number

- Inherited from DisplayObject.get_x

  - Defined in lib/starling/display/DisplayObject.d.ts:278

  #### Returns number

### Protected get_y

- get_y(): number

- Inherited from DisplayObject.get_y

  - Defined in lib/starling/display/DisplayObject.d.ts:283

  #### Returns number

### globalToLocal

- globalToLocal(globalPoint: Point, out?: Point): Point

- Inherited from DisplayObject.globalToLocal

  - Defined in lib/starling/display/DisplayObject.d.ts:130

  Transforms a point from global (stage) coordinates to the local coordinate system. If you pass an `out`-point, the result will be stored in this point instead of creating a new object.

  #### Parameters

  - ##### globalPoint: Point

  - ##### Optional out: Point

  #### Returns Point

### globalToLocal3D

- globalToLocal3D(globalPoint: Point, out?: Vector3D): Vector3D

- Inherited from DisplayObject.globalToLocal3D

  - Defined in lib/starling/display/DisplayObject.d.ts:179

  Transforms a point from global (stage) coordinates to the 3D local coordinate system. If you pass an `out`-vector, the result will be stored in this point instead of creating a new object.

  #### Parameters

  - ##### globalPoint: Point

  - ##### Optional out: Vector3D

  #### Returns Vector3D

### hasEventListener

- hasEventListener(type: string, listener?: any): boolean

- Inherited from EventDispatcher.hasEventListener

  - Defined in lib/starling/events/EventDispatcher.d.ts:55

  If called with one argument, figures out if there are any listeners registered for the given event type. If called with two arguments, also determines if a specific listener is registered.

  #### Parameters

  - ##### type: string

  - ##### Optional listener: any

  #### Returns boolean

### hitTest

- hitTest(localPoint: Point): DisplayObject

- Overrides DisplayObjectContainer.hitTest

  - Defined in lib/starling/display/Canvas.d.ts:20
  inheritdoc

  #### Parameters

  - ##### localPoint: Point

  #### Returns DisplayObject

### hitTestMask

- hitTestMask(localPoint: Point): boolean

- Inherited from DisplayObject.hitTestMask

  - Defined in lib/starling/display/DisplayObject.d.ts:120

  Checks if a certain point is inside the display object's mask. If there is no mask, this method always returns `true` (because having no mask is equivalent to having one that's infinitely big).

  #### Parameters

  - ##### localPoint: Point

  #### Returns boolean

### local3DToGlobal

- local3DToGlobal(localPoint: Vector3D, out?: Point): Point

- Inherited from DisplayObject.local3DToGlobal

  - Defined in lib/starling/display/DisplayObject.d.ts:174

  Transforms a 3D point from the local coordinate system to global (stage) coordinates. This is achieved by projecting the 3D point onto the (2D) view plane.

  If you pass an `out`-point, the result will be stored in this point instead of creating a new object.

  #### Parameters

  - ##### localPoint: Vector3D

  - ##### Optional out: Point

  #### Returns Point

### localToGlobal

- localToGlobal(localPoint: Point, out?: Point): Point

- Inherited from DisplayObject.localToGlobal

  - Defined in lib/starling/display/DisplayObject.d.ts:125

  Transforms a point from the local coordinate system to global (stage) coordinates. If you pass an `out`-point, the result will be stored in this point instead of creating a new object.

  #### Parameters

  - ##### localPoint: Point

  - ##### Optional out: Point

  #### Returns Point

### removeChild

- removeChild(child: DisplayObject, dispose?: boolean): DisplayObject

- Inherited from DisplayObjectContainer.removeChild

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:61

  Removes a child from the container. If the object is not a child, the method returns `null`. If requested, the child will be disposed right away.

  #### Parameters

  - ##### child: DisplayObject

  - ##### Optional dispose: boolean

  #### Returns DisplayObject

### removeChildAt

- removeChildAt(index: number, dispose?: boolean): DisplayObject

- Inherited from DisplayObjectContainer.removeChildAt

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:65

  Removes a child at a certain index. The index positions of any display objects above the child are decreased by 1. If requested, the child will be disposed right away.

  #### Parameters

  - ##### index: number

  - ##### Optional dispose: boolean

  #### Returns DisplayObject

### removeChildren

- removeChildren(beginIndex?: number, endIndex?: number, dispose?: boolean): void

- Inherited from DisplayObjectContainer.removeChildren

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:69

  Removes a range of children from the container (endIndex included). If no arguments are given, all children will be removed.

  #### Parameters

  - ##### Optional beginIndex: number

  - ##### Optional endIndex: number

  - ##### Optional dispose: boolean

  #### Returns void

### removeEventListener

- removeEventListener(type: string, listener: Function): void

- Inherited from DisplayObject.removeEventListener

  Overrides EventDispatcher.removeEventListener

  - Defined in lib/starling/display/DisplayObject.d.ts:219
  inheritdoc

  #### Parameters

  - ##### type: string

  - ##### listener: Function

  #### Returns void

### removeEventListeners

- removeEventListeners(type?: string): void

- Inherited from DisplayObject.removeEventListeners

  Overrides EventDispatcher.removeEventListeners

  - Defined in lib/starling/display/DisplayObject.d.ts:222
  inheritdoc

  #### Parameters

  - ##### Optional type: string

  #### Returns void

### removeFromParent

- removeFromParent(dispose?: boolean): void

- Inherited from DisplayObject.removeFromParent

  - Defined in lib/starling/display/DisplayObject.d.ts:100

  Removes the object from its parent, if it has one, and optionally disposes it.

  #### Parameters

  - ##### Optional dispose: boolean

  #### Returns void

### render

- render(painter: Painter): void

- Inherited from DisplayObjectContainer.render

  Overrides DisplayObject.render

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:106
  inheritdoc

  #### Parameters

  - ##### painter: Painter

  #### Returns void

### setChildIndex

- setChildIndex(child: DisplayObject, index: number): void

- Inherited from DisplayObjectContainer.setChildIndex

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:82

  Moves a child to a certain index. Children at and after the replaced position move up.

  #### Parameters

  - ##### child: DisplayObject

  - ##### index: number

  #### Returns void

### setRequiresRedraw

- setRequiresRedraw(): void

- Inherited from DisplayObject.setRequiresRedraw

  - Defined in lib/starling/display/DisplayObject.d.ts:194

  Forces the object to be redrawn in the next frame. This will prevent the object to be drawn from the render cache.

  This method is called every time the object changes in any way. When creating custom mesh styles or any other custom rendering code, call this method if the object needs to be redrawn.

  If the object needs to be redrawn just because it does not support the render cache, call `painter.excludeFromCache()` in the object's render method instead. That way, Starling's `skipUnchangedFrames` policy won't be disrupted.

  #### Returns void

### Protected set_alpha

- set_alpha(value: number): number

- Inherited from DisplayObject.set_alpha

  - Defined in lib/starling/display/DisplayObject.d.ts:333

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_blendMode

- set_blendMode(value: string): string

- Inherited from DisplayObject.set_blendMode

  - Defined in lib/starling/display/DisplayObject.d.ts:350

  #### Parameters

  - ##### value: string

  #### Returns string

### Protected set_filter

- set_filter(value: FragmentFilter): FragmentFilter

- Inherited from DisplayObject.set_filter

  - Defined in lib/starling/display/DisplayObject.d.ts:373

  #### Parameters

  - ##### value: FragmentFilter

  #### Returns FragmentFilter

### Protected set_height

- set_height(value: number): number

- Inherited from DisplayObject.set_height

  - Defined in lib/starling/display/DisplayObject.d.ts:274

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_mask

- set_mask(value: DisplayObject): DisplayObject

- Inherited from DisplayObject.set_mask

  - Defined in lib/starling/display/DisplayObject.d.ts:405

  #### Parameters

  - ##### value: DisplayObject

  #### Returns DisplayObject

### Protected set_maskInverted

- set_maskInverted(value: boolean): boolean

- Inherited from DisplayObject.set_maskInverted

  - Defined in lib/starling/display/DisplayObject.d.ts:410

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_name

- set_name(value: string): string

- Inherited from DisplayObject.set_name

  - Defined in lib/starling/display/DisplayObject.d.ts:356

  #### Parameters

  - ##### value: string

  #### Returns string

### Protected set_pivotX

- set_pivotX(value: number): number

- Inherited from DisplayObject.set_pivotX

  - Defined in lib/starling/display/DisplayObject.d.ts:289

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_pivotY

- set_pivotY(value: number): number

- Inherited from DisplayObject.set_pivotY

  - Defined in lib/starling/display/DisplayObject.d.ts:294

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_rotation

- set_rotation(value: number): number

- Inherited from DisplayObject.set_rotation

  - Defined in lib/starling/display/DisplayObject.d.ts:328

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_scale

- set_scale(value: number): number

- Inherited from DisplayObject.set_scale

  - Defined in lib/starling/display/DisplayObject.d.ts:312

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_scaleX

- set_scaleX(value: number): number

- Inherited from DisplayObject.set_scaleX

  - Defined in lib/starling/display/DisplayObject.d.ts:300

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_scaleY

- set_scaleY(value: number): number

- Inherited from DisplayObject.set_scaleY

  - Defined in lib/starling/display/DisplayObject.d.ts:306

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_skewX

- set_skewX(value: number): number

- Inherited from DisplayObject.set_skewX

  - Defined in lib/starling/display/DisplayObject.d.ts:317

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_skewY

- set_skewY(value: number): number

- Inherited from DisplayObject.set_skewY

  - Defined in lib/starling/display/DisplayObject.d.ts:322

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_touchGroup

- set_touchGroup(value: boolean): boolean

- Inherited from DisplayObjectContainer.set_touchGroup

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:125

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_touchable

- set_touchable(value: boolean): boolean

- Inherited from DisplayObject.set_touchable

  - Defined in lib/starling/display/DisplayObject.d.ts:343

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_transformationMatrix

- set_transformationMatrix(matrix: Matrix): Matrix

- Inherited from DisplayObject.set_transformationMatrix

  - Defined in lib/starling/display/DisplayObject.d.ts:237

  #### Parameters

  - ##### matrix: Matrix

  #### Returns Matrix

### Protected set_useHandCursor

- set_useHandCursor(value: boolean): boolean

- Inherited from DisplayObject.set_useHandCursor

  - Defined in lib/starling/display/DisplayObject.d.ts:256

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_visible

- set_visible(value: boolean): boolean

- Inherited from DisplayObject.set_visible

  - Defined in lib/starling/display/DisplayObject.d.ts:338

  #### Parameters

  - ##### value: boolean

  #### Returns boolean

### Protected set_width

- set_width(value: number): number

- Inherited from DisplayObject.set_width

  - Defined in lib/starling/display/DisplayObject.d.ts:267

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_x

- set_x(value: number): number

- Inherited from DisplayObject.set_x

  - Defined in lib/starling/display/DisplayObject.d.ts:279

  #### Parameters

  - ##### value: number

  #### Returns number

### Protected set_y

- set_y(value: number): number

- Inherited from DisplayObject.set_y

  - Defined in lib/starling/display/DisplayObject.d.ts:284

  #### Parameters

  - ##### value: number

  #### Returns number

### sortChildren

- sortChildren(compareFunction: function): void

- Inherited from DisplayObjectContainer.sortChildren

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:92

  Sorts the children according to a given (that works just like the sort function of the Vector class).

  #### Parameters

  - ##### compareFunction: function

    - - (a: DisplayObject, b: DisplayObject): number

      - #### Parameters

        - ##### a: DisplayObject

        - ##### b: DisplayObject

        #### Returns number

  #### Returns void

### swapChildren

- swapChildren(child1: DisplayObject, child2: DisplayObject): void

- Inherited from DisplayObjectContainer.swapChildren

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:85

  Swaps the indexes of two children.

  #### Parameters

  - ##### child1: DisplayObject

  - ##### child2: DisplayObject

  #### Returns void

### swapChildrenAt

- swapChildrenAt(index1: number, index2: number): void

- Inherited from DisplayObjectContainer.swapChildrenAt

  - Defined in lib/starling/display/DisplayObjectContainer.d.ts:88

  Swaps the indexes of two children.

  #### Parameters

  - ##### index1: number

  - ##### index2: number

  #### Returns void

Generated using TypeDoc