]> granicus.if.org Git - graphviz/commitdiff
add support for -Gaspect=<ratio>[,<iterations>]
authorellson <devnull@localhost>
Fri, 10 Oct 2008 17:52:00 +0000 (17:52 +0000)
committerellson <devnull@localhost>
Fri, 10 Oct 2008 17:52:00 +0000 (17:52 +0000)
doc/info/attrs.html
doc/infosrc/attrs
doc/infosrc/types
lib/dotgen/dotinit.c

index a0577145cd3465f75e28380b4c064fa9a6f1842d..46a5edc11dd7bd63a200d0d32bc5277ea400ac65 100644 (file)
@@ -76,13 +76,6 @@ This field indicates which graph component uses the attribute.
 <HR ALIGN=CENTER WIDTH="70%" SIZE=3>
 <TABLE ALIGN=CENTER>
 <TR><TH>Name</TH><TH><A HREF=#h:uses>Used By</A></TH><TH>Type</TH><TH>Default</TH><TH>Minimum</TH><TH>Notes</TH></TR>
- <TR><TD><A NAME=a:Damping HREF=#d:Damping>Damping</A>
-</TD><TD>G</TD><TD>double</TD><TD ALIGN="CENTER">0.99</TD><TD>0.0</TD><TD>neato only</TD> </TR>
- <TR><TD><A NAME=a:K HREF=#d:K>K</A>
-</TD><TD>GC</TD><TD>double</TD><TD ALIGN="CENTER">0.3</TD><TD>0</TD><TD>sfdp, fdp only</TD> </TR>
- <TR><TD><A NAME=a:URL HREF=#d:URL>URL</A>
-</TD><TD>ENGC</TD><TD><A HREF=#k:lblString>lblString</A>
-</TD><TD ALIGN="CENTER">&#60;none&#62;</TD><TD></TD><TD>svg, postscript, map only</TD> </TR>
  <TR><TD><A NAME=a:arrowhead HREF=#d:arrowhead>arrowhead</A>
 </TD><TD>E</TD><TD><A HREF=#k:arrowType>arrowType</A>
 </TD><TD ALIGN="CENTER">normal</TD><TD></TD><TD></TD> </TR>
@@ -91,6 +84,9 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:arrowtail HREF=#d:arrowtail>arrowtail</A>
 </TD><TD>E</TD><TD><A HREF=#k:arrowType>arrowType</A>
 </TD><TD ALIGN="CENTER">normal</TD><TD></TD><TD></TD> </TR>
+ <TR><TD><A NAME=a:aspect HREF=#d:aspect>aspect</A>
+</TD><TD>G</TD><TD><A HREF=#k:aspectType>aspectType</A>
+</TD><TD ALIGN="CENTER">1.0,1</TD><TD></TD><TD></TD> </TR>
  <TR><TD><A NAME=a:bb HREF=#d:bb>bb</A>
 </TD><TD>G</TD><TD><A HREF=#k:rect>rect</A>
 </TD><TD ALIGN="CENTER"></TD><TD></TD><TD>write only</TD> </TR>
@@ -122,6 +118,8 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:constraint HREF=#d:constraint>constraint</A>
 </TD><TD>E</TD><TD><A HREF=#k:bool>bool</A>
 </TD><TD ALIGN="CENTER">true</TD><TD></TD><TD>dot only</TD> </TR>
+ <TR><TD><A NAME=a:Damping HREF=#d:Damping>Damping</A>
+</TD><TD>G</TD><TD>double</TD><TD ALIGN="CENTER">0.99</TD><TD>0.0</TD><TD>neato only</TD> </TR>
  <TR><TD><A NAME=a:decorate HREF=#d:decorate>decorate</A>
 </TD><TD>E</TD><TD><A HREF=#k:bool>bool</A>
 </TD><TD ALIGN="CENTER">false</TD><TD></TD><TD></TD> </TR>
@@ -141,9 +139,6 @@ This field indicates which graph component uses the attribute.
 </TD><TD>N</TD><TD>double</TD><TD ALIGN="CENTER">0.0</TD><TD>-100.0</TD><TD></TD> </TR>
  <TR><TD><A NAME=a:dpi HREF=#d:dpi>dpi</A>
 </TD><TD>G</TD><TD>double</TD><TD ALIGN="CENTER">96.0<BR>0.0</TD><TD></TD><TD>svg, bitmap output only</TD> </TR>
- <TR><TD><A NAME=a:edgeURL HREF=#d:edgeURL>edgeURL</A>
-</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
-</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:edgehref HREF=#d:edgehref>edgehref</A>
 </TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
 </TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
@@ -153,6 +148,9 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:edgetooltip HREF=#d:edgetooltip>edgetooltip</A>
 </TD><TD>E</TD><TD><A HREF=#k:escString>escString</A>
 </TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, cmap only</TD> </TR>
+ <TR><TD><A NAME=a:edgeURL HREF=#d:edgeURL>edgeURL</A>
+</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
+</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:epsilon HREF=#d:epsilon>epsilon</A>
 </TD><TD>G</TD><TD>double</TD><TD ALIGN="CENTER">.0001 * # nodes(mode == KK)<BR>.0001(mode == major)</TD><TD></TD><TD>neato only</TD> </TR>
  <TR><TD><A NAME=a:esep HREF=#d:esep>esep</A>
@@ -177,9 +175,6 @@ This field indicates which graph component uses the attribute.
 </TD><TD>ENGC</TD><TD>double</TD><TD ALIGN="CENTER">14.0</TD><TD>1.0</TD><TD></TD> </TR>
  <TR><TD><A NAME=a:group HREF=#d:group>group</A>
 </TD><TD>N</TD><TD>string</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>dot only</TD> </TR>
- <TR><TD><A NAME=a:headURL HREF=#d:headURL>headURL</A>
-</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
-</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:headclip HREF=#d:headclip>headclip</A>
 </TD><TD>E</TD><TD><A HREF=#k:bool>bool</A>
 </TD><TD ALIGN="CENTER">true</TD><TD></TD><TD></TD> </TR>
@@ -198,6 +193,9 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:headtooltip HREF=#d:headtooltip>headtooltip</A>
 </TD><TD>E</TD><TD><A HREF=#k:escString>escString</A>
 </TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, cmap only</TD> </TR>
+ <TR><TD><A NAME=a:headURL HREF=#d:headURL>headURL</A>
+</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
+</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:height HREF=#d:height>height</A>
 </TD><TD>N</TD><TD>double</TD><TD ALIGN="CENTER">0.5</TD><TD>0.02</TD><TD></TD> </TR>
  <TR><TD><A NAME=a:href HREF=#d:href>href</A>
@@ -211,12 +209,11 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:imagescale HREF=#d:imagescale>imagescale</A>
 </TD><TD>N</TD><TD><A HREF=#k:bool>bool</A>
 <BR>string</TD><TD ALIGN="CENTER">false</TD><TD></TD><TD></TD> </TR>
+ <TR><TD><A NAME=a:K HREF=#d:K>K</A>
+</TD><TD>GC</TD><TD>double</TD><TD ALIGN="CENTER">0.3</TD><TD>0</TD><TD>sfdp, fdp only</TD> </TR>
  <TR><TD><A NAME=a:label HREF=#d:label>label</A>
 </TD><TD>ENGC</TD><TD><A HREF=#k:lblString>lblString</A>
 </TD><TD ALIGN="CENTER">"\N" (nodes)<BR>"" (otherwise)</TD><TD></TD><TD></TD> </TR>
