Rasterized rendering

Rasterized rendering#

module:

navground.sim.ui.render

Rasterizes SVG using cairosvg.

Renders the world as a raw image

Parameters:
  • world – The world to be rendered

  • background_color – A valid SVG color for the background

  • kwargs – Arguments forwarded to navground.sim.ui.svg_for_world()

Returns:

An RGB image as a numpy array

Renders the world as an png image

Parameters:
  • world – The world to be rendered

  • background_color – A valid SVG color for the background

  • kwargs – Arguments forwarded to navground.sim.ui.svg_for_world()

Returns:

A png bytestring

Renders the world as an pdf image

Parameters:
  • world – The world to be rendered

  • background_color – A valid SVG color for the background

  • kwargs – Arguments forwarded to navground.sim.ui.svg_for_world()

Returns:

A pdf bytestring