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

Modifying an existing extension - Darker extended


This recipe will use an existing extension to introduce us into the field of expanding Inkscape functionality with your own code. The extension we will modify is Darker found under Extensions | Color by adding the interface to input the percentage of darkening we want to apply to selected object colors.

Inkscape extensions are generally written in Python, a free and open source scripting language which is flexible, elegant, and powerful.

Getting ready

Since the logic of the extension is written in Python, we need to have it installed on our machine. Mac OS X and Linux distributions generally include it in the base installation of the operating system. Windows users can download and install it from the official website: http://www.python.org.

To test it, open your favourite terminal application and write the following:

$ python -V
Python 2.6.6

This means that the 2.6.6 version of the language is installed.

We also need the lxml module for our...