The SolidColorStroke class defines the properties for a line.
You can define a SolidColorStroke object in MXML, but you must attach that SolidColorStroke to
another object for it to appear in your application. The following example
defines two SolidColorStroke objects and then uses them in the horizontalAxisRenderer
of a LineChart control:
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.
Method Detail
apply
()
method
public function apply(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
Language Version :
ActionScript 3.0
Product Version :
Flex 3
Runtime Versions :
Flash Player 9, AIR 1.1
Applies the properties to the specified Graphics object.
Parameters
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
()
method
public function createGraphicsStroke(targetBounds:Rectangle, targetOrigin:Point):GraphicsStroke
Language Version :
ActionScript 3.0
Product Version :
Flex 3
Runtime Versions :
Flash Player 9, AIR 1.1
Generates a GraphicsStroke object representing
this stroke.
Parameters
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.
Returns
GraphicsStroke — The Drawing API-2 GraphicsStroke object representing
this stroke.