Package | starling.filters |
Class | public class FilterChain |
Inheritance | FilterChain FragmentFilter EventDispatcher Object |
Property | Defined By | ||
---|---|---|---|
alwaysDrawToBackBuffer : Boolean Indicates if the last filter pass is always drawn directly to the back buffer. | FragmentFilter | ||
antiAliasing : int The anti-aliasing level. | FragmentFilter | ||
isCached : Boolean [read-only] Indicates if the filter is cached (via the cache method). | FragmentFilter | ||
numFilters : int [read-only] Indicates the current chain length. | FilterChain | ||
numPasses : int [read-only] Indicates the number of rendering passes required for this filter. | FragmentFilter | ||
padding : Padding Padding can extend the size of the filter texture in all directions. | FragmentFilter | ||
resolution : Number The resolution of the filter texture. | FragmentFilter | ||
textureFormat : String The format of the filter texture. | FragmentFilter | ||
textureSmoothing : String The smoothing mode of the filter texture. | FragmentFilter |
Method | Defined By | ||
---|---|---|---|
FilterChain(... args) Creates a new chain with the given filters. | FilterChain | ||
addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher | ||
addFilter(filter:FragmentFilter):void Adds a filter to the chain. | FilterChain | ||
addFilterAt(filter:FragmentFilter, index:int):void Adds a filter to the chain at the given index. | FilterChain | ||
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 [override] Disposes the filter chain itself as well as all contained filters. | FilterChain | ||
getFilterAt(index:int):FragmentFilter Returns the filter at a certain index. | FilterChain | ||
getFilterIndex(filter:FragmentFilter):int Returns the index of a filter within the chain, or "-1" if it is not found. | FilterChain | ||
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 Does the actual filter processing. | FragmentFilter | ||
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 | ||
Removes a filter from the chain. | FilterChain | ||
removeFilterAt(index:int, dispose:Boolean = false):FragmentFilter Removes the filter at a certain index. | FilterChain | ||
Renders the filtered target object. | FragmentFilter |
numFilters | property |
numFilters:int
[read-only] Indicates the current chain length.
public function get numFilters():int
FilterChain | () | Constructor |
public function FilterChain(... args)
Creates a new chain with the given filters.
Parameters... args |
addFilter | () | method |
public function addFilter(filter:FragmentFilter):void
Adds a filter to the chain. It will be appended at the very end.
Parameters
filter:FragmentFilter |
addFilterAt | () | method |
public function addFilterAt(filter:FragmentFilter, index:int):void
Adds a filter to the chain at the given index.
Parameters
filter:FragmentFilter | |
index:int |
dispose | () | method |
override public function dispose():void
Disposes the filter chain itself as well as all contained filters.
getFilterAt | () | method |
public function getFilterAt(index:int):FragmentFilter
Returns the filter at a certain index. If you pass a negative index, '-1' will return the last filter, '-2' the second to last filter, etc.
Parameters
index:int |
FragmentFilter |
getFilterIndex | () | method |
public function getFilterIndex(filter:FragmentFilter):int
Returns the index of a filter within the chain, or "-1" if it is not found.
Parameters
filter:FragmentFilter |
int |
removeFilter | () | method |
public function removeFilter(filter:FragmentFilter, dispose:Boolean = false):FragmentFilter
Removes a filter from the chain. If the filter is not part of the chain, nothing happens. If requested, the filter will be disposed right away.
Parameters
filter:FragmentFilter | |
dispose:Boolean (default = false )
|
FragmentFilter |
removeFilterAt | () | method |
public function removeFilterAt(index:int, dispose:Boolean = false):FragmentFilter
Removes the filter at a certain index. The indices of any subsequent filters are decremented. If requested, the filter will be disposed right away.
Parameters
index:int | |
dispose:Boolean (default = false )
|
FragmentFilter |