Welcome to Installment 2 of Creating and Using Paths. You can find Part 1 here: Creating & Using Paths part 1
Today, we'll cover the second way to create a path (Converting a Selection to a Path) and how to modify the selection to create some great results.
A couple of days ago, board member, capnhud, asked about an easy way to create a rectangle that had only a couple of the corners rounded. See this thread for the request: http://gimptalk.com/topic.php?a=v&t=547&f=2
At the time, I recommended using paths, but was unable to offer the steps in creating it. Since that time, capnhud has resolved his question, but I am now prepared to provide the steps.
But before we get into that, let's talk a bit about the paths dialog box. I left off a discussion of that in our last installment, as I felt I may have been giving you too much at one time. Right now, it's very appropriate. Paths Dialog Box
Because you should be an advanced user, I won't discuss every button, but I did want to show you to very important tools and what a path component looks like (these were briefly discussed in the first installment).
The Selection to Path button (you can also use Select | To Path), will convert ANY
selection into a path for further modification. Once modified, the path must be converted back into a selection (using the Path to Selection button, of course) in the Paths Dialog Box.EDIT: Also note the 2 paths in the above screenshot. Each path contains more than one set of lines and/or closed polygons. These are referred to as components.
Let's create a rectangle with two rounded corners. Capnhud, this example's for you!
- Create a new document (I'm using 500X125)
- Add a new layer above
- Grab the rectangle selection tool and create a selection like in my example
- Convert selection to a path using the button in the path dialog box or by Select | To Path menu
- Turn on the path (click the eye button) in the path dialog box
- Get the paths tool and click on the path in the Image window to show the anchors (The cursor will turn into a hand pointing to the left indicating that you're about the select the path)
- Add anchors (Ctrl-click) as shown
- Delete corner anchors (Ctrl-Shft-click) as shown
- Convert path to selection (path dialog button or menu) ? If you hover over the path to selection button, it will give you some additional options. I used the intersection option (Shft-Ctrl-click) NOTE: You do this on the button itself, not on the path. Corners are now removed.
- Turn off the path layer and return to the layers section of the dialog box.
- With the rounded selection still active, grab your bucket tool and fill it with any color you want.
VIOLA! You've created a round cornered rectangle.
Now, let's move on to some text manipulation.
Techyon really likes using text in his graphics. But none of the standard fonts really look like he wants them to. What's the poor guy to do? Give up? Not a chance. We've got the mighty paths tool to accomplish this task.
- Open a new document
- Grab the text tool and type out some something. I'm using ?Techyon"
- I've added some guidelines for placement purposes, because paths will snap to guidelines just like the other GIMP tools.
- Alpha to Selection on the text layer to get the text outline
- Convert the selection to a path
- Grab the path tool and activate the path so we can see the anchors.
- Grab the anchors like I've done and move them to your hearts content.
- Once you're done, convert the path to a selection and fill the selection with color.
Walah! Techyon has the text looking like he's always wanted it to!
Here's what the final version looks like after I cleaned it up a bit:
Well, that's all for now. Let me know how you're doing. Aren't paths great?!
To go to the final installment of Creating and Using Paths, click here: Creating and Using Paths Part 3