Release 0.8.2 — Daniel Bünzli <daniel.buenzl email@example.com>
val target :
Cairo.context -> [ `Other ] Vg.Vgr.target
target ctxis a render target for rendering to the Cairo context
ctx. Rendering a renderable
(size, view, i)is done as follows.
Box2.v P2.o size. This box is cleared with
Color.voidand the portion
iis rendered in this box.
Multiple images. Multiple images rendering is supported. For
each renderable the above procedure is performed on
ctx. If you
want to have each renderable on a single page on backends that support
it you should handle this between two renderable using Cairo's API.
val stored_target :
[< `Pdf | `Png of Gg.V2.t | `Ps | `Svg ] -> Vg.Vgr.dst_stored Vg.Vgr.target
stored_target fmtis a
fmtrender target for rendering to the stored destination given to
`Pngthe argument specifies the rendering resolution in samples per meters.
Multiple images. Multiple image rendering is supported on
`Ps target, each renderable creates a new page of the
renderable size. Multiple image rendering is not supported on
Invalid_argument is raised by
Vg.Vgr.render if multiple images are rendered.
Warning. The following is subject to change in the future.
Currently text rendering uses Cairo's font selection mechanism and doesn't support the glyph API.
Given a glyph cut:
~text ~blocks ~advances font glyphs
glyphs parameters are ignored.
text must be provided and is used to define the text to render.
font is used to select the font family.
The weight is limited to Normal (
< `W700) and Bold (
The following render warnings are reported.
`Unsupported_cut (`O o, i), outline area cuts can be performed only on (possibly transformed)
`Unsupported_glyph_cut (`O o, i), outline glyph cuts can be performed only on (untransformed)
`Textless_glyph_cut iif no
textargument is specified in a glyph cut.
The following limitations should be taken into account.