| Package | flash.display |
| Class | public final class BlendMode |
| Inheritance | BlendMode Object |
blendMode property of the flash.display.DisplayObject class.blendMode parameter of the draw() method of the
flash.display.BitmapData class| flash.display.DisplayObject.blendMode, flash.display.BitmapData.draw() |
| Property | Defined by | ||
|---|---|---|---|
| ADD : String = "add" [static]
Adds the values of the constituent colors of the display object to the colors of its background, applying a
ceiling of 0xFF.
| BlendMode | ||
| ALPHA : String = "alpha" [static]
Applies the alpha value of each pixel of the display object to the background.
| BlendMode | ||
| DARKEN : String = "darken" [static]
Selects the darker of the constituent colors of the display object and the colors of the background (the
colors with the smaller values).
| BlendMode | ||
| DIFFERENCE : String = "difference" [static]
Compares the constituent colors of the display object with the colors of its background, and subtracts
the darker of the values of the two constituent colors from the lighter value.
| BlendMode | ||
| ERASE : String = "erase" [static]
Erases the background based on the alpha value of the display object.
| BlendMode | ||
| HARDLIGHT : String = "hardlight" [static]
Adjusts the color of each pixel based on the darkness of the display object.
| BlendMode | ||
| INVERT : String = "invert" [static]
Inverts the background.
| BlendMode | ||
| LAYER : String = "layer" [static]
Forces the creation of a transparency group for the display object.
| BlendMode | ||
| LIGHTEN : String = "lighten" [static]
Selects the lighter of the constituent colors of the display object and the colors of the background (the
colors with the larger values).
| BlendMode | ||
| MULTIPLY : String = "multiply" [static]
Multiplies the values of the display object constituent colors by the constituent colors of
the background color, and normalizes by dividing by 0xFF,
resulting in darker colors.
| BlendMode | ||
| NORMAL : String = "normal" [static]
The display object appears in front of the background.
| BlendMode | ||
| OVERLAY : String = "overlay" [static]
Adjusts the color of each pixel based on the darkness of the background.
| BlendMode | ||
| SCREEN : String = "screen" [static]
Multiplies the complement (inverse) of the display object color by the complement of the background
color, resulting in a bleaching effect.
| BlendMode | ||
| SUBTRACT : String = "subtract" [static]
Subtracts the values of the constituent colors in the display object from the values of the background
color, applying a floor of 0.
| BlendMode | ||
public static const ADD:String = "add"
For example, if the display object has a pixel with an RGB value of 0xAAA633, and the background pixel has an RGB value of 0xDD2200, the resulting RGB value for the displayed pixel is 0xFFC833 (because 0xAA + 0xDD > 0xFF, 0xA6 + 0x22 = 0xC8, and 0x33 + 0x00 = 0x33).
public static const ALPHA:String = "alpha"
blendMode property of the parent display object be set to
flash.display.BlendMode.LAYER.
public static const DARKEN:String = "darken"
For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is 0xDDCC00 (because 0xFF > 0xDD, 0xCC < 0xF8, and 0x33 > 0x00 = 33).
public static const DIFFERENCE:String = "difference"
For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is 0x222C33 (because 0xFF - 0xDD = 0x22, 0xF8 - 0xCC = 0x2C, and 0x33 - 0x00 = 0x33).
public static const ERASE:String = "erase"
blendMode property of the parent display object to be set to
flash.display.BlendMode.LAYER.
public static const HARDLIGHT:String = "hardlight"
public static const LAYER:String = "layer"
blendMode
setting other than "normal".
public static const LIGHTEN:String = "lighten"
For example, if the display object has a pixel with an RGB value of 0xFFCC33, and the background pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is 0xFFF833 (because 0xFF > 0xDD, 0xCC < 0xF8, and 0x33 > 0x00 = 33).
public static const MULTIPLY:String = "multiply"
For example, if a constituent color (such as red) of one pixel in the display object and the corresponding color of the pixel in the background both have the value 0x88, the multiplied result is 0x4840. Dividing by 0xFF yields a value of 0x48 for that constituent color, which is a darker shade than the color of the display object or the color of the background.
public static const NORMAL:String = "normal"
public static const OVERLAY:String = "overlay"
public static const SCREEN:String = "screen"
public static const SUBTRACT:String = "subtract"
For example, if the display object has a pixel with an RGB value of 0xAA2233, and the background pixel has an RGB value of 0xDDA600, the resulting RGB value for the displayed pixel is 0x338400 (because 0xDD - 0xAA = 0x33, 0xA6 - 0x22 = 0x84, and 0x00 - 0x33 < 0x00).
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/labs/flashauthoringpreview/flash/display/BlendMode.html