Extensions

Class: Image

Image(texture)

 Image class
   - getBounds() includes the distortion corners, regardless of the renderer's useDistortion config

Constructor

new Image(texture)

Creates an instance of Image.
Parameters:
Name Type Description
texture TextureInfo
Properties:
Name Type Description
tintType TintType
blendMode BlendMode
textureTransform TextureTransform
textureCrop TextureCrop
distortion Distortion
texture TextureInfo
textureMatrixCache Array.<number>
textureCropCache Array.<number>
textureRepeatRandomCache Array.<number>
distortionCache Array.<number>
Source:

Extends

Classes

Image

Members

callbackAfterRender :function

 Set/Get after render callback
   - It will be called after the Item rendered
Type:
  • function
Overrides:
Source:

callbackBeforeRender :function

 Set/Get before render callback
   - It will be called before the Item rendered
Type:
  • function
Overrides:
Source:

(readonly) stage :StageContainer

Get StageContainer
Type:
Overrides:
Source:

(static) RENDERING_TYPE

Type "drawable"
Source:

Methods

callEventHandler(event)

 Handle event
   - It can handle mouse events if the item is interactive and has [
     onPointerOver,
     onPointerOut,
     onPointerMove,
     onPointerDown,
     onPointerUp,
     onPointerClick
   ] function
Parameters:
Name Type Description
event *
Overrides:
Source:

destruct()

Destruct class
Overrides:
Source:

getBounds() → {Rectangle}

 Returns with bounds
   - Uses the matrix cache of the last rendered frame; changes made since then are not included
   - Screen-space pixels: x / y are the left / top edge, width / height are the right / bottom
     edge coordinates (not the size)
Overrides:
Source:
Returns:
Type
Rectangle

isContainsPoint(point) → {boolean}

 Returns true if the Image contains the point
   - Uses the matrix cache of the last rendered frame; changes made since then are not included
Parameters:
Name Type Description
point Point
Source:
Returns:
Type
boolean

remove()

Remove Item from parent
Overrides:
Source:

update()

Update Image
Overrides:
Source: