Class: Image

Image(texture)

Image class

Constructor

new Image(texture)

Creates an instance of Image.
Parameters:
Name Type Description
texture TextureInfo
Properties:
Name Type Description
TintType Image.TintType
blendMode BlendMode
textureTransformProps TextureTransformProps
textureCrop TextureCrop
distortionProps DistortionProps
texture TextureInfo
textureMatrixCache Array.<number>
textureCropCache Array.<number>
textureRepeatRandomCache Array.<number>
distortionPropsCache 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:

parent :Container

Set/Get parent
Type:
Overrides:
Source:

(readonly) stage :StageContainer

Get StageContainer
Type:
Overrides:
Source:

(static) RENDERING_TYPE

Type "drawable"
Source:

(static) TintType

Tint type
Properties:
Name Type Description
NONE number output color = source color * 1 + tint color * 0
NORMAL number output color = source color * tint color
GRAYSCALE number output color = if source color red channel == source color green channel and source color red channel == source color blue channel then source color * tint color else source color
OVERRIDE number output color = tint color
ADD number output color = source color + tint color
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
Overrides:
Source:
Returns:
Type
Rectangle

getCorners() → {Array.<Point>}

Returns with the calculated corder positions
Overrides:
Source:
Returns:
Type
Array.<Point>

isContainsPoint(point) → {boolean}

Returns true if the Image contains the point
Parameters:
Name Type Description
point Point
Source:
Returns:
Type
boolean

remove()

Remove Item from parent
Overrides:
Source:

update()

Update Image
Overrides:
Source: