Following a long-running thread on the Adobe Illustrator forum [click here to read], it emerged that there are different methods to measure the area of a vector path within Illustrator. It was interesting to see that each approach was different – and free – and included a plugin and a hidden window within Illustrator intended for debugging by the development team. Each of the two methods has it own advantages, but both have the same disadvantage; they can only provide a result for simple paths – not compound paths, clipped paths, etc.
In this tip, we’ll have a look at both previously-disclosed methods plus a third option making unique use of Phantasm CS Publisher’s advanced Ink Coverage tool which caters for all object types, including compound paths, editable text, groups and even images!
- Each method detailed here is available right up to Illustrator CS5 on both Windows and Mac.
- Astute Graphics does not provide warranty or support for the non-Phantasm CS Publisher methods provided here. Astute Graphics accepts no responsibility whatsoever for any loss or damage resulting in the use of these methods.
Telegraphics PathArea Filter
Toby Thain of Teleghraphics has kindly produced a series of free Photoshop and Illustrator plugins. The one entitled PathArea Filter is the one we’ll be looking at here.
This Filter is accessed via the Filter menu. In Illustrator CS3 and below, the Filter menu could be found at the top level (File… Edit… Object… etc.). However, since the release of Illustrator CS4, if a 3rd party Filter plugin is installed (such as this PathArea Filter or our very own Phantasm CS) Adobe moved this to become a sub-menu of Object as may be seen below:
Again, having selected a single non-compound path and opting for, the following information window will be displayed:
It’s interesting to note that not only is path’s area provided, but also the path’s perimeter length which can prove equally useful.
Note: if a compound path is selected, this Filter will return the total area as if the two (or more) paths that form the shape were separate.
Illustrator debugging window
This is where things become a little less official. The Illustrator debugging window was revealed by Teri Pettit, probably the longest serving Illustrator developer, in the Illustrator forum posting. It’s critical that before using this method, you understand that this was never intended for general use by the public, so it’s essential that you save your document before trying it out.
First select a single path. The debugging window is then accessed on the Mac by pressing. On later Mac keyboards where the volume button also features on the key, you may also need to hold down the key at the same time! With Windows, the keypress is an equally impressive combination of . Enlarge the debugging window and click on the bold path text right at the bottom. The information of the path object (most of it obscure) which contains the path’s length and area in point units is displayed as below:
We’ve not covered this method in greater detail as the IllustratorHints website has done just that.
Phantasm CS Publisher
Both previously mentioned solutions are free and do exactly what they’re intended for when it comes to single paths. For the majority of situations, this is likely to be all that’s required and the results are accurate and very easy to access. However, they are more restricted when it comes to compound paths (it’s possible that compound paths which don’t intersect such as the letter “O” could be calculated manually) and can’t perform the task on all other object types.
The method about to be outlined makes use of Phantasm CS Publisher’s more advanced Ink Coverage menu where numeric area values are returned for each ink present in the artwork. This tool will be used to gain area information for any kind of embedded object within the Illustrator document. We’ll be using the following simple example of the letter “E” (which is still editable text – not outlined) plus an underlying image where we want to add the image’s areas of color, but not the background white, into the result:
It’s important to remember that this doesn’t form the Ink Coverage tool’s intended purpose so the process is longer than the previously described methods. Also, the Ink Coverage tool provides approximate results and is not as accurate on simple single paths as the previous methods.
Steps to follow:
- Using the Swatches panel, create a new spot color, naming it “Area” and giving it any arbitrary CMYK, RGB or other color value (the color defined really doesn’t matter) as shown below:
- Select the object(s) you wish to measure. This can include all object types and the calculation will also take into account the area occupied by strokes/outlines without first expanding. Then group these together if more than object has been selected.
- With the object or group selected, open Phantasm CS’ Duotone live Effect tool via .
- Click on the default orange tone’s color square to open the window.
- Click on the button (below the button) to toggle to a list of the colors and spot colors defined in the document’s Swatches panel.
- Select the “Area” spot color previously defined and the window to return to the Duotone tool.
- Click on the Duotone curve at the 5% value and drag the new curve node to the top of the graph, or manually enter a value of 100% as shown below:
- the Duotone window. This results in artwork where all areas of color are now represented as a solid tint of the “Area” spot color as shown below:
- Now it’s possible to gain the area result from the Phantasm CS Publisher Ink Coverage tool which is opened by following . The Ink Coverage window in Phantasm CS Publisher provides the approximate area results for each ink; for this exercise we’re looking for the “Area” ink value as highlighted below:
It’s possible to display the value in alternative units by using the associated pull-down menu. The results (which would also include any other ink present) can then be copied as plain text to the clipboard by clicking on the values result box and pressing(Mac) or (Windows).
If this operation is to be repeated, it’s possible to define the Duotone as a Graphic Style which can then be instantly re-applied cutting out stages 3-8. Alternatively, you may find that rather than applying a Duotone to produce a spot color tint of the selected objects, it may be simply sufficient to use the Swatches panel to apply a fill and/or stroke with the “Area” spot color, which again would replace stages 3-8.
We hope that this method is of some use!