| 包 | mx.graphics |
| 类 | public class Stroke |
| 继承 | Stroke SolidColorStroke EventDispatcher Object |
自以下版本起不推荐使用: 4.0: 请使用 SolidColorStroke
| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
...
<mx:Stroke id="ticks" color="0xFF0000" weight="1"/>
<mx:Stroke 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:Stroke> tag inherits all the tag attributes
of its superclass, and adds the following tag attributes:
<mx:Stroke
Properties
alpha="1.0"
caps="null|none|round|square"
color="0x000000"
joints="null|bevel|miter|round"
miterLimit="1"
pixelHinting="false|true"
scaleMode="normal|none|horizontal|vertical"
weight="1 (in most cases)"
/>
相关 API 元素
公共方法
| 方法 | 由以下参数定义 | ||
|---|---|---|---|
Stroke(color:uint = 0x000000, weight:Number = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 1)
构造函数。 | Stroke | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。 | EventDispatcher | |
![]() |
对指定的 Graphics 对象应用属性。 | SolidColorStroke | |
![]() |
生成表示此笔触的 GraphicsStroke 对象。 | SolidColorStroke | |
![]() |
将事件调度到事件流中。 | EventDispatcher | |
![]() |
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。 | EventDispatcher | |
![]() |
表示对象是否已经定义了指定的属性。 | Object | |
![]() |
表示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | |
![]() |
表示指定的属性是否存在、是否可枚举。 | Object | |
![]() |
从 EventDispatcher 对象中删除侦听器。 | EventDispatcher | |
![]() |
设置循环操作动态属性的可用性。 | Object | |
![]() |
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。 | Object | |
![]() |
返回指定对象的字符串表示形式。 | Object | |
![]() |
返回指定对象的原始值。 | Object | |
![]() |
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。 | EventDispatcher | |
构造函数详细信息
Stroke | () | 构造函数 |
public function Stroke(color:uint = 0x000000, weight:Number = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 1)| 语言版本: | ActionScript 3.0 |
| 产品版本: | Flex 3 |
| 运行时版本: | Flash Player 9, AIR 1.1 |
构造函数。
参数color:uint (default = 0x000000) — 指定线条颜色。默认值为 0x000000(黑色)。
| |
weight:Number (default = 0) — 指定线条的粗细(以像素为单位)。默认值为 0。
| |
alpha:Number (default = 1.0) — 指定 alpha 值,介于 0.0 到 1.0 之间。默认值为 1.0(不透明)。
| |
pixelHinting:Boolean (default = false) — 指定是否提示笔触采用完整像素。此值同时影响曲线锚点的位置以及线条笔触大小本身。默认值为 false。
| |
scaleMode:String (default = "normal") — LineScaleMode 类中的一个值,指定要使用的缩放模式。有效值为 LineScaleMode.HORIZONTAL、LineScaleMode.NONE、LineScaleMode.NORMAL 和 LineScaleMode.VERTICAL。此参数是可选的,默认值为 LineScaleMode.NORMAL。
| |
caps:String (default = null) — 指定线条结尾处的端点的类型。有效值为 "round"、"square" 和 "none"。默认值为 null。
| |
joints:String (default = null) — 指定拐角处使用的连接外观的类型。有效值为 "round"、"miter" 和 "bevel"。默认值为 null。
| |
miterLimit:Number (default = 1) — 表示将在哪个限制位置切断尖角。有效值范围是 1 到 255。默认值为 1。
|
Tue Jun 12 2018, 11:04 AM Z
显示 MXML 语法