Bland.Renderer (Elixir Technical Drawing v0.5.0)

Copy Markdown View Source

Figure-to-SVG renderer.

to_svg/1 takes an %Bland.Figure{} and returns the finished SVG as a binary. All geometry is computed here; series only carry data, and the renderer owns projection, tick placement, pattern defs, and the layout of ornaments.

Broad layout, outside-in:

 page border 
  TITLE                                                
  subtitle                                             
          plot frame              
                                           [legend]  
   y                                                 
   lbl             plotting area                     
                                                     
                      
                   x label                             
                                        [title block]  

Summary

Functions

Renders a figure to an SVG binary.

Functions

to_svg(fig)

@spec to_svg(Bland.Figure.t()) :: String.t()

Renders a figure to an SVG binary.