Packageflash.filters
Classpublic final class BitmapFilterQuality
InheritanceBitmapFilterQuality Inheritance Object

The BitmapFilterQuality class contains values to set the rendering quality of a BitmapFilter object.

View the examples.

See also
BevelFilter, BlurFilter, GlowFilter, DropShadowFilter, GradientBevelFilter, GradientGlowFilter


Public Constants
 PropertyDefined by
  HIGH : int = 3
[static] Defines the high quality filter setting.
BitmapFilterQuality
  LOW : int = 1
[static] Defines the low quality filter setting.
BitmapFilterQuality
  MEDIUM : int = 2
[static] Defines the medium quality filter setting.
BitmapFilterQuality
Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties
 PropertyDefined by
 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
Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods
 FunctionDefined by
 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
Constant detail
HIGH constant
public static const HIGH:int = 3

Defines the high quality filter setting.
LOW constant
public static const LOW:int = 1

Defines the low quality filter setting.
MEDIUM constant
public static const MEDIUM:int = 2

Defines the medium quality filter setting.
Class examples

The following example draws a gray square and applies a BevelFilter to it. The quality property of the BevelFilter is set using the constant BitmapFilterQuality.HIGH.

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

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

        public function BitmapFilterExample() {
            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 = .8;
            var shadowColor:Number    = 0x808080;
            var shadowAlpha:Number    = .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();
        }
    }
}




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/flashauthoringpreview/flash/filters/BitmapFilterQuality.html