How to Stroke Paths with Dashes in GIMP

This guide explains how to configure stroke path settings in GIMP to render custom dotted and dashed lines along any vector path. By accessing GIMP’s advanced line style options within the Stroke Path menu, you can precisely control dash lengths, spacing, cap styles, and corner joins to create clean vector-based line effects.

Step 1: Create or Select Your Path

  1. Select the Paths Tool from the Toolbox (shortcut: B).
  2. Click on the canvas to place anchor points and draw your path.
  3. Open the Paths Dialog (Windows > Dockable Dialogs > Paths) to ensure your target path is active and visible.

Step 2: Open the Stroke Path Dialog

  1. Go to the top menu and select Edit > Stroke Path..., or click the Paint along the path icon at the bottom of the Paths dialog.
  2. In the Stroke Path dialog box, select the Stroke line radio button.

Step 3: Configure Line Width and Basic Style

  1. Set the Line width to your desired thickness in pixels.
  2. Choose your color source by selecting either Solid color (uses the current Foreground color) or Pattern.

Step 4: Expand Line Style Settings

Click the + icon next to Line Style to expand the advanced stroke settings.

Key Settings to Adjust:

  • Cap Style: Determines the appearance of the ends of individual dashes or dots:
    • Butt: Cuts the line ends flat at the endpoint.
    • Round: Creates rounded ends (essential for creating circular dots).
    • Square: Extends square ends past the endpoint.
  • Join Style: Controls how corners appear (Miter, Round, or Bevel).
  • Dash Preset: Choose from a list of pre-configured patterns, such as Dotted, Medium Dashes, or Dash Dot.

Step 5: Customize Dash and Dot Spacing

To manually define a dotted or dashed pattern:

  1. Look at the interactive Dash pattern box at the bottom of the Line Style section.
  2. Click inside the white and black segments to add, remove, or resize dashes (black) and gaps (white).
  3. To make a true dotted line:
    • Set Cap Style to Round.
    • Set the dash length to a very short segment (or a single pixel) and expand the spacing segment to allow enough room between round caps.
  4. To make a standard dashed line:
    • Set Cap Style to Butt or Square.
    • Adjust the length of the black segments for longer dashes and white segments for wider gaps.

Step 6: Apply the Stroke

  1. Ensure your active layer is the layer where you want the stroked line to appear.
  2. Click the Stroke button. GIMP will immediately render the dashed or dotted pattern along the active path.