module type DRAW = sig end
Graphical representation of schemes is controlled by a module of signature
DRAW
giving an implementation of drawing primitives. This allows
performing drawing on a variety of device using appropriate external
libraries. An example implementation using the
Graphics
library of the
Objective Caml system is given in
Dalton_templates.DrawGraphics
.
type window
val draw_lines : window ->
color:Dalton_aux.color -> lw:int -> (int * int) list -> unit
val draw_rect : window ->
color:Dalton_aux.color -> lw:int -> x:int -> y:int -> w:int -> h:int -> unit
val draw_ellipse : window ->
color:Dalton_aux.color ->
lw:int -> x:int -> y:int -> rx:int -> ry:int -> unit
val fill_rect : window ->
color:Dalton_aux.color -> x:int -> y:int -> w:int -> h:int -> unit
val fill_ellipse : window ->
color:Dalton_aux.color -> x:int -> y:int -> rx:int -> ry:int -> unit
val fill_poly : window -> color:Dalton_aux.color -> (int * int) list -> unit
val draw_text : window ->
color:Dalton_aux.color ->
?name:string -> size:int -> x:int -> y:int -> string -> unit
val text_size : window -> ?name:string -> size:int -> string -> int * int
val draw_dotted_lines : window -> color:Dalton_aux.color -> (int * int) list -> unit