circuits-diagrams
Safe HaskellNone
LanguageGHC2024

Strings.Svg.Render

Description

Render a laid-out string diagram as ChartOptions (SVG via chart-svg).

Synopsis

Documentation

renderLayout :: Layout -> ChartOptions Source #

Render a Layout to chart options (no hud).

renderSDiagram :: SDiagram -> ChartOptions Source #

Layout then render an untyped skeleton.

renderDiagram :: Diagram a da b db -> ChartOptions Source #

Forget types via skeleton, then render.

equalityRow :: Layout -> Layout -> Layout Source #

Place two layouts side by side with an equals sign between them.

withBackground :: Rect Double -> ChartTree -> ChartTree Source #

Dark background rect behind a chart tree, spanning the given bounds.

padLayout :: Double -> Layout -> Layout Source #

Pad a layout's bounds (for background / viewBox breathing room).