- <TR><TD><A NAME=a:labelURL HREF=#d:labelURL>labelURL</A>
-</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
-</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:labelangle HREF=#d:labelangle>labelangle</A>
 </TD><TD>E</TD><TD>double</TD><TD ALIGN="CENTER">-25.0</TD><TD>-180.0</TD><TD></TD> </TR>
  <TR><TD><A NAME=a:labeldistance HREF=#d:labeldistance>labeldistance</A>
@@ -246,6 +243,9 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:labeltooltip HREF=#d:labeltooltip>labeltooltip</A>
 </TD><TD>E</TD><TD><A HREF=#k:escString>escString</A>
 </TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, cmap only</TD> </TR>
+ <TR><TD><A NAME=a:labelURL HREF=#d:labelURL>labelURL</A>
+</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
+</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:landscape HREF=#d:landscape>landscape</A>
 </TD><TD>G</TD><TD><A HREF=#k:bool>bool</A>
 </TD><TD ALIGN="CENTER">false</TD><TD></TD><TD></TD> </TR>
@@ -417,9 +417,6 @@ This field indicates which graph component uses the attribute.
 </TD><TD ALIGN="CENTER"></TD><TD></TD><TD></TD> </TR>
  <TR><TD><A NAME=a:stylesheet HREF=#d:stylesheet>stylesheet</A>
 </TD><TD>G</TD><TD>string</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg only</TD> </TR>
- <TR><TD><A NAME=a:tailURL HREF=#d:tailURL>tailURL</A>
-</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
-</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:tailclip HREF=#d:tailclip>tailclip</A>
 </TD><TD>E</TD><TD><A HREF=#k:bool>bool</A>
 </TD><TD ALIGN="CENTER">true</TD><TD></TD><TD></TD> </TR>
@@ -438,6 +435,9 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:tailtooltip HREF=#d:tailtooltip>tailtooltip</A>
 </TD><TD>E</TD><TD><A HREF=#k:escString>escString</A>
 </TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, cmap only</TD> </TR>
+ <TR><TD><A NAME=a:tailURL HREF=#d:tailURL>tailURL</A>
+</TD><TD>E</TD><TD><A HREF=#k:lblString>lblString</A>
+</TD><TD ALIGN="CENTER">""</TD><TD></TD><TD>svg, map only</TD> </TR>
  <TR><TD><A NAME=a:target HREF=#d:target>target</A>
 </TD><TD>ENGC</TD><TD><A HREF=#k:escString>escString</A>
 <BR>string</TD><TD ALIGN="CENTER">&#60;none&#62;</TD><TD></TD><TD>svg, map only</TD> </TR>
@@ -447,6 +447,9 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:truecolor HREF=#d:truecolor>truecolor</A>
 </TD><TD>G</TD><TD><A HREF=#k:bool>bool</A>
 </TD><TD ALIGN="CENTER"></TD><TD></TD><TD>bitmap output only</TD> </TR>
+ <TR><TD><A NAME=a:URL HREF=#d:URL>URL</A>
+</TD><TD>ENGC</TD><TD><A HREF=#k:lblString>lblString</A>
+</TD><TD ALIGN="CENTER">&#60;none&#62;</TD><TD></TD><TD>svg, postscript, map only</TD> </TR>
  <TR><TD><A NAME=a:vertices HREF=#d:vertices>vertices</A>
 </TD><TD>N</TD><TD><A HREF=#k:pointfList>pointfList</A>
 </TD><TD ALIGN="CENTER"></TD><TD></TD><TD>write only</TD> </TR>
@@ -465,46 +468,6 @@ This field indicates which graph component uses the attribute.
 <HR>
 <H1>Attribute Descriptions</H1>
 <DL>
