Packagegraphics.drawing
Classpublic dynamic class LinePen
InheritanceLinePen Inheritance Pen Inheritance flash.utils.Proxy
Subclasses ArrowPen, DashLinePen

This pen is the basic tool to draw a line.

Example :

     import flash.display.CapsStyle ;
     import flash.display.JointStyle ;
     import flash.display.LineScaleMode ;
     
     import graphics.drawing.LinePen ;
     import graphics.LineStyle ;
     
     import graphics.geom.Vector2 ;
     
     var shape:Shape = new Shape() ;
     
     var start:Vector2 = new Vector2(0,0) ;
     var end:Vector2   = new Vector2(100,100) ;
     
     var pen:LinePen = new LinePen( shape.graphics , start , end ) ;
     pen.lineStyle  = new LineStyle( 2, 0xFFFFFF , 1 , true, LineScaleMode.NORMAL , CapsStyle.SQUARE, JointStyle.MITER ) ;
     pen.draw() ;
     
     addChild( shape ) ;
     



Public Properties
 PropertyDefined By
 Inheritedalign : uint
Determinates the align value of the pen.
Pen
  end : Vector2
The end vector object of this line pen.
LinePen
 Inheritedfill : IFillStyle
Determinates the fill style object of the pen.
Pen
 Inheritedgraphics : *
Specifies the Graphics object belonging to this Shape object, where vector drawing commands can occur.
Pen
 Inheritedline : ILineStyle
Determinates the line style object of the pen.
Pen
  start : Vector2
The start vector object of this line pen.
LinePen
 InheriteduseClear : Boolean = true
Indicates if the clear() method is invoked at the end of the draw method.
Pen
 InheriteduseEndFill : Boolean = true
Indicates if the endFill() method is invoked at the end of the draw method.
Pen
Public Methods
 MethodDefined By
  
LinePen(graphic:*, start:* = null, end:* = null)
Creates a new LinePen instance.
LinePen
 Inherited
BF(... arguments):void
Defines a shortcut reference to used the beginBitmapFill method.
Pen
 Inherited
C(... arguments):void
Defines a shortcut reference to used the curveTo method.
Pen
 Inherited
CL():void
Defines a shortcut reference to used the clear method.
Pen
  
draw(... args):void
[override] Draws the shape.
LinePen
  
drawShape():void
[override] This method contains the basic drawing shape algorithm.
LinePen
 Inherited
EF():void
Defines a shortcut reference to used the endFill method.
Pen
 Inherited
F(... arguments):void
Defines a shortcut reference to used the beginFill method.
Pen
  
Returns the Line reference of this pen.
LinePen
 Inherited
GF(... arguments):void
Defines a shortcut reference to used the beginGradientFill method.
Pen
 Inherited
GS(... arguments):void
Defines a shortcut reference to used the lineGradientStyle method.
Pen
 Inherited
L(... arguments):void
Defines a shortcut reference to used the lineTo method.
Pen
 Inherited
M(... arguments):void
Defines a shortcut reference to used the moveTo method.
Pen
 Inherited
S(... arguments):void
Defines a shortcut reference to used the lineStyle method.
Pen
  
setPen(... args):void
Sets the arc options to defined all values to draw the arc shape in the movieclip reference of this pen.
LinePen
Property Detail
endproperty
public var end:Vector2

The end vector object of this line pen.

startproperty 
public var start:Vector2

The start vector object of this line pen.

Constructor Detail
LinePen()Constructor
public function LinePen(graphic:*, start:* = null, end:* = null)

Creates a new LinePen instance.

Parameters
graphic:* — The Graphics reference to control with this helper. You can passed-in a Shape or Sprite/MovieClip reference in argument.
 
start:* (default = null) — The default start Vector object.
 
end:* (default = null) — The default end Vector object.
Method Detail
draw()method
override public function draw(... args):void

Draws the shape.

Parameters

... args — (optional) The end vector value (flash.geom.Point or graphics.geom.Vector2)

drawShape()method 
override public function drawShape():void

This method contains the basic drawing shape algorithm.

getLine()method 
public function getLine():Line

Returns the Line reference of this pen.

Returns
Line — the Line reference of this pen.
setPen()method 
public function setPen(... args):void

Sets the arc options to defined all values to draw the arc shape in the movieclip reference of this pen.

Parameters

... args — (optional) The end vector value (flash.geom.Point or graphics.geom.Vector2)