Commit fc9128bd authored by Benoit Barbot's avatar Benoit Barbot
Browse files

fix color

parent 014557af
......@@ -89,7 +89,7 @@ let update_state_attr (s,at) attr_id = function
let get_new_state_attr (s,at) _ = [
"Attribute", (fun (s,at) -> (s, at@[""]), B (List.length at)) ;
"color", (fun (s,at) -> (s, at@["color=black"]), B (List.length at)) ;
"fill", (fun (s,at) -> (s, at@["fill=black"]), B (List.length at)) ;
"fill", (fun (s,at) -> (s, at@["fill=black"]), C (List.length at)) ;
]
......@@ -183,9 +183,9 @@ let get_new_arc_attr atlist (p1,p2) =
let print_single_attr f a=
let open DrawingGeom.Color in
match is_prefix a "fill=" with
| Some x -> Format.fprintf f "fill=%s" (to_tikz_string @@ parse x)
| Some x -> Format.fprintf f "fill={%s}" (to_tikz_string @@ parse x)
| None -> (match is_prefix a "color=" with
| Some x -> Format.fprintf f "color=%s" (to_tikz_string @@ parse x)
| Some x -> Format.fprintf f "color={%s}" (to_tikz_string @@ parse x)
| None -> Format.fprintf f "%s" a
)
......
......@@ -72,7 +72,7 @@ module Color = struct
(loi (g/16)) (loi (g mod 16)) (loi (b/16)) (loi (b mod 16))
let to_tikz_string (r,g,b) =
Printf.sprintf "rgb,255:red,%i;green,%i;yellow,%i" r g b
Printf.sprintf "rgb,255:red,%i;green,%i;blue,%i" r g b
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment