mlpost

OCaml library on top of Metapost
Library mlpost
Module Mlpost . Tree . Simple
type t
val leaf : Box.t -> t
val node : ?ls:Num.t -> ?cs:Num.t -> ?arrow_style:arrow_style -> ?edge_style:edge_style -> ?stroke:Color.t -> ?brush:Brush.t -> ?pen:Pen.t -> ?sep:Num.t -> ?valign:Command.position -> ?halign:Command.position -> Box.t -> t list -> t

a simple tree placement algorithm: align all subtrees horizontally , and place the parent node above. Default arrow_style is Directed. Default edge_style is Straight.

  • parameter ls

    (level sep): vertical distance between levels. The default value is 1.0. A negative value draws the tree upward.

  • parameter cs

    (children sep): horizontal distance between siblings. The default value is 0.2.

  • parameter halign

    change alignment of children (default: `Top)

  • parameter valign

    change alignment of parent node wrt. children (default: `Children)

val bin : ?ls:Num.t -> ?cs:Num.t -> ?arrow_style:arrow_style -> ?edge_style:edge_style -> ?stroke:Color.t -> ?brush:Brush.t -> ?pen:Pen.t -> ?sep:Num.t -> Box.t -> t -> t -> t
val to_box : t -> Box.t
val draw : ?debug:bool -> t -> Command.t