OCaml library on top of Metapost
Library mlpost
Module Mlpost . Shapes
val round_rect : Num.t -> Num.t -> Num.t -> Num.t -> Path.t

round_rect w h rx ry returns a rectangle of width w and height h with rounded corners. The rounded corners are arcs of an ellipse of radii rx and ry. rx (resp. ry) should be positive and smaller than w/2 (resp. h/2).

val rectangle : Num.t -> Num.t -> Path.t

rectangle w h returns a rectangle of width w and height h.

val ellipse : Num.t -> Num.t -> Path.t

ellipse rx ry returns an ellipse of great axis rx and small axis ry. The ellipse is centered on the origin and aligned with the x axis.

  • parameter fill

    the color with which to fill the ellipse ; if no color is provided, it is not filled.

  • parameter stroke

    the color with which the ellipse's outline shall be drawn ; default is black.

  • parameter thickness

    the thickness of the pen used to draw the outline ; 1. is default

val circle : Num.t -> Path.t
val patatoid : Num.t -> Num.t -> Path.t
val patatoid2 : Num.t -> Num.t -> Path.t