GNU/Linux Desktop Survival Guide by Graham Williams |
|||||
Shape Elements |
An icon can be associated with the shape through the icon
element. An example is:
<icon>minimal.xpm</icon> |
which comes after the name element. The specified X pixmap file is used as the icon in the dia toolbox. The filename can be relative to the shape file (e.g., icons/minimal.xpm or ../icons/minimal.xpm). When no icon is specified a default icon is used.
Connection points can be added to the shape
with the connections element which allows any number of
point elements. For example you can add two connection
points to the above Minimal Shape by inserting the following
after the icon element (or after the name element
if there is no icon element):
<connections> <point x="5" y="0"/> <point x="5" y="10"/> </connections> |
This adds a connection point to the top and another to the bottom of the triangle. The coordinate system used for connection points is the same as for the shape itself.
Next an aspectratio element can be specified to indicate how
the shape is to be distorted. The default is as if the following was
specified:
<aspectratio type="free"/> |
<aspectratio type="range" min="4" max="8"/> |
A textbox element can appear next. This is used to provide
a box that automatically adjusts the size of the shape to fit the
supplied text. The location of the text box is specified using the
same coordinate system:
<textbox x1="2" y1="1" x2="8" y2="5"/> |
Copyright © 1995-2006 Graham.Williams@togaware.com