Packagenet.flashpunk.masks
Classpublic class Pixelmask
InheritancePixelmask Inheritance Hitbox Inheritance Mask Inheritance Object

A bitmap mask used for pixel-perfect collision.



Public Properties
 PropertyDefined By
  data : BitmapData
Current BitmapData mask.
Pixelmask
 Inheritedheight : int
Height.
Hitbox
 Inheritedlist : Masklist
The parent Masklist of the mask.
Mask
 Inheritedparent : Entity
The parent Entity of this mask.
Mask
  threshold : uint = 1
Alpha threshold of the bitmap used for collision.
Pixelmask
 Inheritedwidth : int
Width.
Hitbox
 Inheritedx : int
X offset.
Hitbox
 Inheritedy : int
Y offset.
Hitbox
Public Methods
 MethodDefined By
  
Pixelmask(source:*, x:int = 0, y:int = 0)
Constructor.
Pixelmask
 Inherited
collide(mask:Mask):Boolean
Checks for collision with another Mask.
Mask
  
renderDebug(g:Graphics):void
[override]
Pixelmask
 Inherited
update():void
[override]
Hitbox
Property Detail
dataproperty
data:BitmapData

Current BitmapData mask.


Implementation
    public function get data():BitmapData
    public function set data(value:BitmapData):void
thresholdproperty 
public var threshold:uint = 1

Alpha threshold of the bitmap used for collision.

Constructor Detail
Pixelmask()Constructor
public function Pixelmask(source:*, x:int = 0, y:int = 0)

Constructor.

Parameters
source:* — The image to use as a mask.
 
x:int (default = 0) — X offset of the mask.
 
y:int (default = 0) — Y offset of the mask.
Method Detail
renderDebug()method
override public function renderDebug(g:Graphics):void

Parameters

g:Graphics