Issue #10 August 2005

Creating vector graphics with Inkscape

Introducing Inkscape

Inkscape is an open source SVG editor. SVG (Scalable Vector Graphics) is a W3C standard file format for describing two-dimensional vector graphics. The benefits of SVG include:

  • Scaling or rotating the image as many times as needed does not degrade the image.
  • Increasing the size of an image does not affect file size.
  • SVG is an open standard.

Inkscape began in 2003 as a fork of Sodipodi. Although no date or time line has been set for a 1.0 release, Inkscape is currently stable enough for most users.

Installing Inkscape

Inkscape is packaged and available in the Fedora™ Extras repository. To install, enter the following as root at a shell prompt:

yum install inkscape

This article refers to version 0.42 of Inkscape.

Inkscape features

Inkscape is full of features. Here is a list of some that caught my interest:

  • Create shape objects such as rectangles, ellipses, spirals, and polygons.
  • Draw freehand paths with the pencil and calligraphy tools as well as straight lines and Bézier curves with the pen tool.
  • Move, scale, rotate, or otherwise change objects by dragging nodes with the pointer.
  • Cut, copy, and paste objects.
  • Group multiple objects together. Operations performed on the group affects all members.
  • Align the sides of selected objects.
  • Distribute objects evenly or create a random effect.
  • Apply boolean operators to two objects.
  • Color or pattern fill objects.
  • Create gradients with multiple stops.
  • Enter text using any of the available fonts on the computer. Text can also flow in a shape or on a path that you create.
  • Convert non-SVG images to vector form.

A brief tour

Start Inkscape from the panel by selecting Applications -> Graphics -> Inkscape SVG Vector Illustrator. The Inkscape window appears as shown in Figure 1, “Starting Inkscape”.

Inkscape handles different file extensions by depending on other applications. Inkscape gives you a warning if you do not have all the necessary applications. Inkscape can still run normally without these extensions.
Starting Inkscape
Figure 1. Starting Inkscape

At first glance, the Inkscape window can look quite daunting. The Inkscape window includes a menu, a command bar, a tools control bar, a toolbox, a canvas, and a status bar.

The menu is located in the usual place: at the top of the window.
Command bar
The command bar is located directly below the menu. This bar contains shortcuts to the most commonly used selections from the menu.
Tool controls bar
Directly below the command bar, the tool controls bar changes its contents to reflect the options available for the chosen tool. Some tools do not have options. When those tools are chosen, this bar is blank.
The vertical bar on the left, the toolbox shows the selection of tools available. From top to bottom, they are the selector tool, the node tool, the zoom tool, the rectangle tool, the ellipse tool, the star tool, the spiral tool, the pencil, the pen, the calligraphy pen, the text tool, the gradient tool, and the color grabber.
The canvas is the main drawing area. Within the canvas, there is a black frame. This frame represents the printable area. You can still do work outside this main area, but it would not show up when printed. Consider it a sketch pad where you can move objects you like into the frame.
Status bar
The status bar is located at the bottom of the Inkscape window. Along with information like the zoom factor, cursor coordinates, and layer information, the status bar continuously shows helpful information. This information tells you what you can do with your current tool or, if you are in the middle of doing something, what exactly you are doing.

Inkscape's layout may seem a bit cluttered, but once you start using the tools to create your own works of art, you will be glad that the tools are at hand.

Drawing shapes

Inkscape is remarkably consistent with its commands. For example, select the rectangle tool. Dragging the pointer on the canvas creates a rectangle of those dimensions. However, you can press the following modifier keys while dragging:

  • Shift—The resultant shape uses your starting point as its center.
  • Control—The shape maintains a whole number ratio between its length and width.

These rules apply to the ellipse tool as well. However, the polygon tool and the spiral tool share a different set of rules. These shapes are automatically drawn with the starting point as the center. Holding the Shift key while creating these shapes does nothing. Holding the Control key while creating the object keeps the alignment in 15 degree increments.

The polygon tool can also be used to draw stars. If the Polygon option is unchecked in the tool controls bar, a star is created with spokes where the polygon's corners would be.

An example of the four shapes are shown in Figure 2, “Inkscape shapes”.

Inkscape shapes
Figure 2. Inkscape shapes

Drawing paths

The pencil, pen, and calligraphy tools all draw paths. While the pencil and calligraphy tool allows freehand drawing and the pen tool uses Bézier curves, all result in paths defined by nodes.

