Class Bitmap
Extends
DisplayObject.
The Bitmap class represents bitmap images which are display objects. Different from Bitmap class in AS3, it can accept mouse interactions.
Constructor Attributes | Constructor Name and Description |
---|---|
Bitmap(image, frame)
Constructor.
|
Field Attributes | Field Name and Description |
---|---|
A special frame of image to render.
|
|
The image source for bitmap.
|
- Fields borrowed from class DisplayObject:
- alpha, height, id, mouseEnabled, name, parent, regX, regY, rotation, scaleX, scaleY, stage, useHandCursor, visible, width, x, y
Method Attributes | Method Name and Description |
---|---|
render(context)
|
- Methods borrowed from class DisplayObject:
- getCurrentHeight, getCurrentWidth, getRect, getStage, globalToLocal, hitTestObject, hitTestPoint, localToGlobal, localToTarget, onMouseEvent, toString
- Methods borrowed from class EventDispatcher:
- addEventListener, dispatchEvent, hasEventListener, removeAllEventListeners, removeEventListener, removeEventListenerByType
Class Detail
Bitmap(image, frame)
Constructor.
- Parameters:
- image
- Image data, can be HTMLImageElement, HTMLCanvasElement, or HTMLVideoElement
- frame
- format: [x, y, width, height, regX, regY]
Field Detail
frame
A special frame of image to render. The format is [x, y, width, height, regX, regY].
image
The image source for bitmap.
Method Detail
render(context)
- Parameters:
- context