| Package | graphics.drawing |
| Class | public dynamic class RoundedRectanglePen |
| Inheritance | RoundedRectanglePen RectanglePen Pen flash.utils.Proxy |
Example :
import flash.display.CapsStyle ;
import flash.display.JointStyle ;
import flash.display.LineScaleMode ;
import graphics.Align ;
import graphics.FillStyle ;
import graphics.LineStyle ;
import graphics.drawing.RoundedRectanglePen ;
stage.scaleMode = StageScaleMode.NO_SCALE ;
stage.align = "" ;
var shape:Shape = new Shape() ;
shape.x = 740 / 2 ;
shape.y = 420 / 2 ;
var pen:RoundedRectanglePen = new RoundedRectanglePen( shape.graphics , 0, 0, 100, 80, 12, NaN, Align.CENTER ) ;
pen.useClear = true ;
pen.useEndFill = true ;
pen.fill = new FillStyle( 0xFF0000 , 0.5 ) ;
pen.line = new LineStyle( 2, 0xFFFFFF , 1 , true, LineScaleMode.NORMAL , CapsStyle.SQUARE, JointStyle.MITER ) ;
pen.draw() ;
| Property | Defined By | ||
|---|---|---|---|
![]() | align : uint
Determinates the align value of the pen. | Pen | |
| ellipseHeight : Number
The height of the ellipse used to draw the rounded corners (in pixels). | RoundedRectanglePen | ||
| ellipseWidth : Number
The width of the ellipse used to draw the rounded corners (in pixels). | RoundedRectanglePen | ||
![]() | 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 | |
![]() | height : Number
Defines the height of the shape rectangle. | RectanglePen | |
![]() | line : ILineStyle
Determinates the line style object of the pen. | Pen | |
![]() | rectangle : Rectangle [read-only]
Returns the Rectangle reference of this pen. | RectanglePen | |
![]() | 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 | |
![]() | width : Number
Defines the width of the shape rectangle. | RectanglePen | |
![]() | x : Number
Defines the x position of the shape rectangle. | RectanglePen | |
![]() | y : Number
Defines the y position of the shape rectangle. | RectanglePen | |
| Method | Defined By | ||
|---|---|---|---|
RoundedRectanglePen(graphic:*, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, ellipseWidth:Number = 0, ellipseHeight:Number, align:uint = 10)
Creates a new RoundedRectanglePen instance. | RoundedRectanglePen | ||
![]() | 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. | RectanglePen | |
drawShape():void [override]
This method contains the basic drawing shape algorithm. | RoundedRectanglePen | ||
![]() | 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 | |
setPen(... args):void [override]
Sets the shape options to defined all values to draw the shape. | RoundedRectanglePen | ||
| ellipseHeight | property |
public var ellipseHeight:NumberThe height of the ellipse used to draw the rounded corners (in pixels). Optional; if no value is specified, the default value matches that provided for the ellipseWidth parameter.
| ellipseWidth | property |
public var ellipseWidth:NumberThe width of the ellipse used to draw the rounded corners (in pixels).
| RoundedRectanglePen | () | Constructor |
public function RoundedRectanglePen(graphic:*, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, ellipseWidth:Number = 0, ellipseHeight:Number, align:uint = 10)Creates a new RoundedRectanglePen instance.
Parametersgraphic:* — The Graphics reference to control with this helper. You can passed-in a Shape or Sprite/MovieClip reference in argument.
| |
x:Number (default = 0) — (optional) The x position of the pen. (default 0)
| |
y:Number (default = 0) — (optional) The y position of the pen. (default 0)
| |
width:Number (default = 0) — (optional) The width of the pen. (default 0)
| |
height:Number (default = 0) — (optional) The height of the pen. (default 0)
| |
ellipseWidth:Number (default = 0) — (optional) The width of the ellipse used to draw the rounded corners (in pixels). (default 0)
| |
ellipseHeight:Number (default = NaN) — (optional) Optional; if no value is specified, the default value matches that provided for the ellipseWidth parameter.
| |
align:uint (default = 10) — (optional) The align value of the pen. (default Align.TOP_LEFT)
|
| drawShape | () | method |
override public function drawShape():voidThis method contains the basic drawing shape algorithm.
| setPen | () | method |
override public function setPen(... args):voidSets the shape options to defined all values to draw the shape.
Parameters
... args — (optional) The x position of the pen.
|