-<DT><A NAME=d:Damping HREF=#a:Damping><STRONG>Damping</STRONG></A>
-<DD>  Factor damping force motions. On each iteration, a nodes movement
-  is limited to this factor of its potential motion. By being less than
-  1.0, the system tends to ``cool'', thereby preventing cycling.
-
-<DT><A NAME=d:K HREF=#a:K><STRONG>K</STRONG></A>
-<DD>  Spring constant used in virtual physical model. It roughly corresponds
-  to an ideal edge length (in inches), in that increasing K tends to
-  increase the distance between nodes.
-  Note that the edge attribute <A HREF=#d:len>len</A> can be used to
-  override this value for adjacent nodes.
-
-<DT><A NAME=d:URL HREF=#a:URL><STRONG>URL</STRONG></A>
-<DD>  Hyperlinks incorporated into device-dependent output.
-  At present, used in ps2, cmap, i*map and svg formats.
-  For all these formats, URLs can be attached to nodes, edges and
-  clusters. URL attributes can also be attached to the root graph in ps2,
-  cmap and i*map formats. This serves as the base URL for relative URLs in the
-  former, and as the default image map file in the latter.
-  <P>
-  For svg, cmapx and imap output, the active area for a node is its
-  visible image.
-  For example, an unfilled
-  node with no drawn boundary will only be active on its label.
-  For other output, the active area is its bounding box.
-  The active area for a cluster is its bounding box.
-  For edges, the active areas are small circles where the edge contacts its head
-  and tail nodes. In addition, for svg, cmapx and imap, the active area
-  includes a thin polygon approximating the edge. The circles may
-  overlap the related node, and the edge URL dominates.
-  If the edge has a label, this will also be active.
-  Finally, if the edge has a head or tail label, this will also be active.
-  <P>
-  Note that, for edges, the attributes <A HREF=#d:headURL>headURL</A>,
-  <A HREF=#d:tailURL>tailURL</A>, <A HREF=#d:labelURL>labelURL</A> and
-  <A HREF=#d:edgeURL>edgeURL</A> allow control of various parts of an
-  edge.
-  Also note that, if active areas of two edges overlap, it is unspecified
-  which area dominates.
-
 <DT><A NAME=d:arrowhead HREF=#a:arrowhead><STRONG>arrowhead</STRONG></A>
 <DD>  Style of arrowhead on the head node of an edge.
   See also the <A HREF=#d:dir>dir</A> attribute,
@@ -518,6 +481,9 @@ This field indicates which graph component uses the attribute.
   See also the <A HREF=#d:dir>dir</A> attribute,
   and a <A HREF=#h:undir_note>limitation</A>.
 
+<DT><A NAME=d:aspect HREF=#a:aspect><STRONG>aspect</STRONG></A>
+<DD>  Target aspect ratio of the renderered graph, and optionally the maximum number of iterations allowed to achieve it.
+
 <DT><A NAME=d:bb HREF=#a:bb><STRONG>bb</STRONG></A>
 <DD>  Bounding box of drawing in integer points.
 
@@ -616,6 +582,11 @@ This field indicates which graph component uses the attribute.
   yielding the graph:<BR>
   <IMG SRC="constraint.gif">
 
+<DT><A NAME=d:Damping HREF=#a:Damping><STRONG>Damping</STRONG></A>
+<DD>  Factor damping force motions. On each iteration, a nodes movement
+  is limited to this factor of its potential motion. By being less than
+  1.0, the system tends to ``cool'', thereby preventing cycling.
+
 <DT><A NAME=d:decorate HREF=#a:decorate><STRONG>decorate</STRONG></A>
 <DD>  If true, attach edge label to edge by a 2-segment
   polyline, underlining the label, then going to the closest point of spline.
@@ -664,15 +635,6 @@ This field indicates which graph component uses the attribute.
   it is used to guarantee that the dimensions in the output correspond to
   the correct number of points or inches.
 
