module Svg:sig..end
type svg 
val new_svg_document : width:int -> height:int -> ?unit:string -> unit -> svgaccepted values for the unit parameter can be:
    "px", "cm", "mm", "em", "ex", "in", "pt", "pc"
val finish_svg : svg -> unitcloses the root svg tag
val add_comment : svg -> s:string -> unit -> unitadds an xml comment in the source of the svg-document
val add_newline : svg -> unitadds a newline in the source of the svg document
val get_svg_document : svg -> stringreturn the result svg document as a string
val write_svg_file : svg -> filename:string -> unitwrite the result svg document to a file
val print_svg_document : svg -> unitprints the result svg document to stdout
type class_name 
css class-name
type css_style 
provided by the to_style function
type id_name 
id-name
val add_line : svg ->
       x1:int ->
       y1:int ->
       x2:int ->
       y2:int ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_polyline : svg ->
       points:(int * int) list ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_polygon : svg ->
       points:(int * int) list ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_rect : svg ->
       x:int ->
       y:int ->
       width:int ->
       height:int ->
       ?rx:float ->
       ?ry:float ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_circle : svg ->
       cx:float ->
       cy:float ->
       r:float ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_ellipse : svg ->
       cx:float ->
       cy:float ->
       r:float * float ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_triangle : svg ->
       p1:int * int ->
       p2:int * int ->
       p3:int * int ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_text : svg ->
       x:int ->
       y:int ->
       text:string ->
       ?text_anchor:string ->
       ?dominant_baseline:string ->
       ?font_family:string ->
       ?font_size:string ->
       ?font_weight:string ->
       ?font_style:string ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
module Float:sig..end
val add_circle_sector : svg ->
       cx:float ->
       cy:float ->
       r:float ->
       angle1:float ->
       angle2:float ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
val add_donut_slice : svg ->
       cx:float ->
       cy:float ->
       r1:float ->
       r2:float ->
       angle1:float ->
       angle2:float ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unitval begin_group : svg ->
       ?translate:float * float ->
       ?rotate:float * int * int -> ?scale:float * float -> unit -> unit
val end_group : svg -> unittype path 
val empty_path : path
val new_path : unit -> path
val move_to : path -> x:float -> y:float -> path
val line_to : path -> x:float -> y:float -> path
val h_line : path -> x:float -> path
val v_line : path -> y:float -> path
val quad_curve : path -> x1:float -> y1:float -> x:float -> y:float -> path
val cubic_curve : path ->
       x1:float ->
       y1:float -> x2:float -> y2:float -> x:float -> y:float -> path
val arc_to : path ->
       x:float ->
       y:float ->
       r:float * float ->
       ?rotation:float -> ?large_arc:bool -> ?clockwise:bool -> unit -> path
val close_path : path -> path
val add_path : svg ->
       path:path ->
       ?fill:string ->
       ?fill_opacity:float ->
       ?stroke:string ->
       ?stroke_width:float ->
       ?stroke_opacity:float ->
       ?id:id_name ->
       ?css:class_name -> ?style:css_style -> unit -> unit
type cmd = 
| | 
M of  | 
(* | move-to  | *) | 
| | 
L of  | 
(* | line-to  | *) | 
| | 
H of  | 
(* | h-line  | *) | 
| | 
V of  | 
(* | v-line  | *) | 
| | 
Q of  | 
(* | quad-curve  | *) | 
| | 
C of  | 
(* | cubic-curve  | *) | 
| | 
A of  | 
(* | arc-to  | *) | 
| | 
Z | 
(* | close-path  | *) | 
path-commands
val to_path : cmd list -> pathconvert commands to a path
module Relative:sig..end
val scale_path : float -> cmd list -> cmd listscale the coordinates of path commands
val translate_path : float * float -> cmd list -> cmd listtranslate the coordinates of path commands (only for non-relative coords)
val new_fragment : unit -> svginitialises a new svg fragment (useful for example to simulate layers)
val add_fragment : svg -> svg -> unitadd_fragment svg frag adds the fragment frag to the svg document svg
type css_attr 
val fill : css_attr
val fill_opacity : css_attr
val stroke : css_attr
val stroke_width : css_attr
val stroke_opacity : css_attr
val text_anchor : css_attr
val font_family : css_attr
val font_size : css_attr
val font_weight : css_attr
val font_style : css_attr
val letter_spacing : css_attr
val word_spacing : css_attr
val to_style : styles:(css_attr * string) list -> css_styleformat css-properties that you can provide to the style parameter of the shapes functions
module Attrs:sig..end
type style_sheet 
css style-sheet
val new_style_sheet : unit -> style_sheetinitialises a new empty style-sheet
val style_sheet_add : style_sheet ->
       class_name:string ->
       properties:(css_attr * string) list -> class_name * style_sheetadds css-properties to a css style-sheet, and returns the associated class_name,
    that can be provided to the ~css:class_name parameter of the shapes functions
val add_style_sheet : svg -> style_sheet -> unitadd the css style-sheet to a svg document
val style_sheet_add_id : style_sheet ->
       id_name:string ->
       properties:(css_attr * string) list -> id_name * style_sheetsame than style_sheet_add, but using an id instead of a class_name
the returned id_name can be provided to the ~id parameter of the
    shapes functions
val mk_id : string -> id_namemakes an id with no associated style
Here is a small example:
let () =
  let svg = Svg.new_svg_document ~width:300 ~height:190 () in
  Svg.add_circle svg
      ~cx:120.0
      ~cy:80.0
      ~r:60.0
      ~fill:"#00f" ();
  Svg.finish_svg svg;
  Svg.print_svg_document svg;
;;
It will create a small svg-document, with a blue circle in the middle of it.