Class: DisplayObject

PhotoEditorSDK.Engine. DisplayObject

The base class for all objects that can be displayed on the screen

new PhotoEditorSDK.Engine.DisplayObject()

sdk/engine/display/display-object.js, line 23

Creates a DisplayObject

Methods

addShader(shader)

sdk/engine/display/display-object.js, line 107

Pushes the given shader to the list of shaders

Name Type Description
shader PhotoEditorSDK.Engine.Shader

getAlpha(){Number}

sdk/engine/display/display-object.js, line 231

Returns the current alpha (0...1)

Returns:
Type Description
Number

getBounds(){PhotoEditorSDK.Math.Rectangle}

sdk/engine/display/display-object.js, line 142

Returns the bounds for this DisplayObject

Returns:
Type Description
PhotoEditorSDK.Math.Rectangle

getFilterRectangle(){PhotoEditorSDK.Math.Rectangle}

sdk/engine/display/display-object.js, line 273

Returns the filter rectangle

Returns:
Type Description
PhotoEditorSDK.Math.Rectangle rectangle

getParent(){PhotoEditorSDK.Engine.DisplayObject}

sdk/engine/display/display-object.js, line 261

Returns the parent object

Returns:
Type Description
PhotoEditorSDK.Engine.DisplayObject

getPivot(){PhotoEditorSDK.Math.Vector2}

sdk/engine/display/display-object.js, line 194

Returns the current pivot (The point that this Displayobject rotates around)

Returns:
Type Description
PhotoEditorSDK.Math.Vector2

getPosition(){PhotoEditorSDK.Math.Vector2}

sdk/engine/display/display-object.js, line 152

Returns the current position

Returns:
Type Description
PhotoEditorSDK.Math.Vector2

getRotation(){Number}

sdk/engine/display/display-object.js, line 215

Returns the current rotation in radians

Returns:
Type Description
Number

getScale(){PhotoEditorSDK.Math.Vector2}

sdk/engine/display/display-object.js, line 173

Returns the current scale

Returns:
Type Description
PhotoEditorSDK.Math.Vector2

getTint(){Number}

sdk/engine/display/display-object.js, line 289

Returns the current tint color

Returns:
Type Description
Number

getWorldAlpha(){Number}

sdk/engine/display/display-object.js, line 243

Returns the computed alpha of this DisplayObject

Returns:
Type Description
Number

getWorldTransform(){PhotoEditorSDK.Math.Matrix}

sdk/engine/display/display-object.js, line 255

Returns the current world transformation matrix

Returns:
Type Description
PhotoEditorSDK.Math.Matrix

isVisible(){Boolean}

sdk/engine/display/display-object.js, line 301

Checks whether this object is currently visible

Returns:
Type Description
Boolean [description]

removeShader(shader){Boolean}

sdk/engine/display/display-object.js, line 116

Removes the given shader from the list of shaders

Name Type Description
shader PhotoEditorSDK.Engine.Shader
Returns:
Type Description
Boolean

removeShaderAt(index){Boolean}

sdk/engine/display/display-object.js, line 130

Removes the shader at the given index from the list of shaders

Name Type Description
index Number
Returns:
Type Description
Boolean

abstractrenderCanvas(renderer)

sdk/engine/display/display-object.js, line 60

Renders this DisplayObject using the given CanvasRenderer

Name Type Description
renderer PhotoEditorSDK.Engine.CanvasRenderer

abstractrenderWebGL(renderer)

sdk/engine/display/display-object.js, line 51

Renders this DisplayObject using the given WebGLRenderer

Name Type Description
renderer PhotoEditorSDK.Engine.WebGLRenderer

setAlpha(alpha)

sdk/engine/display/display-object.js, line 237

Sets the alpha (0...1)

Name Type Description
alpha Number

setFilterRectangle(rectangle)

sdk/engine/display/display-object.js, line 281

Sets the filter rectangle

Name Type Description
rectangle PhotoEditorSDK.Math.Rectangle

setParent(parent)

sdk/engine/display/display-object.js, line 267

Sets this object's parent object

Name Type Description
parent PhotoEditorSDK.Engine.DisplayObject

setPivot(pivot, y)

sdk/engine/display/display-object.js, line 201

Sets the pivot (The point that this DisplayObject rotates around)

Name Type Description
pivot PhotoEditorSDK.Math.Vector2 | Number
y Number optional

setPosition(x, y)

sdk/engine/display/display-object.js, line 159

Sets the position to the given one

Name Type Description
x PhotoEditorSDK.Math.Vector2 | Number
y Number optional

setRotation(rotation)

sdk/engine/display/display-object.js, line 221

Sets this object's rotation (in radians)

Name Type Description
rotation Number

setScale(x, y)

sdk/engine/display/display-object.js, line 180

Sets the scale to the given one

Name Type Description
x PhotoEditorSDK.Math.Vector2 | Number
y Number optional

setTint(tint)

sdk/engine/display/display-object.js, line 295

Sets the tint color

Name Type Description
tint Number

setVisible(visible)

sdk/engine/display/display-object.js, line 307

Sets this object's visibility

Name Type Description
visible Boolean

updateTransform()

sdk/engine/display/display-object.js, line 67

Updates the world transform for this DisplayObject