Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 2317d584f4360f2e9d9f296ba1af8d7d > files > 141

graphviz-doc-2.16.1-3mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<!--
    This is a generated document.  Do not edit.
-->
<HTML VERSION="2.0">
<HEAD>
<TITLE>Node Shapes</TITLE>
</HEAD>
<BODY BGCOLOR=white>
<A NAME="top"></A>
<H1 align=CENTER>Node Shapes</H1>
<HR>
The geometries of all node shapes are affected by
the node attributes 
<A HREF=attrs.html#d:fixedsize><TT>fixedsize</TT></A>, 
<A HREF=attrs.html#d:fontname><TT>fontname</TT></A>, 
<A HREF=attrs.html#d:fontsize><TT>fontsize</TT></A>, 
<A HREF=attrs.html#d:height><TT>height</TT></A>,
<A HREF=attrs.html#d:label><TT>label</TT></A>, 
<A HREF=#d:style><TT>style</TT></A> and
<A HREF=attrs.html#d:width><TT>width</TT></A>.

<H2><A NAME=polygon>Polygon-based Nodes</A></H2>
The possible polygon-based shapes are displayed below.
<TABLE ALIGN=CENTER>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=box.gif>
    <TD><IMG SRC=polygon.gif>
    <TD><IMG SRC=ellipse.gif>
    <TD><IMG SRC=circle.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:box>box</A>
    <TD><A NAME=d:polygon>polygon</A>
    <TD><A NAME=d:ellipse>ellipse</A>
    <TD><A NAME=d:circle>circle</A>
  </TR>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=point.gif>
    <TD><IMG SRC=egg.gif>
    <TD><IMG SRC=triangle.gif>
    <TD><IMG SRC=plaintext.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:point>point</A>
    <TD><A NAME=d:egg>egg</A>
    <TD><A NAME=d:triangle>triangle</A>
    <TD><A NAME=d:plaintext>plaintext</A>
  </TR>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=diamond.gif>
    <TD><IMG SRC=trapezium.gif>
    <TD><IMG SRC=parallelogram.gif>
    <TD><IMG SRC=house.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:diamond>diamond</A>
    <TD><A NAME=d:trapezium>trapezium</A>
    <TD><A NAME=d:parallelogram>parallelogram</A>
    <TD><A NAME=d:house>house</A>
  </TR>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=pentagon.gif>
    <TD><IMG SRC=hexagon.gif>
    <TD><IMG SRC=septagon.gif>
    <TD><IMG SRC=octagon.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:pentagon>pentagon</A>
    <TD><A NAME=d:hexagon>hexagon</A>
    <TD><A NAME=d:septagon>septagon</A>
    <TD><A NAME=d:octagon>octagon</A>
  </TR>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=doublecircle.gif>
    <TD><IMG SRC=doubleoctagon.gif>
    <TD><IMG SRC=tripleoctagon.gif>
    <TD><IMG SRC=invtriangle.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:doublecircle>doublecircle</A>
    <TD><A NAME=d:doubleoctagon>doubleoctagon</A>
    <TD><A NAME=d:tripleoctagon>tripleoctagon</A>
    <TD><A NAME=d:invtriangle>invtriangle</A>
  </TR>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=invtrapezium.gif>
    <TD><IMG SRC=invhouse.gif>
    <TD><IMG SRC=Mdiamond.gif>
    <TD><IMG SRC=Msquare.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:invtrapezium>invtrapezium</A>
    <TD><A NAME=d:invhouse>invhouse</A>
    <TD><A NAME=d:Mdiamond>Mdiamond</A>
    <TD><A NAME=d:Msquare>Msquare</A>
  </TR>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=Mcircle.gif>
    <TD><IMG SRC=rect.gif>
    <TD><IMG SRC=rectangle.gif>
    <TD><IMG SRC=none.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:Mcircle>Mcircle</A>
    <TD><A NAME=d:rect>rect</A>
    <TD><A NAME=d:rectangle>rectangle</A>
    <TD><A NAME=d:none>none</A>
  </TR>
  <TR ALIGN=CENTER>
    <TD><IMG SRC=note.gif>
    <TD><IMG SRC=tab.gif>
    <TD><IMG SRC=box3d.gif>
    <TD><IMG SRC=component.gif>
  </TR>
  <TR ALIGN=CENTER>
    <TD><A NAME=d:note>note</A>
    <TD><A NAME=d:tab>tab</A>
    <TD><A NAME=d:box3d>box3d</A>
    <TD><A NAME=d:component>component</A>
  </TR>
