sig
val string_of_char : char -> string
val char_of_string : string -> char
val ( ~. ) : int -> float
module Math = Math.Math
module Vector = Math.Vector
type vector = Vector.t
type keys = Set.Make(Uchar).t
type config =
Config.config = {
width : int;
height : int;
display_width : int;
display_height : int;
mouse_x : int;
mouse_y : int;
pmouse_x : int;
pmouse_y : int;
mouse_scroll : int;
mouse_pressed : bool;
mouse_button : [ `Center | `Left | `Right ];
key : char;
keys : keys;
key_unicode : Uchar.t;
key_pressed : bool;
frame_count : int;
frame_rate : float;
}
val check_key : config -> char -> bool
val check_key_uchar : config -> Uchar.t -> bool
val get_keys : config -> char list
val get_keys_uchar : config -> Uchar.t list
exception Exit
type color =
Color.color = {
red : int;
green : int;
blue : int;
alpha : int;
}
val rgb : int -> int -> int -> color
val rgba : int -> int -> int -> int -> color
val gray : int -> color
val graya : int -> int -> color
val hsv : int -> int -> int -> color
val hsva : int -> int -> int -> int -> color
val hex : string -> color
module Key = Key.Key
module KeyUnicode = Key.KeyUnicode
type tag = Shape.tag = ..
type tag += TName of string
type vertex =
Shape.vertex = private
MoveTo of Math.vector
| LineTo of Math.vector
| BezierTo of Math.vector * Math.vector * Math.vector
| Arc of Math.vector * Math.vector * float * float * float
| ClosePath
type t =
Shape.t = private
Shape of vertex list
| Group of t list
| Paint of t * Paint.paint_update
| Tag of t * tag
| Background of Color.color
| Empty
val poly : ?close:[ `Close | `Open ] -> Math.vector list -> t
val point : Math.vector -> t
val line : Math.vector -> Math.vector -> t
val rect : Math.vector -> ?align:[ `Center | `Corner ] -> Math.vector -> t
val quad : Math.vector -> Math.vector -> Math.vector -> Math.vector -> t
val triangle : Math.vector -> Math.vector -> Math.vector -> t
val ellipse :
Math.vector -> ?align:[ `Center | `Corner ] -> Math.vector -> t
val circle : Math.vector -> ?align:[ `Center | `Corner ] -> float -> t
val arc :
Math.vector ->
?align:[ `Center | `Corner ] ->
Math.vector ->
?stroke_mode:[ `Closed | `Open ] ->
?fill_mode:[ `Chord | `Pie ] -> ?phi:float -> float -> float -> t
val bezier : Bezier.t -> t
val group : t list -> t
val shape : t -> Math.vector -> t
val background : Color.color -> t
val empty : t
val fill : Color.color -> t -> t
val no_fill : t -> t
val stroke : Color.color -> t -> t
val no_stroke : t -> t
val stroke_weight : float -> t -> t
val stroke_cap : [ `Project | `Round | `Square ] -> t -> t
val stroke_join : [ `Bevel | `Miter | `Round ] -> t -> t
val bleach : t -> t
val name : string -> t -> t
val find_name : string -> t -> t option
val find_names : string -> t -> t list
val tag : tag -> t -> t
val find_tag : ?eq:(tag -> tag -> bool) -> tag -> t -> t option
val find_tags : ?eq:(tag -> tag -> bool) -> tag -> t -> t list
val translate : Math.vector -> t -> t
val scale : Math.vector -> t -> t
val rotate : float -> t -> t
module Dynamic = Runner.Dynamic
module Runner = Runner.Runner
val run_sketch : (module Sketch.Sketch) -> unit
module Dict :
sig
type key = String.t
type 'a t = 'a Map.Make(String).t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Seq.t -> 'a t
end
module type Sketch = Sketch.Sketch
end