Packagestarling.filters
Interfacepublic interface IFilterHelper

An interface describing the methods available on the helper object passed to the process call of fragment filters. It provides information about the target object and methods to acquire and release pass textures.

See also

FragmentFilter.process()


Public Properties
 PropertyDefined By
  target : DisplayObject
[read-only] The display object the filter is currently attached to.
IFilterHelper
  targetBounds : Rectangle
[read-only] The bounds of the target object (plus padding) in stage coordinates.
IFilterHelper
Public Methods
 MethodDefined By
  
getTexture(resolution:Number = 1.0):Texture
Gets a pass texture from the pool, or creates a new one (cleared and ready to be used as render target).
IFilterHelper
  
putTexture(texture:Texture):void
Puts a texture back into the pool to be reused later (or to be disposed with the pool).
IFilterHelper
Property Detail
targetproperty
target:DisplayObject  [read-only]

The display object the filter is currently attached to.


Implementation
    public function get target():DisplayObject
targetBoundsproperty 
targetBounds:Rectangle  [read-only]

The bounds of the target object (plus padding) in stage coordinates.


Implementation
    public function get targetBounds():Rectangle
Method Detail
getTexture()method
public function getTexture(resolution:Number = 1.0):Texture

Gets a pass texture from the pool, or creates a new one (cleared and ready to be used as render target). Its size is dictated by the bounds of the target display object plus padding.

Beware: each call of this method counts as one render pass. For performance reasons, the filter may be configured to render the last pass directly to the back buffer. In that case, this method will return null for the last pass! That's the sign for the process method to draw to the back buffer. If you receive null too soon, the filter class probably didn't correctly override numPasses.

Parameters

resolution:Number (default = 1.0)

Returns
Texture
putTexture()method 
public function putTexture(texture:Texture):void

Puts a texture back into the pool to be reused later (or to be disposed with the pool).

Parameters

texture:Texture