</TABLE>
As the figures suggest, the shapes <TT>rect</TT> and <TT>rectangle</TT> are synonyms for <TT>box</TT>, and <TT>none</TT> is a synonym for <TT>plaintext</TT>.
Also, unlike the rest, we have shown these last two 
without <TT>style=filled</TT>
to indicate the normal use. If fill were turned on, the label text would
appear in a filled rectangle.
<P>
The geometries of polygon-based shapes are also affected
by the node attributes 
<A HREF=attrs.html#d:regular><TT>regular</TT></A>, 
<A HREF=attrs.html#d:peripheries><TT>peripheries</TT></A> and
<A HREF=attrs.html#d:orientation><TT>orientation</TT></A>.
If <TT>shape="polygon"</TT>, the attributes
<A HREF=attrs.html#d:sides><TT>sides</TT></A>, 
<A HREF=attrs.html#d:skew><TT>skew</TT></A> and
<A HREF=attrs.html#d:distortion><TT>distortion</TT></A> are also used.
If unset, they default to 4, 0.0 and 0.0, respectively.
In addition, the 3 M* shapes support auxiliary labels using
the <A HREF=attrs.html#d:toplabel><TT>toplabel</TT></A> and
<A HREF=attrs.html#d:bottomlabel><TT>bottomlabel</TT></A> attributes.
On the other hand, the point shape is special in that it is
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.

<H2><A NAME=record>Record-based Nodes</A></H2>
These are specified by shape values of "record" and "Mrecord".
The structure of a record-based node is determined by 
its <A HREF=attrs.html#d:label><TT>label</TT></A>,
which has the following schema:
  <TABLE>
  <TR><TD ALIGN=right><I>rlabel</I><TD>=<TD><I>field</I> ( '|' <I>field</I> )*</TR>
  <TR><TD ALIGN=right>where <I>field</I><TD>=<TD>fieldId</I> or '{' <I>rlabel</I> '}'</TR>
  <TR><TD ALIGN=right>and <I>fieldId</I><TD>=<TD> [ '<' <I>string</I> '>'] [ <I>string</I> ]</TR>
  </TABLE>