-<DT><A NAME=d:edgeURL HREF=#a:edgeURL><STRONG>edgeURL</STRONG></A>
-<DD>  If <B>edgeURL</B> is defined, this is the link used for the non-label
-  parts of an edge. This value overrides any <A HREF=#d:URL>URL</A>
-  defined for the edge.
-  Also, this value is used near the head or tail node unless overridden
-  by a <A HREF=#d:headURL>headURL</A> or <A HREF=#d:tailURL>tailURL</A> value,
-  respectively.
-  See <A HREF=#h:undir_note>limitation</A>.
-
 <DT><A NAME=d:edgehref HREF=#a:edgehref><STRONG>edgehref</STRONG></A>
 <DD>  Synonym for <A HREF=#d:edgeURL>edgeURL</A>.
 
@@ -690,6 +652,15 @@ This field indicates which graph component uses the attribute.
   This is used only if the edge has a <A HREF=#d:URL>URL</A>
   or <A HREF=#d:edgeURL>edgeURL</A> attribute.
 
+<DT><A NAME=d:edgeURL HREF=#a:edgeURL><STRONG>edgeURL</STRONG></A>
+<DD>  If <B>edgeURL</B> is defined, this is the link used for the non-label
+  parts of an edge. This value overrides any <A HREF=#d:URL>URL</A>
+  defined for the edge.
+  Also, this value is used near the head or tail node unless overridden
+  by a <A HREF=#d:headURL>headURL</A> or <A HREF=#d:tailURL>tailURL</A> value,
+  respectively.
+  See <A HREF=#h:undir_note>limitation</A>.
+
 <DT><A NAME=d:epsilon HREF=#a:epsilon><STRONG>epsilon</STRONG></A>
 <DD>  Terminating condition. If the length squared of all energy gradients are
   < <B>epsilon</B>, the algorithm stops.
@@ -775,13 +746,6 @@ This field indicates which graph component uses the attribute.
   same group attribute, parameters are set to avoid crossings and keep
   the edges straight.
 
-<DT><A NAME=d:headURL HREF=#a:headURL><STRONG>headURL</STRONG></A>
-<DD>  If <B>headURL</B> is defined, it is
-  output as part of the head label of the edge.
-  Also, this value is used near the head node, overriding any
-  <A HREF=#d:URL>URL</A> value.
-  See <A HREF=#h:undir_note>limitation</A>.
-
 <DT><A NAME=d:headclip HREF=#a:headclip><STRONG>headclip</STRONG></A>
 <DD>  If true, the head of an edge is clipped to the boundary of the head node;
   otherwise, the end of the edge goes to the center of the node, or the
@@ -812,6 +776,13 @@ This field indicates which graph component uses the attribute.
 <DD>  Tooltip annotation attached to the head of an edge. This is used only
   if the edge has a <A HREF=#d:headURL>headURL</A> attribute.
 
+<DT><A NAME=d:headURL HREF=#a:headURL><STRONG>headURL</STRONG></A>
+<DD>  If <B>headURL</B> is defined, it is
+  output as part of the head label of the edge.
+  Also, this value is used near the head node, overriding any
+  <A HREF=#d:URL>URL</A> value.
+  See <A HREF=#h:undir_note>limitation</A>.
+
 <DT><A NAME=d:height HREF=#a:height><STRONG>height</STRONG></A>
 <DD>  Height of node, in inches. This is taken as the initial, minimum height
   of the node. If <A HREF=#d:fixedsize><B>fixedsize</B></A> is true, this
@@ -873,17 +844,19 @@ This field indicates which graph component uses the attribute.
   expansion, if  <TT>imagescale=true</TT>, width and height are
   scaled uniformly.
 
+<DT><A NAME=d:K HREF=#a:K><STRONG>K</STRONG></A>
+<DD>  Spring constant used in virtual physical model. It roughly corresponds
+  to an ideal edge length (in inches), in that increasing K tends to
+  increase the distance between nodes.
+  Note that the edge attribute <A HREF=#d:len>len</A> can be used to
+  override this value for adjacent nodes.
+
 <DT><A NAME=d:label HREF=#a:label><STRONG>label</STRONG></A>
 <DD>  Text label attached to objects.
   If a node's <A HREF=#d:shape>shape</A> is record, then the label can
   have a <A HREF=shapes.html#record>special format</A>
   which describes the record layout.
 
