Packagecom.pblabs.rendering2D
Classpublic class BitmapRenderer
InheritanceBitmapRenderer Inheritance DisplayObjectRenderer Inheritance AnimatedComponent Inheritance EntityComponent Inheritance Object
Implements ICopyPixelsRenderer
Subclasses SpriteRenderer, SpriteSheetRenderer

Simple way to render a bitmap to a scene.



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
  bitmapData : BitmapData
BitmapRenderer
 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
  displayObject : DisplayObject
[override]
BitmapRenderer
 InheritedisRegistered : Boolean
[read-only] Whether or not the component is currently registered with an entity.
EntityComponent
 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
 InheritedlocalBounds : Rectangle
[read-only]
DisplayObjectRenderer
  modifiers : Array
Array with BitmapData modifiers that will be applied
BitmapRenderer
  mouseEnabled : Boolean
BitmapRenderer
 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
 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
  smoothing : Boolean
BitmapRenderer
 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
  bitmap : Bitmap
BitmapRenderer
 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
  _mouseEnabled : Boolean = false
BitmapRenderer
 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
  _smoothing : Boolean = false
BitmapRenderer
 Inherited_transformDirty : Boolean = true
DisplayObjectRenderer
 Inherited_transformMatrix : Matrix
DisplayObjectRenderer
 Inherited_zIndex : int = 0
DisplayObjectRenderer
 Inherited_zIndexDirty : Boolean = true
DisplayObjectRenderer
Public Methods
 MethodDefined By
  
BitmapRenderer
  
drawPixels(objectToScreen:Matrix, renderTarget:BitmapData):void
BitmapRenderer
  
isPixelPathActive(objectToScreen:Matrix):Boolean
BitmapRenderer
 Inherited
onFrame(elapsed:Number):void
[override]
DisplayObjectRenderer
  
pointOccupied(worldPosition:Point, mask:ObjectType):Boolean
[override]
BitmapRenderer
 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
  
BitmapRenderer
  
modify(data:BitmapData):BitmapData
BitmapRenderer
 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
Protected Constants
 ConstantDefined By
  zeroPoint : Point
[static]
BitmapRenderer
Property Detail
_mouseEnabledproperty
protected var _mouseEnabled:Boolean = false

_smoothingproperty 
protected var _smoothing:Boolean = false

bitmapproperty 
protected var bitmap:Bitmap

bitmapDataproperty 
bitmapData:BitmapData


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

See also

Bitmap.bitmapData
displayObjectproperty 
displayObject:DisplayObject[override]


Implementation
    public function get displayObject():DisplayObject
    public function set displayObject(value:DisplayObject):void
modifiersproperty 
modifiers:Array

Array with BitmapData modifiers that will be applied


Implementation
    public function get modifiers():Array
    public function set modifiers(value:Array):void
mouseEnabledproperty 
mouseEnabled:Boolean


Implementation
    public function get mouseEnabled():Boolean
    public function set mouseEnabled(value:Boolean):void
smoothingproperty 
smoothing:Boolean


Implementation
    public function get smoothing():Boolean
    public function set smoothing(value:Boolean):void
Constructor Detail
BitmapRenderer()Constructor
public function BitmapRenderer()



Method Detail
dataModified()method
protected function dataModified():void

drawPixels()method 
public function drawPixels(objectToScreen:Matrix, renderTarget:BitmapData):void

Parameters

objectToScreen:Matrix
 
renderTarget:BitmapData

isPixelPathActive()method 
public function isPixelPathActive(objectToScreen:Matrix):Boolean

Parameters

objectToScreen:Matrix

Returns
Boolean
modify()method 
protected function modify(data:BitmapData):BitmapData

Parameters

data:BitmapData

Returns
BitmapData
pointOccupied()method 
override public function pointOccupied(worldPosition:Point, mask:ObjectType):Boolean

Parameters

worldPosition:Point
 
mask:ObjectType

Returns
Boolean
Constant Detail
zeroPointConstant
protected static const zeroPoint:Point