Graph.XDotDrawSourceParses xdot drawing operations
See dot documentation to understand the drawing operations
Dot layout coordinates
Dimensions
Text alignment
Style attributes
type operation = | Filled_ellipse of pos * width * height| Unfilled_ellipse of pos * width * height| Filled_polygon of pos array| Unfilled_polygon of pos array| Polyline of pos array| Bspline of pos array| Filled_bspline of pos array| Text of pos * align * width * string| Fill_color of string| Pen_color of string| Font of float * string| Style of style_attr listDrawing operations
val string_scale_size :
fontMeasure:(fontName:string -> fontSize:int -> string -> int * int) ->
string ->
float ->
string ->
width * heightstring_scale_size ~fontMeasure font font_size text. Interpolates the font metrics we have to use to draw the given text with the given font but preserving the bounding box of the text even with a proportional font. For a fixed width font the result is font_size*font_size.
Parses an xdot drawing attribute
Some drawing operations modify the following drawing state (pen_color, font and style).
type draw_state = private {mutable fill_color : string;mutable pen_color : string;mutable font : float * string;mutable style : style_attr list;}Iterates on the drawing operations and updates the implicit drawing state
Reads the color string and converts to rgb if in an another format