Tile#

class Tile(**properties: Any)#

Superclasses: Object

An object that represents map tiles. Tiles are loaded by a MapSource.

Constructors#

class Tile
classmethod new() Tile#

Creates an instance of Tile.

classmethod new_full(x: int, y: int, size: int, zoom_level: int) Tile#

Creates an instance of Tile.

Parameters:
  • x – the x position

  • y – the y position

  • size – the size in pixels

  • zoom_level – the zoom level

Methods#

class Tile
get_fade_in() bool#

Checks whether the tile should fade in.

get_paintable() Paintable | None#

Get the Paintable representing this tile.

get_scale_factor() float#

Gets the scale factor of the tile.

Added in version 1.1.

get_size() int#

Gets the tile’s size.

get_state() State#

Gets the current state of tile loading.

get_x() int#

Gets the tile’s x position.

get_y() int#

Gets the tile’s y position.

get_zoom_level() int#

Gets the tile’s zoom level.

set_fade_in(fade_in: bool) None#

Sets the flag determining whether the tile should fade in when loading

Parameters:

fade_in – determines whether the tile should fade in when loading

set_paintable(paintable: Paintable) None#

Sets the Paintable representing this tile.

Parameters:

paintable – a Paintable

set_scale_factor(scale_factor: float) None#

Sets the scale factor of the tile.

Added in version 1.1.

Parameters:

scale_factor – the scale factor

set_size(size: int) None#

Sets the tile’s size

Parameters:

size – the size in pixels

set_state(state: State) None#

Sets the tile’s State

Parameters:

state – a State

set_x(x: int) None#

Sets the tile’s x position

Parameters:

x – the position

set_y(y: int) None#

Sets the tile’s y position

Parameters:

y – the position

set_zoom_level(zoom_level: int) None#

Sets the tile’s zoom level

Parameters:

zoom_level – the zoom level

Properties#

class Tile
props.fade_in: bool#

The type of the None singleton.

props.paintable: Paintable#

The type of the None singleton.

props.scale_factor: float#

The type of the None singleton.

Added in version 1.1.

props.size: int#

The type of the None singleton.

props.state: State#

The type of the None singleton.

props.x: int#

The type of the None singleton.

props.y: int#

The type of the None singleton.

props.zoom_level: int#

The type of the None singleton.