| Package | mx.graphics |
| Class | public class Stroke |
| Inheritance | Stroke Object |
| Implements | IStroke |
...
<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 Syntax
Hide MXML Syntax
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="0"
pixelHinting="false|true"
scaleMode="normal|none|noScale|vertical"
weight="1 (in most cases)"
/>
See also
| Property | Defined by | ||
|---|---|---|---|
| alpha : Number
The transparency of a line.
| Stroke | ||
| caps : String = "null"
Specifies the type of caps at the end of lines.
| Stroke | ||
| color : uint = 0
The line color.
| Stroke | ||
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance.
| Object | |
| joints : String = "null"
Specifies the type of joint appearance used at angles.
| Stroke | ||
| miterLimit : Number = 0
Indicates the limit at which a miter is cut off.
| Stroke | ||
| pixelHinting : Boolean = false
Specifies whether to hint strokes to full pixels.
| Stroke | ||
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
| scaleMode : String = "normal"
Specifies how to scale a stroke.
| Stroke | ||
| weight : Number
The line weight, in pixels.
| Stroke | ||
| Method | Defined by | ||
|---|---|---|---|
|
Stroke(color:uint = 0, weight:Number = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 0)
Constructor.
| Stroke | ||
|
Applies the properties to the specified Graphics object.
| Stroke | ||
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
Returns the primitive value of the specified object.
| Object | |
| alpha | property |
public var alpha:NumberThe transparency of a line. Possible values are 0.0 (invisible) through 1.0 (opaque).
The default value is 1.0..
| caps | property |
public var caps:String = "null"
Specifies the type of caps at the end of lines.
Valid values are: "round", "square",
and "none".
| color | property |
| joints | property |
public var joints:String = "null"
Specifies the type of joint appearance used at angles.
Valid values are "round", "miter",
and "bevel".
| miterLimit | property |
public var miterLimit:Number = 0Indicates the limit at which a miter is cut off. Valid values range from 0 to 255.
The default value is 0.
| pixelHinting | property |
public var pixelHinting:Boolean = falseSpecifies 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 | property |
public var scaleMode:String = "normal"
Specifies how to scale a stroke.
Valid values are "normal", "none",
"vertical", and "noScale".
The default value is "normal".
| weight | property |
weight:Number [read-write]The line weight, in pixels. For many charts, the default value is 1 pixel.
Implementation public function get weight():Number
public function set weight(value:Number):void
| Stroke | () | constructor |
public function Stroke(color:uint = 0, weight:Number = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 0)Constructor.
Parameterscolor:uint (default = 0) — Specifies the line color.
|
|
weight:Number (default = 0) — Specifies the line weight, in pixels.
|
|
alpha:Number (default = 1.0) — Specifies the alpha value in the range 0.0 to 1.0.
|
|
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.
|
|
scaleMode:String (default = "normal") — Specifies how to scale a stroke.
Valid values are "normal", "none",
"vertical", and "noScale".
|
|
caps:String (default = null) — Specifies the type of caps at the end of lines.
Valid values are "round", "square",
and "none".
|
|
joints:String (default = null) — Specifies the type of joint appearance used at angles.
Valid values are "round", "miter",
and "bevel".
|
|
miterLimit:Number (default = 0) — Indicates the limit at which a miter is cut off.
Valid values range from 0 to 255.
|
| apply | () | method |
public function apply(g:Graphics):voidApplies the properties to the specified Graphics object.
Parametersg:Graphics — The Graphics object to which the Stroke's styles are applied.
|