Module Vgr_svg

module Vgr_svg: sig .. end
Vg SVG renderer.


v0.9.0 - homepage

SVG render targets

val target : ?xml_decl:bool -> ?xmp:string -> unit -> Vg.Vgr.dst_stored
target xml_decl xmp () is an SVG render target for rendering to the stored destination given to Vg.Vgr.create.

Multiple images. Multiple image renders on the target are not supported. Invalid_argument is raised by Vg.Vgr.render if multiple images are rendered.

Text rendering

Warning. The following is subject to change in the future.

Currently text rendering uses SVG's CSS font selection mechanism and doesn't support the glyph API.

Given a glyph cut:

Vg.I.cut_glyphs ~text ~blocks ~advances font glyphs

The blocks, advances and glyphs parameters are ignored. text must be provided and is used to define the text to render. font is used to select the font in a CSS stylesheet.

Render warnings and limitations

The following render warnings are reported.

The following limitations should be taken into account.