Stroking Open Paths with Custom Dashes in GIMP

Stroking an open path using the "Stroke line" option with custom dash patterns in GIMP applies a repetitive sequence of alternating dashes and gaps directly along the path's vector trajectory onto the active layer. Because the path is open, the pattern begins at the starting anchor point and follows the path segments sequentially to the endpoint, terminating abruptly if the path length does not evenly divide by the pattern's repeat interval.

Path Trajectory and Pattern Progression

When you initiate the stroke via Edit > Stroke Path and select Stroke line, GIMP converts the mathematical curve of the open path into a rasterized line. If you define a custom dash pattern in the Line Style dropdown, GIMP reads the pattern grid from left to right. The stroke begins precisely at the first control point of the open path, starting with the first dash block defined in your pattern.

As the stroke advances along the coordinates of the path, GIMP repeats the sequence of filled dashes and empty spaces. Unlike closed paths, which loop continuously, an open path has distinct terminal boundaries.

Endpoint Termination and Truncation

Because an open path does not loop, the custom dash pattern will not automatically compress or stretch to fit the total length of the line. Instead, the behavior at the final anchor point depends strictly on the total length of the path relative to your dash cycle:

  • Mid-dash completion: If the path ends during a dash segment, the line cuts off at the final anchor point.
  • Mid-gap completion: If the path terminates during an empty interval, the stroke ends prematurely, leaving empty space between the last visible dash and the final anchor.

Cap and Join Interactions

The appearance of each dash along the open path is dictated by the selected Cap style and Join style:

  • Butt Caps: Cuts each dash off squarely at the dash boundary without extending beyond the defined length.
  • Round Caps: Adds a semicircular cap to both ends of every individual dash, including the start and end of the open path, which effectively elongates the dashes and narrows the gaps.
  • Square Caps: Adds a square extension to both ends of every dash equal to half the line width.
  • Joins (Miter, Round, Bevel): Dictate how dashes render when passing over sharp angles or corner nodes within the open path.

Final Output

The resulting stroke is painted directly onto the currently selected drawable layer using the active foreground color (or pattern, if selected). GIMP applies antialiasing to smooth the curved or diagonal edges of both the dashes and the line caps, resulting in a clean, non-destructive overlay that leaves the original vector path intact for future editing.