Module Mlpost.Picture


module Picture: sig .. end


Pictures are a powerful way to reuse and modify parts of a figure
type t 
The abstract type of pictures
val make : Command.t -> t
Make a picture from a drawing command
val tex : string -> t
Take a string in Latex format and transform it into a picture
val transform : Transform.t -> t -> t
Apply a transformation to a picture
val bbox : t -> Path.t
Get the bounding box of a picture (with default padding, as in MetaPost)
val corner_bbox : ?dx:Num.t -> ?dy:Num.t -> t -> Path.t
Get the bounding box of a picture, according to its corners and supplied padding dx and dy.
val center : Point.t -> t -> t
Place a picture centered at some point
val place_up_left : Point.t -> t -> t
Place a picture with its upper left corner at some point
val place_up_right : Point.t -> t -> t
Place a picture with its upper right corner at some point
val place_bot_left : Point.t -> t -> t
Place a picture with its bottom left corner at some point
val place_bot_right : Point.t -> t -> t
Place a picture with its bottom right corner at some point
val beside : t -> t -> t
beside p1 p2 returns a picture in which p2 is placed right to p1
val below : t -> t -> t
below p1 p2 returns a picture in which p2 is placed below p1

Special points of the bounding box of a picture


val ulcorner : t -> Point.t
val llcorner : t -> Point.t
val urcorner : t -> Point.t
val lrcorner : t -> Point.t
val ctr : t -> Point.t
val clip : t -> Path.t -> t
clip pic path limits pic to the cyclic path path; all elements outside of path are cut off.

Dimensions


val width : t -> Num.t
val height : t -> Num.t

Predefined Transformations
val scale : Num.t -> t -> t
val rotate : float -> t -> t
val shift : Point.t -> t -> t
val yscale : Num.t -> t -> t
val xscale : Num.t -> t -> t
val spin : float -> t -> t