Book Image

Inkscape 0.48 Illustrator's Cookbook

Book Image

Inkscape 0.48 Illustrator's Cookbook

Overview of this book

Inkscape is an open source vector graphics editor with an intuitive user interface that has enough depth to make quality graphic designs with an attractive layout comparable to what you would make using Illustrator or CorelDraw. But choosing the right tool and the best approach to creating the desired effect can be challenging. Inkscape 0.48 Illustrator's Cookbook makes it super-easy for you to make your own vector-based graphics with the powerful Inkscape editor. Inkscape 0.48 Illustrator's Cookbook provides you with the latest recipes to quickly create scalable vector graphics. Recipes in this book teach you about some of the most useful time-saving features in Inkscape accompanied by a list of keyboard shortcuts that you can easily memorize. In addition to covering use of Inkscape tools and their advanced features, examples from the recipes uncover solutions to common graphics problems. The book starts off with familiarizing you with the tools and techniques in Inkscape that you can use to draw 2D shapes, calligraphic shapes, and 3D boxes easily. It then guides you through the most common color-changing steps performed in Inkscape along with some convenient procedures that can save your time when dealing with colors. It explains drawing using linear and radial gradients, which are irreplaceable, usage of clones to create interesting effects in illustrations, and live-path effects that can help you speed up constructing a shape and make the process more natural. You will learn how to make those tweaks on some of the ready-made filters, and in the final recipe we will create a filter from scratch. This practical book also contains recipes showing how to use Inkscape as a raster editor and how to achieve photo-realistic effects in Inkscape. For each important technique and skill, you'll see some simple recipes, then some more advanced recipes followed by an explanation of how Inkscape works to produce the desired effects in your illustrations. By the end of this book you will be confident enough to create your own vector-based graphics with Inkscape.
Table of Contents (18 chapters)
Inkscape 0.48 Illustrator's Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface

Clipping


In this recipe we will see how to completely hide parts of a drawing in a non-destructive manner.

How to do it...

The following steps will show you how to clip an object:

  1. 1. Select the Star tool (Shift + F9 or *) and create an upright star by dragging upwards while holding Ctrl key. This is the object we want to clip.

  2. 2. Select the Ellipse tool (F5 or E) and create a circle by holding Ctrl while dragging. Make the circle a bit smaller than the star and position it above the star. The circle will be our clipping object.

  3. 3. Select both of our objects (Ctrl + A) and clip them by using the Object | Clip | Set command. Notice how the circle disappears from the drawing and parts of the star previously not covered by the circle are hidden. Check the Status bar notification area tips and you will see the star is labeled as clipped.

  4. 4. Select the Star tool (Shift + F9 or *) and move the star handles to change the shape of the object. Notice how the same circle area remains visible while the rest is hidden no matter how we edit the star.

  5. 5. Select the Node tool (F2 or N) and enable the Show clipping path(s) of selected object(s) toolbar button You will now see the outline of the clipping object in green.

  6. 6. Edit the clipping circle by using the ellipse handles. Notice how this reveals or hides different parts of the star object.

How it works...

Although the clipped object looks like some of its parts have been cut off, they are actually only hidden and can be edited even while being clipped. To "unclip" an object use the Object | Clip | Release option.

Note

Clipping object color

The clipping object color isn't relevant, as only the shape determines what is hidden or revealed, but it is helpful to color it differently from the rest of the drawing so it's easier for us to predict what the final result might look like.

Clipping is handy in many situations. For example, it can be used to rapidly produce galleries of banners or portraits using a common, irregularly shaped frame as the clipping object.

Note

Editing shapes used as clipping objects

As of writing this book the option to edit clipping objects that are shapes (rectangle, ellipse, star) doesn't work, so if this is important to you convert the clipping object into a path (Shift + Ctrl + C) before clipping.

There's more...

We only used simple one object clippings in this recipe but clipping also works with groups, either as clipped or clipping objects. The following is an example where we clipped a group of stars with a group of circles:

Note

Clipping and automatic grouping

There is a very useful option in Inkscape Preferences (Shift + Ctrl + P) under Clippaths and masks to automatically group the object(s) we want to clip. If we set it to Enclose every clipped/masked object in its own group all objects will get their own independent clipping objects; if you edit one object's clipping path, the others will remain unchanged. If we choose Put all clipped/masked objects into one group, editing the clipping path will affect the whole group of objects as if it was a single object.

Grouping a single object before clipping can be very useful when we need to position the object differently with respect to its clipping object, as we can enter the group and move the object around without moving the clipping object or unclipping.

See also

For more information, refer to the Masking and Path operations recipes in this chapter.