套件 | mx.graphics |
類別 | public class RectangularDropShadow |
繼承 | RectangularDropShadow Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
alpha : Number
陰影顏色的 Alpha 透明度值。 | RectangularDropShadow | ||
angle : Number
陰影的角度。 | 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
陰影的顏色。 | RectangularDropShadow | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
distance : Number
陰影的偏移距離,以像素為單位。 | 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 |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | RectangularDropShadow | ||
Renders the shadow on the screen. | RectangularDropShadow | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
alpha | 屬性 |
angle | 屬性 |
blRadius | 屬性 |
blRadius:Number
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get blRadius():Number
public function set blRadius(value:Number):void
blurX | 屬性 |
blurY | 屬性 |
brRadius | 屬性 |
brRadius:Number
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get brRadius():Number
public function set brRadius(value:Number):void
color | 屬性 |
distance | 屬性 |
tlRadius | 屬性 |
tlRadius:Number
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get tlRadius():Number
public function set tlRadius(value:Number):void
trRadius | 屬性 |
trRadius:Number
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get trRadius():Number
public function set trRadius(value:Number):void
RectangularDropShadow | () | 建構函式 |
public function RectangularDropShadow()
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor.
drawShadow | () | 方法 |
public function drawShadow(g:Graphics, x:Number, y:Number, width:Number, height:Number):void
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Renders the shadow on the screen.
參數
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, 03:47 PM Z