Packageflare.display
Classpublic class RectSprite
InheritanceRectSprite Inheritance DirtySprite Inheritance flash.display.Sprite
SubclassesLegendItem, LegendRange

A Sprite representing a rectangle shape. Supports line and fill colors and rounded corners.



Public Properties
 PropertyDefined by
 Inheritedangle : Number
The angle value of this sprite's position in polar co-ordinates.
DirtySprite
  cornerHeight : Number
The height of rounded corners.
RectSprite
  cornerSize : Number
[write-only] Sets corner width and height simultaneously.
RectSprite
  cornerWidth : Number
The width of rounded corners.
RectSprite
  fillColor : uint
The fill color of the rectangle.
RectSprite
  h : Number
The height of the rectangle.
RectSprite
 Inheritedheight : Number
If dirty, this sprite is re-rendered before returning the height.
DirtySprite
  lineColor : uint
The line color of the rectangle outline.
RectSprite
  linePixelHinting : Boolean
Flag indicating if pixel hinting should be used for the outline.
RectSprite
  lineWidth : Number
The line width of the rectangle outline.
RectSprite
 Inheritedorigin : Point
The origin point for polar coordinates.
DirtySprite
 Inheritedradius : Number
The radius value of this sprite's position in polar co-ordinates.
DirtySprite
  w : Number
The width of the rectangle.
RectSprite
 Inheritedwidth : Number
If dirty, this sprite is re-rendered before returning the width.
DirtySprite
 Inheritedx : Number
DirtySprite
 Inheritedy : Number
DirtySprite
Protected Properties
 PropertyDefined by
 Inherited_angle : Number
The angle value of this sprite's position in polar co-ordinates.
DirtySprite
 Inherited_origin : Point
The origin point for polar coordinates.
DirtySprite
 Inherited_radius : Number
The radius value of this sprite's position in polar co-ordinates.
DirtySprite
Public Methods
 MethodDefined by
  
RectSprite(x:Number = 0, y:Number = 0, w:Number = 0, h:Number = 0, cw:Number = 0, ch:Number = 0)
Creates a new RectSprite.
RectSprite
 Inherited
dirty():void
Marks this sprite as "dirty" and in need of re-rendering.
DirtySprite
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered returning the bounds.
DirtySprite
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered before returning the rect.
DirtySprite
 Inherited
hitTestObject(obj:DisplayObject):Boolean
If dirty, either sprite is re-rendered before hit-testing.
DirtySprite
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
If dirty, this sprite is re-rendered before hit-testing.
DirtySprite
  
render():void
Draw this sprite's graphical content.
RectSprite
 Inherited
renderDirty(evt:Event = null):void
[static] Frame render callback that renders all sprites on the dirty list.
DirtySprite
 Inherited
toString():String
DirtySprite
Public Constants
 ConstantDefined by
 InheritedZERO : Point
[static] A constant for the point (0,0).
DirtySprite
Property detail
cornerHeightproperty
cornerHeight:Number  [read-write]

The height of rounded corners. Zero indicates no rounding.

Implementation
    public function get cornerHeight():Number
    public function set cornerHeight(value:Number):void
cornerSizeproperty 
cornerSize:Number  [write-only]

Sets corner width and height simultaneously.

Implementation
    public function set cornerSize(value:Number):void
cornerWidthproperty 
cornerWidth:Number  [read-write]

The width of rounded corners. Zero indicates no rounding.

Implementation
    public function get cornerWidth():Number
    public function set cornerWidth(value:Number):void
fillColorproperty 
fillColor:uint  [read-write]

The fill color of the rectangle.

Implementation
    public function get fillColor():uint
    public function set fillColor(value:uint):void
hproperty 
h:Number  [read-write]

The height of the rectangle.

Implementation
    public function get h():Number
    public function set h(value:Number):void
lineColorproperty 
lineColor:uint  [read-write]

The line color of the rectangle outline.

Implementation
    public function get lineColor():uint
    public function set lineColor(value:uint):void
linePixelHintingproperty 
linePixelHinting:Boolean  [read-write]

Flag indicating if pixel hinting should be used for the outline.

Implementation
    public function get linePixelHinting():Boolean
    public function set linePixelHinting(value:Boolean):void
lineWidthproperty 
lineWidth:Number  [read-write]

The line width of the rectangle outline.

Implementation
    public function get lineWidth():Number
    public function set lineWidth(value:Number):void
wproperty 
w:Number  [read-write]

The width of the rectangle.

Implementation
    public function get w():Number
    public function set w(value:Number):void
Constructor detail
RectSprite()constructor
public function RectSprite(x:Number = 0, y:Number = 0, w:Number = 0, h:Number = 0, cw:Number = 0, ch:Number = 0)

Creates a new RectSprite.

Parameters
x:Number (default = 0) — the x-coordinate of the top-left corner of the rectangle
 
y:Number (default = 0) — the y-coordinate of the top-left corder of the rectangle
 
w:Number (default = 0) — the width of the rectangle
 
h:Number (default = 0) — the height of the rectangle
 
cw:Number (default = 0) — the width of rounded corners (zero for no rounding)
 
ch:Number (default = 0) — the height of rounded corners (zero for no rounding)
Method detail
render()method
public override function render():void

Draw this sprite's graphical content. Subclasses should override this method with custom drawing code.