Manual For Dia.docx
《Manual For Dia.docx》由会员分享,可在线阅读,更多相关《Manual For Dia.docx(36页珍藏版)》请在冰豆网上搜索。
ManualForDia
DiaSoftwareManual
1.Introduction
Dia isanapplicationforcreatingtechnicaldiagrams.ItsinterfaceandfeaturesarelooselypatternedaftertheWindowsprogramVisio.FeaturesofDiaincludemultiple-pageprinting,exporttomanyformats(EPS,SVG,CGMandPNG),andtheabilitytousecustomshapescreatedbytheuserassimpleXMLdescriptions. Dia isusefulfordrawingUMLdiagrams,networkmaps,andflowcharts.
Thisdocumentdescribesversion0.97of Dia.
Figure 1.1. SampleFlowchartDiagram
1.1Whatcanyoudo?
Dia isadiagrammingapplicationthatcanbeusedtomakealargevarietyofdiagrams. Dia iseasytolearnandflexibleenoughtoallowpoweruserstocreatehighlycustomizeddiagrams.Belowaretwosimpleexamplesofdiagramsthatcanquicklybecreatedusing Dia.
1.2StartingwithDia:
Diatabbeddiagramming
1.3CreatingaCanvas:
Alldiagramsaredrawnintheirown canvas.WhenyoufirststartDia,ablankcanvasiscreatedautomatically.Atanytime,youcancreateanewcanvasbyselecting File->NewDiagram.Thecanvasmaybecustomizedinvariousways,suchaschangingthebackgroundcolororgridlines.
DiastartupshowingblankcanvasaboveandToolbox.
Figure 1.3. DiaStartup
1.4MakingaDiagram
1.Adiagramismadeupofobjects.Objectsareshapesorlinesthatcanbedifferentcolorsandsizes.Objectscanbesimplelinedrawings,text,orfull-colorpictures.Someobjectsallowtexttobeenteredinsidetheshape.
UsingDiatocreateadiagramiseasy.TheToolboxcontainsapaletteofpredefinedobjects,includingsimpleshapes,lines,andspecializedobjects.Toaddanobjecttothecanvas,simplyclickonthedesiredobject'siconontheToolboxandthenclickonthedesiredpointonthecanvas.Theobjectwillappearonthecanvaswhereyouclicked.
2.Anobjectcanbemovedbyclickingontheobjectanddraggingthemouse.Theobjectcanberesizedbyclickinganddraggingoneoftheobject'sgreenorred"handles".
Objectscanbeconnectedusinglines.Justdrageachendofalinetoanyconnectionpoint(smallblue"x")onanobject.Onceobjectsareconnected,theycanbemovedandthelinestretchestokeepthemconnected.
3.IntheToolbox,youcandouble-clickonanyobject'sicontoviewandedittheobject'sdefaultproperties.Thisallowsyoutocustomizevariousdefaultpropertiesofeachobject.
Forobjectsthatincludetext,youcancustomizethetextalignmentandfontproperties.Forstandardshapes,youcancustomizethetransparency,thecornershape,andtheaspectratio
Diaincludesasetofstandardshapeandlineobjects.Diaincludesalargenumberofpredefinedobjectsforvarioususes.Theseincludeflowcharts,UMLdiagrams,networkdiagrams,andmanyothers.
4,ManycommontasksinDiarequireselectingoneormoreobjects.Diaincludesanumberofwaystoselectobjectsquickly.
Diacanbecustomizedinanumberofways.
Layerscreatemultiple-imagessotheyareoneimage.Bydoingthis,ausercaneditonelayerwithoutworryingaboutaffectinganyoftheotherlayers.
Diaisdesignedtomakeaddingnewuser-definedshapesveryeasy.
1.5.SavingandPrintingYourDiagram
Diaprovidesthenormalsaveandprintoptions,locatedontheFilemenu.Selectingthe File -> PageSetup allowsyoutosetthepapersize,orientation,andprintmargins.Thisalsoallowsyoutochoosewhethertoprintthediagramtoscale(enteredinpercent)ortofitthediagramtoaspecificsize(incentimeters).
Diasupportsexportingtonumerousformatsforexcellentwebpublishing.Someoftheminclude:
∙ComputerGraphicsMetafile(.cgm)
∙EncapsulatedPostscript(.eps)
∙PortableDocumentFormat(.pdf)
∙PortableNetworkGraphics(.png)
∙ScalableVectorGraphics(.svg)
2.ObjectAndToolBox
Fig:
2.1Diatoolbox
When Dia isexecuted,twowindowsopen:
thecanvas,whichcontainsthediagram,andtheToolbox,whichcontainstheobjectpalettesandothercontrols.TheToolboxisdividedintothreeregions.Thetopregioncontains14buttons.Thefirstthreearecontrolsusedtoadjustthediagram.Thenext11aretheiconsforthebuilt-inbasicobjects.
ThemiddleportionoftheToolboxcontainstheselectedSpecialObjects.Thisisusedtoselectamongthemanybuilt-inobjectsheetssuppliedwithDia,suchasUML,Flowchart,Network,etc.
ThebottomportionoftheToolboxcontainsspecialcontrolsthatsetdefaultpropertiesforobjectsplacedonthecanvas.Theseincludeforegroundcolor,backgroundcolor,andlinewidth.Therearealsothreecontrolsthatsetthedefaultpropertiesforlineobjects.Thesearebeginningarrowstyle,endingarrowstyle,andlinestyle.
ModifyControl:
Figure 2.2 ModifyControl
TheModifycontrolisthedefaultsettingwhenusingDia.Thiscontrolallowsyoutoselectoneormoreobjectsonthecanvas.Afteranobjectisaddedtothediagram,theModifycontrolisautomaticallyselectedforyou.ThismakesiteasytoaddanobjectandthencontinueworkingwithouthavingtoreselecttheModifycontrol.
TexteditingControl:
Figure 2.3. TexteditControl
TheTexteditcontrolisnewwithDiafromversion0.97-itindicatesbeingintexteditmode.Togetherwithanappropriateobjectselectionitisonewaytostarttextmodification.
Anobjectsupportingin-canvastexteditingcanbeintwodifferentselectionmodes.Thenormalselectionisthesameforallobjects,itallowstomanipulatetheobjectsposition,groupingetc..Someobjectcanenterasecondselectionmode,whichallowstoedittheirtextfromthecanvas.
ScrollControl:
Figure 2.4. ScrollControl
TheScrollcontrolisusedtomovearoundthediagram.Whenthiscontrolisactive,themousepointerchangestoahand.WhentheScrollcontrolisactive,youcanscrollaroundthediagrambyclickinganywhereonthecanvasanddraggingthemouse.Thediagramscrollswithinthecanvaswindow.TheScrollcontrolstaysactiveuntilyoupressoneoftheothercontrols.
SpecialObjects:
OntheToolbox,justbelowthebasicobjecticons,isadrop-downlistboxthatallowsyoutoselectasheetofspecialobjectstobeincludedinthediagram.Asyoucanseefromthescreenshotabove, Dia providesalargenumberofspecialobjects.Touseaspecialobject,firstselectthedesiredsheetusingthisdrop-downlistbox.Then,justclickonthedesiredobjectandclickonthecanvastoinserttheobject.
DefaultColor,LineWidth,andLineStyle
Belowthespecialobjectspalettearecontrolsforsettingthedefaultforegroundandbackgroundcolor,linewidth,andlinestyle.Thesecontrolsallsetdefaultpropertiesfornewobjectsbeingaddedtothecanvas.Theydonotaffectthepropertiesofexistingobjectsalreadyonthepalette.Thesesettingsstayineffectforallfuture Dia sessions,untiltheyarechanged.
Thetwosquaresontheleftallowyoutosetthedefaultforegroundandbackgroundcolorsforallnewobjectsbeingaddedtothediagram.Ifyoudouble-clickontheuppersquare(i.e.,theblackoneinthescreenshotabove),youcansetthedefaultforegroundcolorforallnewobjects.Double-clickingonthelowersquare(whiteinthescreenshot)allowsyoutoselectthedefaultbackgroundcolor
-RestoreDefaultColorsButton
-ReverseColorsButton
-DefaultLineWidth
-ArrowandLinkStyle
AtthebottomoftheToolboxarethreebuttons.Theleftbuttonallowsyoutoselectthedefaultarrowshapeforthebeginningofaline.Inthescreenshotthisisdefaultingto"noarrow".Therightbuttonallowsyoutoselectthedefaultarrowshapefortheendofaline.Sinceonlylineshavearrows,thesebuttonsonlyaffectlineobjectsandhavenoeffectonothershapes.Themiddlebuttonallowsyoutoselectthedefaultlinestyle(solid,dashed,etc.).
3.WorkingWithDia
3.1AddingObjects
Addingobjectstothe Dia canvasisdonebyclickingonthedesiredobject'siconbuttoninthe Toolbox andthenclickingonthecanvasatthedesiredinsertionpoint.Theselectedobjectwillbeinsertedatthatpoint.
3.2MovingObjects
Whenanobjectisinsertedintothecanvas,thedesiredobjectwillappearwithsmallgreenboxes(knownashandles)aroundtheborder.
Figure 4.12. ObjectHandles
Tomoveanobject,clickanywhereinsidetheobject(orsomewhereonalineotherthanahandle)anddrag
themousetothedesiredlocationonthecanvas.Forlineobjects,youneedtoclickontheline.
3.3 ResizingObjects
Handlesareusedtochangethesizeoftheobject.Toexpandanobject,justclickahandleanddragitawayfromthecenteroftheobject.Toshrinkanobject,dragahandletowarditscenter.Theobject'ssizewillchangeasyoudragthemouse.Ifanobjecthasafixedaspectratio,changingonedimensionautomaticallychangestheother.Ifanobjecthasafreeaspectratio,youcanchangeonedimension(e.g.,height)withoutaffectingtheother(e.g.,width).Someobjectshaveapropertysettingthatdetermineswhethertheaspectratioisfixedorfree.
3.4 DeletingObjects
Todeleteanobject,clickontheobjecttoselectit.Thehandleswilldisplay,whichindicatesthattheobjectisselected.ThenpresstheDeletekeyorselect Edit->Delete fromthemenu.
3.5ConnectingObjectsWithLines
Inmanydiagrams,shapesareconnectedtoeachotherusingoneofthebasiclineobjects.Whenashapeisnotselected,anumberofconnectionpointsaredisplayedonitsbordersassmall"x"figures.Thereisalsoaconnectionpointinthemiddleofeachshape.Linesalsohaveconnectionpointswhereotherlinescanconnect.
Lineshavehandlesoneachendthatareusedtoconnectthemtootherobjects.Thesehandlesaregreenifthelineisnotconnectedandredifitisconnected.Linesalsohaveorang