March 14, 2005

Re-usable, editable graphics in

Author: Rob Reilly

Have you ever wanted to brainstorm an intricate new system design using block diagrams on your Linux or Windows desktop? How about drawing an organizational chart, knowing full well that you will need to change it tomorrow? What you need is a program that makes it easy to create and edit line and shape objects. Draw might be just the ticket.

Draw is a vector-based graphics editor that works with objects rather than pixels. Pixel-painting programs, like the GIMP, are fine for touching up red-eye in photos or blending several pictures together. They fall short when it comes to jobs where individual objects (such as boxes or lines) need to be moved or changed. For those jobs it's much easier to deal with objects than to try to move groups of pixels around the screen. You need the ability to grab an object and move it. That's exactly what Draw does.

Ready, set, Draw

Creating a drawing in Draw 1.1.2 is straightforward and intuitive. If you've ever used Microsoft Visio, the concepts are similar.

As an exercise, let's create a basic system chart. System charts are sets of squares, text, and other objects that represent components and how they work together. Lines show data or process flows between components. Charts can range from simple to highly complex, depending on the project, and can change throughout the life of a project.

Follow these easy steps for a basic system chart:

  • Start and create a new Drawing file.
  • After the drawing window opens, select the rectangle tool icon from the menu along the left border.
  • Move the rectangle over into the drawing window and click the start position.
  • Drag the outline to the desired size and release the mouse button.
  • Click the diagonal arrow icon on the top left to return to select objects mode when you're done making rectangles.

You should now have a box with the default color (blue) on your drawing. Double-click the rectangle to edit its text.

Duplicate the above steps for other rectangles. Try adding a few more shapes to your drawing. Figure 1 shows some boxes and ellipses as positioned during a mock brainstorming session.

Fig 1 - Shapes on the chart

Let's route lines between the boxes to show how the components are connected.

  • Select the connector line icon along the left side of the drawing window. Hold the left mouse button down for a menu of connector types.
  • Click on the icon to choose a circle at each end, a circle at one end and arrow at the other, or another configuration.
  • Move the cursor near a shape and click over an anchor point to attach one end of the line to that shape.
  • Move the cursor to another anchor point, on another object to connect the remaining end of the line.

That's all there is to connecting shapes with lines. Take a look at Figure 2 to see how I connected the shapes on my chart.

Fig 2 - Connecting the shapes with lines

What a good-looking chart. It seems like it could be a little neater, though.

You could grab a shape and manually move it so the lines are straight, but that's the hard way. Much better to select several shapes and align them horizontally or vertically with the alignment tool.

While holding down the left-shift button, click on all the objects that you want to align. Click and hold down the alignment tool icon (along the left edge of the drawing window) to bring up the alignment options. Move the cursor over one of the alignment choices, such as vertically centered, and release the mouse button. Poof, the objects will all be neatly aligned and the lines all straightened. You can do this in either or both directions.

You'll also note that the lines stayed connected to the objects and the lines were relatively well-routed, automatically. The ability to move objects around while maintaining the relationships to each other is a key feature of vector graphics editors.

Now just add in some text for titles and labels to complete the chart. You can connect any object with lines, including text. Figure 3 shows my finished chart.

Fig 3 - My finished chart

Re-using the parts

Another great thing about vector graphics is that individual objects are re-usable. That includes lines, boxes, ellipses, text, or any other graphical element.

Say you wanted to develop an alternative to your original system design, but you wanted to retain the top two system components. You could copy and paste the "System 1" and "System 2" components, along with their lines, into a new drawing and use it as a starting point for the new design.

Inserting your system design chart into a slide show is easy too, especially since has an integrated presentation application called Impress that is much like Microsoft PowerPoint.

Once you've developed your design drawings, it's a simple matter of either importing or copying and pasting the graphical elements into the slide show. As a matter of fact, you could just as easily start out by creating the system design in Impress itself, because Impress uses vector graphics elements, too.

Wrap up Draw can make short work of creating all kinds of line and shape type charts. You can move, copy, and paste elements to your heart's content. With a little practice and exploring, you'll be a charting whiz in no time.

Rob Reilly is a consultant, writer, and commentator who advises clients on business and technology projects. His Linux, portable computing, and public speaking skills-related articles regularly appear in various high-end Linux and business media outlets.

Click Here!