Packagegraphics.drawing
Classpublic class ScalePen
InheritanceScalePen Inheritance Pen Inheritance flash.utils.Proxy

This pen scale a bitmap and divided it into a grid with nine regions, based on the scale9Grid rectangle, which defines the center region of the grid.

Note : In this pen the fill and line styles properties are not used.



Public Properties
 PropertyDefined By
 Inheritedalign : uint
Determinates the align value of the pen.
Pen
  bitmapData : BitmapData
Determinates the BitmapData reference of the pen.
ScalePen
 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
  height : Number
Indicates the height value of the pen.
ScalePen
  inner : Rectangle
Indicates the inner scale nine area of the pen.
ScalePen
  keepAspectRatio : Boolean
Indicates if the pen keep the aspect ratio.
ScalePen
 Inheritedline : ILineStyle
Determinates the line style object of the pen.
Pen
  outer : Rectangle
Indicates the outer scale nine area of the pen.
ScalePen
  smoothing : Boolean = true
Indicates whether or not use pixel smoothing render.
ScalePen
 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
  width : Number
Determinates the width of the pen.
ScalePen
Public Methods
 MethodDefined By
  
ScalePen(graphics:* = null, bitmapData:BitmapData = null, width:Number, height:Number, inner:Rectangle = null, outer:Rectangle = null)
Creates a new ScalePen instance.
ScalePen
 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 and scale it.
ScalePen
  
drawShape():void
[override] This method contains the basic drawing shape algorithm.
ScalePen
 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
 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
  
setSize(width:Number = 0, height:Number = 0):void
Sets the width and height properties of the pen.
ScalePen
  
setup(bitmap:BitmapData = null, width:Number, height:Number, inner:Rectangle = null, outer:Rectangle = null):void
Sets the pen options to defined all values to draw the shape.
ScalePen
Property Detail
bitmapDataproperty
bitmapData:BitmapData

Determinates the BitmapData reference of the pen.


Implementation
    public function get bitmapData():BitmapData
    public function set bitmapData(value:BitmapData):void
heightproperty 
height:Number

Indicates the height value of the pen.


Implementation
    public function get height():Number
    public function set height(value:Number):void
innerproperty 
inner:Rectangle

Indicates the inner scale nine area of the pen.


Implementation
    public function get inner():Rectangle
    public function set inner(value:Rectangle):void
keepAspectRatioproperty 
keepAspectRatio:Boolean

Indicates if the pen keep the aspect ratio.


Implementation
    public function get keepAspectRatio():Boolean
    public function set keepAspectRatio(value:Boolean):void
outerproperty 
outer:Rectangle

Indicates the outer scale nine area of the pen.


Implementation
    public function get outer():Rectangle
    public function set outer(value:Rectangle):void
smoothingproperty 
public var smoothing:Boolean = true

Indicates whether or not use pixel smoothing render.

widthproperty 
width:Number

Determinates the width of the pen.


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
ScalePen()Constructor
public function ScalePen(graphics:* = null, bitmapData:BitmapData = null, width:Number, height:Number, inner:Rectangle = null, outer:Rectangle = null)

Creates a new ScalePen 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.
 
bitmapData:BitmapData (default = null)
 
width:Number (default = NaN)
 
height:Number (default = NaN)
 
inner:Rectangle (default = null)
 
outer:Rectangle (default = null)
Method Detail
draw()method
override public function draw(... args):void

Draws the shape and scale it.

Parameters

... args

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

This method contains the basic drawing shape algorithm.

setSize()method 
public function setSize(width:Number = 0, height:Number = 0):void

Sets the width and height properties of the pen.

Parameters

width:Number (default = 0)
 
height:Number (default = 0)

setup()method 
public function setup(bitmap:BitmapData = null, width:Number, height:Number, inner:Rectangle = null, outer:Rectangle = null):void

Sets the pen options to defined all values to draw the shape.

Parameters

bitmap:BitmapData (default = null)
 
width:Number (default = NaN)
 
height:Number (default = NaN)
 
inner:Rectangle (default = null)
 
outer:Rectangle (default = null)