Paket | mx.graphics |
Klass | public class RectangularDropShadow |
Arv | RectangularDropShadow Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
This class optimizes drop shadows for a common case. If you are applying a drop shadow to a rectangularly-shaped object whose edges fall on pixel boundaries, then this class should be used instead of using the DropShadowFilter directly.
This class accepts the first four parameters that are passed
to DropShadowFilter: alpha
, angle
,
color
, and distance
.
In addition, this class accepts the corner radii for each of the four
corners of the rectangularly-shaped object that is casting a shadow.
Once those 8 values have been set,
this class pre-computes the drop shadow in an offscreen Bitmap.
When the drawShadow()
method is called, pieces of the
precomputed drop shadow are copied onto the passed-in Graphics object.
Relaterade API-element
Egenskap | Definieras med | ||
---|---|---|---|
alpha : Number
Alfagenomskinlighetsvärdet för skuggfärgen. | RectangularDropShadow | ||
angle : Number
Skuggans vinkel. | RectangularDropShadow | ||
blRadius : Number
The corner radius of the bottom left corner
of the rounded rectangle that is casting the shadow. | RectangularDropShadow | ||
blurX : Number
The amount of horizontal blur. | RectangularDropShadow | ||
blurY : Number
The amount of vertical blur. | RectangularDropShadow | ||
brRadius : Number
The corner radius of the bottom right corner
of the rounded rectangle that is casting the shadow. | RectangularDropShadow | ||
color : int
Skuggans färg. | RectangularDropShadow | ||
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
distance : Number
Skuggans förskjutningsavstånd i pixlar. | RectangularDropShadow | ||
tlRadius : Number
The corner radius of the top left corner
of the rounded rectangle that is casting the shadow. | RectangularDropShadow | ||
trRadius : Number
The corner radius of the top right corner
of the rounded rectangle that is casting the shadow. | RectangularDropShadow |
Metod | Definieras med | ||
---|---|---|---|
Constructor. | RectangularDropShadow | ||
Renders the shadow on the screen. | RectangularDropShadow | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object |
alpha | egenskap |
alpha:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Alfagenomskinlighetsvärdet för skuggfärgen. Giltiga värden är från 0,0 till 1,0. 0,25 innebär till exempel att genomskinlighetsvärdet är 25 %. Standardvärdet är 1.0.
Implementering
public function get alpha():Number
public function set alpha(value:Number):void
angle | egenskap |
blRadius | egenskap |
blRadius:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
The corner radius of the bottom left corner of the rounded rectangle that is casting the shadow. May be zero for non-rounded rectangles.
Implementering
public function get blRadius():Number
public function set blRadius(value:Number):void
blurX | egenskap |
blurY | egenskap |
brRadius | egenskap |
brRadius:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
The corner radius of the bottom right corner of the rounded rectangle that is casting the shadow. May be zero for non-rounded rectangles.
Implementering
public function get brRadius():Number
public function set brRadius(value:Number):void
color | egenskap |
distance | egenskap |
tlRadius | egenskap |
tlRadius:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
The corner radius of the top left corner of the rounded rectangle that is casting the shadow. May be zero for non-rounded rectangles.
Implementering
public function get tlRadius():Number
public function set tlRadius(value:Number):void
trRadius | egenskap |
trRadius:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
The corner radius of the top right corner of the rounded rectangle that is casting the shadow. May be zero for non-rounded rectangles.
Implementering
public function get trRadius():Number
public function set trRadius(value:Number):void
RectangularDropShadow | () | Konstruktor |
public function RectangularDropShadow()
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Constructor.
drawShadow | () | metod |
public function drawShadow(g:Graphics, x:Number, y:Number, width:Number, height:Number):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Renders the shadow on the screen.
Parametrar
g:Graphics — The Graphics object on which to draw the shadow.
| |
x:Number — The horizontal offset of the drop shadow,
based on the Graphics object's position.
| |
y:Number — The vertical offset of the drop shadow,
based on the Graphics object's position.
| |
width:Number — The width of the shadow, in pixels.
| |
height:Number — The height of the shadow, in pixels.
|
Tue Jun 12 2018, 01:40 PM Z