Lesson: Basic Drawing Tools For this lesson we'll take a step back from photographs, and learn how to use the gimp for drawing. Let's start with a blank canvas: File->New. You can make it any size you want, but it might be best to give yourself some space, say 640x480 or larger. A New Image window will open up filled with the current background color. It's probably white, if you haven't changed it, and that's a good canvas color for practicing drawing, though you can use any color you like. PENCIL AND PAINTBRUSH The two main drawing tools are the Pencil (draws hard-edged lines) and the Paintbrush (draws fuzzy-edged lines). For both of these tools, you can change the width of the stroke by changing the "brush". The current brush is shown at the bottom right of the toolbox, just to the right of the foreground/background color swatches. It's probably a small black circle by default. Click on it, and the brushes dialog comes up (you can also get the dialog through the menus, File->Dialogs->Brushes). In gimp2, you can also change the brush through a dropdown menu in the Tool Options part of the toolbox. Some of the brushes are silly, like the pepper. But play around with what's there and get an idea what they all do. Go ahead and scribble! Try changing color, brush, and tool. STRAIGHT LINES What if you want to draw a straight line? That's easy: shift-click. Click once (without the shift key) where you want the line to start, move to the other end of the line, and hold down the shift key. Gimp will show you where the line will be: and when you click (still holding shift), it will draw a straight line, using the current tool, color, and brush. This might be a good time to mention guides. If you ever need to position something accurately -- a selection, a line you're drawing, or a layer -- if you click on the ruler to the left of the image, and drag right, out into the image, you'll see a line follows you. That's a guide. When you release the mouse button, the guide will stay where you put it (and if you need it at a specific location, just watch the coordinates in the lower left corner of the image window until the coordinates are what you want). Similarly, you can drag from the top ruler, down, to get a horizontal guide. You can make as many guides as you want. They're not part of the image: they're just hints to help you position things accurately. If you make a selection and drag near a guide, the selection will "snap to" the guide. This is especially helpful for positioning elliptical selections. OTHER LINE DRAWING TOOLS A few other line drawing tools: Airbrush draws fuzzy lines that get bigger if you stay in one place. Ink Pen draws with an asymmetric brush -- it's good for calligraphy. Both these tools also respond to pressure if you have special hardware like a drawing tablet. Eraser: erases to the background color (or to transparent, if the layer you're drawing on has transparency). Finally, you can clear (erase) an area by selecting it, using any selection tool, then doing Edit->Clear. This is bound to Ctrl-K (like "clear to end of line" in the shell, emacs or most other linux programs) and I find I use it often enough that I usually use the key binding rather than the menus. Drawing, like most things in gimp, is undoable. If you've been scribbling away trying out some of these things, try undoing now: hit ctrl-Z repeatedly and watch your lines and squiggles disappear one by one, until you hit the limit of Gimp's Undo buffer. (This is configurable: in File->Preferences there's a setting for the size of the undo stack. Larger means more room for correcting oopses, but gimp will take up more memory.) FILLING AN AREA Most of the time, the Bucket Fill tool is the one to use when you want a filled shape, like a circle or rectangle. First make a selection where you want the shape to be, using the rectangle or ellipse selection tool from lesson 4. You might even want to try the free select tool -- also known as the "Lasso tool" for its icon in the toolbox. This lets you make a selection of any shape, as long as you can draw it in one go without releasing the mouse button. You can even use free select to cut out shapes or people from an image -- but there are easier ways of doing that, as we'll discuss in a later lesson. Then select Bucket Fill -- it looks like it's pouring paint from a paint can -- and click inside the selection. It should fill with the foreground color. Bucket Fill has some interesting options, though. First, you can "fill whole selection" or "fill similar colors". "Whole selection" is obvious, and is most often what you want. "Similar colors" is a bit trickier: you can click on a pixel in a photograph, and bucket fill will try to fill nearby colors that are "similar enough" to the place where you clicked. You can adjust how similar they need to be with the Threshold slider. This can do strange things to your image; try it, if you have a photo loaded in gimp, but don't be surprised if you have to Undo. In addition, you can also bucket fill with a pattern. Try it now: click Pattern Fill in the tool options dialog, select an area in the image, then click inside it. The currently chosen pattern is shown in a little square in the toolbox, just to the right of the active brush. Clicking on it brings up the Patterns dialog, where you can choose from a wide selection. Try some of them! Click on a pattern in the Patterns dialog (notice that the active pattern shown in the toolbox changes), then go back to the image and click on your selection again. ERASING Two final tools left to mention. One is the eraser (located near the paintbrush), which does the obvious. The other is that whenever you have something selected, you can Edit->Cut or Edit->Clear to erase the whole selection. (The difference is that Cut copies it so that you can paste it later, whereas Clear just erases it.) Here's the image I have left after scribbling around while writing this lesson. It looks like something a five-year-old made with Tux Paint. :-) http://shallowsky.com/images/gimpcourse/lesson5/mittenfault-draw.jpg DRAWING ON TOP OF IMAGES For this lesson, we started with a blank canvas. But you can draw on top of a photo, too! For instance, how about cartoon thought bubbles, like Poppy's cat had in Lesson 4? First I start with a photo: http://shallowsky.com/images/gimpcourse/lesson5/coots.jpg Next I want some text, because I can't make the thought bubble until I know how big the text is going to be. I'll go ahead and make it in black even though that doesn't show up, since I'm going to use a white bubble. I won't bother to save an intermediate showing that, because you can't really read the text anyway. Now I'll make a new layer to hold my thought bubble. I very strongly recommend that you make a new layer for any drawing you do on top of an existing image. Any drawing you do in this layer will be optional: if you erase, you'll erase your drawing, not the original image, and if you decide you don't like your drawing, you can throw it all away and the image underneath will be fine. Go to the Layers dialog, and click the New Layer button. The new layer needs to be transparent (which should be the default). In the "Create a New Layer" dialog, I'll change the layer name to be "thought bubble" so it will be easy to remember which layer is which. You don't have to name your layer, but it will make things easier later when you make image with lots of layers. I click OK, and the new layer is created. But here's a slightly tricky part: I need the thought bubble to be underneath the text, not on top of it. The bubble layer needs to be in between the Background and the text layer. Right now, the thought bubble is on top, and if I draw a white area on it, that white area will hide the text behind it. I solve this by clicking the down arrow button in the Layers dialog to move the "thought bubble" layer down. The down and up arrows always move the currently selected layer. I'm finally ready to draw! I'll make my bubble oval: I use the elliptical selection tool until I have an oval just the right size. Then switch to the bucket fill tool, set the color to white (or pick "BG color fill" if the background color is already white), and click inside the oval but not on top of the text. Voila! A white thought bubble layer under the text. Now it looks like this: http://shallowsky.com/images/gimpcourse/lesson5/coots-bubble.jpg Notice that the text isn't really centered on the bubble? It's fairly difficult to control exactly where an elliptical selection will end up, but that's okay: all I have to do is switch to the move tool, and drag that layer around until I'm happy with its placement. I'm not quite done yet, though. I still need some dots to link the thought bubble to the coot doing the thinking. I can either make another new layer for that, or draw it on the thought bubble layer. I'm going to make a new layer for it. Why? (1) it means I can change to a different shaped thought bubble layer, and (2) it means I can change my mind later about which bird is doing the thinking, and replace just that part. It isn't critical whether this new layer is above or below the thought bubble layer or text layer, because it won't overlap with either one of them. It's only when layers overlap that you need to worry about which one is on top. On this new layer (I called it "bubbles") I'll make several small circular selections and fill them each with white: http://shallowsky.com/images/gimpcourse/lesson5/coots-allbubbles.jpg But there's still something missing. The small bubbles are hard to see against that busy background. Okay, class, what do we do when we want to make something stand out? You, there in the second row. That's right! A drop shadow! I make a drop shadow on the thought bubble layer, and another one on the bubbles layer. I ended up with 6 layers. Here's what my layers dialog looks like now (GIMP can take a screen shot of any window, with File->Aquire->Screen Shot, then click on the window): http://shallowsky.com/images/gimpcourse/lesson5/layersdialog.jpg Don't forget to save your image as .xcf as well as a .jpg! That way you can go back and make changes to any of these layers at any time. http://shallowsky.com/images/gimpcourse/lesson5/coots-done.jpg Homework: either a drawing on a blank canvas, or something drawn on top of an existing image. Be silly! Be creative! Have fun! Next lesson: Removing unwanted objects from photos.