render_debug#

Import

from scenet import render_debug

Defined in

scenet.emit.debug_svg (source)

Install

pip install scenet

Since

0.1

Stability

Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how.

scenet.emit.debug_svg.render_debug(core, *, id_prefix='')[source]#

Render the solver’s working geometry over a faint copy of the panel.

Parameters:
  • core (PanelCore) – The compiled panel.

  • id_prefix (str) – Put in front of every id the overlay writes, so a strip can hold several overlays in one document. Empty by default, as in render.

Return type:

str

Returns:

One SVG document, as text – the panel’s geometry, with no art.

Note

It draws no lettering and no picture, so it needs neither fonts nor bytes, and it raises nothing for any Core.

Example

>>> from scenet import compile_source, render_debug
>>> core = compile_source("cast: {a: {reference: alice}}").core
>>> render_debug(core).count("<svg")
1

See also

render, the panel itself.

Added in version 0.10: The id_prefix parameter.