</TR>
<TR ALIGN=CENTER>
<TD><IMG SRC=plaintext.gif>
+ <TD><IMG SRC=plain.gif>
<TD><IMG SRC=diamond.gif>
<TD><IMG SRC=trapezium.gif>
- <TD><IMG SRC=parallelogram.gif>
</TR>
<TR ALIGN=CENTER>
<TD><A NAME=d:plaintext>plaintext</A>
+ <TD><A NAME=d:plain>plain</A>
<TD><A NAME=d:diamond>diamond</A>
<TD><A NAME=d:trapezium>trapezium</A>
- <TD><A NAME=d:parallelogram>parallelogram</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=parallelogram.gif>
<TD><IMG SRC=house.gif>
<TD><IMG SRC=pentagon.gif>
<TD><IMG SRC=hexagon.gif>
- <TD><IMG SRC=septagon.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:parallelogram>parallelogram</A>
<TD><A NAME=d:house>house</A>
<TD><A NAME=d:pentagon>pentagon</A>
<TD><A NAME=d:hexagon>hexagon</A>
- <TD><A NAME=d:septagon>septagon</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=septagon.gif>
<TD><IMG SRC=octagon.gif>
<TD><IMG SRC=doublecircle.gif>
<TD><IMG SRC=doubleoctagon.gif>
- <TD><IMG SRC=tripleoctagon.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:septagon>septagon</A>
<TD><A NAME=d:octagon>octagon</A>
<TD><A NAME=d:doublecircle>doublecircle</A>
<TD><A NAME=d:doubleoctagon>doubleoctagon</A>
- <TD><A NAME=d:tripleoctagon>tripleoctagon</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=tripleoctagon.gif>
<TD><IMG SRC=invtriangle.gif>
<TD><IMG SRC=invtrapezium.gif>
<TD><IMG SRC=invhouse.gif>
- <TD><IMG SRC=Mdiamond.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:tripleoctagon>tripleoctagon</A>
<TD><A NAME=d:invtriangle>invtriangle</A>
<TD><A NAME=d:invtrapezium>invtrapezium</A>
<TD><A NAME=d:invhouse>invhouse</A>
- <TD><A NAME=d:Mdiamond>Mdiamond</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=Mdiamond.gif>
<TD><IMG SRC=Msquare.gif>
<TD><IMG SRC=Mcircle.gif>
<TD><IMG SRC=rect.gif>
- <TD><IMG SRC=rectangle.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:Mdiamond>Mdiamond</A>
<TD><A NAME=d:Msquare>Msquare</A>
<TD><A NAME=d:Mcircle>Mcircle</A>
<TD><A NAME=d:rect>rect</A>
- <TD><A NAME=d:rectangle>rectangle</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=rectangle.gif>
<TD><IMG SRC=square.gif>
<TD><IMG SRC=star.gif>
<TD><IMG SRC=none.gif>
- <TD><IMG SRC=underline.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:rectangle>rectangle</A>
<TD><A NAME=d:square>square</A>
<TD><A NAME=d:star>star</A>
<TD><A NAME=d:none>none</A>
- <TD><A NAME=d:underline>underline</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=underline.gif>
<TD><IMG SRC=note.gif>
<TD><IMG SRC=tab.gif>
<TD><IMG SRC=folder.gif>
- <TD><IMG SRC=box3d.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:underline>underline</A>
<TD><A NAME=d:note>note</A>
<TD><A NAME=d:tab>tab</A>
<TD><A NAME=d:folder>folder</A>
- <TD><A NAME=d:box3d>box3d</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=box3d.gif>
<TD><IMG SRC=component.gif>
<TD><IMG SRC=promoter.gif>
<TD><IMG SRC=cds.gif>
- <TD><IMG SRC=terminator.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:box3d>box3d</A>
<TD><A NAME=d:component>component</A>
<TD><A NAME=d:promoter>promoter</A>
<TD><A NAME=d:cds>cds</A>
- <TD><A NAME=d:terminator>terminator</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=terminator.gif>
<TD><IMG SRC=utr.gif>
<TD><IMG SRC=primersite.gif>
<TD><IMG SRC=restrictionsite.gif>
- <TD><IMG SRC=fivepoverhang.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:terminator>terminator</A>
<TD><A NAME=d:utr>utr</A>
<TD><A NAME=d:primersite>primersite</A>
<TD><A NAME=d:restrictionsite>restrictionsite</A>
- <TD><A NAME=d:fivepoverhang>fivepoverhang</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=fivepoverhang.gif>
<TD><IMG SRC=threepoverhang.gif>
<TD><IMG SRC=noverhang.gif>
<TD><IMG SRC=assembly.gif>
- <TD><IMG SRC=signature.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:fivepoverhang>fivepoverhang</A>
<TD><A NAME=d:threepoverhang>threepoverhang</A>
<TD><A NAME=d:noverhang>noverhang</A>
<TD><A NAME=d:assembly>assembly</A>
- <TD><A NAME=d:signature>signature</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=signature.gif>
<TD><IMG SRC=insulator.gif>
<TD><IMG SRC=ribosite.gif>
<TD><IMG SRC=rnastab.gif>
- <TD><IMG SRC=proteasesite.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:signature>signature</A>
<TD><A NAME=d:insulator>insulator</A>
<TD><A NAME=d:ribosite>ribosite</A>
<TD><A NAME=d:rnastab>rnastab</A>
- <TD><A NAME=d:proteasesite>proteasesite</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=proteasesite.gif>
<TD><IMG SRC=proteinstab.gif>
<TD><IMG SRC=rpromoter.gif>
<TD><IMG SRC=rarrow.gif>
- <TD><IMG SRC=larrow.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:proteasesite>proteasesite</A>
<TD><A NAME=d:proteinstab>proteinstab</A>
<TD><A NAME=d:rpromoter>rpromoter</A>
<TD><A NAME=d:rarrow>rarrow</A>
- <TD><A NAME=d:larrow>larrow</A>
</TR>
<TR ALIGN=CENTER>
+ <TD><IMG SRC=larrow.gif>
<TD><IMG SRC=lpromoter.gif>
</TR>
<TR ALIGN=CENTER>
+ <TD><A NAME=d:larrow>larrow</A>
<TD><A NAME=d:lpromoter>lpromoter</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
+The shape <TT>plain</TT> is similar to these two, except that it also enforces
+<TT>width=0 height=0 margin=0</TT>, which guarantees that the actual size of the node is entirely determined by the label.
+This is useful, for example, when using <A HREF=shapes.html#html>HTML-like labels</A>.
+Also, unlike the rest, we have shown these three, as well as <TT>underline</TT>,
without <TT>style=filled</TT>
to indicate the normal use. If fill were turned on, the label text would
appear in a filled rectangle.
later than 8 July 2011.
</EM>
<P>
+<B>NOTE:</B><EM>For releases later than 9 September 2014, one can use <TT>shape=plain</TT> so that the size
+of the node is totally determined by the label. Otherwise, the node's margin, width and height values may cause the
+node to be larger, so that edges are clipped away from the label. In effect, <TT>shape=plain</TT> is shorthand
+for <TT>shape=none width=0 height=0 margin=0</TT>.
+<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
<TD ALIGN=LEFT>|</TD>
<TD ALIGN=LEFT><B><U></B> <I>text</I> <B></U></B></TD>
</TR>
-<TR>
- <TD ALIGN=RIGHT></TD>
- <TD ALIGN=LEFT>|</TD>
- <TD ALIGN=LEFT><B><O></B> <I>text</I> <B></O></B></TD>
-</TR>
<TR>
<TD ALIGN=RIGHT></TD>
<TD ALIGN=LEFT>|</TD>
>
</PRE>
<P>
- <!-- Underline text -->
+ <!-- Underlined text -->
<PRE><U
<!-- No attributes -->
>
</PRE>
-<P>
- <!-- Overline text -->
-<PRE><O
- <!-- No attributes -->
->
-</PRE>
<P>
<!-- Subscript text -->
<PRE><SUB
static polygon_t p_box = { FALSE, 1, 4, 0., 0., 0. };
static polygon_t p_square = { TRUE, 1, 4, 0., 0., 0. };
static polygon_t p_plaintext = { FALSE, 0, 4, 0., 0., 0. };
+static polygon_t p_plain = { FALSE, 0, 4, 0., 0., 0. };
static polygon_t p_diamond = { FALSE, 1, 4, 45., 0., 0. };
static polygon_t p_trapezium = { FALSE, 1, 4, 0., -.4, 0. };
static polygon_t p_parallelogram = { FALSE, 1, 4, 0., 0., .6 };
static polygon_t p_lpromoter = { FALSE, 1, 4, 0., 0., 0., LPROMOTER};
#define IS_BOX(n) (ND_shape(n)->polygon == &p_box)
+#define IS_PLAIN(n) (ND_shape(n)->polygon == &p_plain)
/* True if style requires processing through round_corners. */
#define SPECIAL_CORNERS(style) ((style) & (ROUNDED | DIAGONALS | SHAPE_MASK))
{"triangle", &poly_fns, &p_triangle},
{"none", &poly_fns, &p_plaintext},
{"plaintext", &poly_fns, &p_plaintext},
+ {"plain", &poly_fns, &p_plain},
{"diamond", &poly_fns, &p_diamond},
{"trapezium", &poly_fns, &p_trapezium},
{"parallelogram", &poly_fns, &p_parallelogram},
int regular, peripheries, sides;
int i, j, isBox, outp;
polygon_t *poly = NEW(polygon_t);
+ boolean isPlain = IS_PLAIN(n);
regular = ND_shape(n)->polygon->regular;
peripheries = ND_shape(n)->polygon->peripheries;
* Else use minimum default value.
* If node is not regular, use the current width and height.
*/
- if (regular) {
+ if (isPlain) {
+ width = height = 0;
+ }
+ else if (regular) {
double sz = userSize(n);
if (sz > 0.0)
width = height = sz;
/* minimal whitespace around label */
if ((dimen.x > 0) || (dimen.y > 0)) {
/* padding */
- if ((p = agget(n, "margin"))) {
- marginx = marginy = 0;
- i = sscanf(p, "%lf,%lf", &marginx, &marginy);
- if (marginx < 0)
- marginx = 0;
- if (marginy < 0)
- marginy = 0;
- if (i > 0) {
- dimen.x += 2 * POINTS(marginx);
- if (i > 1)
- dimen.y += 2 * POINTS(marginy);
- else
- dimen.y += 2 * POINTS(marginx);
+ if (!isPlain) {
+ if ((p = agget(n, "margin"))) {
+ marginx = marginy = 0;
+ i = sscanf(p, "%lf,%lf", &marginx, &marginy);
+ if (marginx < 0)
+ marginx = 0;
+ if (marginy < 0)
+ marginy = 0;
+ if (i > 0) {
+ dimen.x += 2 * POINTS(marginx);
+ if (i > 1)
+ dimen.y += 2 * POINTS(marginy);
+ else
+ dimen.y += 2 * POINTS(marginx);
+ } else
+ PAD(dimen);
} else
PAD(dimen);
- } else
- PAD(dimen);
+ }
}
spacex = dimen.x - ND_label(n)->dimen.x;