Module Mlpost.Command


module Command: sig .. end


General Commands to build figures
type t 
The abstract commands type

Drawing Commands


val draw : ?color:Color.t ->
?pen:Pen.t ->
?dashed:Dash.t -> Path.t -> t
Draw a path
color : the color of the path; default is black
pen : the pen used to draw the path; default is Pen.default
dashed : if given, the path is drawn using that dash_style.
val draw_arrow : ?color:Color.t ->
?pen:Pen.t ->
?dashed:Dash.t -> Path.t -> t
Draw a path with an arrow head; the optional arguments are the same as for Command.draw
val fill : ?color:Color.t -> Path.t -> t
Fill a contour given by a closed path
color : the color used to fill the area; default is black
val draw_pic : Picture.t -> t
draws a picture
val externalimage : string ->
[ `Exact of Num.t * Num.t
| `Height of Num.t
| `Inside of Num.t * Num.t
| `None
| `Width of Num.t ] -> t
insert an image given its filename

Manipulating Commands


val nop : t
A command that has no effect
val append : t -> t -> t
Append two commands to form a compound command
val (++) : t -> t -> t
Abbreviation for append
val seq : t list -> t
Group a list of commands to a single command
val iter : int -> int -> (int -> t) -> t
iter m n f builds a command that corresponds to the sequence of commands f m; f (m+1); ... ; f(n)
val iterl : ('a -> t) -> 'a list -> t
iterl f l builds a command that corresponds to the sequence of commands f x1; f x2; ... ; f xn for l = [x1;x2;...;xn]

Labels


type hposition = [ `Center | `Left | `Right ] 
Positions; useful to place labels
type vposition = [ `Bot | `Center | `Top ] 
type position = [ `Bot
| `Center
| `Left
| `Lowleft
| `Lowright
| `Right
| `Top
| `Upleft
| `Upright ]
val label : ?pos:position ->
Picture.t -> Point.t -> t
label ~pos:`Left pic p puts picture pic at the left of point p
val dotlabel : ?pos:position ->
Picture.t -> Point.t -> t
Works like label, but puts a dot at point p as well