Shumate.Tile

g GObject.Object GObject.Object Shumate.Tile Shumate.Tile GObject.Object->Shumate.Tile

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_full (x, y, size, zoom_level)

get_fade_in ()

get_paintable ()

get_scale_factor ()

get_size ()

get_state ()

get_x ()

get_y ()

get_zoom_level ()

set_fade_in (fade_in)

set_paintable (paintable)

set_scale_factor (scale_factor)

set_size (size)

set_state (state)

set_x (x)

set_y (y)

set_zoom_level (zoom_level)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

fade-in

bool

r/w

Tile should fade in

paintable

Gdk.Paintable

r/w

Paintable

scale-factor

float

r/w/en

scale-factor

size

int

r/w

The size of the tile

state

Shumate.State

r/w

The state of the tile

x

int

r/w

The X position of the tile

y

int

r/w

The Y position of the tile

zoom-level

int

r/w

The zoom level of the tile

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Shumate.Tile(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Shumate.TileClass

An object that represents map tiles. Tiles are loaded by a [class`MapSource`].

classmethod new()
Returns:

a new Shumate.Tile

Return type:

Shumate.Tile

Creates an instance of Shumate.Tile.

classmethod new_full(x, y, size, zoom_level)
Parameters:
  • x (int) – the x position

  • y (int) – the y position

  • size (int) – the size in pixels

  • zoom_level (int) – the zoom level

Returns:

a Shumate.Tile

Return type:

Shumate.Tile

Creates an instance of Shumate.Tile.

get_fade_in()
Returns:

the return value determines whether the tile should fade in when loading.

Return type:

bool

Checks whether the tile should fade in.

get_paintable()
Returns:

A [iface`Gdk`.Paintable]

Return type:

Gdk.Paintable or None

Get the [iface`Gdk`.Paintable] representing this tile.

get_scale_factor()
Returns:

the scale factor

Return type:

float

Gets the scale factor of the tile.

New in version 1.1.

get_size()
Returns:

the tile’s size in pixels

Return type:

int

Gets the tile’s size.

get_state()
Returns:

the tile’s Shumate.State

Return type:

Shumate.State

Gets the current state of tile loading.

get_x()
Returns:

the tile’s x position

Return type:

int

Gets the tile’s x position.

get_y()
Returns:

the tile’s y position

Return type:

int

Gets the tile’s y position.

get_zoom_level()
Returns:

the tile’s zoom level

Return type:

int

Gets the tile’s zoom level.

set_fade_in(fade_in)
Parameters:

fade_in (bool) – determines whether the tile should fade in when loading

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

set_paintable(paintable)
Parameters:

paintable (Gdk.Paintable) – a [iface`Gdk`.Paintable]

Sets the [iface`Gdk`.Paintable] representing this tile.

set_scale_factor(scale_factor)
Parameters:

scale_factor (float) – the scale factor

Sets the scale factor of the tile.

New in version 1.1.

set_size(size)
Parameters:

size (int) – the size in pixels

Sets the tile’s size

set_state(state)
Parameters:

state (Shumate.State) – a Shumate.State

Sets the tile’s Shumate.State

set_x(x)
Parameters:

x (int) – the position

Sets the tile’s x position

set_y(y)
Parameters:

y (int) – the position

Sets the tile’s y position

set_zoom_level(zoom_level)
Parameters:

zoom_level (int) – the zoom level

Sets the tile’s zoom level

Property Details

Shumate.Tile.props.fade_in
Name:

fade-in

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Specifies whether the tile should fade in when loading

Shumate.Tile.props.paintable
Name:

paintable

Type:

Gdk.Paintable

Default Value:

None

Flags:

READABLE, WRITABLE

The [iface`Gdk`.Paintable] backing the tile

Shumate.Tile.props.scale_factor
Name:

scale-factor

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The scale factor of the widget the tile will be displayed in.

New in version 1.1.

Shumate.Tile.props.size
Name:

size

Type:

int

Default Value:

256

Flags:

READABLE, WRITABLE

The size of the tile in pixels

Shumate.Tile.props.state
Name:

state

Type:

Shumate.State

Default Value:

Shumate.State.NONE

Flags:

READABLE, WRITABLE

The state of the tile

Shumate.Tile.props.x
Name:

x

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The x position of the tile

Shumate.Tile.props.y
Name:

y

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The y position of the tile

Shumate.Tile.props.zoom_level
Name:

zoom-level

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The zoom level of the tile