| Package | starling.filters |
| Class | public class DropShadowFilter |
| Inheritance | DropShadowFilter FragmentFilter EventDispatcher Object |
| Property | Defined By | ||
|---|---|---|---|
| alpha : Number The alpha value of the shadow. | DropShadowFilter | ||
![]() | alwaysDrawToBackBuffer : Boolean Indicates if the last filter pass is always drawn directly to the back buffer. | FragmentFilter | |
| angle : Number The angle with which the shadow is offset, in radians. | DropShadowFilter | ||
![]() | antiAliasing : int The anti-aliasing level. | FragmentFilter | |
| blur : Number The amount of blur with which the shadow is created. | DropShadowFilter | ||
| color : uint The color of the shadow. | DropShadowFilter | ||
| distance : Number The offset distance for the shadow, in points. | DropShadowFilter | ||
| inner : Boolean Indicates whether or not the shadow is an inner shadow. | DropShadowFilter | ||
![]() | isCached : Boolean [read-only] Indicates if the filter is cached (via the cache method). | FragmentFilter | |
| knockout : Boolean If enabled, applies a knockout effect, which effectively makes the object's fill
transparent. | DropShadowFilter | ||
![]() | 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 | |
| quality : Number The quality used for blurring the shadow (range: 0.1 - 1). | DropShadowFilter | ||
![]() | 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 | ||
|---|---|---|---|
DropShadowFilter(distance:Number = 4.0, angle:Number = 0.785, color:uint = 0x0, alpha:Number = 0.5, blur:Number = 1.0, quality:Number = 0.5, inner:Boolean = false, knockout:Boolean = false) Creates a new DropShadowFilter instance with the specified parameters. | DropShadowFilter | ||
![]() | 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 [override] Disposes all resources that have been created by the filter. | DropShadowFilter | ||
![]() | 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 | |
![]() | Renders the filtered target object. | FragmentFilter | |
| alpha | property |
alpha:NumberThe alpha value of the shadow. Values between 0 and 1 modify the opacity; values > 1 will make it stronger, i.e. produce a harder edge.
The default value is 0.5.
public function get alpha():Number public function set alpha(value:Number):void| angle | property |
angle:NumberThe angle with which the shadow is offset, in radians.
The default value is Math.PI / 4.
public function get angle():Number public function set angle(value:Number):void| blur | property |
blur:Number The amount of blur with which the shadow is created.
The number of required passes will be Math.ceil(value) × 2.
The default value is 1.0.
public function get blur():Number public function set blur(value:Number):void| color | property |
color:uintThe color of the shadow.
The default value is 0x0.
public function get color():uint public function set color(value:uint):void| distance | property |
distance:NumberThe offset distance for the shadow, in points.
The default value is 4.0.
public function get distance():Number public function set distance(value:Number):void| inner | property |
inner:Boolean Indicates whether or not the shadow is an inner shadow. The default is
false, an outer shadow (a shadow around the outer edges of the object).
public function get inner():Boolean public function set inner(value:Boolean):void| knockout | property |
knockout:BooleanIf enabled, applies a knockout effect, which effectively makes the object's fill transparent.
The default value is false.
public function get knockout():Boolean public function set knockout(value:Boolean):void| quality | property |
quality:NumberThe quality used for blurring the shadow (range: 0.1 - 1). Forwarded to the internally used BlurFilter.
public function get quality():Number public function set quality(value:Number):void| DropShadowFilter | () | Constructor |
public function DropShadowFilter(distance:Number = 4.0, angle:Number = 0.785, color:uint = 0x0, alpha:Number = 0.5, blur:Number = 1.0, quality:Number = 0.5, inner:Boolean = false, knockout:Boolean = false)Creates a new DropShadowFilter instance with the specified parameters.
Parametersdistance:Number (default = 4.0) — the offset distance of the shadow, in points.
| |
angle:Number (default = 0.785) — the angle with which the shadow is offset, in radians.
| |
color:uint (default = 0x0) — the color of the shadow.
| |
alpha:Number (default = 0.5) — the alpha value of the shadow. Values between 0 and 1 modify the
opacity; values > 1 will make it stronger, i.e. produce a harder edge.
| |
blur:Number (default = 1.0) — the amount of blur with which the shadow is created. Note that high
values will cause the number of render passes to grow.
| |
quality:Number (default = 0.5) — the quality of the shadow blur, '1' being the best (range 0.1 - 1.0)
| |
inner:Boolean (default = false) — if enabled, the shadow will be drawn inside the object.
| |
knockout:Boolean (default = false) — if enabled, only the shadow will be drawn.
|
| dispose | () | method |
override public function dispose():voidDisposes all resources that have been created by the filter.