Drawing Basic Shapes:
Title: Drawing Basic Shapes: Version: 1 .0 First edition: November 200
Contents !verview..........................................................................................................................................ii "op#right and trademar$ in%ormation.........................................................................................ii Feedbac$ ..................................................................................................................................... ii &c$nowledgments.......................................................................................................................ii 'odi%ications and (pdates................................................... ....................................................... ii Drawing Basic Shapes.................................................. .................................................................. iii Drawing a segment o% a straight line......................................................................................... iii Drawing a rectangle................................................ ................................................................... vi Drawing a circle......................................................................................................................... vi The Basic Drawing Shapes................................................ ............................................................ vii The Te)ts.................................................................................................................................. vii *ectangles and S+(ares..............................................................................................................i) "ircles, -llipses and &rcs................................................... ....................................................... i) D !b/ects..................................................................................................................................)i "(rves....................................................................................................................................... )ii ines and &rrows.....................................................................................................................)iii "onnectors................................................... ............................................................................ )iv -diting l(epoints................................................................................................................... )vi
Drawing Basic Shapes
i
Overview
Overview This chapter describes the basic methods %or drawing simple shapes (sing !pen!%%ice.org Draw.
Copyright and trademark information The contents o% this Doc(mentation are s(b/ect to the (blic Doc(mentation icense, Version 1.0 3the 4icense456 #o( ma# onl# (se this Doc(mentation i% #o( compl# with the terms o% this icense. & cop# o% the icense is available at: http:77www.openo%%ice.org7licenses7D.rt% The !riginal Doc(mentation is Drawing Basic Sh apes. The 8nitial 9riter3s5 o% the !riginal Doc(mentation is7are inda 9orthington © 200. &ll *ights *eserved. 38nitial 9riter contact3s5:lindawopeno%%ice.org. The 8nitial 9riter contact3s5 is to report errors in the doc(mentation. For +(estions regarding how to (se the so%tware, s(bscribe to the ;sers 'ail ist and post #o(r +(estion there: http:77s(pport.openo%%ice.org7inde).html.5 ortions created b#: original French doc(ment written b# 'ichel in+(ier, translated to -nglish b# &le) Th(rgood and previo(s content revised b#
Feedback lease direct an# comments or s(ggestions abo(t this doc(ment to: a(thors(ser=%a+.openo%%ice.org.
Acknowledgments Than$s to Daniel "arrera, "arol eather and ollis 9eber %or reviewing this chapter.
Modifications and updates Version
Date
1.0
1? November 200
Drawing Basic Shapes
Description of Change First p(blished edition.
ii
Drawing Basic Shapes This chapter will teach #o( the basic methods %or drawing simple shapes. 8n the remainder o% this doc(ment, we@ll (se the term objects to designate the vario(s shapes drawn 3whether the#@re simple lines, rectangles or more complicated shapes5. This is common notation in vector drawing so%tware. The %ollowing three sections ill(strate how to draw three basic shapes: a straight line, a rectangle and a circle. This ill(stration shows the b(ttons on the 'ain Toolbar that correspond to the ne)t three sections.
Drawing a segment of a straight line et@s get started with drawing the simplest o% shapes, a segment o% a straight line. To begin, clic$ on the ines and &rrows b(tton on the 'ain Toolbar. The de%a(lt line on the 'ain Toolbar ines and &rrows b(tton is an arrow. To change to a line, long=clic$ the &rrow St#le b(tton to see a list o% all the di%%erent arrow heads and tails available on line segments.
To draw a straight line segment, clic$ the straight line b(tton and place the mo(se c(rsor at the point where #o( wish to start drawing. Drawing Basic Shapes
iii
Drawing Basic Shapes
Start Point
Drag the mo(se while $eeping the b(tton pressed down. et go o% the mo(se b(tton when #o( want to stop drawing the line. Two bl(e or green handle points located at each end o% the line will appear, showing that this is the c(rrentl# selected ob/ect. The handle colors depend on the de%a(lt select mode 3the# will be green %or simple selection and bl(e when in point edit mode5.
9hile drawing the segment, i% #o( hold down the Shi%t $e# as well, #o( will %orce the line to be drawn at angle which is a m(ltiple o% A with respect to the horiContal. The star in dots shows the angles that are permitted %or the straight line when the Shi%t $e# is pressed.
Drawing Basic Shapes
iv
8% #o( replace the Shi%t $e# with the "ontrol $e# "trlE, the constraining angle will be 1A. o( can set this angle in the Tools > Options > Drawing > Grid dialog bo).
8% #o( hold down the <E $e#, the line will be drawn s#mmetricall# with respect to the start point. This techni+(e lets #o( draw straight lines b# starting %rom the middle o% the line. Note: You must press the left mouse button BEFORE ou press the !"lt# $e to draw our line% &ressing the !"lt# $e first will 'ause ou to mo(e the program panel instead of drawing a line%
Start Point
The line #o( draw will have the de%a(lt attrib(tes 3color, line t#pe, and arrow st#le5. o( can change the line attrib(tes b# activating 3clic$ing5 the line. *ight=clic$ and select the line, and then ma$e #o(r attrib(te changes with the men( provided. o( can reach this same dialog bo) b# clic$ing the line b(tton on the ob/ect bar.
Drawing Basic Shapes
v
Drawing Basic Shapes
Drawing a rectangle Drawing rectangles is similar to drawing straight line segments, e)cept that #o( (se the *ectangle b(tton %rom the 'ain Toolbar.
The line drawn with the mo(se shows the diagonal o% the rectangle.
Start Point
8% #o( hold the Shi%tE $e#, #o( will get a s+(are and the <E $e# enables #o( to draw a rectangle starting %rom its center.
Drawing a circle To draw an ellipse or a circle, (se the -llipse b(tton %rom the 'ain Toolbar.
The ellipse or circle is de%ined b# a rectangle that is lin$ed to the diagonal drawn with the mo(se. The diameter o% the ellipse or circle corresponds to the longest side o% the rectangle. Start Point
-)tended %(nctions shown b# long=clic$ing the -llipse b(tton incl(de circles, ellipses, ellipse and circle pies, segments, arcs, %illed and non=%illed closed shapes.
Drawing Basic Shapes
vi
There are three other wa#s to draw an ellipse or circle: ➢
Shi%t=circle = %orces the ellipse to be a circle.
➢
<=circle = draws a s#mmetrical ellipse or circle %rom the center instead o% dragging corner to corner. Note: You must press the left mouse button BEFORE ou press the !"lt# $e to draw our 'ir'le% &ressing the !"lt# $e first will 'ause ou to mo(e the program panel instead of drawing a 'ir'le%
➢
"trl=circle = snaps to grid lines.
he Basic Drawing Shapes This section provides a complete overview o% the vario(s basic o b/ects that #o( can draw in the Draw mod(le. These ob/ects can then be edited, combined, and manip(lated to create more comple) shapes. 8n the preceding pages, we have seen ho w to (se some o% these basic drawing shapes. &ll o% the tool palettes described here can be displa#ed %rom the 'ain Toolbar.
he e!ts The te)t mode palette loo$s li$e this:
The Te)t tool lets #o( write te)t in the de%a(lt %ont, color and siCe.
8% #o( clic$ on an empt# space in the wor$space, the te)t will be written at that spot. 8% #o( clic$ on an ob/ect, the te)t will be written in the center o% the ob/ect and will remain within the ob/ect, and the border o% the ob/ect will become the te)t@s %rame. 9hen #o(@ve %inished t#ping #o(r te)t, clic$ inside the %rame. 8% #o( wish, #o( can drop to the %ollowing line b# pressing the -nterE $e#. The te)t can be edited at all times b# clic$ing Drawing Basic Shapes
vii
The Basic Drawing Shapes
on it. 9hen #o( t#pe #o(r te)t, #o( will notice that the (pper r(ler incl(des the (s(al paragraph attrib(tes: indents, %irst line, tab stops. o( can, as in 9riter, change the st#le o% all or part o% the characters #o( enter. The St#list also wor$s here, so #o( can create st#les that #o( can (se again in other te)t %rames e)actl# as #o( wo(ld with 9riter. The te)t %rames can also be manip(lated /(st li$e an# other draw ob/ects. o( can assign them %ill colors, shadows etc. o( can also rotate the %rame and write the te)t at an# angle. The Fit Te)t To Frame tool lets #o( t#pe in te)t, b(t #o( can also change the siCe o% the res(lting te)t b# manip(lating the ob/ect@s selection handles.
>ere is a te)t the siCe o% which has been changed d#namicall#
>ere is a te)t the siCe o% which has been changed d#namicall#
8n the e)ample above, the same te)t has been d(plicated, b(t the selection rectangle has been changed. 8n order to ma$e the e%%ect clearer, we have displa#ed the border o% the rectangle. The "allo(t tool in the palette is (sed %or creating captions 3callo(ts or %ig(re labels5. 8n %act it@s a tool that p(ts a %rame aro(nd te)t and provides a connector 3an artic(lated arrow5. This tool has been (sed man# times %or the captions in this man(al.
Drawing Basic Shapes
viii
"ectangles and S#uares This toolbar palette has G tools:
These b(ttons let #o( draw %illed or empt# rectangles. These b(ttons let #o( draw %illed or empt# s+(ares. Note: 8% #o( hold the Shi%tE $e# down when drawing a rectangle, #o( will create a s+(are. These b(ttons let #o( draw %illed or empt# ro(nded rectangles. These b(ttons let #o( draw %illed or empt# ro(nded s+(ares.
Circles$ %llipses and Arcs
Drawing Basic Shapes
ix
The Basic Drawing Shapes
These two tools let #o( draw empt# or %illed ellipses. These two b(ttons let #o( draw empt# or %illed circles. Note: Drawing an ellipse while holding down the Shi%tE $e# at the same time also lets #o( draw a circle. These two b(ttons let #o( draw an elliptical sector. >ere@s the wa# to do this: First draw the ellipse. Then indicate on the ellipse with the mo(se the position o% the %irst segment and then repeat this %or the second segment. o( will note the partic(lar shape o% the mo(se c(rsor when drawing the elliptical sector. These two tools let #o( draw circ(lar sectors. The wa# to draw them is similar to that %or elliptical sectors. o( can also draw elliptical segments. &n elliptical segment is an ellipse that has been c(t into two along a straight line segment. The idea is simple: %irst draw the ellipse, then place the %irst and second segment points. o( will note the partic(lar shape o% the mo(se c(rsor. These two b(ttons let #o( draw circ(lar segments. This b(tton lets #o( draw an elliptical arc. This wor$s in a similar wa# to elliptical sectors, e)cept that the res(lting %ig(re isn@t closed. >ere again, note the shape o% the mo(se c(rsor. <(st li$e with sectors and segments, arcs can be changed at an# time. The last tool in the ellipse palette lets #o( draw circ(lar arcs.
Drawing Basic Shapes
x
&D Ob'ects Draw lets #o( draw three dimensional ob/ects. The D ob/ect palette o%%ers a choice o% G basic primitives that can be (sed to create more comple) ob/ects thro(gh merging or combination.
The creation o% a D ob/ect alwa#s wor$s in the same wa#: clic$ on the a ssociated b(tton and then draw a rectangle on the wor$ area corresponding to the %oregro(nd area o% the ob/ect to be drawn. & c(be silho(ette 3bo(ndar# bo)5 that will contain the %(t(re ob/ect is displa#ed.
This tool creates a c(be. 'ore generall#, this tool can be (sed to create D parallelepipeds. 8% #o( want to draw a c(be, press down the "trl $e# "trlE while drawing #o(r shape. This tool lets #o( draw a sphere. 8n realit#, the ob/ect drawn b# de%a(lt with this tool is an ellipsoid. To obtain a sphere, /(st press the "trl $e# while drawing. This tool lets #o( draw a c#linder. This tool lets #o( draw a cone.
Drawing Basic Shapes
xi
The Basic Drawing Shapes
This tool draws a p#ramid. This one lets #o( draw a tor(s 3a ring5. &nd this one a shell or c(p shape6 that is, a hollowed o(t hemisphere. This b(tton lets #o( draw a complete hemisphere6 that is, %illed.
Curves The c(rve palette o%%ers G tools %or drawing non=linear pro%iles.
These icons represent the basic tools %or drawing c(rves. The res(lting c(rve can be manip(lated b# BeCier c(rves as we have seen previo(sl#. The principle behind the tools is as %ollows: "lic$ on the drawing area to position the %irst point. Heeping the mo(se b(tton pressed down, move the mo(se to draw the tangent to the c(rve that passes thro(gh the start point. et go o% the mo(se b(tton a nd move the mo(se to draw the c(rve. To %inish the shape, do(ble=clic$ on the le%t mo(se b(tton. This operation can be repeated immediatel# starting %rom the newl# created end point. The shape #o( create will be %illed or empt# depending on the b(tton #o( pressed. 9here the shape is %illed, a segment will be drawn %rom the start point to the end point. The ob/ect that res(lts can be manip(lated li$e an# other, b(t #o( can also pla# with the tangents o% the ob/ect in edit points mode.
Drawing Basic Shapes
xii
This tool lets #o( create pol#gons. & pol#gon is a series o% straight segments. The wa# it wor$s is %airl# simple: /(st clic$ on the wor$space to set the %irst point, move the mo(se to the ne)t position where #o( want to set a second point and clic$, and a segment will be drawn between the two. The pol#gon is drawn b# repeating this proced(re (ntil all o% the points have been drawn. 9hen #o( have %inished, do(ble=clic$ on the mo(se to release the pol#gon %rom edit mode. 8% #o( chose to create a closed shape, a segment will lin$ the start point to the end o% the last segment that #o( have drawn. This tool is similar to the previo(s one, b(t vario(s segments will all have angles that are a m(ltiple o% A in relation to a horiContal a)is. The shape drawn will be open or %illed depending on the b(tton chosen. 9hen #o( clic$ on these b(ttons, #o( can draw a %reehand line. The principle behind this is as %ollows: move the mo(se and at the same time hold down the le%t mo(se b(tton. The movement o% the mo(se as shown on screen will become the c(rve that is drawn. !pen!%%ice.org act(all# draws a c(rve composed o% several control points. o( can chec$ this b# switching into edit points mode. >ere again, depending on the icon chosen, #o( can draw a closed or open %reehand c(rve.
(ines and Arrows
This b(tton corresponds to the simplest o% drawing shapes, a straight line segment. The line drawn will begin or end with an arrow. The two ends o% the segment are made (p o% a circle at one end and an arrow at the other.
Drawing Basic Shapes
xiii
The Basic Drawing Shapes
The two ends o% the segment will be made (p o% a s+(are at one end and an arrow at the other. The segments drawn will have an angle that is a m(ltiple o% A to the horiContal a)is. o( can get the same e%%ect b# pressing the "trl $e# when #o( draw #o(r line. This b(tton lets #o( displa# the dimensions o% the ob/ect being drawn. & dimension ob/ect incl(des a do(ble=headed arrow, two segments that indicate the e)tremities o% the meas(red Cone, and a meas(re in the c(rrent (nit o% meas(re. 8% a dimensioned ob/ect is resiCed, the corresponding change in siCe is recalc(lated a(tomaticall# and displa#ed. 8% #o( gro(p an ob/ect with dimensions, an# change in the siCe o% the ob/ect will be re%lected in the siCes reported in the dimensions. 8n s(ch a case, we call them a ssociated dimensions. The dimensions can be con%ig(red (sing a dialog bo) that is available %rom the local dimensions men(. The dimensions are shown as de%a(lt in the (n it o% meas(rement corresponding to that o% the sheet. o( can change the (nits (sing the men( Format I Dimensions. The Dimensioning options dialog lets #o( set (p the positions o% the elements that ma$e (p the dimension. o( can enter line thic$nesses, distance and overhang to the g(ide mar$s, te)t position and also change the (nit o% meas(rement displa#ed 3or even not to displa# the (nit o% meas(rement5. o( can also set the line t#pe and te)t attrib(tes (sing the classical available %(nctions alread# disc(ssed. 9ith this tool6 #o( can draw a segment bearing arrows at each end.
Connectors "onnectors are a partic(lar t#pe o% c(rve, the ends o% which are attached to gl(epoints on other ob/ects, and which stic$ to these gl(epoints when the associated ob/ect is moved. The# are partic(larl# (se%(l %or ma$ing organiCational charts. o( can reorganiCe the bloc$s o% #o(r chart while $eeping the lin$s between them. !pen!%%ice.org Draw has a whole panopl# o % %(nctions that are reall# +(ite remar$able as %ar as connectors are concerned. Finding the vario(s %(nctions is not at %irst sight ver# eas#, b(t we shall loo$ at the wa#s o% ma$ing them visible. Connector drawing basics
The principle behind drawing a connector is as %ollows: all ob/ects have gl(epoints associated with them. The gl(epoints are invisible b# de%a(lt. The connectors #o( can draw position themselves a(tomaticall# onto the gl(epoints o% the ob/ect. Draw sets the de%a(lt n(mber o% gl(epoints %or an ob/ect to . 9e will see later how #o( can change the position o% the gl(epoints and add new ones. Drawing Basic Shapes
xiv
The de%a(lt gl(epoints are located at the centers o% the lines %orming the edges o% the selection rectangle aro(nd an ob/ect. &s #o( can see on the %ollowing %ig(re, this means that the gl(epoints are not necessaril# located on the conto(r o% the ob/ect:
9hen #o( move one o% the ends o% a connector over an ob/ect, its gl(epoints become visible. o( can drop the end o% the connector onto one o% the gl(epoints. &%terwards, whenever either the connector or the ob/ect are moved, the end o% the connector will remain attached to the ob/ect gl(epoint.
o( can also drop the end o% the connector onto the ob/ect. 8n this case, when #o( move the ob/ect or the connector, !pen!%%ice.org will a(tomaticall# choose the best gl(epoint in order to avoid a too length# connector:
9herever possible, !pen!%%ice.org will attempt to avoid drawing the connector over the top o% the ob/ect. o( can alwa#s brea$ the lin$ between a connector and an ob/ect b# moving the end o% the connector awa# %rom the gl(epoint to which it was attached. &s with all ob/ects, control points are associated with connectors in order to %acilitate their drawing. The main control point is located in the middle o% the connector and lets #o( decide on the siCe o% each segment either side o% the control point.
Drawing Basic Shapes
xv
The Basic Drawing Shapes
Connector toolbar The connector toolbar contains a large n(mber o% b(ttons.
&s shown b# the %ig(re above, the connectors can be gro(ped into %o(r categories. -ach categor# is s(bdivided into J connector t#pes depending on the arrowhead %or each end. The b(ttons in this row let #o( draw traditional connectors li$e the ones #o( have seen on the previo(s pages. These connectors are made (p o% a line segment and two smaller segments at the horiContal or vertical ends. These connectors are comprised o% a simple straight line. These connectors are based on BeCier c(rves.
%diting )luepoints l(epoint management is handled b# a special toolbar. This toolbar isn@t visible b# de%a(lt. To displa# it, press the b(tton in the option toolbar. The gl(epoint toolbar loo$s li$e this:
>ere@s a brie% description o% the wa# these b(ttons wor$:
Drawing Basic Shapes
xvi
This b(tton lets #o( insert a new gl(epoint. 8% the ob/ect is %illed, the point can be inserted an#where within the ob/ect and not onl# on its conto(r. &%ter #o(@ve chosen this tool, clic$ on the ob/ect to add the gl(epoints.
The gl(epoints remain visible %or as long as the b(tton is pressed down. The# are displa#ed as little bl(e crosses and the gl(epoint that is c(rrentl# selected appears highlighted. o( can move the gl(epoints with the mo(se and delete them with the DelE $e#. These %o(r b(ttons let #o( choose the directions o% movement that are allowed aro(nd the /(nction o% a connector gl(epoint. o( can also select several o% these b(ttons %or an# given gl(epoint. >ere@s an e)ample o% their (se:
>ere@s a ver# simple drawing to which a gl(epoint has been added.
B# de%a(lt, connector lines can attach themselves to this point %rom an# direction. Now clic$ on the . The e%%ect o% this is to %orce an# connector placed on the gl(epoint to come in %rom the le%t as shown in the %ollowing drawing:
Drawing Basic Shapes
xvii
The Basic Drawing Shapes
8%, when #o( are in gl(epoint edit mode, #o( clic$ on the b(tton, #o( can add a new possible direction to a gl(epoint. 8% we $eep the preceding e)ample, this wo(ld give:
The addition o% this e)tra direction enabled !pen!%%ice.org to draw a shorter connector. 9hen this b(tton is pressed 3as it is b# de%a(lt5, an# resiCing o% an ob/ect will ca(se gl(epoints to move with the associated ob/ect. 8% this b(tton is deactivated, the gl(epoint will not move, as shown b# the %ollowing ill(strations:
9hen the b(tton is deactivated, the last si) b(ttons on the toolbar that were gra#ed o(t now become (sable. These b(ttons let #o( choose how the gl(e points will be rearranged when the ob/ect is re dimensioned. These three b(ttons let #o( choose the horiContal positioning o% the g l(epoint. o( can choose to maintain the same position with respect to the le%t edge 31st b(tton5, with respect to the center 32nd b(tton5 or with respect to the right edge 3rd b(tton5.
These three b(ttons let #o( choose the vertical positioning o% the gl(epoint. o( can choose to maintain the same position with respect to the (pper edge 31st b(tton5, with respect to the center 32nd b(tton5 or with respect to the lower edge 3rd b(tton5.
Drawing Basic Shapes
xviii