套件 | mx.graphics |
類別 | public class SolidColorStroke |
繼承 | SolidColorStroke EventDispatcher Object |
實作 | IStroke |
子類別 | Stroke |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
... <mx:SolidColorStroke id="ticks" color="0xFF0000" weight="1"/> <mx:SolidColorStroke id="mticks" color="0x0000FF" weight="1"/> <mx:LineChart id="mychart" dataProvider="{ndxa}"> <mx:horizontalAxisRenderer> <mx:AxisRenderer placement="bottom" canDropLabels="true"> <mx:tickStroke>{ticks}</mx:tickStroke> <mx:minorTickStroke>{mticks}</mx:minorTickStroke> </mx:AxisRenderer> </mx:horizontalAxisRenderer> </LineChart> ...MXML 語法隱藏 MXML 語法
The <mx:SolidColorStroke>
tag inherits all the tag attributes
of its superclass, and adds the following tag attributes:
<mx:SolidColorStroke Properties alpha="1.0" caps="round|none|square" color="0x000000" joints="round|bevel|miter" miterLimit="3" pixelHinting="false|true" scaleMode="normal|none|horizontal|vertical" weight="1 (in most cases)" />
更多範例
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
alpha : Number
The transparency of a line. | SolidColorStroke | ||
caps : String
Specifies the type of caps at the end of lines. | SolidColorStroke | ||
color : uint
The line color. | SolidColorStroke | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
joints : String
Specifies the type of joint appearance used at angles. | SolidColorStroke | ||
miterLimit : Number
Indicates the limit at which a miter is cut off. | SolidColorStroke | ||
pixelHinting : Boolean
Specifies whether to hint strokes to full pixels. | SolidColorStroke | ||
scaleMode : String
A value from the LineScaleMode class
that specifies which scale mode to use. | SolidColorStroke | ||
weight : Number
The line weight, in pixels. | SolidColorStroke |
方法 | 定義自 | ||
---|---|---|---|
SolidColorStroke(color:uint = 0x000000, weight:Number = 1, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = "round", joints:String = "round", miterLimit:Number = 3)
Constructor. | SolidColorStroke | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
Applies the properties to the specified Graphics object. | SolidColorStroke | ||
Generates a GraphicsStroke object representing
this stroke. | SolidColorStroke | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
alpha | 屬性 |
alpha:Number
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The transparency of a line. Possible values are 0.0 (invisible) through 1.0 (opaque).
預設值為 1.0.。
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get alpha():Number
public function set alpha(value:Number):void
caps | 屬性 |
caps:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Specifies the type of caps at the end of lines.
Valid values are: CapsStyle.ROUND
, CapsStyle.SQUARE
,
and CapsStyle.NONE
.
預設值為 CapsStyle.ROUND。
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get caps():String
public function set caps(value:String):void
color | 屬性 |
joints | 屬性 |
joints:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Specifies the type of joint appearance used at angles.
Valid values are JointStyle.ROUND
, JointStyle.MITER
,
and JointStyle.BEVEL
.
預設值為 JointStyle.ROUND。
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get joints():String
public function set joints(value:String):void
miterLimit | 屬性 |
miterLimit:Number
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Indicates the limit at which a miter is cut off. Valid values range from 1 to 255.
預設值為 3。
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get miterLimit():Number
public function set miterLimit(value:Number):void
pixelHinting | 屬性 |
pixelHinting:Boolean
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Specifies whether to hint strokes to full pixels. This value affects both the position of anchors of a curve and the line stroke size itself.
預設值為 false。
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get pixelHinting():Boolean
public function set pixelHinting(value:Boolean):void
scaleMode | 屬性 |
scaleMode:String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
A value from the LineScaleMode class that specifies which scale mode to use. Value valids are:
-
LineScaleMode.NORMAL
— Always scale the line thickness when the object is scaled (the default). -
LineScaleMode.NONE
— Never scale the line thickness. -
LineScaleMode.VERTICAL
— Do not scale the line thickness if the object is scaled vertically only. -
LineScaleMode.HORIZONTAL
— Do not scale the line thickness if the object is scaled horizontally only.
預設值為 LineScaleMode.NORMAL。
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get scaleMode():String
public function set scaleMode(value:String):void
weight | 屬性 |
SolidColorStroke | () | 建構函式 |
public function SolidColorStroke(color:uint = 0x000000, weight:Number = 1, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = "round", joints:String = "round", miterLimit:Number = 3)
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor.
參數color:uint (default = 0x000000 ) — Specifies the line color.
The default value is 0x000000 (black).
| |
weight:Number (default = 1 ) — Specifies the line weight, in pixels.
The default value is 1.
| |
alpha:Number (default = 1.0 ) — Specifies the alpha value in the range 0.0 to 1.0.
The default value is 1.0 (opaque).
| |
pixelHinting:Boolean (default = false ) — Specifies whether to hint strokes to full pixels.
This value affects both the position of anchors of a curve
and the line stroke size itself.
The default value is false.
| |
scaleMode:String (default = "normal ") — A value from the LineScaleMode class
that specifies which scale mode to use.
Valid values are LineScaleMode.HORIZONTAL ,
LineScaleMode.NONE , LineScaleMode.NORMAL ,
and LineScaleMode.VERTICAL .
This parameter is optional,
with a default value of LineScaleMode.NORMAL .
| |
caps:String (default = "round ") — Specifies the type of caps at the end of lines.
Valid values are CapsStyle.ROUND , CapsStyle.SQUARE ,
and CapsStyle.NONE .
The default value is CapsStyle.ROUND .
| |
joints:String (default = "round ") — Specifies the type of joint appearance used at angles.
Valid values are JointStyle.ROUND , JointStyle.MITER ,
and JointStyle.BEVEL .
The default value is JointStyle.ROUND .
| |
miterLimit:Number (default = 3 ) — Indicates the limit at which a miter is cut off.
Valid values range from 1 to 255.
The default value is 3.
|
apply | () | 方法 |
public function apply(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Applies the properties to the specified Graphics object.
參數
graphics:Graphics — The Graphics object to apply the properties to.
| |
targetBounds:Rectangle — The bounds of the shape that the stroke is applied to.
| |
targetOrigin:Point — The Point that defines the origin (0,0) of the shape in the
coordinate system of target.
|
createGraphicsStroke | () | 方法 |
public function createGraphicsStroke(targetBounds:Rectangle, targetOrigin:Point):GraphicsStroke
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Generates a GraphicsStroke object representing this stroke.
參數
targetBounds:Rectangle — The stroke's bounding box.
| |
targetOrigin:Point — The Point that defines the origin (0,0) of the shape in the
coordinate system of target.
|
GraphicsStroke — The Drawing API-2 GraphicsStroke object representing
this stroke.
|
Tue Jun 12 2018, 03:47 PM Z