Class: Bitmap

bitmap. Bitmap


new Bitmap()

A sprite that renders an image asset

Author:
  • Chris Peters
Source:

Extends

Members


_composite :String

The composite operation type. Can be source-atop|source-in|source-out|source-over|destination-atop|destination-in|destination-out|destination-over|lighter|xor|copy
Default is 'source-over'

Type:
  • String
Inherited From:
Source:

Methods


getBoundingArea()

Inherited From:
Source:
Returns:

The bounding area

Type
Object

getComposite()

Inherited From:
Source:
Returns:
Type
String

getHeight()

Inherited From:
Source:
Returns:
Type
Integer

getOpacity()

Inherited From:
Source:
Returns:
Type
Float

getPivotX()

Inherited From:
Source:
Returns:
Type
Integer

getPivotY()

Inherited From:
Source:
Returns:
Type
Integer

getRotation()

Inherited From:
Overrides:
Source:
Returns:
Type
Float

getScaleX()

Inherited From:
Source:
Returns:
Type
Integer

getScaleY()

Inherited From:
Source:
Returns:
Type
Integer

getSrcHeight()

Inherited From:
Source:
Returns:
Type
Integer

getSrcWidth()

Inherited From:
Source:
Returns:
Type
Integer

getSrcX()

Inherited From:
Source:
Returns:
Type
Integer

getSrcY()

Inherited From:
Source:
Returns:
Type
Integer

getWidth()

Inherited From:
Source:
Returns:
Type
Integer

getX()

Inherited From:
Source:
Returns:
Type
Integer

getY()

Inherited From:
Source:
Returns:
Type
Integer

render(context)

Parameters:
Name Type Description
context Object

The canvas' context

Inherited From:
Source:

setComposite(val)

Parameters:
Name Type Description
val Integer

The composite value

Inherited From:
Overrides:
Source:
Returns:
Type
Sprite

setHeight(val)

Parameters:
Name Type Description
val Integer

The height value

Inherited From:
Source:
Returns:
Type
Sprite

setOpacity(val)

Parameters:
Name Type Description
val Float

The opacity value

Inherited From:
Source:
Returns:
Type
Sprite

setPivotX(val)

Parameters:
Name Type Description
val Float

The opacity value

Inherited From:
Source:
Returns:
Type
Sprite

setPivotY(val)

Parameters:
Name Type Description
val Float

The opacity value

Inherited From:
Source:
Returns:
Type
Sprite

setRotation(val)

Parameters:
Name Type Description
val Integer

The rotation value

Inherited From:
Source:
Returns:
Type
Sprite

setScaleX(val)

Parameters:
Name Type Description
val Integer

The scaleX value

Inherited From:
Source:
Returns:
Type
Sprite

setScaleY(val)

Parameters:
Name Type Description
val Integer

The scaleY value

Inherited From:
Source:
Returns:
Type
Sprite

setSrcHeight(val)

Parameters:
Name Type Description
val Integer

The srcHeight value

Inherited From:
Source:
Returns:
Type
Sprite

setSrcWidth(val)

Parameters:
Name Type Description
val Integer

The srcWidth value

Inherited From:
Source:
Returns:
Type
Sprite

setSrcX(val)

Parameters:
Name Type Description
val Integer

The srcX value

Inherited From:
Source:
Returns:
Type
Sprite

setSrcY(val)

Parameters:
Name Type Description
val Integer

The srcY value

Inherited From:
Source:
Returns:
Type
Sprite

setWidth(val)

Parameters:
Name Type Description
val Integer

The width value

Inherited From:
Source:
Returns:
Type
Sprite

setY(val)

Parameters:
Name Type Description
val Integer

The y value

Inherited From:
Source:
Returns:
Type
Sprite

translate(x, y)

Add/Subtract current x/y values. Assign any non-number to leave value the same.

Parameters:
Name Type Argument Description
x Integer <optional>
y Integer <optional>
Inherited From:
Source:
Returns:
Type
Sprite