Packagecom.rubenswieringa.drawing
Classpublic class LineStyle

Stores line-styles.

See also

DrawingTool.html
edit 1 Before modifying and/or redistributing this class, please contact Ruben Swieringa (ruben.swieringa


Public Properties
 PropertyDefined by
  alpha : Number
A number that indicates the alpha value of the color of the line; valid values are 0 to 1.
LineStyle
  caps : String
A value from the CapsStyle class that specifies the type of caps at the end of lines.
LineStyle
  color : uint = 0
Line color.
LineStyle
  dash : Number
The length of a dash in a dashed line.
LineStyle
  dashEnabled : Boolean = false
If true, the line this LineStyle instance is applied to will have a dashed line.
LineStyle
  joints : String
A value from the JointStyle class that specifies the type of joint appearance used at angles.
LineStyle
  miterLimit : Number
A number that indicates the limit at which a miter is cut off.
LineStyle
  pixelHinting : Boolean = false
A Boolean value that specifies whether to hint strokes to full pixels.
LineStyle
  scaleMode : String
A value from the LineScaleMode class that specifies which scale mode to use.
LineStyle
  space : Number
The space between two dashes in a dashed line.
LineStyle
  thickness : Number
An integer that indicates the thickness of the line in points; valid values are 0 to 255.
LineStyle
Public Methods
 MethodDefined by
  
LineStyle(thickness:Number = 1, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3)
Constructor.
LineStyle
  
applyTo(graphics:Graphics):void
Sets a Graphics instance its lineStyle equal to the values of the native supported properties (all of which can be set through this class its constructor).
LineStyle
Property detail
alphaproperty
alpha:Number  [read-write]

A number that indicates the alpha value of the color of the line; valid values are 0 to 1.

Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
capsproperty 
caps:String  [read-write]

A value from the CapsStyle class that specifies the type of caps at the end of lines.

Implementation
    public function get caps():String
    public function set caps(value:String):void

See also

colorproperty 
public var color:uint = 0

Line color.

The default value is 0.

dashproperty 
dash:Number  [read-write]

The length of a dash in a dashed line. When this property is set, dashEnabled is automatically set to true.

The default value is 2.

Implementation
    public function get dash():Number
    public function set dash(value:Number):void

See also

dashEnabledproperty 
public var dashEnabled:Boolean = false

If true, the line this LineStyle instance is applied to will have a dashed line.

The default value is false.

See also

jointsproperty 
joints:String  [read-write]

A value from the JointStyle class that specifies the type of joint appearance used at angles.

Implementation
    public function get joints():String
    public function set joints(value:String):void

See also

miterLimitproperty 
miterLimit:Number  [read-write]

A number that indicates the limit at which a miter is cut off. Valid values range from 1 to 255.

Implementation
    public function get miterLimit():Number
    public function set miterLimit(value:Number):void
pixelHintingproperty 
public var pixelHinting:Boolean = false

A Boolean value that specifies whether to hint strokes to full pixels.

The default value is false.

scaleModeproperty 
scaleMode:String  [read-write]

A value from the LineScaleMode class that specifies which scale mode to use.

Implementation
    public function get scaleMode():String
    public function set scaleMode(value:String):void

See also

spaceproperty 
space:Number  [read-write]

The space between two dashes in a dashed line. If untouched, the value of the space property will be equal to that of the dash property.

The default value is 2.

Implementation
    public function get space():Number
    public function set space(value:Number):void

See also

thicknessproperty 
thickness:Number  [read-write]

An integer that indicates the thickness of the line in points; valid values are 0 to 255.

Implementation
    public function get thickness():Number
    public function set thickness(value:Number):void
Constructor detail
LineStyle()constructor
public function LineStyle(thickness:Number = 1, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3)

Constructor.

Parameters
thickness:Number (default = 1)
 
color:uint (default = 0)
 
alpha:Number (default = 1.0)
 
pixelHinting:Boolean (default = false)
 
scaleMode:String (default = "normal")
 
caps:String (default = null)
 
joints:String (default = null)
 
miterLimit:Number (default = 3)

See also

Method detail
applyTo()method
public function applyTo(graphics:Graphics):void

Sets a Graphics instance its lineStyle equal to the values of the native supported properties (all of which can be set through this class its constructor).

Parameters
graphics:Graphics — A Graphics instance.

See also