Manages bitmap filter effects applied to a Stroke shape.
StrokeFilter | Manages bitmap filter effects applied to a Stroke shape. |
Private members | |
shape | Reference to Stroke shape which filters are managed. |
Creation | |
StrokeFilter | Constructor that stores a reference to the shape to manage filters for. |
addBevelFilter | Add a Bevel filter to the shape if it does not have one. |
addBlurFilter | Add a Blur filter to the shape if it does not have one. |
addShadowFilter | Add a DropShadow filter to the shape if it does not have one. |
Destruction | |
clear | Remove all filters from the shape. |
dispose | Remove all filters from the shape and remove any reference to the shape. |
Query Properties | |
hasFilters | Determines if the shape has any blur, bevel or drop shadow filters. |
withBevel | Determines if the shape has a bevel filter. |
withBlur | Determines if the shape has a blur filter. |
withShadow | Determines if the shape has a drop shadow filter. |
Reverse engineering | |
setBlurParams | Adds a blur filter to the shape with the given parameters. |
setBevelParams | Adds a bevel filter to the shape with the given parameters. |
setDropShadowParams | Adds a dropshadow filter to the shape with the given parameters. |
Public filter query | |
Private filter manipulation | |
applyFilter | Applies a filter to the shape. |
findFilterIndex | Find the first filter on the displayObject with a class name that matches the filterClassName. |
private var shape: DisplayObject
Reference to Stroke shape which filters are managed.
public function StrokeFilter( shape: DisplayObject )
Constructor that stores a reference to the shape to manage filters for.
shape | a DisplayObject shape or sprite |
public function addBevelFilter():void
Add a Bevel filter to the shape if it does not have one.
public function addBlurFilter():void
Add a Blur filter to the shape if it does not have one.
public function addShadowFilter():void
Add a DropShadow filter to the shape if it does not have one.
public function clear():void
Remove all filters from the shape.
public function get hasFilters():Boolean
Determines if the shape has any blur, bevel or drop shadow filters.
True if found, false otherwise
public function get withBevel():Boolean
Determines if the shape has a bevel filter.
True if found, false otherwise
public function get withBlur():Boolean
Determines if the shape has a blur filter.
True if found, false otherwise
public function get withShadow():Boolean
Determines if the shape has a drop shadow filter.
True if found, false otherwise
public function setBlurParams( params: Array ):void
Adds a blur filter to the shape with the given parameters.
params | array of parameters as obtained from MethodParser.parseParameters |
public function setBevelParams( params: Array ):void
Adds a bevel filter to the shape with the given parameters.
params | array of parameters as obtained from MethodParser.parseParameters |
public function setDropShadowParams( params: Array ):void
Adds a dropshadow filter to the shape with the given parameters.
params | array of parameters as obtained from MethodParser.parseParameters |
private function findFilterIndex( displayObject: DisplayObject, filterClassName: String ):int
Find the first filter on the displayObject with a class name that matches the filterClassName.
The filter class name is taken from flash.filters.
displayObject | the display object to be searched |
filterClassName | the class name of a filter |
The index of the first filter with the class or -1 if no such filter was found
Reference to Stroke shape which filters are managed.
private var shape: DisplayObject
Constructor that stores a reference to the shape to manage filters for.
public function StrokeFilter( shape: DisplayObject )
Add a Bevel filter to the shape if it does not have one.
public function addBevelFilter():void
Add a Blur filter to the shape if it does not have one.
public function addBlurFilter():void
Add a DropShadow filter to the shape if it does not have one.
public function addShadowFilter():void
Remove all filters from the shape.
public function clear():void
Remove all filters from the shape and remove any reference to the shape.
public function dispose():void
Determines if the shape has any blur, bevel or drop shadow filters.
public function get hasFilters():Boolean
Determines if the shape has a bevel filter.
public function get withBevel():Boolean
Determines if the shape has a blur filter.
public function get withBlur():Boolean
Determines if the shape has a drop shadow filter.
public function get withShadow():Boolean
Adds a blur filter to the shape with the given parameters.
public function setBlurParams( params: Array ):void
Adds a bevel filter to the shape with the given parameters.
public function setBevelParams( params: Array ):void
Adds a dropshadow filter to the shape with the given parameters.
public function setDropShadowParams( params: Array ):void
Applies a filter to the shape.
private function applyFilter( filter: BitmapFilter, filterTypeName: String ):void
Find the first filter on the displayObject with a class name that matches the filterClassName.
private function findFilterIndex( displayObject: DisplayObject, filterClassName: String ):int
Scans action method call parameters, pushes found parameters on the given paramArray reference.
private function parseParameters( paramList: String, paramArray: Array ):void