package tiny_appkits

  1. Overview
  2. Docs
Application engines from scratch: a spreadsheet, rich text, paint, draw, CAD, editors and more

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.3.6.tar.gz
md5=7c636383d146d30ac6f2fa234a6253c8
sha512=c79f3823c5f8f57e5038eb640d487c61168b84aa07c61999d6622ef9fd0c890e2b03b4c6a7cdbbe9352a49e25dda00ac7bb14693cee8e3d7beeed251351a2af0

doc/tiny_appkits.appkit_sketch/Sketch/index.html

Module SketchSource

Sourcetype pos = float * float
Sourcetype item =
  1. | Line of int * int
  2. | Circle of int * int
Sourcetype constr =
  1. | Horizontal of int
  2. | Vertical of int
  3. | Parallel of int * int
  4. | Perpendicular of int * int
  5. | Equal of int * int
  6. | On_line of int * int
  7. | On_circle of int * int
Sourcetype instance = {
  1. master : int;
  2. at : pos;
  3. size : float;
  4. angle : float;
}
Sourcetype sheet = {
  1. points : (int * pos) list;
  2. fixed : int list;
  3. items : (int * item) list;
  4. constraints : constr list;
  5. instances : instance list;
  6. next : int;
}
Sourceval empty : sheet
Sourceval add_point : pos -> sheet -> sheet * int
Sourceval add_item : item -> sheet -> sheet * int
Sourceval constrain : constr -> sheet -> sheet
Sourceval pos : sheet -> int -> pos
Sourceval set_pos : int -> pos -> sheet -> sheet
Sourceval toggle_fixed : int -> sheet -> sheet
Sourceval ends : sheet -> int -> (int * int) option
Sourceval points_of : sheet -> constr -> int list
Sourceval merge : drop:int -> onto:int -> sheet -> sheet
Sourceval delete : int -> sheet -> sheet
Sourcetype t = sheet list
Sourceval sheet : t -> int -> sheet
Sourceval set_sheet : int -> sheet -> t -> t
Sourceval uses : t -> int -> int -> bool
Sourceval place : int -> instance -> t -> t option
Sourcetype stroke =
  1. | Seg of pos * pos
  2. | Round of pos * float
Sourceval transform : instance -> pos -> pos
Sourceval instance_strokes : t -> instance -> stroke list
Sourceval strokes : t -> int -> stroke list
Sourcetype aim =
  1. | Nothing
  2. | At_point of int
  3. | On_item of int * pos
  4. | At_instance of int
Sourceval aim : t -> int -> tolerance:float -> ?except:int -> pos -> aim
Sourceval to_segment : pos -> pos -> pos -> float