How to Draw a Straight Line in GIMP
Drawing a perfectly straight line in GIMP is not obvious the first time. There is no dedicated line tool, but a simple trick with any paint brush gets you there in two clicks. For more precise or scalable lines, the Paths tool is the better approach.
Shift+Click for Straight Lines
This method works with the Paintbrush, Pencil, Eraser, and most other paint tools:
- Activate the Paintbrush (P) or any paint tool you want to use.
- Set your brush size, hardness, and color.
- Click once at the starting point of the line (do not drag).
- Hold Shift and click at the end point of the line.
GIMP draws a perfectly straight stroke between the two click points. The line takes on the current brush's size, hardness, and color. To continue drawing connected lines (a polyline), keep holding Shift and click each new endpoint.
Note: The first click places a single brush stamp. The Shift+click then draws from that stamp to the new point. If you do not want a dot at the start point, undo, draw on a separate layer with a thin brush, or use the Paths method instead.
Paths Tool for Precise Lines
The Paths tool (also called Bezier tool) creates vector lines that you can stroke with any brush settings:
- Press B to activate the Paths tool.
- Click at the start point, then click at the end point. Do not drag.
- Press Enter to finish the path.
- Go to Edit > Stroke Path.
- Set line width, style, and color in the dialog. Click Stroke.
The Paths method gives you control over exact line weight, dashed patterns, and line cap styles (round ends, square ends, etc.). The path itself is non-destructive until you stroke it - you can adjust the endpoint positions before committing.
Perfect Horizontal and Vertical Lines
When using the Shift+click method, hold Ctrl as well as Shift to constrain the line to 15-degree increments. This makes it easy to draw lines at exactly 0°, 45°, or 90° without eyeballing.
With the Paths tool, hold Ctrl while clicking the second point to constrain to horizontal, vertical, or 45-degree diagonal.
Drawing a Line with an Arrow Tip
GIMP does not have a built-in arrow tool, but the Script-Fu console has one. To add an arrowhead:
- Draw your line using the Paths method (so the path is still active).
- Go to Filters > Render > Arrows if you have the arrows script installed.
- Or go to Filters > Script-Fu > Console and run the
gimp-drawable-transformscript to manually build arrow geometry.
For most practical cases - diagrams, annotations, UI mockups - the cleanest approach is to draw the line with Shift+click on the line drawing method and then use the Pencil tool to hand-draw a small arrowhead at the end.
Quick Recap
- Fastest: click start point, hold Shift, click end point with any paint tool
- Precise: Paths tool (B) - click two points, Enter, then Edit > Stroke Path
- Hold Ctrl+Shift for exact 0/45/90-degree lines
Explore on GIMP.cc
Share this article: