GIMP is a great tool for creating digital artwork, but it’s always a good idea to learn the basics before you start working on your masterpiece. Most of GIMP’s drawing tools are brush-based and share the same basic settings and options, so this little tutorial can be used with any tool from the Paintbrush to the Clone tool.
Note: There isn’t a “line tool” in GIMP.
The Quick Guide to Drawing Straight Lines in GIMP
There’s a simple trick to drawing perfectly straight lines with your brushes: the Shift key. Here’s how to use it:
Step 1: Select and customize your brush, then click once on your image to set the first point on your straight line.
Step 2: Hold down the Shift key and click again to set the second point of your line. GIMP will automatically fill the space between the two points in a perfectly straight line using your chosen brush settings.
You can keep going from point to point, creating as many as you want, as long as you keep holding down the Shift key. This isn’t as precise as the more advanced Paths method explained below, but it’s fast and easy, which makes it very handy for smaller adjustments where pixel-perfect precision doesn’t matter.
Drawing Straight Lines in GIMP Using Paths
If you want a bit more control over your final result, you can use the Paths tool to plan out your line in advance. Despite what you might expect from other programs, the Paths tool doesn’t let you draw vector shapes, exactly, but you can use the paths it creates to draw a series of connected lines all at once. Here’s how to do it:
Step 1: Select the Paths tool from the toolbox or press the keyboard shortcut B.
Step 2: In the Tool Options panel, check to make sure that the Edit Mode is set to Design, or you won’t be able to draw any new points for your path.
Step 3: Click on your image to set the first point of your line, and then repeat until you’ve drawn out the exact path you want.
Step 4: Select the Stroke Path button in the Tool Options panel, and GIMP will display the Stroke Path options dialog box shown below.
At this point, you’ve obviously got a few options. You can tell GIMP to use the Stroke line function the way it does by default, or you can tell it to Stroke with a paint tool which gives you all the capabilities of the quick “Shift key method” I described earlier in the post.
If you choose Stroke line, you can set the Line width as well as a whole slew of other options by expanding the Line Style section.
This lets you set how the ends of lines appear, how GIMP should draw corners, and optionally choose to create a dashed line from a range of presets or customize your own. Selecting the Stroke with a paint tool option gives you a lot more flexibility, although it doesn’t always create perfectly crisp lines the way the Stroke line option does.
Select the tool you want to use from the dropdown list, and the Stroke with a paint tool feature will use the current settings for that tool.
The biggest advantage to using the Paths tool is that you can adjust the points along the path before you actually commit to drawing anything, which can be very useful for planning out a series of strokes.
The paths you create can also be used again and again, letting you create exact copies of a line with different colors or brush properties. Move them around, rotate them, and then you can use them again.
Last but definitely not least, you can also create and save multiple paths within your image, and switch between them using the Paths panel, which is located in a tabbed array next to the Layers panel in the bottom right corner of the GIMP interface.
Tweaking Your Brush Settings
GIMP’s brush settings are wonderfully thorough, allowing you to create a huge range of different effects. But when you’re using an autofill technique like either of the line drawing options I mentioned earlier, there is one key setting that can have a huge impact on your line: Spacing.
When GIMP draws with a brush, it’s essentially ‘stamping’ the shape of that brush repeatedly onto your image for as long as you hold down the mouse button.
The Spacing setting controls how often that stamp is applied, and different settings can create anything from a smooth-edged line to individually-spaced stamps as distinct shapes like those found in a dashed line.
Most of the time, you’ll want to have your spacing setting set to the lowest value possible, which creates a solid line from point to point, but you can create some interesting effects by playing around with the values, as you can see in the example below.
I think that covers the most important points of how to draw straight lines in GIMP! Everyone has their own workflow, but I think these are the best possible options. Do you have a method you love that I left out? Let us know in the comments and I’ll give it a try!
About Thomas Boldt
Walt Borovkoff
“…For perfectly horizontal or vertical lines…”
Thats genus, why didn’t think of that, I guess you can teach an old dog… Plus I used the ends,(corners) for arrows.
Thank you
Troy Richards
Hi Thomas,
thanks for the tutorials. Is there a way to make perfectly horizontal and vertical lines?
– Troy
Thomas Boldt
Hi Troy,
For perfectly horizontal or vertical lines, there are a couple of ways to do it, but your best bet is probably to use the Rectangle Select Tool to create the shape of your line, and then fill it with the Bucket Fill tool (or simply paint it in with a brush). If you need to use a brushstroke along your line, you could turn your rectangular selection into a path, and then stroke the path with a brush tool.
I hope that helps!