| Package | graphics.drawing |
| Class | public dynamic class LinePen |
| Inheritance | LinePen Pen flash.utils.Proxy |
| Subclasses | ArrowPen, DashLinePen |
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 ) ;
| Property | Defined By | ||
|---|---|---|---|
![]() | align : uint
Determinates the align value of the pen. | Pen | |
| end : Vector2
The end vector object of this line pen. | LinePen | ||
![]() | fill : IFillStyle
Determinates the fill style object of the pen. | Pen | |
![]() | graphics : *
Specifies the Graphics object belonging to this Shape object, where vector drawing commands can occur. | Pen | |
![]() | line : ILineStyle
Determinates the line style object of the pen. | Pen | |
| start : Vector2
The start vector object of this line pen. | LinePen | ||
![]() | useClear : Boolean = true
Indicates if the clear() method is invoked at the end of the draw method. | Pen | |
![]() | useEndFill : Boolean = true
Indicates if the endFill() method is invoked at the end of the draw method. | Pen | |
| Method | Defined By | ||
|---|---|---|---|
LinePen(graphic:*, start:* = null, end:* = null)
Creates a new LinePen instance. | LinePen | ||
![]() | BF(... arguments):void
Defines a shortcut reference to used the beginBitmapFill method. | Pen | |
![]() | C(... arguments):void
Defines a shortcut reference to used the curveTo method. | Pen | |
![]() | 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 | ||
![]() | EF():void
Defines a shortcut reference to used the endFill method. | Pen | |
![]() | F(... arguments):void
Defines a shortcut reference to used the beginFill method. | Pen | |
Returns the Line reference of this pen. | LinePen | ||
![]() | GF(... arguments):void
Defines a shortcut reference to used the beginGradientFill method. | Pen | |
![]() | GS(... arguments):void
Defines a shortcut reference to used the lineGradientStyle method. | Pen | |
![]() | L(... arguments):void
Defines a shortcut reference to used the lineTo method. | Pen | |
![]() | M(... arguments):void
Defines a shortcut reference to used the moveTo method. | Pen | |
![]() | 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 | ||
| end | property |
public var end:Vector2The end vector object of this line pen.
| start | property |
public var start:Vector2The start vector object of this line pen.
| LinePen | () | Constructor |
public function LinePen(graphic:*, start:* = null, end:* = null)Creates a new LinePen instance.
Parametersgraphic:* — 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.
|
| draw | () | method |
override public function draw(... args):voidDraws the shape.
Parameters
... args — (optional) The end vector value (flash.geom.Point or graphics.geom.Vector2)
|
| drawShape | () | method |
override public function drawShape():voidThis method contains the basic drawing shape algorithm.
| getLine | () | method |
public function getLine():LineReturns the Line reference of this pen.
ReturnsLine — the Line reference of this pen.
|
| setPen | () | method |
public function setPen(... args):voidSets 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)
|