Class: ImageLayer

graphics.tmx. ImageLayer


new ImageLayer( [init])

An image layer definition.

An image layer definition.

Parameters:
Name Type Argument Description
init Object <optional>

A generic object containing properties with which to populate the newly instance. If this argument is null, it is ignored.

Extends

Members


height :number

The height of the object, in tiles.

Type:
  • number
Inherited From:
Default Value:
  • 0

image :graphics.tmx.Image

The image definition.

Type:
Default Value:
  • null

name :string

The name of the object. An arbitrary string.

Type:
  • string
Inherited From:
Default Value:
  • null

<constant> offset :graphics.geom.Point

The rendering offset for this layer in pixels. Defaults to new Point(0,0).

Type:
Inherited From:

offsetx :number

Rendering offset for this layer in pixels. Defaults to 0. (since 0.14)

Type:
  • number
Inherited From:
Default Value:
  • 0

offsety :number

Rendering offset for this layer in pixels. Defaults to 0. (since 0.14)

Type:
  • number
Inherited From:
Default Value:
  • 0

opacity :number

The opacity of the layer as a value from 0 to 1. Defaults to 1.

Type:
  • number
Inherited From:
Default Value:
  • 0

visible :boolean

Whether the layer is shown (true) or hidden (false). Defaults to true. (since 0.9)

Type:
  • boolean
Inherited From:
Default Value:
  • true

width :number

The width of the layer, in tiles.

Type:
  • number
Inherited From:
Default Value:
  • 0

x :number

The x coordinate of the layer in tiles. Defaults to 0 and can no longer be changed in Tiled Qt.

Type:
  • number
Inherited From:
Default Value:
  • 0

y :number

The y coordinate of the layer in tiles. Defaults to 0 and can no longer be changed in Tiled Qt.

Type:
  • number
Inherited From:
Default Value:
  • 0

Methods


clone()

Returns a shallow copy of the object.

Inherited From:
Returns:

a shallow copy of the object.


setTo(init)

Sets the members of the object to the specified values.

Parameters:
Name Type Description
init Object

The generic object to initialize the object.

Inherited From:
Returns:

The current object reference.


toObject()

Returns the Object representation of this object.

Inherited From:
Overrides:
Returns:

the Object representation of this object.


toString()

Returns the string representation of this object.

Inherited From:
Returns:

the string representation of this object.