-<DT><A NAME=d:labelURL HREF=#a:labelURL><STRONG>labelURL</STRONG></A>
-<DD>  If <B>labelURL</B> is defined, this is the link used for the label
-  of an edge. This value overrides any <A HREF=#d:URL>URL</A>
-  defined for the edge.
-
 <DT><A NAME=d:labelangle HREF=#a:labelangle><STRONG>labelangle</STRONG></A>
 <DD>  This, along with <A HREF=#d:labeldistance>labeldistance</A>, determine
   where the
@@ -960,6 +933,11 @@ This field indicates which graph component uses the attribute.
   This is used only if the edge has a <A HREF=#d:URL>URL</A>
   or <A HREF=#d:labelURL>labelURL</A> attribute.
 
+<DT><A NAME=d:labelURL HREF=#a:labelURL><STRONG>labelURL</STRONG></A>
+<DD>  If <B>labelURL</B> is defined, this is the link used for the label
+  of an edge. This value overrides any <A HREF=#d:URL>URL</A>
+  defined for the edge.
+
 <DT><A NAME=d:landscape HREF=#a:landscape><STRONG>landscape</STRONG></A>
 <DD>  If true, the graph is rendered in landscape mode. Synonymous with
   <A HREF=#d:rotate><TT>rotate=90</TT></A> or
@@ -1528,13 +1506,6 @@ This field indicates which graph component uses the attribute.
 <DT><A NAME=d:stylesheet HREF=#a:stylesheet><STRONG>stylesheet</STRONG></A>
 <DD>  A URL or pathname specifying an XML style sheet, used in SVG output.
 
-<DT><A NAME=d:tailURL HREF=#a:tailURL><STRONG>tailURL</STRONG></A>
-<DD>  If <B>tailURL</B> is defined, it is
-  output as part of the tail label of the edge.
-  Also, this value is used near the tail node, overriding any
-  <A HREF=#d:URL>URL</A> value.
-  See <A HREF=#h:undir_note>limitation</A>.
-
 <DT><A NAME=d:tailclip HREF=#a:tailclip><STRONG>tailclip</STRONG></A>
 <DD>  If true, the tail of an edge is clipped to the boundary of the tail node;
   otherwise, the end of the edge goes to the center of the node, or the
@@ -1563,6 +1534,13 @@ This field indicates which graph component uses the attribute.
 <DD>  Tooltip annotation attached to the tail of an edge. This is used only
   if the edge has a <A HREF=#d:tailURL>tailURL</A> attribute.
 
+<DT><A NAME=d:tailURL HREF=#a:tailURL><STRONG>tailURL</STRONG></A>
+<DD>  If <B>tailURL</B> is defined, it is
+  output as part of the tail label of the edge.
+  Also, this value is used near the tail node, overriding any
+  <A HREF=#d:URL>URL</A> value.
+  See <A HREF=#h:undir_note>limitation</A>.
+
 <DT><A NAME=d:target HREF=#a:target><STRONG>target</STRONG></A>
 <DD>  If the object has a URL, this attribute determines which window
   of the browser is used for the URL.
@@ -1595,6 +1573,34 @@ This field indicates which graph component uses the attribute.
   antialiasing can show up as a fuzzy white area around characters.
   Using <B>truecolor</B>=true avoids this problem.
 
