Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Shape Elements

An icon can be associated with the shape through the icon element. An example is:


Image dia-sheet-sample-min-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.

Image dia-sheet-default-icon

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):

    <point x="5" y="0"/>
    <point x="5" y="10"/>

Image dia-sheet-sample-min-canvas2

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"/>

This indicates that there is no restriction on the aspect ratio (i.e., you can stretch the shape arbitrarily in the X and Y directions independently). A fixed aspect ratio requires Y to change in the same proportion as X, and vice versa. A range can be specified, with two attributes, min and max, identifying a range of allowable amounts of distortion. For example,

  <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 [email protected]

  Published under the terms fo the GNU General Public License Design by Interspire