module Data: sig
.. end
Internal data.
Path representation
type
segment = [ `Ccurve of Gg.p2 * Gg.p2 * Gg.p2
| `Close
| `Earc of bool * bool * float * Gg.size2 * Gg.p2
| `Line of Gg.p2
| `Qcurve of Gg.p2 * Gg.p2
| `Sub of Gg.p2 ]
The type for path segments.
type
path = segment list
The type for paths. The segment list is reversed. A few invariants
apply. See the comment in Vg
's source.
val of_path : Vg.P.t -> path
of_path p
is the internal representation of p
.
Image representation
type
tr =
| |
Move of Gg.v2 |
| |
Rot of float |
| |
Scale of Gg.v2 |
| |
Matrix of Gg.m3 |
The type for transforms. Not uniformely expressed as a
matrix since renderers may have shorter syntaxes for some
transforms.
val tr_to_m3 : tr -> Gg.M3.t
tr_to_m3 tr
is the matrix of tr
.
val inv_tr_to_m3 : tr -> Gg.M3.t
inv_tr_to_m3 tr
is the matrix inverse of tr
.
type
blender = [ `Atop | `Copy | `In | `Out | `Over | `Plus | `Xor ]
type
primitive =
| |
Const of Gg.color |
| |
Axial of Gg.Color.stops * Gg.p2 * Gg.p2 |
| |
Radial of Gg.Color.stops * Gg.p2 * Gg.p2 * float |
| |
Raster of Gg.box2 * Gg.raster |
The type for image primitives.
type
glyph_run = {
|
font : Vg.font ; |
|
text : string option ; |
|
o : Gg.p2 ; |
|
blocks : bool * (int * int) list ; |
|
advances : Gg.v2 list ; |
|
glyphs : Vg.glyph list ; |
}
The type for glyph runs.
type
image =
The type for images.
val of_image : Vg.I.t -> image
of_image i
is the internal representation of i
.