+<DT><A NAME=d:URL HREF=#a:URL><STRONG>URL</STRONG></A>
+<DD>  Hyperlinks incorporated into device-dependent output.
+  At present, used in ps2, cmap, i*map and svg formats.
+  For all these formats, URLs can be attached to nodes, edges and
+  clusters. URL attributes can also be attached to the root graph in ps2,
+  cmap and i*map formats. This serves as the base URL for relative URLs in the
+  former, and as the default image map file in the latter.
+  <P>
+  For svg, cmapx and imap output, the active area for a node is its
+  visible image.
+  For example, an unfilled
+  node with no drawn boundary will only be active on its label.
+  For other output, the active area is its bounding box.
+  The active area for a cluster is its bounding box.
+  For edges, the active areas are small circles where the edge contacts its head
+  and tail nodes. In addition, for svg, cmapx and imap, the active area
+  includes a thin polygon approximating the edge. The circles may
+  overlap the related node, and the edge URL dominates.
+  If the edge has a label, this will also be active.
+  Finally, if the edge has a head or tail label, this will also be active.
+  <P>
+  Note that, for edges, the attributes <A HREF=#d:headURL>headURL</A>,
+  <A HREF=#d:tailURL>tailURL</A>, <A HREF=#d:labelURL>labelURL</A> and
+  <A HREF=#d:edgeURL>edgeURL</A> allow control of various parts of an
+  edge.
+  Also note that, if active areas of two edges overlap, it is unspecified
+  which area dominates.
+
 <DT><A NAME=d:vertices HREF=#a:vertices><STRONG>vertices</STRONG></A>
 <DD>  If the input graph defines this attribute, the node is polygonal,
   and output is dot or xdot, this attribute provides the
@@ -1685,6 +1691,10 @@ the given types.
   (<TT>ediamond</TT>, <TT>open</TT>, <TT>halfopen</TT>,
   <TT>empty</TT>, <TT>invempty</TT>).
 
+<DT><A NAME=k:aspectType><STRONG>aspectType</STRONG></A>
+<DD><p>An aspect ratio, double, followed optionally by a ',' and a max iteration count.
+  If the aspect ratio is given, but no max iteration count, then the max iteration count defaults to 5.
+
 <DT><A NAME=k:clusterMode><STRONG>clusterMode</STRONG></A>
 <DD>"local","global","none"
 
@@ -1888,14 +1898,14 @@ the given types.
   Using "fast" gives about a 2-4 times overall speedup compared with "normal", 
   though layout quality can suffer a little. 
 
-<DT><A NAME=k:rankType><STRONG>rankType</STRONG></A>
-<DD>"same", "min", "source", "max", "sink"
-
 <DT><A NAME=k:rankdir><STRONG>rankdir</STRONG></A>
 <DD>"TB", "LR", "BT", "RL", corresponding to directed graphs drawn
   from top to bottom, from left to right, from bottom to top, and from
   right to left, respectively.
 
+<DT><A NAME=k:rankType><STRONG>rankType</STRONG></A>
+<DD>"same", "min", "source", "max", "sink"
+
 <DT><A NAME=k:rect><STRONG>rect</STRONG></A>
 <DD>"%d,%d,%d,%d"  The rect llx,lly,urx,ury gives the coordinates, in
    points, of the lower-left corner (llx,lly) and the upper-right corner
index 237ae180ec443a8d091830c8f791d7c22f7e0b6d..d807535f2d237550abfdafd3a44939aa2dac2db3 100644 (file)
@@ -88,6 +88,8 @@ Multiplicative scale factor for arrowheads.
 Style of arrowhead on the tail node of an edge.
 See also the <A HREF=#d:dir>dir</A> attribute,
 and a <A HREF=#h:undir_note>limitation</A>.
+:aspect:G:aspectType:1.0,1;
+Target aspect ratio of the renderered graph, and optionally the maximum number of iterations allowed to achieve it.
 :bb:G:rect; write
 Bounding box of drawing in integer points.
 :bgcolor:GC:color:<none>;
index cd93c9c85ea590a482238d86ed24d11b12b2e727..9816f0035e2d82606d16206b023b0c2f81c0ddf3 100644 (file)
@@ -5,6 +5,9 @@
 #
 # The type <typename> is given the anchor k:<typename>, so
 # the description can be linked with <HREF="k:<typename>">
