pytmx.util_pygame_sdl2 module

Copyright (C) 2012-2022, Leif Theden <leif.theden@gmail.com>

This file is part of pytmx.

pytmx is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

pytmx is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with pytmx. If not, see <http://www.gnu.org/licenses/>.

class pytmx.util_pygame_sdl2.PygameSDL2Tile(texture: pygame._sdl2.video.Texture, srcrect: pygame.rect.Rect, size: Tuple[int, int], angle: float = 0.0, center: None = None, flipx: bool = False, flipy: bool = False)[source]

Bases: object

angle = 0.0
center = None
flipx = False
flipy = False
pytmx.util_pygame_sdl2.handle_flags(flags: pytmx.pytmx.TileFlags)[source]

Return angle and flip values for the SDL2 renderer

pytmx.util_pygame_sdl2.load_pygame_sdl2(renderer: pygame._sdl2.video.Renderer, filename: str, *args, **kwargs)[source]

Load a TMX file, images, and return a TiledMap class

pytmx.util_pygame_sdl2.pygame_sd2_image_loader(renderer: pygame._sdl2.video.Renderer, filename: str, colorkey, **kwargs)[source]

pytmx image loader for pygame