Packagecom.pblabs.rendering2D
Classpublic class SimpleShapeRenderer
InheritanceSimpleShapeRenderer Inheritance DisplayObjectRenderer Inheritance AnimatedComponent Inheritance EntityComponent Inheritance Object

Draw a simple shape, a box or a circle, with color.



Public Properties
 PropertyDefined By
 Inheritedalpha : Number
Transparency, 0 being completely transparent and 1 being opaque.
DisplayObjectRenderer
 InheritedalphaProperty : PropertyReference
If set, alpha is gotten from this property every frame.
DisplayObjectRenderer
 InheritedblendMode : String
Blend mode, using strings from flash.display.BlendMode
DisplayObjectRenderer
 InheritedblendModeProperty : PropertyReference
If set, blend mode is gotten from this property every frame.
DisplayObjectRenderer
 InheriteddisplayObject : DisplayObject
The displayObject which this DisplayObjectRenderer will draw.
DisplayObjectRenderer
  fillAlpha : Number
Opacity for the shape fill.
SimpleShapeRenderer
  fillColor : uint
Fill shape with color.
SimpleShapeRenderer
  isCircle : Boolean
If set, draw a circle.
SimpleShapeRenderer
 InheritedisRegistered : Boolean
[read-only] Whether or not the component is currently registered with an entity.
EntityComponent
  isSquare : Boolean
If set, draw a square.
SimpleShapeRenderer
 InheritedlayerIndex : int
In what layer of the scene is this renderer drawn?
DisplayObjectRenderer
 InheritedlayerIndexProperty : PropertyReference
If set, the layer index is gotten from this property every frame.
DisplayObjectRenderer
  lineAlpha : Number
The opacity of the line.
SimpleShapeRenderer
  lineColor : uint
Color of the line.
SimpleShapeRenderer
  lineSize : Number
Thickness of the line.
SimpleShapeRenderer
 InheritedlocalBounds : Rectangle
[read-only]
DisplayObjectRenderer
 Inheritedname : String
[read-only] The name given to the component when it is added to an entity.
EntityComponent
 InheritedobjectMask : ObjectType
The types for this object; used for picking queries primarily.
DisplayObjectRenderer
 Inheritedowner : IEntity
A reference to the entity that this component currently belongs to.
EntityComponent
 Inheritedposition : Point
Position of the renderer in scene space.
DisplayObjectRenderer
 InheritedpositionOffset : Point
Sets a position offset that will offset the sprite.
DisplayObjectRenderer
 InheritedpositionProperty : PropertyReference
If set, position is gotten from this property every frame.
DisplayObjectRenderer
  radius : Number
The size of the shape in pixels.
SimpleShapeRenderer
 InheritedregisterForUpdates : Boolean
Set to register/unregister for frame updates.
AnimatedComponent
 InheritedregistrationPoint : Point
The registration point can be used to offset the sprite so that rotation and scaling work properly.
DisplayObjectRenderer
 InheritedregistrationPointProperty : PropertyReference
If set, our registration point is gotten from this property every frame.
DisplayObjectRenderer
 InheritedrenderKey : int = 0
Reference value used for sorting in some scenes.
DisplayObjectRenderer
 InheritedrenderPosition : Point
[read-only] Where in the scene will this object be rendered?
DisplayObjectRenderer
 Inheritedrotation : Number
Rotation in degrees, with 0 being Y+.
DisplayObjectRenderer
 InheritedrotationOffset : Number
Rotation offset applied to the child DisplayObject.
DisplayObjectRenderer
 InheritedrotationProperty : PropertyReference
If set, rotation is gotten from this property every frame.
DisplayObjectRenderer
 Inheritedscale : Point
You can scale things on the X and Y axes.
DisplayObjectRenderer
 InheritedscaleProperty : PropertyReference
If set, scale is gotten from this property every frame.
DisplayObjectRenderer
 Inheritedscene : IScene2D
The scene which is responsible for drawing this renderer.
DisplayObjectRenderer
 InheritedsceneBounds : Rectangle
[read-only] Our bounds in scene coordinates.
DisplayObjectRenderer
 Inheritedsize : Point
Explicitly set the size.
DisplayObjectRenderer
 InheritedsizeProperty : PropertyReference
If set, size is determined by this property every frame.
DisplayObjectRenderer
 InheritedsnapToNearestPixels : Boolean = true
if set this to false, positions will be handeled with numbers insteed of integers makes slow movement smoother for example
DisplayObjectRenderer
 InheritedupdatePriority : Number = 0.0
The update priority for this component.
AnimatedComponent
 InheritedworldPosition : Point
Convenience method to allow placing the renderer in world coordinates.
DisplayObjectRenderer
 Inheritedx : Number
The x value of our scene space position.
DisplayObjectRenderer
 Inheritedy : Number
