Useful utility methods that wouldn't be needed if the flash API were not so retarded.
public static function addFilter(disp:DisplayObject, filter:BitmapFilter):void
Add the specified filter to the DisplayObject.
Parameters
| disp:DisplayObject |
|
| filter:BitmapFilter |
protected static function checkArgs(disp:DisplayObject, filter:BitmapFilter):void
Parameters
| disp:DisplayObject |
|
| filter:BitmapFilter |
public static function createHueShift(hue:int):ColorMatrixFilter
Create a filter that, if applied to a DisplayObject, will shift the hue of that object
by the given value.
Parameters
| hue:int — a value, in degrees, between -180 and 180.
|
Returns
public static function equals(f1:BitmapFilter, f2:BitmapFilter):Boolean
Are the two filters equals?
Parameters
| f1:BitmapFilter |
|
| f2:BitmapFilter |
Returns
public static function removeFilter(disp:DisplayObject, filter:BitmapFilter):void
Remove the specified filter from the DisplayObject.
Note that the filter set in the DisplayObject is a clone, so the values
of the specified filter are used to find a match.
Parameters
| disp:DisplayObject |
|
| filter:BitmapFilter |
public static function shiftHueBy(original:ColorMatrixFilter, hueShift:int):ColorMatrixFilter
Shift the color matrix filter by the given amount. This is adapted from the code found at
http://www.kirupa.com/forum/showthread.php?t=230706
Parameters
| original:ColorMatrixFilter — a value, in degrees, between -180 and 180.
|
|
| hueShift:int |
Returns
Copyright © 2007-2009 Three Rings Design, Inc.