type picture = Picture of float * float * float * float * pic_object list
and point = float * float
and pic_object = Line of point * int * int * float * option list
| Circle of point * float * option list
| Oval of point * float * float * option list
| Text of point * string * option list
| Curve of point * point * point * option list
| SubPicture of point * picture * option list
| Framebox of point * float * float * option list
and option = Arrowhead
| Anchor of anchor * anchor
| Filled
| Dashed of float
| Framed
| Points of int
and anchor = N | L | R | T | B
let string_of_anchor = function
N -> "n" | L -> "l" | R -> "r" | T -> "t" | B -> "b"
let rec extract_anchor = function
[] -> ""
| Anchor (a1, a2) :: s -> "[" ^ (string_of_anchor a1) ^
(string_of_anchor a2) ^ "]"
| _ :: s -> extract_anchor s
let rec extract_points = function
[] -> ""
| Points i :: s -> "[" ^ (string_of_int i) ^ "]"
| _ :: s -> extract_points s
let rec extract_dashed = function
[] -> ""
| Dashed i :: s -> (string_of_float i)
| _ :: s -> extract_dashed s