SpriteGroup Class

Inheritance diagram of SpriteGroup

class SpriteGroup(texture, blend_src, blend_dest, parent=None)

Shared sprite rendering group.

The group is automatically coalesced with other sprite groups sharing the same parent group, texture and blend parameters.

Constructor:

__init__(texture, blend_src, blend_dest, parent=None)

Create a sprite group.

The group is created internally within Sprite; applications usually do not need to explicitly create it.

Parameters:
  • texture (Texture) – The (top-level) texture containing the sprite image.
  • blend_src (int) – OpenGL blend source mode; for example, GL_SRC_ALPHA.
  • blend_dest (int) – OpenGL blend destination mode; for example, GL_ONE_MINUS_SRC_ALPHA.
  • parent (Group) – Optional parent group.

Methods:

Methods

SpriteGroup.set_state()
SpriteGroup.unset_state()

Inherited members

Methods

SpriteGroup.set_state_recursive()

Set this group and its ancestry.

Call this method if you are using a group in isolation: the parent groups will be called in top-down order, with this class’s set being called last.

SpriteGroup.unset_state_recursive()

Unset this group and its ancestry.

The inverse of set_state_recursive.

Table Of Contents

Previous topic

Sprite Class

Next topic

pyglet.text