package tiny_appkits

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module FigureSource

Sourcetype point = float * float
Sourcetype box = {
  1. x0 : float;
  2. y0 : float;
  3. x1 : float;
  4. y1 : float;
}
Sourceval box : point -> point -> box
Sourcetype style = {
  1. fill : float option;
  2. pen : float;
}
Sourcetype 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
Sourceval bounds : t -> box
Sourceval union : box -> box -> box
Sourceval hit : tolerance:float -> t -> point -> bool
Sourceval translate : float -> float -> t -> t
Sourceval fit : box -> t -> t
Sourceval handles : t -> point list
Sourceval drag_handle : t -> int -> point -> t
Sourceval restyle : (style -> style) -> t -> t