After drawing a path, select the node tool. The nodes appear as small diamonds or squares on the path as shown in Figure 3, “Nodes on a path”. Move these nodes to change the shape of your path.

Nodes on a path
Figure 3. Nodes on a path
If your path is rougher than you would like, Inkscape can smooth it out for you. Select Path > Simplify as many times as you want to achieve the desired effect. The number and placement of your nodes will change.

Select one of the nodes in your path. One or two handles appears on your selected node as well as the two nodes adjacent to it on the path. Moving these handles changes the curvature of the path.

Convert a shape into a path by selecting the shape and selecting Path -> Object to Path. Once it has become a path, its nodes can be grabbed and moved in the same way.

Interview with Diana Fong and Máirín Duffy

Diana Fong is a graphic designer in the desktop group at Red Hat. Máirín Duffy is an interaction designer also at Red Hat. They have agreed to share some of their thoughts on Inkscape. Note that Diana uses version 0.41, and Máirín uses version 0.39.

What do you like most about Inkscape?

DF: Inkscape is a vector program which I would recommend to new users. Its simpler menus and functions allow users to create complex shapes that would otherwise take a longer amount of time in other vector programs. The features of color to transparent fill is also very exciting.

MD: Hmm… off the top of my head, it's open-source, it's really snappy, and doesn't freeze up as much as other vector-drawing programs. The tool controls for each tool are really descriptive and easy to access, and the menus aren't as cluttered as other drawing programs.

Where do you use (or envision using) Inkscape at work?

DF: Being a graphic designer for the desktop team, I would use it for icons and other graphics needs that would benefit from being a vector graphic (which is better for resizing).

MD: In my previous life as a graphic designer I'd used it for making vector logo art for clients. Now as an interaction designer, I find it a useful tool for making wire frame interface mockups and working with icon art.

What is your favorite feature?

DF: The feature that impressed me the most is Inkscape's ability to fill a gradient from color to transparent. Even Adobe® Illustrator® doesn't have this feature.

MD: The "tool controls" bar for the path node editor tool. I feel it gives me much better control over the shape of my paths than the equivalent Adobe Illustrator path editor tools. In Illustrator, the path editing tool has different modes that can be really confusing. Inkscape explicitly lists all of the different ways you can edit a path right in the toolbar with a button for each so there's no guesswork or confusion.

Inkscape has four different color selectors; which one do you prefer?

DF: It would be great if Inkscape had a swatch palette. Swatch palettes serve as a good starting point for color selection and as color storage.

Of the four, I prefer the HSV. It has pretty much all you need in one convenient spot. In the HSV tab, you can set the Hue, Saturation, Value, Alpha, and RGBA. CMYK and RGB set the color but without Saturation and Value (which is quite useful). Never really found the "wheel" useful.

MD: I like to start off with the color wheel and fine-tune the color further using the other three selectors. I tend to like Hue-Saturation-Value (HSV) the best for this fine-tuning, but it's a personal preference.

How does Inkscape's learning curve compare to other drawing programs?

DF: The learning curve for Inkscape is comparable to that of other vector programs. It's interface does not seem to be written to any common layout, which makes using Inkscape a bit more difficult (adds to the learning curve). However, with not as many choices, it is also simpler learn than other programs that are bloated with options.

MD: I came to Inkscape/Sodipodi having had experience with vector drawing programs such as Adobe Illustrator and Macromedia Freehand and thus had a grasp on some of the concepts involved (e.g., Bézier curves, layering, working with palettes, etc.) I think Inkscape has a steeper learning curve than raster drawing programs would, but no steeper than other vector drawing programs.

Any other thoughts you would like to share?

MD: A couple of my beefs with Inkscape: I would like to be able to right-click on text to be able to edit its properties such as font, size, color, etc., but you have to go up to the object menu to see that palette. I always right click the text and select the "Object Properties" dialog instead. Also, I've had a bit of trouble getting some SVG art exported from Adobe Illustrator (that works fine in gThumb) to display properly in Inkscape.

A wish item I have for Inkscape is a tool similar to how Macromedia Flash allows you to import scanned line art and convert it to vector line art. Editor's note: In Inkscape 0.41 there is a new bitmap trace tool you can access by selecting Path-> Trace Bitmap from the menu.

Further reading

About the author

Rosanna Yuen is an avid computer user who often finds herself surrounded by computer programmers. She co-wrote AisleRiot and is a dabbler in the GNOME project. In her spare time, she reads, knits, and experiments in her kitchen.