Source

py-sdl2 / doc / modules / sdl2ext_sprite.rst

Sprite, texture and pixel surface routines

A simple 2D object, implemented as abstract base class.

A simple, visible, pixel-based 2D object, implemented on top of SDL2 software surfaces.

A simple, visible, pixel-based 2D object, implemented on top of SDL2 textures.

A rendering system for :class:`Sprite` components. This is a base class for rendering systems capable of drawing and displaying :class:`Sprite` based objects. Inheriting classes need to implement the rendering capability by overriding the render() method.

A factory class for creating :class:`Sprite` objects. The :class:`SpriteFactory` can create :class:`TextureSprite` or :class:`SoftwareSprite` instances, depending on the sprite_type being passed to it, which can be SOFTWARE or TEXTURE. The additional kwargs are used as default arguments for creating sprites within the factory methods.