Literal braces, vertical bars and angle brackets must be escaped.
Spaces are interpreted as separators between tokens,
so they must be escaped if you want spaces in the text.
<P>
The first string in <I>fieldId</I> assigns a portname to the field and can 
be combined with the node name to indicate where to attach an edge
to the node. (See <A HREF=attrs.html#k:portPos>portPos</A>.)
The second string is used as the text for the field; it supports the usual
<A HREF=attrs.html#k:escString>escape sequences</A> \n, \l and \r.
<P>
Visually, a record is a box, with fields represented by alternating
rows of horizontal or vertical subboxes. The Mrecord shape is identical
to a record shape, except that the outermost box has rounded corners.
Flipping between horizontal and vertical layouts is done by nesting
fields in braces "{...}". The top-level orientation in a record is
horizontal. Thus, a record with label "A | B | C | D" will have 4 fields 
oriented left to right, while "{A | B | C | D}" will have them 
from top to bottom and "A | { B | C } | D" will have "B" over "C", with
"A" to the left and "D" to the right of "B" and "C".
<P>
As an example of a record node, the dot input
<XMP>
digraph structs {
    node [shape=record];
    struct1 [label="<f0> left|<f1> mid\ dle|<f2> right"];
    struct2 [label="<f0> one|<f1> two"];
    struct3 [label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"];
    struct1:f1 -> struct2:f0;
    struct1:f2 -> struct3:here;
}
</XMP>

yields the figure<BR>
<IMG SRC=record.gif>
<P>
If we change node <TT>struct1</TT> to have shape <TT>Mrecord</TT>,
it then looks like:<BR>
<IMG SRC=mrecord.gif>

<H2><A NAME="d:style">Styles for Nodes</A></H2>
The <A HREF=attrs.html#d:style><TT>style</TT></A>
attribute can be used to modify the appearance of a node.
At present, there are 8 style values recognized:
<TT>filled</TT>, <TT>invisible</TT>, <TT>diagonals</TT>, <TT>rounded</TT>.
<TT>dashed</TT>, <TT>dotted</TT>, <TT>solid</TT> and <TT>bold</TT>.
As usual, the value of the <A HREF=attrs.html#d:style><TT>style</TT></A>
attribute can be a comma-separated list of any of these. If the
style contains conflicts (e.g, <TT>style="dotted, solid"</TT>), the last
attribute wins.
<DL>
<DT><A NAME=d:filled><TT>filled</TT>
  <DD>This value indicates that the node's interior should be filled.
The color used is the node's <TT>fillcolor</TT> or, if that's not defined, its
<TT>color</TT>. For unfilled nodes, the interior of the node is transparent to
whatever color is the current graph or cluster background color.
Note that <TT>point</TT> shapes are always filled.
<P>
Thus, the code
<XMP>
digraph G {
  rankdir=LR
  node [shape=box, color=blue]
  node1 [style=filled] 
  node2 [style=filled, fillcolor=red] 
  node0 -> node1 -> node2
}
</XMP>
yields the figure<BR>
<IMG SRC=fill.gif>

<DT><A NAME=d:invisible><TT>invisible</TT>
  <DD>Setting this style causes the node not to be displayed at all.
Note that the node is still used in laying out the graph.

<DT><A NAME=d:diagonals><TT>diagonals</TT>
  <DD>The diagonals style causes small chords to be drawn near the vertices
of the node's polygon or, in case of circles and ellipses, two chords near
the top and the bottom of the shape. The special node shapes
<A HREF=#d:Msquare><TT>Msquare</TT></A>,
<A HREF=#d:Mcircle><TT>Mcircle</TT></A>, and
<A HREF=#d:Mdiamond><TT>Mdiamond</TT></A>
are simply an ordinary square, circle and
diamond with the diagonals style set.

<DT><A NAME=d:rounded><TT>rounded</TT>
  <DD>The rounded style causes the polygonal corners to be smoothed.
Note that this style also applies to record-based nodes. Indeed,
the <TT>Mrecord</TT> shape is simply shorthand for setting this style.
Also, prior to 26 April 2005, the rounded and filled styles were 
mutually exclusive.
<P>
As an example of rounding, dot uses the graph
<XMP>
digraph R {
  rankdir=LR
  node [style=rounded]
  node1 [shape=box]
  node2 [fillcolor=yellow, style="rounded,filled", shape=diamond]
  node3 [shape=record, label="{ a | b | c }"]

  node1 -> node2 -> node3
}
</XMP>
to produce the figure<BR>
<IMG SRC=round.gif>
<DT><A NAME=d:dashed><TT>dashed</TT>
  <DD>This style causes the node's border to be drawn as a dashed line.
<DT><A NAME=d:dotted><TT>dotted</TT>
  <DD>This style causes the node's border to be drawn as a dotted line.
<DT><A NAME=d:solid><TT>solid</TT>
  <DD>This style causes the node's border to be drawn as a solid line,
which is the default.
<DT><A NAME=d:bold><TT>bold</TT>
  <DD>This style causes the node's border to be drawn as a bold line.
See also <A HREF=attrs.html#d:setlinewidth>setlinewidth</A>.

</DL>

<P>
Additional styles may be available with a specific code generator.
<H2><A NAME=html>HTML-Like Labels</A></H2>

<B>NOTE:</B><EM>This feature is only available on versions of Graphviz
that are newer than mid-November 2003. In particular, it is not part
of release 1.10.</EM>
<P>
If the value of a label attribute
(<A HREF=attrs.html#d:label><TT>label</TT></A> for nodes, edges, clusters, and
graphs, and the
<A HREF=attrs.html#d:headlabel><TT>headlabel</TT></A> and
<A HREF=attrs.html#d:taillabel><TT>taillabel</TT></A>
attributes of an edge) is given as an
<A HREF=lang.html#html>HTML string</A>, 
that is, delimited by <TT>&lt;...&gt;</TT>
rather than <TT>&quot;...&quot;</TT>,
the label is interpreted as
an HTML description. At their simplest, such labels
can describe multiple lines of variously aligned text as provided by ordinary 
<A HREF=attrs.html#k:escString>string labels</A>. More generally, the
label can specify a table similar to those provided by HTML,
with different graphical attributes at each level.
<P>
<B>NOTE:</B> The features and syntax supported by these labels are
inspired by HTML. However, there are many aspects that are relevant
to Graphviz labels that are not in HTML and, conversely, HTML allows
various constructs which are meaningless in Graphviz. We will generally
refer to these labels as "HTML labels" rather than the cumbersome
"HTML-like labels" but the reader is warned that these are not really
HTML. The grammar below describes precisely what Graphviz will accept.
<P>
Although HTML labels are not, strictly speaking, a shape, they can be
viewed as a generalization of the record shapes described above. 
In particular, if a node has set its 
<A HREF=attrs.html#k:shape><TT>shape</TT></A>
attribute to <TT>plaintext</TT>, the HTML label will be the node's
shape. On the other hand, if the node has any other shape (except 
<TT>point</TT>), the HTML label will be embedded within the node the
same way an ordinary label would be.
<P>
The following is an abstract grammar for HTML labels.
Terminals are shown in bold font and nonterminals in italics.
Square brackets [ and ] enclose optional items.
Vertical bars | separate alternatives.
<TABLE>
<TR>
  <TD ALIGN=RIGHT><I>label</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT><I>text</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT></TD>
  <TD ALIGN=LEFT>|</TD>
  <TD ALIGN=LEFT><I>table</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT><I>text</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT><I>textitem</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT></TD>
  <TD ALIGN=LEFT>|</TD>
  <TD ALIGN=LEFT><I>text</I> <I>textitem</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT><I>textitem</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT><I>string</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT></TD>
  <TD ALIGN=LEFT>|</TD>
  <TD ALIGN=LEFT><B>&lt;BR/&gt;</B></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT></TD>
  <TD ALIGN=LEFT>|</TD>
  <TD ALIGN=LEFT><B>&lt;FONT&gt;</B> <I>text</I> <B>&lt;/FONT&gt;</B></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT><I>table</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT>[ <B>&lt;FONT&gt;</B> ] <B>&lt;TABLE&gt;</B> <I>rows</I> <B>&lt;/TABLE&gt;</B> [ <B>&lt;/FONT&gt;</B> ]</TD>
</TR>
<TR>
  <TD ALIGN=RIGHT><I>rows</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT><I>row</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT></TD>
  <TD ALIGN=LEFT>|</TD>
  <TD ALIGN=LEFT><I>rows</I> <I>row</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT><I>row</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT><B>&lt;TR&gt;</B> <I>cells</I> <B>&lt;/TR&gt;</B></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT><I>cells</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT><I>cell</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT></TD>
  <TD ALIGN=LEFT>|</TD>
  <TD ALIGN=LEFT><I>cells</I> <I>cell</I></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT><I>cell</I></TD>
  <TD ALIGN=LEFT>:</TD>
  <TD ALIGN=LEFT><B>&lt;TD&gt;</B> <I>label</I> <B>&lt;/TD&gt;</B></TD>
</TR>
<TR>
  <TD ALIGN=RIGHT></TD>
  <TD ALIGN=LEFT>|</TD>
  <TD ALIGN=LEFT><B>&lt;TD&gt;</B> <B>&lt;IMG/&gt;</B> <B>&lt;/TD&gt;</B></TD>
</TR>
</TABLE>
<P>
Above, a <I>string</I> is any collection of printable characters, including
all spaces. Note that outside of the body of a &lt;TD&gt; element, 
whitespace characters are ignored; within a &lt;TD&gt; element, spaces
are preserved but all other white space characters are discarded.
HTML comments are allowed within an HTML string. They can occur anywhere
provided that, if they contain part of an HTML element, they must contain
the entire element.
<P>
As is obvious from the above description, the interpretation of white space
characters is one place where HTML-like labels is very different from 
standard HTML. In HTML, any sequence of white space characters is 
collapsed to a single space, If the user does not want this to happen, the
input must use non-breaking spaces "&amp;nbsp;". This makes sense in
HTML, where text layout depends dynamically on the space available. In
Graphviz, the layout is statically determined by the input, so it is
reasonable to treat ordinary space characters as non-breaking. In addition,
ignoring tabs and newlines allows the input text to be formatted for
easier reading. 
<P>
Each of the HTML elements has a set of optional attributes.
Attribute values must appear in double quotes.
<PRE>&lt;TABLE
  ALIGN="CENTER|LEFT|RIGHT"
  BGCOLOR="<I>color</I>"
  BORDER="<I>value</I>"
  CELLBORDER="<I>value</I>"
  CELLPADDING="<I>value</I>"
  CELLSPACING="<I>value</I>"
  FIXEDSIZE="FALSE|TRUE"
  HEIGHT="<I>value</I>"
  HREF="<I>value</I>"
  PORT="<I>portName</I>"
  TARGET="<I>value</I>"
  TITLE="<I>value</I>"
  TOOLTIP="<I>value</I>"
  VALIGN="MIDDLE|BOTTOM|TOP"
  WIDTH="<I>value</I>"
&gt;
</PRE>
<P>
<PRE>&lt;TD
  ALIGN="CENTER|LEFT|RIGHT|TEXT"
  BALIGN="CENTER|LEFT|RIGHT"
  BGCOLOR="<I>color</I>"
  BORDER="<I>value</I>"
  CELLPADDING="<I>value</I>"
  CELLSPACING="<I>value</I>"
  COLSPAN="<I>value</I>"
  FIXEDSIZE="FALSE|TRUE"
  HEIGHT="<I>value</I>"
  HREF="<I>value</I>"
  PORT="<I>portName</I>"
  ROWSPAN="<I>value</I>"
  TARGET="<I>value</I>"
  TITLE="<I>value</I>"
  TOOLTIP="<I>value</I>"
  VALIGN="MIDDLE|BOTTOM|TOP"
  WIDTH="<I>value</I>"
&gt;
</PRE>

<P>
<PRE>&lt;FONT
  COLOR="<I>color</I>"
  FACE="<I>fontname</I>"
  POINT-SIZE="<I>value</I>"
&gt;
</PRE>

<P>
<PRE>&lt;BR
  ALIGN="CENTER|LEFT|RIGHT"
&gt;
</PRE>

<P>
<PRE>&lt;IMG
  SCALE="FALSE|TRUE|WIDTH|HEIGHT|BOTH"
  SRC="<I>value</I>"
&gt;
</PRE>

<P>
<B><I><FONT SIZE=-1>ALIGN</FONT> </I></B>
<BLOCKQUOTE>
specifies horizontal placement. When an object is allocated
more space than required, this value determines where the extra space
is placed left and right of the object.
<P>
<ul>
<LI>CENTER aligns the object in the center. (Default) </LI>
<LI>LEFT aligns the object on the left.</LI>
<LI>RIGHT aligns the object on the right.  </LI>
<LI>(<T>&lt;TD&gt;</T> only) TEXT aligns lines of text using the full
cell width. The alignment of a line is determined by its (possibly
implicit) associated <T>&lt;BR&gt;</T> element.</LI> 
</ul>
<P>
The contents of a cell are normally aligned as a block. In particular,
lines of text are first aligned as a text block based on the width of
the widest line and the corresponding <T>&lt;BR&gt;</T> elements. Then,
the entire text block is aligned within a cell. If, however, the
cell's <B><I>ALIGN</I></B> value is <T>"TEXT"</T>, and the cell contains
lines of text, then the lines are justified using the entire available
width of the cell. If the cell does not contain text, then the contained
image or table is centered.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>BALIGN</FONT> </I></B>
<BLOCKQUOTE>
specifies the default alignment of <T>&lt;BR&gt;</T> elements contained
in the cell. That is, if a <T>&lt;BR&gt;</T> element has no
explicit <B><I>ALIGN</I></B> attribute, the attribute value is specified
by the value of <B><I>BALIGN</I></B>.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>BGCOLOR="color"</FONT></I></B>
<BLOCKQUOTE>
sets the color of the background. This color can be 
overridden by a <B><I>BGCOLOR</I></B> attribute in descendents.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>BORDER="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the width of the border around the object in points.
A value of zero indicates no border. The default is 1.
The maximum value is 255.
If set in a table, and <B><I>CELLBORDER</I></B> is not set,
this value is also used for all cells in the table.
It can be overridden by a <B><I>BORDER</I></B> tag in  a cell.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>CELLBORDER="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the width of the border for all cells in a table.
It can be overridden by a <B><I>BORDER</I></B> tag in  a cell.
The maximum value is 255.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>CELLPADDING="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the space, in points, between a cell's border and its content.
The default is 2.
The maximum value is 255.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>CELLSPACING="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the space, in points, between cells in a table and between
a cell and the table's border.  The default is 2.
The maximum value is 127.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>COLOR="color"</FONT></I></B>
<BLOCKQUOTE>
sets the color of the font within the scope of
&lt;FONT&gt;...&lt;/FONT&gt;.
This color can be 
overridden by a <B><I>COLOR</I></B> attribute in descendents.
By default, the font color is determined by the
<A HREF="attrs.html#:fontcolor">fontcolor</A> attribute of
the corresponding node, edge or graph.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>COLSPAN="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the number of columns spanned by the cell. The default is 1.
The maximum value is 65535.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>FACE="fontname"</FONT></I></B>
<BLOCKQUOTE>
specifies the font to use within the scope of
&lt;FONT&gt;...&lt;/FONT&gt;.
This can be 
overridden by a <B><I>FACE</I></B> attribute in descendents.
By default, the font name is determined by the
<A HREF="attrs.html#:fontname">fontname</A> attribute of the corresponding
node, edge or graph.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>FIXEDSIZE</FONT> </I></B>
<BLOCKQUOTE>
specifies whether the values given by the <B><I>WIDTH</I></B> 
and <B><I>HEIGHT</I></B> attributes are enforced.
<P>
<ul>
<LI>FALSE allows the object to grow so that all its contents will fit. (Default) </LI>
<LI>TRUE fixes the object size to its given <B><I>WIDTH</I></B> 
and <B><I>HEIGHT</I></B>.
Both of these attributes must be supplied.</LI>
</ul>
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>HEIGHT="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the mininum height, in points, of the object. The height
includes the contents, any spacing and the border. Unless
<B><I>FIXEDSIZE</I></B> is true, the height will be expanded to allow
the contents to fit.
The maximum value is 65535.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>HREF="value"</FONT></I></B>
<BLOCKQUOTE>
attaches a URL to the object.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>POINT-SIZE="value"</FONT></I></B>
<BLOCKQUOTE>
sets the size of the font, in points, used within the scope of
&lt;FONT&gt;...&lt;/FONT&gt;.
This can be 
overridden by a <B><I>POINT-SIZE</I></B> attribute in descendents.
By default, the font name is determined by the
<A HREF="attrs.html#:fontsize">fontsize</A> attribute of the corresponding
node, edge or graph.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>PORT="value"</FONT></I></B>
<BLOCKQUOTE>
attaches a portname to the object.
(See <A HREF=attrs.html#k:portPos>portPos</A>.)
This can be used to modify the head
or tail of an edge, so that the end attaches directly to the object.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>ROWSPAN="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the number of rows spanned by the cell. The default is 1.
The maximum value is 65535.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>SCALE</FONT></I></B>
<BLOCKQUOTE>
specifies how an image will use any extra space available in its cell.
Allowed values are
<ul>
<LI>FALSE : keep image its natural size. (Default) </LI>
<LI>TRUE : scale image uniformly to fit.</LI>
<LI>WIDTH : expand image width to fill  </LI>
<LI>HEIGHT : expand image height to fill  </LI>
<LI>BOTH : expand both image width height to fill  </LI>
</ul>
If this attribute is undefined, 
the image inherits the <A HREF=attrs.html#d:imagescale>imagescale</A> 
attribute of the graph object being drawn.
As with the <A HREF=attrs.html#d:imagescale>imagescale</A>
attribute, if the cell has a fixed size and the image is too large,
any offending dimension will be shrunk to fit the space, the
scaling being uniform in width and height if <I>SCALE=<TT>"true"</TT></I>.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>SRC="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the image file to be displayed in the cell.
Note that if the software is used as a web server, file system access
to images is more restricted. See <A HREF=d:GV_FILE_PATH>GV_FILE_PATH</A>
and <A HREF=d:SERVER_NAME>SERVER_NAME</A>.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>TARGET="value"</FONT></I></B>
<BLOCKQUOTE>
determines which window of the browser is used for the URL if the object 
has one. 
See <A HREF="http://www.w3.org/TR/html401/present/frames.html#adef-target">W3C documentation</A>.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>TITLE="value"</FONT></I></B>
<BLOCKQUOTE>
sets the tooltip annotation attached to the element. 
This is used only if the element has a HREF attribute.
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>TOOLTIP="value"</FONT></I></B>
<BLOCKQUOTE>
is an alias for <B><I><FONT SIZE=-1>TITLE</FONT></I></B>.
</BLOCKQUOTE>

<P>
<B><I><FONT SIZE=-1>VALIGN</FONT> </I></B>
<BLOCKQUOTE>
specifies vertical placement. When an object is allocated
more space than required, this value determines where the extra space
is placed above and below the object.
<P>
<ul>
<LI>MIDDLE aligns the object in the center. (Default) </LI>
<LI>LEFT aligns the object on the left.</LI>
<LI>RIGHT aligns the object on the right.  </LI>
</ul>
</BLOCKQUOTE>

<B><I><FONT SIZE=-1>WIDTH="value"</FONT></I></B>
<BLOCKQUOTE>
specifies the mininum width, in points, of the object. The width
includes the contents, any spacing and the border. Unless
<B><I>FIXEDSIZE</I></B> is true, the width will be expanded to allow
the contents to fit.
The maximum value is 65535.
</BLOCKQUOTE>

<P>
There is some inheritance among the attributes. If a table specifies
a <I><B>CELLPADDING</B></I>, <I><B>CELLBORDER</B></I> or <I><B>BORDER</B></I> 
value, this value is used by the table's
cells unless overridden. If a cell or table specifies a <I><B>BGCOLOR</B></I>,
this will be the background color for all of its descendents.
Of course, if a background or fill color is specified for the
graph object owning the label, this will be the original
background for the label.
The object's fontname, fontcolor and fontsize attributes
are the default for drawing text. These can be overridden by using
<I><B>FONT</B></I> to set new values. The new font values will hold
until overridden by an enclosed <I><B>FONT</B></I> element.
Finally, the pencolor or color of the graph object will be used as
the border color.
<P>
Because of certain limitations in handling tables in a device-independent
manner, when <I><B>BORDER</B></I> is 1 and both table and cell borders
are on and <I><B>CELLSPACING</B></I> is less than 2, anomalies can arise
in the output, such as gaps between sides of borders which should be
abutting or even collinear. The user can usual get around this by increasing
the border size or the spacing, or turning off the table border.
<P>
As an example of HTML labels, the dot input 
<XMP>
digraph structs {
    node [shape=plaintext]
    struct1 [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
  <TR><TD>left</TD><TD PORT="f1">mid dle</TD><TD PORT="f2">right</TD></TR>
</TABLE>>];
    struct2 [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
  <TR><TD PORT="f0">one</TD><TD>two</TD></TR>
</TABLE>>];
    struct3 [label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
  <TR>
    <TD ROWSPAN="3">hello<BR/>world</TD>
    <TD COLSPAN="3">b</TD>
    <TD ROWSPAN="3">g</TD>
    <TD ROWSPAN="3">h</TD>
  </TR>
  <TR>
    <TD>c</TD><TD PORT="here">d</TD><TD>e</TD>
  </TR>
  <TR>
    <TD COLSPAN="3">f</TD>
  </TR>
</TABLE>>];
    struct1:f1 -> struct2:f0;
    struct1:f2 -> struct3:here;
}
</XMP>
produces the HTML analogue of the record example above<BR>
<IMG SRC=html1.gif>
<P>
As usual, an HTML specification is more verbose. On the other hand,
HTML labels are much more general, as the following example shows:
<P>
<IMG SRC=html2.gif>
<P>
The source for this graph can be found <A HREF=html2.dot>here</A>.
<P>
Here is an example using &lt;FONT&gt; elements 
<P>
<IMG SRC=html3.gif>
<P>
with the <A HREF=html3.dot>input graph</A>.
<P>
Here is an example using an &lt;IMG&gt; element 
<P>
<IMG SRC=html4.gif>
<P>
with the <A HREF=html4.dot>input graph</A>.

<H2><A NAME=epsf>User-defined Nodes</A></H2>

There is a third type of node shape which is specified by the user.
Typically, these shapes rely on the details of a concrete graphics
format. At present, shapes can be described using PostScript, via a
file or add-on library, for use in PostScript output, or shapes can
be specified by a bitmap-image file for use with SVG or bitmap (jpeg,
gif, etc.) output. More information can be found on the page 
<A HREF="http://www.graphviz.org/Documentation/html/shapehowto.html">
How to create custom shapes</A>.

<H2><A NAME=sdlshapes>SDL Shapes for PostScript</A></H2>
One example of user-defined node shapes is provided by Mark Rison of CSR.
These are the <A  HREF=http://www.sdl-forum.org/SDL/index.htm>SDL</A> shapes.
These are available as PostScript functions whose use is described in
<A HREF="http://www.graphviz.org/Documentation/html/shapehowto.html#psprocs"> External PostScript procedures</A>.
The necessary PostScript library file and sample use can be found in the
<tt>contrib/sdlshapes</tt> directory in the release. Please note the
COPYRIGHT AND PERMISSION NOTICE contained in the library file <tt>sdl.ps</tt>.
<P>
The table below
gives the shape names and the corresponding node shapes.
<IMG SRC=sdlshapes.jpg>
</BODY>
</HTML>