]> granicus.if.org Git - graphviz/commitdiff
Add support for a -Glandscape boolean. Now landscape can be set with:
authorellson <devnull@localhost>
Mon, 16 Jan 2006 19:44:23 +0000 (19:44 +0000)
committerellson <devnull@localhost>
Mon, 16 Jan 2006 19:44:23 +0000 (19:44 +0000)
-Glandscape
-Gorientation=landscape
-Grotat=90

lib/common/input.c

index e476183d1599b78993699048d305bb8d12260591..539dbeef65419b01de25c55478df219d7d190eb9 100644 (file)
@@ -556,12 +556,13 @@ void graph_init(graph_t * g, bool use_rankdir)
     getdouble(g, "nodefactor", &Nodefactor);
 
     GD_drawing(g)->centered = mapbool(agget(g, "center"));
+
     if ((p = agget(g, "rotate")))
        GD_drawing(g)->landscape = (atoi(p) == 90);
-    else {                     /* today we learned the importance of backward compatibilty */
-       if ((p = agget(g, "orientation")))
-           GD_drawing(g)->landscape = ((p[0] == 'l') || (p[0] == 'L'));
-    }
+    else if ((p = agget(g, "orientation")))
+       GD_drawing(g)->landscape = ((p[0] == 'l') || (p[0] == 'L'));
+    else if ((p = agget(g, "landscape")))
+       GD_drawing(g)->landscape = mapbool(p);
 
     p = agget(g, "clusterrank");
     CL_type = maptoken(p, rankname, rankcode);