Pacoteflash.filters
Classepublic final class BitmapFilterType
HerançaBitmapFilterType Inheritance Object

The BitmapFilterType class contains values to set the type of a BitmapFilter.

Veja Exemplos

Veja também

BevelFilter
GradientBevelFilter
GradientGlowFilter


Propriedades Públicas
 PropriedadeDefinido por
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Métodos Públicos
 MétodoDefinido por
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Constantes públicas
 ConstanteDefinido por
  FULL : String = "full"
[static] Defines the setting that applies a filter to the entire area of an object.
BitmapFilterType
  INNER : String = "inner"
[static] Defines the setting that applies a filter to the inner area of an object.
BitmapFilterType
  OUTER : String = "outer"
[static] Defines the setting that applies a filter to the outer area of an object.
BitmapFilterType
Detalhes da constante
FULLConstante
public static const FULL:String = "full"

Defines the setting that applies a filter to the entire area of an object.

INNERConstante 
public static const INNER:String = "inner"

Defines the setting that applies a filter to the inner area of an object.

OUTERConstante 
public static const OUTER:String = "outer"

Defines the setting that applies a filter to the outer area of an object.

Exemplos How to use examples
BitmapFilterTypeExample.as

The following exemplo draws a gray square and applies a BevelFilter object to it. The exemplo sets the type property by using the constant BitmapFilterType.HIGH.

package {
    import flash.display.Sprite;
    import flash.filters.BevelFilter;
    import flash.filters.BitmapFilter;
    import flash.filters.BitmapFilterQuality;
    import flash.filters.BitmapFilterType;

    public class BitmapFilterTypeExample extends Sprite {
        private var bgColor:uint = 0x999999;
        private var size:uint    = 80;
        private var offset:uint  = 50;

        public function BitmapFilterTypeExample() {
            draw();
            var filter:BitmapFilter = getBitmapFilter();
            var myFilters:Array = new Array();
            myFilters.push(filter);
            filters = myFilters;
        }

        private function getBitmapFilter():BitmapFilter {
            var distance:Number       = 5;
            var angleInDegrees:Number = 45;
            var highlightColor:Number = 0xCCCCCC;
            var highlightAlpha:Number = 0.8;
            var shadowColor:Number    = 0x808080;
            var shadowAlpha:Number    = 0.8;
            var blurX:Number          = 5;
            var blurY:Number          = 5;
            var strength:Number       = 5;
            var quality:Number        = BitmapFilterQuality.HIGH;
            var type:String           = BitmapFilterType.INNER;
            var knockout:Boolean      = false;

            return new BevelFilter(distance,
                                   angleInDegrees,
                                   highlightColor,
                                   highlightAlpha,
                                   shadowColor,
                                   shadowAlpha,
                                   blurX,
                                   blurY,
                                   strength,
                                   quality,
                                   type,
                                   knockout);
        }

        private function draw():void {
            graphics.beginFill(bgColor);
            graphics.drawRect(offset, offset, size, size);
            graphics.endFill();
        }
    }
}