beatmup.SceneRenderer

class beatmup.SceneRenderer

AbstractTask rendering a Scene. The rendering may be done to a given bitmap or on screen, if the platform supports on-screen rendering.

__init__(self: beatmup.SceneRenderer) None

Methods

__init__(self)

pick_layer(self, x, y, inPixels)

Searches for a layer at a given position.

reset_output(self)

Removes a bitmap from the renderer output, if any, and switches to on-screen rendering.

Attributes

FIT_HEIGHT

FIT_WIDTH

FIT_WIDTH_TO_TOP

STRETCH

background_image

Image to pave the background.

output

Output bitmap

output_mapping

Specifies how the scene coordinates [0,1]² are mapped to the output (screen or bitmap) pixel coordinates.

output_pixels_fetching

If set to True, the output image data is pulled from GPU to CPU memory every time the rendering is done.

output_reference_width

Value overriding output width for elements that have their size in pixels, in order to render a resolution-independent picture

scene

Scene