FlattenFilter class

The FlattenFilter does not change the visual appearance of the BitmapData or DisplayObject where it is applied to. This filter can be used to merge the children of a DisplayObjectContainer to a flat texture. This is useful for DisplayObjects with certain blend modes or alpha values.

Example:

var sprite = new Sprite();
sprite.addChild(background);
sprite.addChild(foreground);
sprite.addChild(text);
sprite.blendMode = BlendMode.ADD;
sprite.filters = [FlattenFilter()];
Inheritance

Constructors

FlattenFilter()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
isSimple bool
read-only, inherited
overlap Rectangle<int>
read-only, inherited
renderPassSources List<int>
read-only, inherited
renderPassTargets List<int>
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

apply(BitmapData bitmapData, [Rectangle<num> rectangle]) → void
inherited
clone() BitmapFilter
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
renderFilter(RenderState renderState, RenderTextureQuad renderTextureQuad, int pass) → void
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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