Packagegraphics.filters
Classpublic class GrayScaleFilter
InheritanceGrayScaleFilter Inheritance ShaderCustomFilter Inheritance flash.filters.ShaderFilter

The GrayScaleFilter class applies a gray scale color transformation over a display or a bitmap. This filter use the algorithm from ITU-R Recommendation BT.709. The Shader must be defines with the GrayScale pixelbender implementation.

See also

http://local.wasp.uwa.edu.au/~pbourke/texture_colour/imageprocess/


Public Properties
 PropertyDefined By
 Inheriteddescription : String
[read-only] The description of the filter (defines in the Shader).
ShaderCustomFilter
 Inheritedname : String
[read-only] The name of the filter (defines in the Shader).
ShaderCustomFilter
 Inheritednamespace : String
[read-only] The namespace of the filter (defines in the Shader).
ShaderCustomFilter
  scale : Number
The scale value of the filter between 0 and 1 (default 1).
GrayScaleFilter
 Inheritedversion : String
[read-only] The version of the filter (defines in the Shader).
ShaderCustomFilter
Public Methods
 MethodDefined By
  
GrayScaleFilter(shader:Shader = null, init:Object = null)
Creates a new GrayScaleFilter instance.
GrayScaleFilter
  
clone():BitmapFilter
[override] Returns a shallow copy of the object.
GrayScaleFilter
Property Detail
scaleproperty
scale:Number

The scale value of the filter between 0 and 1 (default 1).


Implementation
    public function get scale():Number
    public function set scale(value:Number):void
Constructor Detail
GrayScaleFilter()Constructor
public function GrayScaleFilter(shader:Shader = null, init:Object = null)

Creates a new GrayScaleFilter instance.

Parameters
shader:Shader (default = null) — The Shader reference with the GrayScale pixel bender filter inside.
 
init:Object (default = null) — The optional dynamic object to initialize the filter.
Method Detail
clone()method
override public function clone():BitmapFilter

Returns a shallow copy of the object.

Returns
BitmapFilter — a shallow copy of the object.