The y component of our scene space position.
DisplayObjectRenderer
 InheritedzIndex : int
By default, layers are sorted based on the z-index, from small to large.
DisplayObjectRenderer
 InheritedzIndexProperty : PropertyReference
If set, our z-index is gotten from this property every frame.
DisplayObjectRenderer
Protected Properties
 PropertyDefined By
 Inherited_alpha : Number = 1
DisplayObjectRenderer
 Inherited_blendMode : String = normal
DisplayObjectRenderer
 Inherited_displayObject : DisplayObject
DisplayObjectRenderer
 Inherited_hitTestDirty : Boolean = true
DisplayObjectRenderer
 Inherited_inScene : Boolean = false
DisplayObjectRenderer
 Inherited_lastLayerIndex : int = -1
DisplayObjectRenderer
 Inherited_layerIndex : int = 0
DisplayObjectRenderer
 Inherited_layerIndexDirty : Boolean = true
DisplayObjectRenderer
 Inherited_position : Point
DisplayObjectRenderer
 Inherited_positionOffset : Point
DisplayObjectRenderer
 Inherited_registrationPoint : Point
DisplayObjectRenderer
 Inherited_rotation : Number = 0
DisplayObjectRenderer
 Inherited_rotationOffset : Number = 0
DisplayObjectRenderer
 Inherited_scale : Point
DisplayObjectRenderer
 Inherited_scene : IScene2D
DisplayObjectRenderer
 Inherited_size : Point
DisplayObjectRenderer
 Inherited_transformDirty : Boolean = true
DisplayObjectRenderer
 Inherited_transformMatrix : Matrix
DisplayObjectRenderer
 Inherited_zIndex : int = 0
DisplayObjectRenderer
 Inherited_zIndexDirty : Boolean = true
DisplayObjectRenderer
Public Methods
 MethodDefined By
  
SimpleShapeRenderer
 Inherited
onFrame(elapsed:Number):void
[override]
DisplayObjectRenderer
 Inherited
pointOccupied(worldPosition:Point, mask:ObjectType):Boolean
Is the rendered object opaque at the request position in screen space?
DisplayObjectRenderer
  
redraw():void
Automatically called, but redraws the Sprite based on the user's settings.
SimpleShapeRenderer
 Inherited
register(owner:IEntity, name:String):void
Registers the component with an entity.
EntityComponent
 Inherited
reset():void
This is called by an entity on all of its components any time a component is added or removed.
EntityComponent
 Inherited
transformObjectToWorld(p:Point):Point
Transform a point from object space to world space.
DisplayObjectRenderer
 Inherited
transformWorldToObject(p:Point):Point
Transform a point from world space to object space.
DisplayObjectRenderer
 Inherited
unregister():void
Unregisters the component from an entity.
EntityComponent
 Inherited
updateTransform(updateProps:Boolean = false):void
Update the object's transform based on its current state.
DisplayObjectRenderer
Protected Methods
 MethodDefined By
 Inherited
addToScene():void
DisplayObjectRenderer
 Inherited
onAdd():void
[override]
DisplayObjectRenderer
 Inherited
onRemove():void
[override]
DisplayObjectRenderer
 Inherited
onReset():void
This is called anytime a component is added or removed from the owner entity.
EntityComponent
 Inherited
DisplayObjectRenderer
 Inherited
DisplayObjectRenderer
Property Detail
fillAlphaproperty
fillAlpha:Number

Opacity for the shape fill.


Implementation
    public function get fillAlpha():Number
    public function set fillAlpha(value:Number):void
fillColorproperty 
fillColor:uint

Fill shape with color.


Implementation
    public function get fillColor():uint
    public function set fillColor(value:uint):void
isCircleproperty 
isCircle:Boolean

If set, draw a circle.


Implementation
    public function get isCircle():Boolean
    public function set isCircle(value:Boolean):void
isSquareproperty 
isSquare:Boolean

If set, draw a square.


Implementation
    public function get isSquare():Boolean
    public function set isSquare(value:Boolean):void
lineAlphaproperty 
lineAlpha:Number

The opacity of the line.


Implementation
    public function get lineAlpha():Number
    public function set lineAlpha(value:Number):void
lineColorproperty 
lineColor:uint

Color of the line.


Implementation
    public function get lineColor():uint
    public function set lineColor(value:uint):void
lineSizeproperty 
lineSize:Number

Thickness of the line. If between 0 and 1 you get a hairline.


Implementation
    public function get lineSize():Number
    public function set lineSize(value:Number):void
radiusproperty 
radius:Number

The size of the shape in pixels.


Implementation
    public function get radius():Number
    public function set radius(value:Number):void
Constructor Detail
SimpleShapeRenderer()Constructor
public function SimpleShapeRenderer()



Method Detail
redraw()method
public function redraw():void

Automatically called, but redraws the Sprite based on the user's settings.