Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Inkscape 0.48 Illustrator's Cookbook

You're reading from   Inkscape 0.48 Illustrator's Cookbook 109 recipes to create scalable vector graphics with Inkscape

Arrow left icon
Product type Paperback
Published in Apr 2011
Publisher Packt
ISBN-13 9781849512664
Length 340 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (18) Chapters Close

Inkscape 0.48 Illustrator's Cookbook
Credits
About the Authors
About the Reviewer
1. www.PacktPub.com
2. Preface
1. Creating and Editing Objects FREE CHAPTER 2. Editing Colors 3. Speeding Up Your Workflow 4. Creating and Editing Clones 5. Live Path Effects 6. Extensions 7. SVG Filters 8. Putting it All Together 9. Raster and Almost Raster 10. Web Graphics Preparation 11. SVG in Websites 12. Draw Freely

Path operations


Inkscape comes with several useful path operations that enable us to assemble complex objects from simpler ones, thus speeding up the process of creating elaborate drawings.

How to do it...

The following steps outline some useful path operations:

  1. 1. Create a rectangle using the Rectangle tool (F4 or R) and a star using the Star tool (Shift + F9 or *). Position the star over the top rectangle edge so it partially overlaps the rectangle.

  2. 2. Select both objects (Ctrl + A) and perform a union on them using the Path | Union option or Ctrl + +. Notice how we now have only one object with the same outline as the previous objects combined:

  3. 3. Create a circle with the Ellipse tool (F5 or E) and position it over the object we got in the previous step.

  4. 4. Select both objects (Ctrl + A) and perform a difference using the Path | Difference option or Ctrl + -. Notice that we now have only one object that was made by subtracting the top from the bottom one:

  5. 5. Create an ellipse using the Ellipse tool (F5 or E) that is a bit wider than the object from the previous step and position it over the upper half of that object (I also lowered the opacity a bit so it's easier to see what we're doing.)

  6. 6. Select both objects (Ctrl + A) and perform an intersection using the Path | Intersection option or Ctrl + *. This option is the same as Clipping, only destructive, since we can't get the original shape back:

  7. 7. Create a rectangle using the Rectangle tool (F4 or R) that is larger than the object from the previous step, and center it over that object (I also lowered the opacity a bit so it's easier to see what we're doing.)

  8. 8. Select both objects (Ctrl + A) and perform an exclusion using the Path | Exclusion option or Ctrl + ^. This operation is like a reverse Difference:

  9. 9. Create a rectangle using the Rectangle tool (F4 or R) that is approximately half the size of the object from the previous step, and position it over the bottom area of that object (I also lowered the opacity a bit so it's easier to see what we're doing.)

  10. 10. Select both objects (Ctrl + A), duplicate them (Ctrl + D), and move away the selection (duplicated objects). We will use them in a later step.

  11. 11. Select the original two objects using a rubber band selection or by clicking on one and using Shift while clicking on the other to add it to the selection. Then perform a division using the Path | Division option or Ctrl + /.

  12. 12. Deselect using the Esc key and then select each of the resulting objects and move them away so that each subpath of the original object is divided separately.

  13. 13. Select the objects we had previously duplicated and set aside, and cut the paths using the Path | Cut Path option or Ctrl + Alt + /.

  14. 14. Deselect using the Esc key and then select each of the resulting objects and move them away to see how all the sub-paths of the original object were cut independently. Paths that are generated with the Cut Path operation are open so their fill is removed to make it more clear.

There's more...

We only used two objects at a time to demonstrate different path operations but more than two paths can be used to perform Union, Intersection, and Exclusion.

If we use Open Paths with path operations they will be closed in the process by connecting its end points with a straight line. If we use shape objects (rectangle, ellipse, or stars) they will automatically be converted to paths.

Inset and Outset

Inset and Outset aren't path operations but what they do is similar enough to include them in this recipe. Inset (Ctrl + ( ) and Outset (Ctrl + ) ) moves the path edge towards the center or away from the object center by an equal amount. Here are some examples:

Dynamic Offset

Dynamic Offset moves the path edge towards or away from the object center using a square handle that appears when this option is selected. The end result is not an editable path, and if we want to edit it further we have to convert it to a path (Shift + Ctrl + C). This effect isn't destructive like the Inset and Offset options. Here are some examples:

Linked Offset

Linked Offset duplicates the object before modifying it so we end up with two objects, the original one and the one with the offset. The offset is linked to the object and will be updated as we modify the original object. Here is an example:

See also

For more information, refer to the recipe on Clipping in this chapter.

You have been reading a chapter from
Inkscape 0.48 Illustrator's Cookbook
Published in: Apr 2011
Publisher: Packt
ISBN-13: 9781849512664
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image