Use a GraphicsStroke object with the Graphics.drawGraphicsData() method. Drawing a GraphicsStroke object is the equivalent of calling one of the methods of the Graphics object that sets the line style, such as the Graphics.lineStyle() method, the Graphics.lineBitmapStyle() method, or the Graphics.lineGradientStyle() method.


Can be created with method new:

Lib.Media.Display.GraphicsStroke.new(thickness, pixelHinting, scaleMode, caps, joints, miterLimit, fill)

Creates a new GraphicsStroke object.

thickness - An integer that indicates the thickness of the line in points; valid values are 0-255. If a number is not specified, or if the parameter is undefined, a line is not drawn. If a value of less than 0 is passed, the default is 0. The value 0 indicates hairline thickness; the maximum thickness is 255. If a value greater than 255 is passed, the default is 255.

pixelHinting - (default = false) - A Boolean value that specifies whether to hint strokes to full pixels. This affects both the position of anchors of a curve and the line stroke size itself. With pixelHinting set to true, application hints line widths to full pixel widths. With pixelHinting set to false, disjoints can appear for curves and straight lines. 

scaleMode - (default = "normal") - A value from the LineScaleMode object that specifies which scale mode to use:

LineScaleMode.NORMAL - Always scale the line thickness when the object is scaled (the default).

LineScaleMode.NONE - Never scale the line thickness. (not supported)

LineScaleMode.VERTICAL - Do not scale the line thickness if the object is scaled vertically only. (not supported)

LineScaleMode.HORIZONTAL - Do not scale the line thickness if the object is scaled horizontally only. (not supported)

caps - (default = "none") - A value from the CapsStyle object that specifies the type of caps at the end of lines. Valid values are: CapsStyle.NONE, CapsStyle.ROUND, and CapsStyle.SQUARE. If a value is not indicated, Flash uses round caps.

joints - (default = "round") - A value from the JointStyle object that specifies the type of joint appearance used at angles. Valid values are: JointStyle.BEVEL, JointStyle.MITER, and JointStyle.ROUND. If a value is not indicated, Flash uses round joints.

Note: For joints set to JointStyle.MITER, you can use the miterLimit parameter to limit the length of the miter.

miterLimit - (default = 3.0) - A number that indicates the limit at which a miter is cut off. Valid values range from 1 to 255 (and values outside that range are rounded to 1 or 255). This value is only used if the jointStyle is set to "miter". The miterLimit value represents the length that a miter can extend beyond the point at which the lines meet to form a joint. The value expresses a factor of the line thickness. 

fill - (default = nil) - An IGraphicsDatal instance containing data for filling a stroke. An IGraphicsData instance can represent a series of fill commands.


Created with the Personal Edition of HelpNDoc: Free Kindle producer