Welcome Installation Getting Started User Interaction Build a Game #1 Build a Game #2 Build a Game #3 Colours Coordinates API Reference Globals Window Camera Mouse Key Rect Image Text Shape Line Screen Sound Base

Image

The Image class is for rendering textures. It is a subclass of Rect.

__init__(name = MAN, x = 0, y = 0, angle = 0, width = 0, height = 0, color = WHITE)

Call the image initialiser.

  • name: str

    The path to the source image. Can also be MAN, COIN or ENEMY.

  • x: float

    The x position of the image

  • y: float

    The y position of the image

  • width: float

    The width of the image. When set to 0, detect the image width

  • height: float

    The height of the image. When set to 0, detect the image height

  • angle: float

    The rotation of the image

  • color: float, float, float, float

    The colour of the image

name: str

The path to the source image. Can also be MAN, COIN or ENEMY.

Rect Text