2022-12-15 13:41:19 +01:00
|
|
|
type drawops_colspec =
|
|
|
|
NoCol
|
|
|
|
| RGB of float * float * float
|
|
|
|
| Grey of float
|
|
|
|
| CYMK of float * float * float * float
|
|
|
|
|
|
|
|
type drawops =
|
|
|
|
| Rect of float * float * float * float (* x, y, w, h *)
|
|
|
|
| To of float * float
|
|
|
|
| Line of float * float
|
|
|
|
| Fill of drawops_colspec
|
|
|
|
| Stroke of drawops_colspec
|
2022-12-15 15:20:41 +01:00
|
|
|
| SetLineThickness of float
|
|
|
|
| SetLineCap of int
|
|
|
|
| SetLineJoin of int
|
|
|
|
| SetMiterLimit of float
|
|
|
|
| SetDashPattern of float list * float
|
2022-12-16 13:13:38 +01:00
|
|
|
| Matrix of Pdftransform.transform_matrix
|
|
|
|
| Push
|
|
|
|
| Pop
|
2022-12-15 13:41:19 +01:00
|
|
|
| EndPath
|
|
|
|
|
|
|
|
type state =
|
|
|
|
{mutable fill : drawops_colspec;
|
|
|
|
mutable stroke : drawops_colspec;
|
|
|
|
mutable linewidth : float;
|
|
|
|
mutable linecap : int;
|
|
|
|
mutable linejoin : int;
|
|
|
|
mutable miterlimit : float;
|
|
|
|
mutable dashpattern : float list * float}
|
|
|
|
|
|
|
|
val draw : bool -> int list -> Pdf.t -> drawops list -> Pdf.t
|