套件 | spark.filters |
類別 | public class GradientFilter |
繼承 | GradientFilter BaseDimensionFilter BaseFilter EventDispatcher Object |
子類別 | GradientBevelFilter, GradientGlowFilter |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The <s:GradientFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:GradientFilter Properties angle="45" distance="4.0" entries="[]" type="inner" />
預設 MXML 屬性entries
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
angle : Number
The angle, in degrees. | GradientFilter | ||
blurX : Number
The amount of horizontal blur. | BaseDimensionFilter | ||
blurY : Number
The amount of vertical blur. | BaseDimensionFilter | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
distance : Number
The offset distance of the glow. | GradientFilter | ||
entries : Array
An Array of GradientEntry objects
defining the fill patterns for the gradient fill. | GradientFilter | ||
knockout : Boolean
Specifies whether the object has a knockout effect. | BaseDimensionFilter | ||
quality : int
The number of times to apply the filter. | BaseDimensionFilter | ||
strength : Number
The strength of the imprint or spread. | BaseDimensionFilter | ||
type : String
The placement of the filter effect. | GradientFilter |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | GradientFilter | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
Propagates a change event when the filter has changed. | BaseFilter | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
angle | 屬性 |
angle:Number
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The angle, in degrees. Valid values are 0 to 360. The angle value represents the angle of the theoretical light source falling on the object and determines the placement of the effect relative to the object. If distance is set to 0, the effect is not offset from the object, and therefore the angle property has no effect.
預設值為 45。
實作
public function get angle():Number
public function set angle(value:Number):void
distance | 屬性 |
entries | 屬性 |
entries:Array
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
An Array of GradientEntry objects defining the fill patterns for the gradient fill.
預設值為 []。
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get entries():Array
public function set entries(value:Array):void
type | 屬性 |
type:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The placement of the filter effect. Possible values are flash.filters.BitmapFilterType constants:
BitmapFilterType.OUTER
- Glow on the outer edge of the object.BitmapFilterType.INNER
- Glow on the inner edge of the object.BitmapFilterType.FULL
- Glow on top of the object.
預設值為 BitmapFilterType.INNER。
實作
public function get type():String
public function set type(value:String):void
相關 API 元素
GradientFilter | () | 建構函式 |
public function GradientFilter(colors:Array = null, alphas:Array = null, ratios:Array = null)
語言版本: | ActionScript 3.0 |
產品版本: | Flex 4 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
參數colors:Array (default = null ) — An array of RGB hexadecimal color values to use in the gradient.
For example, red is 0xFF0000, blue is 0x0000FF, and so on.
| |
alphas:Array (default = null ) — An array of alpha transparency values for the corresponding colors in
the colors array. Valid values for each element in the array are 0 to 1.
For example, .25 sets a transparency value of 25%.
| |
ratios:Array (default = null ) — An array of color distribution ratios; valid values are
0 to 255.
|
Tue Jun 12 2018, 03:47 PM Z