Advertisement

## What is the difference between a path and a stroke?

### Question

Is a path the set of points from a to b? And is the stroke the "definition" (i.e. the color, shape, etc.) of the path?

And, how can you have a path with no stroke? Is this only because it is a computer drawing program? In the real world you can't have a path without a stroke can you?

If it matters, I am using Inkscape.

2016/06/10
1
8
6/10/2016 7:19:00 PM

### Accepted Answer

A path, as you said, is a set of points. It is a set of coordinates that define a shape. The path itself is only a set of numbers, a mathematical definition, nothing more. Anything you see on your screen is a visual representation of that path.

A stroke is a visual attribute that you can apply to a path. A stroke can have a defined width, color or a number of other properties. A stroke is a visual effect that is attached to the path.

You can have a path without a stroke, but you can't have a stroke without a path.

2016/06/17
12
6/17/2016 5:44:00 PM

You're on the right track, but missing the mark a bit. Adobe defines paths as follows:

A path consists of segments and vertices. Segments are the lines or curves that connect vertices. Vertices define where each segment of a path starts and ends. Some Adobe applications use the terms anchor point and path point to refer to a vertex.

Essentially, a path is a line that connects anchor points. Paths can be open (e.g. a straight line) or they can be closed, to make a shape. Closed paths do not need to be filled with color, I think this is where you are confusing stroke with fill.

A stroke, on the other hand, is simply a line that follows your path. Strokes can be set to the inside, middle, or outside of your path and may vary in thickness, color, style, etc.

To answer your question about paths in the real world: no, they don't exist in the same sense as they do in computer graphics.

The best example I could give you of a real-world representation of paths would be to imagine your path as a stencil. You can either trace around the edge of that stencil (stroke) or you can color the stencil in completely (fill).

2016/06/13