Package | net.flashpunk.graphics |
Class | public class Stamp |
Inheritance | Stamp Graphic Object |
Property | Defined By | ||
---|---|---|---|
active : Boolean = false
If the graphic should update. | Graphic | ||
height : uint [read-only]
Height of the stamp. | Stamp | ||
relative : Boolean = true
If the graphic should render at its position relative to its parent Entity's position. | Graphic | ||
scrollX : Number = 1
X scrollfactor, effects how much the camera offsets the drawn graphic. | Graphic | ||
scrollY : Number = 1
Y scrollfactor, effects how much the camera offsets the drawn graphic. | Graphic | ||
source : BitmapData
Source BitmapData image. | Stamp | ||
visible : Boolean = true
If the graphic should render. | Graphic | ||
width : uint [read-only]
Width of the stamp. | Stamp | ||
x : Number = 0
X offset. | Graphic | ||
y : Number = 0
Y offset. | Graphic |
Method | Defined 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 | ||
render(target:BitmapData, point:Point, camera:Point):void
Renders the graphic to the screen buffer. | Graphic | ||
update():void
Updates the graphic. | Graphic |
height | property |
height:uint
[read-only] Height of the stamp.
public function get height():uint
source | property |
source:BitmapData
Source BitmapData image.
public function get source():BitmapData
public function set source(value:BitmapData):void
width | property |
width:uint
[read-only] Width of the stamp.
public function get width():uint
Stamp | () | Constructor |
public function Stamp(source:*, x:int = 0, y:int = 0)
Constructor.
Parameterssource:* — Source image.
| |
x:int (default = 0 ) — X offset.
| |
y:int (default = 0 ) — Y offset.
|
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.
|
Stamp — A new Stamp object.
|