Start/Finish Render

class arcade.start_finish_data.StartFinishRenderData(pixelated: bool = False, blend: bool = True)[source]

Bases:

State data for offscreen rendering with arcade.start_render() and arcade.finish_render(). This is only meant for simple module level drawing like creating a static image we display repeatedly once the module has executed.

Example:

import arcade
arcade.open_window(500, 500, "Picture")
arcade.set_background_color(arcade.color.WHITE)
# This renderer is permanently enabled here
arcade.start_render()
arcade.draw_text("Hello World", 190, 50, arcade.color.BLACK, 20)
arcade.draw_circle_filled(250, 250, 100, arcade.color.RED)
arcade.finish_render()
# Repeatedly display the image produced between start and finish render
arcade.run()

This renderer is enabled by calling arcade.start_render(). It’s an irreversible action.

Parameters:
  • pixelated – Should the image be pixelated or smooth when scaled?

  • blend – Should we draw with alpha blending enabled?

begin()[source]

Enable rendering into the buffer.

Should only be called once followed by a call to end().

draw()[source]

Draw the buffer to the screen attempting to preserve the aspect ratio.

end()[source]

Switch back to rendering into the window