How to add a new shape to Dia$Date: 2012/05/22 08:53:32 $20072012Steffen MackeSteffenMackesdteffen@gmail.com
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.1 or any later version published
by the Free Software Foundation with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy
of the GNU Free Documentation License from
the Free Software Foundation by visiting their Web site or by writing to:
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
CSS stylesheets referenced in this document and graphics referenced
in those stylesheets are not part of this document and covered by
a different license.
IntroductionThis document describes (step by step) how to add a custom shape to
Dia.Dia is a diagram editor. More information about dia can be found on
the dia homepage, http://live.gnome.org/Dia.Dia for Windows is available from http://dia-installer.de.Creating a shapeJust draw your shape in Dia like you draw a diagram.You can also use other tools such as Inkscape to draw your shape,
save it in the SVG format and import it to Dia.The following will illustrate how to add a pre-silo shape to the Civil
Engineering sheet. A pre-silo shape is just a square box with a circle drawn
inside. Draw your shape in Dia as shown in
.Pre-silo shape in diaSelect FileExport... from the menu to open the
diagram export dialog ().Select
Dia Shape File (*.shape) as the file type.Advanced users can use the option By extension and specify the *.shape
extension directly in the filename.Provide a meaningful name for your shape (pre-silo.shape in this example) and remember the folder in
which you are saving the file.Export diagram dialogYou will be asked for the resolution of the icon that will be used
in the Dia toolbar. While you are free to select a resolution yourself,
it is suggested that you use 22 pixels as the height like all the
shapes that are included in the main Dia distribution.If possible, also try to use the a width of 22 pixels for your
icons.If you are following the example, specify a width of 22 pixels and
a height of 22 pixels in the dialog ().Shape icon resolutionAdding a shape to a sheetOnce you have created a shape, you can add it to a sheet.Select
FileSheets and
Objects from the menu to open the
Sheets and Objects
dialog.You can press F9 to open the Sheets
and Objects dialog.In the left drop-down, select Civil to see the
existing Civil Engineering sheet as shown in .Sheets and Objects dialogTo add the new shape to the sheet, click on the
New button - a new dialog will be opened
().Empty new shape dialogIn the new dialog, click on the Browse...
browse button to select the location of the new shape file. A file
selection dialog will be opened. Browse to the new shape file and
select it. For the example, pre-silo.shape has
been selected in .Select SVG Shape FileClick the OK to close the file selection
dialog.Fill in a description for the new shape. Your dialog box should look
now similar to .Filled new shape dialogClick on the OK button to close the
dialog.Congratulations! You've added a shape to the Civil Engineering sheet,
which should look now like the one in .Updated Sheets and Objects dialogClick on the Close button to close the Sheets
and Objects dialog and start a new diagram. You can add your newly
created shape to this diagram.You can use the same approach to add new shapes to existing sheets. Note that the shape will be added
to the left sheet in the Sheets and Objects Dialog.Create a new sheetIn the click on the
New button and switch the radio button to "Sheet name:"
as shown in .
Create a new sheet
Enter the new sheet name and description. Click OK.
Share your shapesConsider sharing your shapes with others, e.g. by sending an email to
dia-list@gnome.org, adding it to a website, etc. The best way
to do this is to create a new enhancement bug in Dia's bugtracker,
http://bugzilla.gnome.org.
Note that you have to agree to place your shapes under the terms of
GPL, if you would like to have your shapes included in the Dia distribution.
DocBook sourcehttp://dia-installer.de/howto/shapes/dia_create_shape.xmlOther languagesEspañol