Packagegraphics.drawing
Classpublic dynamic class Pen
InheritancePen Inheritance flash.utils.Proxy
Implements IPen
Subclasses AntPen, ArcPen, BezierPen, Canvas, CirclePen, DistortPen, EllipsePen, FreePolygonPen, GearPen, HexagonPen, LinePen, PageFlipPen, PolygonPen, PolyLinePen, RectanglePen, ScalePen, StarPen, TrianglePen

The Pen class use composition to control a Graphics reference and draw custom vector graphic shapes.



Public Properties
 PropertyDefined By
  align : uint
Determinates the align value of the pen.
Pen
  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
  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
Public Methods
 MethodDefined By
  
Pen(graphics:* = null)
Creates a new Pen instance.
Pen
  
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(... arguments):void
Draws the vector graphic shape.
Pen
  
drawShape():void
This method contains the basic drawing shape algorithm.
Pen
  
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
  
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
Protected Methods
 MethodDefined By
  
callProperty(methodName:*, ... rest):*
[override] Overrides the behavior of an object property that can be called as a function.
Pen
Property Detail
alignproperty
align:uint

Determinates the align value of the pen.


Implementation
    public function get align():uint
    public function set align(value:uint):void
fillproperty 
fill:IFillStyle

Determinates the fill style object of the pen.


Implementation
    public function get fill():IFillStyle
    public function set fill(value:IFillStyle):void
graphicsproperty 
graphics:*

Specifies the Graphics object belonging to this Shape object, where vector drawing commands can occur. This attribute is always a Graphics reference but must be defines with a Shape, Sprite, MovieClip or Graphics object.


Implementation
    public function get graphics():*
    public function set graphics(value:any):void
lineproperty 
line:ILineStyle

Determinates the line style object of the pen.


Implementation
    public function get line():ILineStyle
    public function set line(value:ILineStyle):void
useClearproperty 
public var useClear:Boolean = true

Indicates if the clear() method is invoked at the end of the draw method.

useEndFillproperty 
public var useEndFill:Boolean = true

Indicates if the endFill() method is invoked at the end of the draw method.

Constructor Detail
Pen()Constructor
public function Pen(graphics:* = null)

Creates a new Pen instance.

Parameters
graphics:* (default = null) — The Graphics reference to control with this helper. You can passed-in a Shape or Sprite/MovieClip reference in argument.
Method Detail
BF()method
public function BF(... arguments):void

Defines a shortcut reference to used the beginBitmapFill method.

Parameters

... arguments

C()method 
public function C(... arguments):void

Defines a shortcut reference to used the curveTo method.

Parameters

... arguments

callProperty()method 
override flash_proxy function callProperty(methodName:*, ... rest):*

Overrides the behavior of an object property that can be called as a function. When a method of the object is invoked, this method is called. While some objects can be called as functions, some object properties can also be called as functions.

Parameters

methodName:*
 
... rest

Returns
*
CL()method 
public function CL():void

Defines a shortcut reference to used the clear method.

draw()method 
public function draw(... arguments):void

Draws the vector graphic shape.

Parameters

... arguments

drawShape()method 
public function drawShape():void

This method contains the basic drawing shape algorithm.

EF()method 
public function EF():void

Defines a shortcut reference to used the endFill method.

F()method 
public function F(... arguments):void

Defines a shortcut reference to used the beginFill method.

Parameters

... arguments

GF()method 
public function GF(... arguments):void

Defines a shortcut reference to used the beginGradientFill method.

Parameters

... arguments

GS()method 
public function GS(... arguments):void

Defines a shortcut reference to used the lineGradientStyle method.

Parameters

... arguments

L()method 
public function L(... arguments):void

Defines a shortcut reference to used the lineTo method.

Parameters

... arguments

M()method 
public function M(... arguments):void

Defines a shortcut reference to used the moveTo method.

Parameters

... arguments

S()method 
public function S(... arguments):void

Defines a shortcut reference to used the lineStyle method.

Parameters

... arguments