THE BOOK OF™ INKSCAPE THE BOOK OF ™ INKSCAPE The Definitive Guide to the Free Graphics Editor by Dmitry Kirsanov San Francisco THE BOOK OF INKSCAPE. Copyright © 2009 by Dmitry Kirsanov. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. 13 12 11 10 09 1 2 3 4 5 6 7 8 9 ISBN-10: 1-59327-181-6 ISBN-13: 978-1-59327-181-7 Publisher: William Pollock Production Editor: Megan Dunchak Cover Design: Octopod Studios Developmental Editor: Tyler Ortman Technical Reviewers: Tim Cole and Joshua A. Andler Copyeditors: Kathleen Mish and Megan Dunchak Compositor: Alina Kirsanova Proofreader: Alina Kirsanova For information on book distributors or translations, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 555 De Haro Street, Suite 250, San Francisco, CA 94107 phone: 415.863.9900; fax: 415.863.9950; [email protected]; www.nostarch.com Library of Congress Cataloging-in-Publication Data: Kirsanov, Dmitry. The book of Inkscape : the definitive guide to the free graphics editor / Dmitry Kirsanov. p. cm. Includes index. ISBN-13: 978-1-59327-181-7 ISBN-10: 1-59327-181-6 1. Computer graphics. 2. Inkscape (Electronic resource) I. Title. T385.K491256 2009 006.6'8--dc22 2009023973 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. “The Book of” is a trademark of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. BRIEF CONTENTS Acknowledgments........................................................................................................... xvii Introduction.................................................................................................................... xix Chapter 1 Inkscape and the World ................................................................................. 1 Chapter 2 An Inkscape Primer ....................................................................................... 17 Chapter 3 Setting Up and Moving Around ...................................................................... 35 Chapter 4 Objects ........................................................................................................ 51 Chapter 5 Selecting ...................................................................................................... 67 Chapter 6 Transforming ................................................................................................ 81 Chapter 7 Snapping and Arranging .............................................................................. 99 Chapter 8 Styling ..........................................................................................................117 Chapter 9 Stroke and Markers .......................................................................................135 Chapter 10 Gradients and Patterns ................................................................................149 Chapter 11 Shapes .......................................................................................................165 Chapter 12 Editing Paths ...............................................................................................187 Chapter 13 Path Effects and Extensions ..........................................................................213 Chapter 14 Drawing .....................................................................................................237 Chapter 15 Text ............................................................................................................255 Chapter 16 Clones ........................................................................................................271 Chapter 17 Filters .........................................................................................................285 Chapter 18 Bitmaps ......................................................................................................303 Chapter 19 Tutorial: Designing a Business Card ..............................................................321 Chapter 20 Tutorial: Creating an Animation ...................................................................329 Chapter 21 Tutorial: Drawing a 3D-Correct Cartoon .......................................................337 Chapter 22 Tutorial: Artistic Drawing .............................................................................343 Chapter 23 Tutorial: Technical Drawing ..........................................................................349 Chapter 24 Tutorial: The Rose ........................................................................................357 Appendix A An SVG Primer ..........................................................................................369 Appendix B Import and Export ......................................................................................383 Appendix C The Command Line .....................................................................................391 Appendix D Keyboard Shortcuts ....................................................................................399 Index ..............................................................................................................................427 Color Illustrations ..................................................................................... following page 212 vi Brief Contents CONTENTS IN DETAIL ACKNOWLEDGMENTS xvii INTRODUCTION xix What’s in This Book? ....................................................................................................... xx Who Is This Book For? ..................................................................................................... xx 1 INKSCAPE AND THE WORLD 1 1.1 What Vector Graphics Is and Why It Matters .............................................................. 1 1.2 What Can You Do with Inkscape? .............................................................................. 5 1.3 Sources of Inkscape Art ............................................................................................ 7 1.4 A Brief History of SVG .............................................................................................. 8 1.5 Inkscape and Its Competition ..................................................................................... 10 1.5.1 Adobe Illustrator ..................................................................................... 10 1.5.2 CorelDRAW ............................................................................................ 12 1.5.3 Xara ....................................................................................................... 13 1.5.4 . . . and Inkscape .................................................................................... 14 1.6 The Life of an Open Source Application ..................................................................... 15 2 AN INKSCAPE PRIMER 17 2.1 Installing Inkscape .................................................................................................... 17 2.2 Inkscape’s “Hello, World!” ........................................................................................ 19 2.3 Interface Overview ................................................................................................... 21 2.4 Panning and Zooming .............................................................................................. 23 2.5 Creating Objects ...................................................................................................... 23 2.6 Selecting ................................................................................................................. 26 2.7 Transforming ........................................................................................................... 27 2.8 Styling ..................................................................................................................... 29 2.9 Saving and Exporting ............................................................................................... 31 2.10 A Final Example ..................................................................................................... 32 3 SETTING UP AND MOVING AROUND 35 3.1 Preferences .............................................................................................................. 35 3.1.1 Inkscape Preferences ............................................................................... 36 3.1.2 Document Properties ................................................................................ 37 3.2 Document Templates ................................................................................................. 37 3.3 Keyboard Setup ....................................................................................................... 39 3.4 Page Setup .............................................................................................................. 39 3.4.1 Document Units ....................................................................................... 40 3.4.2 Background ............................................................................................ 40 3.4.3 Page Size ............................................................................................... 40 3.5 Instances, Documents, Views ..................................................................................... 41 3.6 The Document Window ............................................................................................ 42 3.6.1 Window Geometry .................................................................................. 43 3.7 Dialogs ................................................................................................................... 44 3.8 Basic Zooming ......................................................................................................... 45 3.9 The Zoom Tool ......................................................................................................... 46 3.10 Panning ................................................................................................................. 47 3.11 Rendering Modes ................................................................................................... 48 4 OBJECTS 51 4.1 Object Properties ..................................................................................................... 51 4.2 The Bounding Box .................................................................................................... 53 4.3 Z-Order ................................................................................................................... 55 4.4 Copying, Cutting, Pasting, and Duplicating ................................................................ 56 4.5 Groups .................................................................................................................... 57 4.5.1 Uses of Grouping .................................................................................... 58 4.5.2 Groups and Z-Order ............................................................................... 59 4.6 Layers ..................................................................................................................... 59 4.6.1 Layer Hierarchy ....................................................................................... 60 4.6.2 The Layer Menu ...................................................................................... 61 4.6.3 The Current Layer Indicator ...................................................................... 62 4.6.4 The Layers Dialog .................................................................................... 62 4.7 The XML Editor ......................................................................................................... 63 5 SELECTING 67 5.1 The Selection Cue ..................................................................................................... 67 5.2 Selection and the Status Bar ...................................................................................... 68 5.3 Subselection ............................................................................................................. 69 5.4 Selecting by Clicking: The Selector ............................................................................. 70 5.5 Selecting by Clicking: Other Tools .............................................................................. 71 5.6 Adding to a Selection ............................................................................................... 71 5.7 Selecting with the Rubber Band ................................................................................. 71 5.8 Touch Selection ........................................................................................................ 72 5.9 Selecting Objects from Underneath ............................................................................ 73 5.10 Selecting in Groups ................................................................................................ 74 5.11 Selecting with Keyboard Shortcuts ........................................................................... 75 5.12 Finding Objects ...................................................................................................... 76 5.13 Following Links ...................................................................................................... 78 5.14 Deselecting ............................................................................................................ 78 5.15 Selection Miscellany ............................................................................................... 79 6 TRANSFORMING 81 6.1 The Selector: Moving ................................................................................................ 81 6.2 The Selector: Scaling ................................................................................................ 83 6.3 The Selector: Rotating and Skewing ........................................................................... 84 6.4 Center of Rotation .................................................................................................... 85 viii Contents in Detail