]> granicus.if.org Git - graphviz/commitdiff
Update documentation on fixedsize=shape
authorEmden R. Gansner <erg@alum.mit.edu>
Mon, 3 Feb 2014 23:59:50 +0000 (18:59 -0500)
committerEmden R. Gansner <erg@alum.mit.edu>
Mon, 3 Feb 2014 23:59:50 +0000 (18:59 -0500)
doc/info/attrs.html
doc/info/fixed.gif [new file with mode: 0644]
doc/info/shapes.html
doc/infosrc/Makefile.old
doc/infosrc/attrs
doc/infosrc/shapes.2

index 492db28e3d9db83a4633d7479f8259e8f3d90018..157ec2d8983d90f6e85dd4585cfcb10470291b1c 100644 (file)
@@ -178,7 +178,7 @@ of the layout programs.
 </TD><TD ALIGN="CENTER">lightgrey(nodes)<BR>black(clusters)</TD><TD></TD><TD></TD> </TR>
  <TR><TD><A NAME=a:fixedsize HREF=#d:fixedsize>fixedsize</A>
 </TD><TD>N</TD><TD><A HREF=#k:bool>bool</A>
-</TD><TD ALIGN="CENTER">false</TD><TD></TD><TD></TD> </TR>
+<BR>string</TD><TD ALIGN="CENTER">false</TD><TD></TD><TD></TD> </TR>
  <TR><TD><A NAME=a:fontcolor HREF=#d:fontcolor>fontcolor</A>
 </TD><TD>ENGC</TD><TD><A HREF=#k:color>color</A>
 </TD><TD ALIGN="CENTER">black</TD><TD></TD><TD></TD> </TR>
@@ -817,10 +817,28 @@ of the layout programs.
   <B>color</B> or <B>bgcolor</B> attribute set for the cluster.
 
 <DT><A NAME=d:fixedsize HREF=#a:fixedsize><STRONG>fixedsize</STRONG></A>
-<DD>  If true, the node size is specified by the values of the
-  <A HREF=#d:width><B>width</B></A>
-  and <A HREF=#d:height><B>height</B></A> attributes only
+<DD>  If <tt>false</tt>, the size of a node is determined by smallest width and height
+  needed to contain its label and image, if any, with a margin specified by
+  the <A HREF=#d:margin><TT>margin</TT></A> attribute. The width
+  and height must also be at least as large as the sizes specified by the
+  <A HREF=#d:width><TT>width</TT></A> and
+  <A HREF=#d:height><TT>height</TT></A> attributes, which specify
+  the minimum values for these parameters. 
+  <P>
+  If <tt>true</tt>, the node size is specified by the values of the
+  <A HREF=#d:width><TT>width</TT></A>
+  and <A HREF=#d:height><TT>height</TT></A> attributes only
   and is not expanded to contain the text label.
+  There will be a warning if the label (with margin)
+  cannot fit within these limits.
+  <P>
+  If the <A HREF=attrs.html#d:fixedsize><TT>fixedsize</TT></A> attribute is set 
+  to <tt>shape</tt>, the <A HREF=#d:width><TT>width</TT></A> and
+  <A HREF=#d:height><TT>height</TT></A> attributes also determine the size
+  of the node shape, but the label can be much larger. Both the label and
+  shape sizes are used when avoiding node overlap, but all edges to the
+  node ignore the label and only contact the node shape. No warning is given
+  if the label is too large.
 
 <DT><A NAME=d:fontcolor HREF=#a:fontcolor><STRONG>fontcolor</STRONG></A>
 <DD>  Color used for text.
diff --git a/doc/info/fixed.gif b/doc/info/fixed.gif
new file mode 100644 (file)
index 0000000..d5b2be1
Binary files /dev/null and b/doc/info/fixed.gif differ
index 637bceb468c81357fbfb84865e91bae71b9dbf77..fb78c4ef3a186f76d47ee1f6cce9e22d5bd7419f 100644 (file)
@@ -228,6 +228,38 @@ only affected by the <A HREF=attrs.html#d:peripheries><TT>peripheries</TT></A>,
 <A HREF=attrs.html#d:width><TT>width</TT></A> and
 <A HREF=attrs.html#d:height><TT>height</TT></A> attributes.
 <P>
+Normally, the size of a node is determined by smallest width and height
+needed to contain its label and image, if any, with a margin specified by
+the <A HREF=attrs.html#d:margin><TT>margin</TT></A> attribute. The width
+and height must also be at least as large as the sizes specified by the
+<A HREF=attrs.html#d:width><TT>width</TT></A> and
+<A HREF=attrs.html#d:height><TT>height</TT></A> attributes, which specify
+the minimum values for these parameters. 
+See the <A HREF=attrs.html#d:fixedsize><TT>fixedsize</TT></A> attribute
+for ways of restricting the node size.
+In particular, if <tt>fixedsize=shape</tt>, the node's shape will be fixed
+by the <A HREF=attrs.html#d:width><TT>width</TT></A> and
+<A HREF=attrs.html#d:height><TT>height</TT></A> attributes, and the shape
+is used for edge termination, but both the shape and label sizes are used
+preventing node overlap. For example, the following graph
+<XMP>
+digraph G {
+  { 
+    node [margin=0 fontcolor=blue fontsize=32 width=0.5 shape=circle style=filled]
+    b [fillcolor=yellow fixedsize=true label="a very long label"]
+    d [fixedsize=shape label="an even longer label"]
+  }
+  a -> {c d}
+  b -> {c d}
+}
+</XMP>
+yields the figure<BR>
+<IMG SRC=fixed.gif>
+<P>
+Note that the label of the yellow node, with <tt>fixedsize=true</tt>, overlaps
+the other node, where there is sufficient space for the gray node with
+<tt>fixedsize=shape</tt>.
+<P>
 The shapes: <TT>note</TT>, <TT>tab</TT>, <TT>folder</TT>,
 <TT>box3d</TT> and <TT>component</TT> were provided by Pander.
 The synthetic biology shapes:
index 5564d4fa42d25f610f18cebbf39a6fea2da543a4..eb5fbd50ee8176478bd2d1aae11c2da351558f9d 100644 (file)
@@ -27,7 +27,7 @@ INSTALL_DIR = ../info
 XGIF = forward.gif back.gif both.gif nohead.gif
 
 MGIF = constraint.gif record.gif html1.gif html2.gif fill.gif round.gif \
-       mrecord.gif html3.gif html4.gif colorlist.gif record2.gif
+       mrecord.gif html3.gif html4.gif colorlist.gif record2.gif fixed.gif
 
 MJPG = sdlshapes.jpg
 
index 2920b3470c9902a6dcf3a46c1ce70bbf4029f9da..1a95a27ebdc146924dcb92b890f9db9169704532 100644 (file)
@@ -319,11 +319,29 @@ for setting the gradient angle.
 Note that a cluster inherits the root graph's attributes if defined.
 Thus, if the root graph has defined a <B>fillcolor</B>, this will override a
 <B>color</B> or <B>bgcolor</B> attribute set for the cluster.
-:fixedsize  (N_fixed):N:bool:false;
-If true, the node size is specified by the values of the
-<A HREF=#d:width><B>width</B></A>
-and <A HREF=#d:height><B>height</B></A> attributes only
+:fixedsize  (N_fixed):N:bool/string:false;
+If <tt>false</tt>, the size of a node is determined by smallest width and height
+needed to contain its label and image, if any, with a margin specified by
+the <A HREF=#d:margin><TT>margin</TT></A> attribute. The width
+and height must also be at least as large as the sizes specified by the
+<A HREF=#d:width><TT>width</TT></A> and
+<A HREF=#d:height><TT>height</TT></A> attributes, which specify
+the minimum values for these parameters. 
+<P>
+If <tt>true</tt>, the node size is specified by the values of the
+<A HREF=#d:width><TT>width</TT></A>
+and <A HREF=#d:height><TT>height</TT></A> attributes only
 and is not expanded to contain the text label.
+There will be a warning if the label (with margin)
+cannot fit within these limits.
+<P>
+If the <A HREF=attrs.html#d:fixedsize><TT>fixedsize</TT></A> attribute is set 
+to <tt>shape</tt>, the <A HREF=#d:width><TT>width</TT></A> and
+<A HREF=#d:height><TT>height</TT></A> attributes also determine the size
+of the node shape, but the label can be much larger. Both the label and
+shape sizes are used when avoiding node overlap, but all edges to the
+node ignore the label and only contact the node shape. No warning is given
+if the label is too large.
 :fontcolor:ENGC:color:black;
 Color used for text.
 :fontnames:G:string:"";    svg
index 538d01b7b0687cf290ceb7e0a1421ac7bf018e55..72eab109ed0ef158cf1809bea6061b9c33ff2f55 100644 (file)
@@ -20,6 +20,38 @@ only affected by the <A HREF=attrs.html#d:peripheries><TT>peripheries</TT></A>,
 <A HREF=attrs.html#d:width><TT>width</TT></A> and
 <A HREF=attrs.html#d:height><TT>height</TT></A> attributes.
 <P>
+Normally, the size of a node is determined by smallest width and height
+needed to contain its label and image, if any, with a margin specified by
+the <A HREF=attrs.html#d:margin><TT>margin</TT></A> attribute. The width
+and height must also be at least as large as the sizes specified by the
+<A HREF=attrs.html#d:width><TT>width</TT></A> and
+<A HREF=attrs.html#d:height><TT>height</TT></A> attributes, which specify
+the minimum values for these parameters. 
+See the <A HREF=attrs.html#d:fixedsize><TT>fixedsize</TT></A> attribute
+for ways of restricting the node size.
+In particular, if <tt>fixedsize=shape</tt>, the node's shape will be fixed
+by the <A HREF=attrs.html#d:width><TT>width</TT></A> and
+<A HREF=attrs.html#d:height><TT>height</TT></A> attributes, and the shape
+is used for edge termination, but both the shape and label sizes are used
+preventing node overlap. For example, the following graph
+<XMP>
+digraph G {
+  { 
+    node [margin=0 fontcolor=blue fontsize=32 width=0.5 shape=circle style=filled]
+    b [fillcolor=yellow fixedsize=true label="a very long label"]
+    d [fixedsize=shape label="an even longer label"]
+  }
+  a -> {c d}
+  b -> {c d}
+}
+</XMP>
+yields the figure<BR>
+<IMG SRC=fixed.gif>
+<P>
+Note that the label of the yellow node, with <tt>fixedsize=true</tt>, overlaps
+the other node, where there is sufficient space for the gray node with
+<tt>fixedsize=shape</tt>.
+<P>
 The shapes: <TT>note</TT>, <TT>tab</TT>, <TT>folder</TT>,
 <TT>box3d</TT> and <TT>component</TT> were provided by Pander.
 The synthetic biology shapes: