| Package | starling.filters |
| Class | public class CompositeFilter |
| Inheritance | CompositeFilter FragmentFilter EventDispatcher Object |
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance. | CompositeFilter | ||
![]() | addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher | |
![]() | cache():void Caches the filter output into a texture. | FragmentFilter | |
![]() | clearCache():void Clears the cached output of the filter. | FragmentFilter | |
![]() | dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | |
![]() | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered
listeners for the given type. | EventDispatcher | |
![]() | dispose():void Disposes all resources that have been created by the filter. | FragmentFilter | |
getAlphaAt(layerID:int):Number Indicates the alpha value with which the layer is drawn. | CompositeFilter | ||
getColorAt(layerID:int):uint Returns the RGB color with which a layer is tinted when it is being drawn. | CompositeFilter | ||
getInvertAlphaAt(layerID:int):Boolean Indicates if the alpha value of the given layer's fragments should be inverted,
effectively inverting the layer's silhouette. | CompositeFilter | ||
getModeAt(layerID:int):String The mode with which the layer is drawn. | CompositeFilter | ||
getOffsetAt(layerID:int, out:Point = null):Point Returns the position (in points) at which a certain layer will be drawn. | CompositeFilter | ||
getReplaceColorAt(layerID:int):Boolean Indicates if the color of the given layer is replaced (true) or tinted (false). | CompositeFilter | ||
![]() | hasEventListener(type:String, listener:Function = null):Boolean If called with one argument, figures out if there are any listeners registered for
the given event type. | EventDispatcher | |
process(painter:Painter, helper:IFilterHelper, input0:Texture = null, input1:Texture = null, input2:Texture = null, input3:Texture = null):Texture [override] Combines up to four input textures into one new texture,
adhering to the properties of each layer. | CompositeFilter | ||
![]() | removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher | |
![]() | removeEventListeners(type:String = null):void Removes all event listeners with a certain type, or all of them if type is null. | EventDispatcher | |
![]() | Renders the filtered target object. | FragmentFilter | |
setAlphaAt(layerID:int, alpha:Number):void Adjusts the alpha value with which the layer is drawn. | CompositeFilter | ||
setColorAt(layerID:int, color:uint, replace:Boolean = false):void Adjusts the RGB color with which a layer is tinted when it is being drawn. | CompositeFilter | ||
setInvertAlphaAt(layerID:int, value:Boolean = true):void Activate this setting to invert the alpha values of this layer's fragments, which will
effectively invert the layer's silhouette. | CompositeFilter | ||
setModeAt(layerID:int, mode:String):void Sets the mode with which the layer is drawn. | CompositeFilter | ||
setOffsetAt(layerID:int, x:Number, y:Number):void Indicates the position (in points) at which a certain layer will be drawn. | CompositeFilter | ||
| CompositeFilter | () | Constructor |
public function CompositeFilter()Creates a new instance.
| getAlphaAt | () | method |
public function getAlphaAt(layerID:int):NumberIndicates the alpha value with which the layer is drawn.
Parameters
layerID:int |
Number |
| getColorAt | () | method |
public function getColorAt(layerID:int):uintReturns the RGB color with which a layer is tinted when it is being drawn.
Parameters
layerID:int |
uint |
| getInvertAlphaAt | () | method |
public function getInvertAlphaAt(layerID:int):BooleanIndicates if the alpha value of the given layer's fragments should be inverted, effectively inverting the layer's silhouette.
Parameters
layerID:int |
Boolean |
| getModeAt | () | method |
public function getModeAt(layerID:int):StringThe mode with which the layer is drawn.
Parameters
layerID:int |
String |
See also
| getOffsetAt | () | method |
public function getOffsetAt(layerID:int, out:Point = null):PointReturns the position (in points) at which a certain layer will be drawn.
Parameters
layerID:int | |
out:Point (default = null) |
Point |
| getReplaceColorAt | () | method |
public function getReplaceColorAt(layerID:int):BooleanIndicates if the color of the given layer is replaced (true) or tinted (false).
Parameters
layerID:int |
Boolean |
| process | () | method |
override public function process(painter:Painter, helper:IFilterHelper, input0:Texture = null, input1:Texture = null, input2:Texture = null, input3:Texture = null):TextureCombines up to four input textures into one new texture, adhering to the properties of each layer.
Parameters
painter:Painter | |
helper:IFilterHelper | |
input0:Texture (default = null) | |
input1:Texture (default = null) | |
input2:Texture (default = null) | |
input3:Texture (default = null) |
Texture |
| setAlphaAt | () | method |
public function setAlphaAt(layerID:int, alpha:Number):voidAdjusts the alpha value with which the layer is drawn.
Parameters
layerID:int | |
alpha:Number |
| setColorAt | () | method |
public function setColorAt(layerID:int, color:uint, replace:Boolean = false):void Adjusts the RGB color with which a layer is tinted when it is being drawn.
If replace is enabled, the pixels are not tinted, but instead
the RGB channels will replace the texture's color entirely.
Parameters
layerID:int | |
color:uint | |
replace:Boolean (default = false) |
| setInvertAlphaAt | () | method |
public function setInvertAlphaAt(layerID:int, value:Boolean = true):voidActivate this setting to invert the alpha values of this layer's fragments, which will effectively invert the layer's silhouette. Note that this setting is only applied if color replacement is activated on this layer.
Parameters
layerID:int | |
value:Boolean (default = true) |
| setModeAt | () | method |
public function setModeAt(layerID:int, mode:String):voidSets the mode with which the layer is drawn.
Parameters
layerID:int | |
mode:String |
See also
| setOffsetAt | () | method |
public function setOffsetAt(layerID:int, x:Number, y:Number):voidIndicates the position (in points) at which a certain layer will be drawn.
Parameters
layerID:int | |
x:Number | |
y:Number |