FrameRequest#

Added in version 2.0.

class FrameRequest(**properties: Any)#

Superclasses: Object

Defines which parts of an image to load.

::: warning

Loaders can and frequently will ignore instructions set in GlyFrameRequest. The reason is that for most loaders many instructions don’t have a meaningful interpretation.

Constructors#

class FrameRequest
classmethod new() FrameRequest#

Creates a new frame request.

Added in version 2.0.

Methods#

class FrameRequest
set_loop_animation(loop_animation: bool) None#

Controls if first frame is returned after last frame

By default, this option is set to TRUE, returning the first frame, if the previously requested frame was the last frame.

Added in version 2.0.1.

Parameters:

loop_animation

set_scale(width: int, height: int) None#

Set maximum dimensions for the frame. The texture will be scaled to be within the maximum dimensions while keeping its aspect ratio. This option is especially useful to SVGs which will be rendered at the respective size.

::: warning

Most loaders will ignore this option. Currently, only the SVG loader is known to obey it.

Added in version 2.0.

Parameters:
  • width – Maximum width

  • height – Maximum height

Properties#

class FrameRequest
props.loop_animation: bool#

The type of the None singleton.

props.scale_height: int#

The type of the None singleton.

props.scale_width: int#

The type of the None singleton.