Gamalto

Fork me on GitHub

Object Surface Overview

Gamalto. Surface

new Gamalto.Surface(width, height, canvasopt)

Creates a new drawing surface.

Parameters
Name Type Attributes Description
width number

Physical horizontal size of the surface.

height number

Physical vertical size of the surface.

canvas number <optional>

Type of the internal canvas.

Implements
Extends
Example
var surface = new Gamalto.Surface(320, 240);

Members

height :number

readonly

Vertical size of the surface.

Implements

renderer :Gamalto.BaseRenderer

readonly

Internal canvas renderer.

tag :object

inherited

Utility property to exchange data between objects.

Inherited From

width :number

readonly

Horizontal size of the surface.

Implements

Methods

blit(surface, x, y)

Copies a surface content at the given position.

Parameters
Name Type Description
surface Gamalto.Surface

Surface to copy.

x number

Horizontal origin of the copy.

y number

Vertical origin of the copy.

clear()

Clears the surface content.

clone() object

inherited abstract

Clones the object. It will be shallow copy unless otherwise specfied.

Inherited From
Returns
  • New instance of the object. Defaults to null.

disableClipping()

Disables the renderering clipping.

enableClipping(rect)

Activates the renderering clipping.

Parameters
Name Type Description
rect Gamalto.Box

Rectangle representing the clipping area.

lock() object

Gets a buffer for direct drawing.

Returns
  • A buffer or null if the surface is already locked.

redraw(surface, x, y, regions)

Redraws parts of the given surface into the current surface.

Parameters
Name Type Description
surface Gamalto.Surface

Surface to copy.

x number

Horizontal origin of the copy.

y number

Vertical origin of the copy.

regions array.<Gamalto.Box>

List of the regions to be updated.

toString() string

inherited abstract

Converts the object into a string.

Inherited From
Returns
  • string

unlock()

Unlocks a previously locked surface.

Documentation generated by JSDoc 3.3.2 on Sun Sep 13 2015 20:13:31 GMT+0200 (CEST)