flash.filters

# BitmapFilterQuality - AS3

Package | flash.filters
Class | public final class BitmapFilterQuality
Inheritance | BitmapFilterQuality Object

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

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

View the examples

Related API Elements

BevelFilter
BlurFilter
GlowFilter
DropShadowFilter
GradientBevelFilter
GradientGlowFilter

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined 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

Constant Detail

### HIGH

Constant

`public static const HIGH:int = 3`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Defines the high quality filter setting.

### LOW

Constant

`public static const LOW:int = 1`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Defines the low quality filter setting.

### MEDIUM

Constant

`public static const MEDIUM:int = 2`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Defines the medium quality filter setting.

Examples How to use this example
BitmapFilterQualityExample.as
The following example draws a gray square and applies a BevelFilter object to it. The example sets the `quality` property by using the constant `BitmapFilterQuality.HIGH`.
Copy

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

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

            public function BitmapFilterQualityExample() {
                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();
            }
        }
    }

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00