| Package | starling.core |
| Class | public class RenderSupport |
| Inheritance | RenderSupport Object |
| Property | Defined By | ||
|---|---|---|---|
| blendMode : String The blend mode to be used on rendering. | RenderSupport | ||
| mvpMatrix : Matrix3D [read-only] Calculates the product of modelview and projection matrix. | RenderSupport | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new RenderSupport object with an empty matrix stack. | RenderSupport | ||
applyBlendMode(premultipliedAlpha:Boolean):void Activates the appropriate blend factors on the current rendering context. | RenderSupport | ||
Adds a quad to the current batch of unrendered quads. | RenderSupport | ||
clear(rgb:uint = 0, alpha:Number = 0.0):void [static] Clears the render context with a certain color and alpha value. | RenderSupport | ||
dispose():void Disposes all quad batches. | RenderSupport | ||
finishQuadBatch():void Renders the current quad batch and resets it. | RenderSupport | ||
loadIdentity():void Changes the modelview matrix to the identity matrix. | RenderSupport | ||
nextFrame():void Resets the matrix and blend mode stacks, and the quad batch index. | RenderSupport | ||
popBlendMode():void Restores the blend mode that was last pushed to the stack. | RenderSupport | ||
popMatrix():void Restores the modelview matrix that was last pushed to the stack. | RenderSupport | ||
pushBlendMode():void Pushes the current blend mode to a stack from which it can be restored later. | RenderSupport | ||
pushMatrix():void Pushes the current modelview matrix to a stack from which it can be restored later. | RenderSupport | ||
resetBlendMode():void Clears the blend mode stack and restores NORMAL blend mode. | RenderSupport | ||
resetMatrix():void Empties the matrix stack, resets the modelview matrix to the identity matrix. | RenderSupport | ||
rotateMatrix(angle:Number, axis:Vector3D = null):void Prepends a rotation (angle in radians) to the modelview matrix. | RenderSupport | ||
scaleMatrix(sx:Number, sy:Number, sz:Number = 1.0):void Prepends an incremental scale change to the modelview matrix. | RenderSupport | ||
setBlendFactors(premultipliedAlpha:Boolean, blendMode:String = normal):void [static] Sets up the blending factors that correspond with a certain blend mode. | RenderSupport | ||
setDefaultBlendFactors(premultipliedAlpha:Boolean):void [static] Deprecated. | RenderSupport | ||
setOrthographicProjection(width:Number, height:Number, near:Number = -1.0, far:Number = 1.0):void Sets up the projection matrix for ortographic 2D rendering. | RenderSupport | ||
transformMatrix(object:DisplayObject):void Prepends translation, scale and rotation of an object to the modelview matrix. | RenderSupport | ||
transformMatrixForObject(matrix:Matrix3D, object:DisplayObject):void [static] Prepends translation, scale and rotation of an object to a custom matrix. | RenderSupport | ||
translateMatrix(dx:Number, dy:Number, dz:Number = 0):void Prepends a translation to the modelview matrix. | RenderSupport | ||
| blendMode | property |
blendMode:StringThe blend mode to be used on rendering.
public function get blendMode():String public function set blendMode(value:String):void| mvpMatrix | property |
mvpMatrix:Matrix3D [read-only] Calculates the product of modelview and projection matrix. CAUTION: Don't save a reference to this object! Each call returns the same instance.
public function get mvpMatrix():Matrix3D| RenderSupport | () | Constructor |
public function RenderSupport()Creates a new RenderSupport object with an empty matrix stack.
| applyBlendMode | () | method |
public function applyBlendMode(premultipliedAlpha:Boolean):voidActivates the appropriate blend factors on the current rendering context.
Parameters
premultipliedAlpha:Boolean |
| batchQuad | () | method |
public function batchQuad(quad:Quad, parentAlpha:Number, texture:Texture = null, smoothing:String = null):voidAdds a quad to the current batch of unrendered quads. If there is a state change, all previous quads are rendered at once, and the batch is reset.
Parameters
quad:Quad | |
parentAlpha:Number | |
texture:Texture (default = null) | |
smoothing:String (default = null) |
| clear | () | method |
public static function clear(rgb:uint = 0, alpha:Number = 0.0):voidClears the render context with a certain color and alpha value.
Parameters
rgb:uint (default = 0) | |
alpha:Number (default = 0.0) |
| dispose | () | method |
public function dispose():voidDisposes all quad batches.
| finishQuadBatch | () | method |
public function finishQuadBatch():voidRenders the current quad batch and resets it.
| loadIdentity | () | method |
public function loadIdentity():voidChanges the modelview matrix to the identity matrix.
| nextFrame | () | method |
public function nextFrame():voidResets the matrix and blend mode stacks, and the quad batch index.
| popBlendMode | () | method |
public function popBlendMode():voidRestores the blend mode that was last pushed to the stack.
| popMatrix | () | method |
public function popMatrix():voidRestores the modelview matrix that was last pushed to the stack.
| pushBlendMode | () | method |
public function pushBlendMode():voidPushes the current blend mode to a stack from which it can be restored later.
| pushMatrix | () | method |
public function pushMatrix():voidPushes the current modelview matrix to a stack from which it can be restored later.
| resetBlendMode | () | method |
public function resetBlendMode():voidClears the blend mode stack and restores NORMAL blend mode.
| resetMatrix | () | method |
public function resetMatrix():voidEmpties the matrix stack, resets the modelview matrix to the identity matrix.
| rotateMatrix | () | method |
public function rotateMatrix(angle:Number, axis:Vector3D = null):voidPrepends a rotation (angle in radians) to the modelview matrix.
Parameters
angle:Number | |
axis:Vector3D (default = null) |
| scaleMatrix | () | method |
public function scaleMatrix(sx:Number, sy:Number, sz:Number = 1.0):voidPrepends an incremental scale change to the modelview matrix.
Parameters
sx:Number | |
sy:Number | |
sz:Number (default = 1.0) |
| setBlendFactors | () | method |
public static function setBlendFactors(premultipliedAlpha:Boolean, blendMode:String = normal):voidSets up the blending factors that correspond with a certain blend mode.
Parameters
premultipliedAlpha:Boolean | |
blendMode:String (default = normal) |
| setDefaultBlendFactors | () | method |
public static function setDefaultBlendFactors(premultipliedAlpha:Boolean):voidDeprecated. Call 'setBlendFactors' instead.
Parameters
premultipliedAlpha:Boolean |
| setOrthographicProjection | () | method |
public function setOrthographicProjection(width:Number, height:Number, near:Number = -1.0, far:Number = 1.0):voidSets up the projection matrix for ortographic 2D rendering.
Parameters
width:Number | |
height:Number | |
near:Number (default = -1.0) | |
far:Number (default = 1.0) |
| transformMatrix | () | method |
public function transformMatrix(object:DisplayObject):voidPrepends translation, scale and rotation of an object to the modelview matrix.
Parameters
object:DisplayObject |
| transformMatrixForObject | () | method |
public static function transformMatrixForObject(matrix:Matrix3D, object:DisplayObject):voidPrepends translation, scale and rotation of an object to a custom matrix.
Parameters
matrix:Matrix3D | |
object:DisplayObject |
| translateMatrix | () | method |
public function translateMatrix(dx:Number, dy:Number, dz:Number = 0):voidPrepends a translation to the modelview matrix.
Parameters
dx:Number | |
dy:Number | |
dz:Number (default = 0) |