+:aspectType
+<p>An aspect ratio, double, followed optionally by a ',' and a max iteration count.
+If the aspect ratio is given, but no max iteration count, then the max iteration count defaults to 5.
 :arrowType
 <TABLE>
   <TR><TD>"normal"<TD><IMG SRC="a_normal.gif">
index 7b9da685b59dafa4b85a841b4264765a919c3009..dc5bfc38a3a5027f1b5fd862d042917f4d6ccb6d 100644 (file)
@@ -237,28 +237,53 @@ extern int prevIterations;
 extern int curIterations;
 /**************************** EXTERNAL VARIABLES ***********************/
 
-int nextiter;
 int packiter = 0;
-int nPasses = 0;
-
-double start, finish, totalCLK;
 
 void dot_layout(Agraph_t * g)
 {
-
+    int rvi, targetITR, iter, packiter = 0;
+    double rv, start, finish, totalCLK;
     setEdgeType (g, ET_SPLINE);
+    attrsym_t *a;
+    char *p;
+
+
+#define MIN_AR 1.0
+#define MAX_AR 20.0
+#define MIN_ITR 1
+#define DEF_ITR 5
+#define MAX_ITR 200
+
+    targetAR = MIN_AR; /* default target aspect-ratio and iterations */
+    targetITR = MIN_ITR;  /* if targetAR isn't given, the do just the minimum*/
+    if ((a = agfindattr(g, "aspect"))) {
+        p = agxget(g, a->index);
+       if (p[0]) {
+           if ((rv = atof(p)) > MIN_AR) targetAR = rv;
+           if (targetAR > MAX_AR) targetAR = MAX_AR;
+            targetITR = DEF_ITR;  /* if targetAR *is* given, the init default */
+           if ((p = strchr(p, ','))) {
+               p++;
+               if (p[0]) {
+                   if ((rvi = atoi(p)) > MIN_ITR) targetITR = rvi;
+                   if (targetITR > MAX_ITR) targetITR = MAX_ITR;
+               }
+           }
+       }
+    }
 
-    nextiter = -1;
+    if (Verbose) 
+        fprintf(stderr, "Target AR = %g\n", targetAR);
 
     dot_init_node_edge(g);
 
-#ifdef ASPECT
-    printf("Target AR = ");
-    scanf("%lf", &targetAR);
+    iter = 0;
+    while (iter < targetITR) {
+       iter++;
 
-    do {
-        nPasses++;
-#endif
+        if (Verbose) 
+            fprintf(stderr, "Iteration = %d (of %d max) Current AR = %g\n",
+               iter, targetITR, currentAR);
 
         start = clock();
         dot_rank(g);
@@ -271,20 +296,7 @@ void dot_layout(Agraph_t * g)
 
         finish = clock();
         totalCLK += finish - start;
-
-#ifdef ASPECT
-        char response[100];
-        printf("Continue: yes/no/enter # of iterations? (y/n/i)");
-        scanf("%s",response);
-        if (!strcmp(response, "n") || !strcmp(response, "N"))
-            break;
-        else if (!strcmp(response, "i") || !strcmp(response, "I"))
-        {
-            printf("Enter # of iterations: ");
-            scanf("%d", &nextiter);
-        }
-    } while (nextiter);
-#endif
+    }
 
     dot_sameports(g);
 
@@ -296,7 +308,7 @@ void dot_layout(Agraph_t * g)
     dotneato_postprocess(g);
 
     if (Verbose) {
-        fprintf(stderr, "Packing iterations=%d\n# of Passes=%d\n", packiter, nPasses);
+        fprintf(stderr, "Packing iterations=%d\n# of Passes=%d\n", packiter, iter);
         fprintf(stderr, "Total time = %0.3lf sec\n\n", totalCLK/CLOCKS_PER_SEC);
     }
 }