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

Masking


In this recipe we will see how to make certain areas of a drawing transparent without applying permanent changes to the elements of the drawing itself, thanks to the use of masking objects.

How to do it...

The following steps show you how to create an object masking:

  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 mask.

  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 masking object.

  3. 3. Make the circle fill color White by clicking on the white colored chip in the color swatch under the canvas.

  4. 4. Create a radial gradient by selecting the Gradient tool choosing the radial gradient, clicking in the center of our circle, and then dragging outwards. Increase the stroke width (10 worked in my case) and set its color to White.

  5. 5. Select both of our objects (Ctrl + A) and apply the masking by using the Object | Mask | Set command. The star will appear to be clipped, but if we read the Status bar notification area tip, we will see that the star is actually labeled as masked.

  6. 6. Select the Star tool (Shift + F9 or *) and move the star handles to change the star shape.

  7. 7. Select the Node tool (F2 or N) and enable the Show mask(s) of selected object(s) toolbar button. You will now see the outline of the masking object in blue.

  8. 8. Edit the masking circle by using the ellipse handles.

How it works...

The masking object, in addition to acting as a clip path, will use its colors to make parts of an object opaque or transparent. In parts where the masking object is white, the masked object will be visible, and in parts where the masking object is black or transparent, the masked object will be transparent. Mask colors aren't limited to black and white though, any color can be used and the masking will be determined by the color lightness and opacity.

The masked object can be edited while being masked or it can be released from the mask by using the Object | Mask | Release option.

Note

Editing shapes used as masking objects

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

There's more...

As with clipping, masking can also be performed on groups and by groups. The following are the two groups from the clipping recipe, only now we have used masking:

Note

Masking and automatic grouping

Masked objects can be automatically grouped before masking to make future editing easier. Read more about it in the Clipping recipe.

See also

For more information, refer to the Making objects partially transparent and Creating linear gradients in Chapter 2.

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