Packagenet.flashpunk.graphics
Classpublic class Stamp
InheritanceStamp Inheritance Graphic Inheritance Object

A simple non-transformed, non-animated graphic.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean = false
If the graphic should update.
Graphic
  height : uint
[read-only] Height of the stamp.
Stamp
 Inheritedrelative : Boolean = true
If the graphic should render at its position relative to its parent Entity's position.
Graphic
 InheritedscrollX : Number = 1
X scrollfactor, effects how much the camera offsets the drawn graphic.
Graphic
 InheritedscrollY : Number = 1
Y scrollfactor, effects how much the camera offsets the drawn graphic.
Graphic
  source : BitmapData
Source BitmapData image.
Stamp
 Inheritedvisible : Boolean = true
If the graphic should render.
Graphic
  width : uint
[read-only] Width of the stamp.
Stamp
 Inheritedx : Number = 0
X offset.
Graphic
 Inheritedy : Number = 0
Y offset.
Graphic
Protected Properties
 PropertyDefined By
 Inheritedassign : Function
Graphic
Public Methods
 MethodDefined By
  
Stamp(source:*, x:int = 0, y:int = 0)
Constructor.
Stamp
  
createRect(width:uint, height:uint, color:uint = 0xFFFFFF, alpha:Number = 1):Stamp
[static] Creates a new rectangle Stamp.
Stamp
 Inherited
render(target:BitmapData, point:Point, camera:Point):void
Renders the graphic to the screen buffer.
Graphic
 Inherited
update():void
Updates the graphic.
Graphic
Property Detail
heightproperty
height:uint  [read-only]

Height of the stamp.


Implementation
    public function get height():uint
sourceproperty 
source:BitmapData

Source BitmapData image.


Implementation
    public function get source():BitmapData
    public function set source(value:BitmapData):void
widthproperty 
width:uint  [read-only]

Width of the stamp.


Implementation
    public function get width():uint
Constructor Detail
Stamp()Constructor
public function Stamp(source:*, x:int = 0, y:int = 0)

Constructor.

Parameters
source:* — Source image.
 
x:int (default = 0) — X offset.
 
y:int (default = 0) — Y offset.
Method Detail
createRect()method
public static function createRect(width:uint, height:uint, color:uint = 0xFFFFFF, alpha:Number = 1):Stamp

Creates a new rectangle Stamp.

Parameters

width:uint — Width of the rectangle.
 
height:uint — Height of the rectangle.
 
color:uint (default = 0xFFFFFF) — Color of the rectangle.
 
alpha:Number (default = 1) — Alpha of the rectangle.

Returns
Stamp — A new Stamp object.