CLASS v1.8.0

tilemap.ImageLayer

pykraken.tilemap.ImageLayer

ImageLayer displays a single image as a layer.

More about tilemap.ImageLayer

Attributes

  • opacity (float) — Layer opacity.
  • texture (Texture) — The layer image texture.

Methods

  • draw — Draw the image layer.

Inherits Layer

Reference

PYTHON API
tilemap.ImageLayer(/, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

name

property
name: str

Layer name.

offset

property
offset: Vec2

Per-layer drawing offset.

opacity

property
opacity: float

Layer opacity from 0.0 to 1.0.

texture

property
texture: Texture

Texture used by the image layer.

type

property

Layer type enum.

visible

property
visible: bool

Whether the layer is visible.

draw

method
draw(self, angle: float = 0.0, pivot: Vec2 = Vec2(0.500000, 0.500000)) -> None

Draw the image layer.

Args

  • angle (float, optional) — Rotation angle in degrees. Defaults to 0.0.
  • pivot (Vec2, optional) — Rotation pivot as normalized coordinates relative to the map size. Defaults to (0.5, 0.5).

Find your next step

Start typing to search the manual.