Understanding Compound Paths in Inkpad

by Lindsay in Features

When using Inkpad’s many tools you may happen across a rather curious vector shape. One that appears to be more than one shape, but is strangely linked! It may have mysterious holes in it, do peculiar things in relation to shapes around it, or just stubbornly refuse to change stroke or fill colour without affecting other elements!

All sounds rather bizarre right? Well rest assured everything is working just as it should and these rather magical shapes are called compound paths.

A compound path is a selection of paths that have been linked. There are several places you can create a compound path, whether you meant to or not. In the Path Menu compound paths can be created when using the Outline Stroke, Combine Paths, Subtract Front or Create Outlines from Text operations. I will cover how each of these work in my Path Menu videos. You can also create a compound path when using the Eraser Tool from the Tools Menu.

For now we’ll look at what a compound path is and how they work.

The basics

A compound path is a collection of paths that through one process or another have been combined to create subpaths. You may notice the shapes share certain attributes, like stroke colour and width, but are also independently editable and moveable. Compound paths are often used to create shapes with holes, but if you let your imagination run wild they can make very interesting compositions.

Path direction

The first thing to know is that paths have a direction! If I create two rectangles with the pen tool, the first in a clockwise direction and the second in an anticlockwise direction, they may look the same on the surface, but they have different directions.

In the fantastical world of vectors, there are times when this direction is important. So important in fact that in the Path Menu there is a Reverse Path Direction option, which will reverse your path direction should you ever find it is going the wrong way!

In compound paths the direction of your subpaths changes the way they behave. Overlapping subpaths of the same direction will all share a fill colour, while overlapping subpaths of opposite direction will result in a hole.

Shared properties

A compound path will share shadow, opacity, stroke and fill properties, no matter how many subpaths it contains. Even if you think you only have one subpath selected any changes you make will be applied to all subpaths in that compound path.

Deleting, Copying and Pasting Compound Paths

When you delete a compound path only the paths that are selected will be removed. So if I select and delete the outer path of this shape, the remaining smaller circles will remain and will still be linked.

When copying a compound path all subpaths will be copied, even if you only select one path. So, if I select the outer ring of this compound path and use copy, then move to a different layer and paste it the entire compound path will be pasted. The same will happen if I duplicate my compound path.

Moving compound paths

The position and anchors of each subpath that makes up a compound path remain individually editable. The means you can change the shape, size or position of any subpath.

To manipulate an individual subpath you need to select that specific path. If a fill colour is applied to your compound path, tapping it will result in all subpaths being selected.

To move the compound path as one you need to ensure all subpaths are selected. So in the case of this letter ‘P’ just grabbing the outer shape will leave the inner path behind! This can be a lot of fun when working with some shapes, but in the case of a letter it is best to make sure everything is selected before moving.

That’s not to say you can’t move just one subpath at a time. Overlapping subpaths can be used to create all sorts of weird and wonderful shapes. As you can see parts of a subpath that no longer intersects another subpath will suddenly appear filled.

I will cover creating and editing compound paths more in my Path Menu Videos, but for now if you encounter one of these magical shapes, have fun and know you haven’t broken anything!