Module Mlpost.Triangle
Tree-like, triangular shapes, with a root on top and an horizontal bottom line.
type t= Box.tA triangular shape is a box. In the following, we simply call it a "triangle".
val create : ?brush:Brush.t -> ?stroke:Color.t option -> ?pen:Pen.t -> ?dash:Dash.t -> ?fill:Color.t -> ?left:float -> ?right:float -> ?width:Num.t -> depth:Num.t -> unit -> Box.tcreate depthcreates a triangular shape of depthdepth. The width is equal todepth, unless specified usingwidth.leftandrightcontrol the horizontal position of the root; they default to0.5i.e. the root is centered. Negative values forleftandrightare allowed.
val pic : ?brush:Brush.t -> ?stroke:Color.t option -> ?pen:Pen.t -> ?dash:Dash.t -> ?fill:Color.t -> ?dx:float -> ?dy:float -> Picture.t -> tbuilds a triangle surrounding a picture
val tex : ?brush:Brush.t -> ?stroke:Color.t option -> ?pen:Pen.t -> ?dash:Dash.t -> ?fill:Color.t -> ?dx:float -> ?dy:float -> string -> tbuilds a triangle surrounding a picture
builds a triangle surrounding a LaTeX label
val root : t -> Point.tval bottom_left : t -> Point.tval bottom_right : t -> Point.tSpecial points in a triangle.
val draw : ?debug:bool -> t -> Command.tval root_label : ?pos:Command.position -> Picture.t -> t -> tval tex_root_label : ?pos:Command.position -> string -> t -> tAttach a label to the root.
val x_depth : ?x:float -> ?depth:float -> t -> Point.ta point inside a triangle is denoted using two coordinates
xanddepth. Coordinatexcontrols horizontal placement, with 0.0 for left and 1.0 for right (negative values are allowed). Coordinatedepthcontrols vertical placement, with 0.0 for root and 1.0 for bottom line (negative values are allowed).xdefaults to0.5(centered) anddepthdefaults to1.0(bottom).
val label : ?x:float -> ?depth:float -> ?pos:Command.position -> Picture.t -> t -> tval tex_label : ?x:float -> ?depth:float -> ?pos:Command.position -> string -> t -> tAttach a label to the point (x, depth). Coordinate
depthdefaults to 0.7, so that label is likely to fit nicely in the triangle (otherwise, you may consider using functionspicandtexabove).
val anchor : ?x:float -> ?depth:float -> t -> t -> tanchor t2 t1moves trianglet1at position (x, depth) in trianglet2
val pose : ?x:float -> ?depth:float -> t -> t -> tpose t2 t1moves trianglet1so that its south point is at position (x, depth) in trianglet2