GDropShadowFilter class

A filter that applies a drop shadow effect to the target display object.

Inheritance
Available Extensions

Constructors

GDropShadowFilter([double blurX = 0, double blurY = 0, double angle = 0, double distance = 0, Color color = kColorBlack, bool hideObject = false, bool innerShadow = false])
Creates a new instance of GDropShadowFilter.

Properties

angle double
The angle of the shadow, in radians.
getter/setter pair
blurX double
The blur value for the shadow on the x-axis.
getter/setter pair
blurY double
The blur value for the shadow on the y-axis.
getter/setter pair
color Color
The color of the shadow.
getter/setter pair
currentObject GDisplayObject?
The currentObject property holds a reference to the display object that the filter is applied to. OutlineFilter uses this to adjust the filter size to the current object scale.
getter/setter pairinherited
dirty bool
The dirty property is used to determine if the filter needs to be rebuilt.
getter/setter pairinherited
distance double
The distance between the object and the shadow.
getter/setter pair
filterRect GRect
Returns the filter rectangle bounding area.
no setter
hashCode int
The hash code for this object.
no setterinherited
hideObject bool
Whether to hide the content behind the filter.
getter/setter pairinherited
innerShadow bool
Determines whether the shadow is an inner shadow (true) or an outer shadow (false). Inner shadows appear inside the boundaries of the object, while outer shadows appear outside.
getter/setter pair
isValid bool
(Internal usage) Checks if the filter is valid and should be applied.
no setteroverride
iterations int
An integer that represents the number of iterations to apply the same filter. The bigger the value, the more stressed the shadow will be. By default, it's set to 1.
getter/setter pair
layerBounds GRect?
The layerBounds property holds the bounds of the display object.
getter/setter pairinherited
maskSigma double
A double that represents the value of the blur sigma. When set to -1 (default), it will be automatically detected from the blurX and blurY values. Otherwise, it will be set to the provided value.
getter/setter pair
paint Paint
The paint object used to apply the painting function.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style BlurStyle
The style of blur to apply to the shadow.
getter/setter pair

Methods

buildFilter() → void
(Internal usage) Constructs the various filters used by this drop shadow filter, such as the mask filter, image filter, and color filter. Applies these filters to the paint object.
override
expandBounds(GRect layerBounds, GRect outputBounds) → void
(Internal usage) Expands the filter's bounds to include any additional area needed to accommodate the drop shadow effect, as determined by the current blur radius.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process(Canvas canvas, Function applyPaint, [int processCount = 1]) → void
(Internal usage)
override
resolvePaint(Paint paint) → void
Applies the filter effect to the specified paint object.
inherited
toString() String
A string representation of this object.
inherited
update() → void
The update method is called to check if the filter needs to be rebuilt. If the dirty property is true and the isValid property is also true, then the buildFilter method is called to rebuild the filter.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited