包 | 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
线条的透明度。 | SolidColorStroke | ||
caps : String
指定线条结尾处的端点的类型。 | SolidColorStroke | ||
color : uint
线条颜色。 | SolidColorStroke | ||
constructor : Object
对类对象或给定对象实例的构造函数的引用。 | Object | ||
joints : String
指定拐角处使用的连接外观的类型。 | SolidColorStroke | ||
miterLimit : Number
表示将在哪个限制位置切断尖角。 | SolidColorStroke | ||
pixelHinting : Boolean
指定是否提示笔触采用完整像素。 | SolidColorStroke | ||
scaleMode : String
LineScaleMode 类中的一个值,指定要使用的缩放模式。 | SolidColorStroke | ||
weight : Number
线条粗细(以像素为单位)。 | 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)
构造函数。 | SolidColorStroke | ||
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 |
属性详细信息
alpha | 属性 |
caps | 属性 |
color | 属性 |
joints | 属性 |
joints:String
语言版本: | ActionScript 3.0 |
产品版本: | Flex 3 |
运行时版本: | Flash Player 9, AIR 1.1 |
指定拐角处使用的连接外观的类型。有效值为:JointStyle.ROUND
、JointStyle.MITER
和 JointStyle.BEVEL
。
默认值为 JointStyle.ROUND。
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get joints():String
public function set joints(value:String):void
miterLimit | 属性 |
pixelHinting | 属性 |
scaleMode | 属性 |
scaleMode:String
语言版本: | ActionScript 3.0 |
产品版本: | Flex 3 |
运行时版本: | Flash Player 9, AIR 1.1 |
LineScaleMode 类中的一个值,指定要使用的缩放模式。有效值为:
-
LineScaleMode.NORMAL
—始终在缩放对象时缩放线条的粗细(默认值)。 -
LineScaleMode.NONE
—从不缩放线条粗细。 -
LineScaleMode.VERTICAL
—如果仅垂直缩放对象,则不缩放线条粗细。 -
LineScaleMode.HORIZONTAL
—如果仅水平缩放对象,则不缩放线条粗细。
默认值为 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 |
构造函数。
参数color:uint (default = 0x000000 ) — 指定线条颜色。默认值为 0x000000(黑色)。
| |
weight:Number (default = 1 ) — 指定线条的粗细(以像素为单位)。默认值为 1。
| |
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 = "round ") — 指定线条结尾处的端点的类型。有效值为:CapsStyle.ROUND 、CapsStyle.SQUARE 和 CapsStyle.NONE 。默认值为 CapsStyle.ROUND 。
| |
joints:String (default = "round ") — 指定拐角处使用的连接外观的类型。有效值为:JointStyle.ROUND 、JointStyle.MITER 和 JointStyle.BEVEL 。默认值为 JointStyle.ROUND 。
| |
miterLimit:Number (default = 3 ) — 表示将在哪个限制位置切断尖角。有效值范围是 1 到 255。默认值为 3。
|
方法详细信息
apply | () | 方法 |
public function apply(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
语言版本: | ActionScript 3.0 |
产品版本: | Flex 3 |
运行时版本: | Flash Player 9, AIR 1.1 |
对指定的 Graphics 对象应用属性。
参数
graphics:Graphics — 要对其应用属性的 Graphics 对象。
| |
targetBounds:Rectangle — 笔触所应用到的形状的边界。
| |
targetOrigin:Point — 在目标的坐标系中定义形状的原点 (0,0) 的点。
|
createGraphicsStroke | () | 方法 |
public function createGraphicsStroke(targetBounds:Rectangle, targetOrigin:Point):GraphicsStroke
语言版本: | ActionScript 3.0 |
产品版本: | Flex 3 |
运行时版本: | Flash Player 9, AIR 1.1 |
生成表示此笔触的 GraphicsStroke 对象。
参数
targetBounds:Rectangle — 笔触的定界框。
| |
targetOrigin:Point — 在目标的坐标系中定义形状的原点 (0,0) 的点。
|
GraphicsStroke — 表示此笔触的 Drawing API-2 GraphicsStroke 对象。
|
Tue Jun 12 2018, 11:04 AM Z