Represents an image in either BMP or PNG format.
A PNG image can contain an alpha channel, in which case the flag 'useAlpha' should be set to true in the constructor.
|Bitmap (string, int)||Constructs a new bitmap object.|
|int Height ()||Returns the bitmap's height in pixels.|
|int HitAt (int, int)||Test if a mouse button press at the specified coordinates in this image will register as a click.|
|HitThreshold (int)||Sets the bitmap's hit threshold.|
|int Mode ()||Returns the bitmap's current mode, which is either kRGBA or kDevice.|
|int Width ()||Returns the bitmap's width in pixels.|
method Bitmap (string path, int useAlpha)
Constructs a new bitmap object.
The bitmap is loaded immediately from the specified path and filename.
method int Height ()
Returns the bitmap's height in pixels.
method int HitAt (int x, int y)
Test if a mouse button press at the specified coordinates in this image will register as a click.
The function actually retrieves the alpha channel value at the given coordinate and compares it to the hit threshold. If it is smaller than the threshold, the image was not clicked.
method HitThreshold (int n)
Sets the bitmap's hit threshold.
The value should be in the range of 0 (nothing can be clicked) to 255 (everything can be clicked).
method int Mode ()
Returns the bitmap's current mode, which is either kRGBA or kDevice.
method int Width ()
Returns the bitmap's width in pixels.