Module Figure

type point = float * float
type box = {
  1. x0 : float;
  2. y0 : float;
  3. x1 : float;
  4. y1 : float;
}
val box : point -> point -> box
type style = {
  1. fill : float option;
  2. pen : float;
}
type t =
  1. | Line of point * point * style
  2. | Rect of box * style
  3. | Oval of box * style
  4. | Text of box * string * float
  5. | Group of t list
val bounds : t -> box
val union : box -> box -> box
val hit : tolerance:float -> t -> point -> bool
val translate : float -> float -> t -> t
val fit : box -> t -> t
val handles : t -> point list
val drag_handle : t -> int -> point -> t
val restyle : (style -> style) -> t -> t