December 6, 1998

Giving Lines an Outline
Creating roads for a map or glowing neon effects

This tip describes how to give a basic or dashed line an outline color. This could come in handy when creating maps and want to make roads or even make a line "bolder" in appearance by giving it an outline to accentuate it more.

Version: Any

 
 


This is a fairly easy way to give a line an outline. The first thing you want to make sure is that your document measurement is set to Points.

First you are going to want to draw a line of any weight, above I created a 1pt line. This can be either straight or curvy. This will be the outline for the final line so give it a Black color. Example zoomed in.

Next Clone this line and give it a different color. I used Yellow in the above example.

Now you need to use a little math to figure out how wide to make the underlying Black line. I created a 1pt line originally and I want to have a .5pt outline around the original line. Since you'll have a .5pt line on all sides of the line you'd double that and add 1pt (Original line width) to the total. This means that you'll want to give the original Black line a 2pt line width so that there will be a .5pt outline. Here's the equation I would use for my example:

.5

x  2  + 

1

=

2

outline width

 

original line width

 

new line width for underlying line

I probably made it sound more complicated than it really is, but I just wanted to make sure that you understand it even if you aren't using Points as you're document measurement.

 

Now you want to select the Black line behind the Yellow line. In the Inspector palette, give it the new line width you came up with from the formula above, here I would use a 2pt stroke width. Now you should have a .5pt outline on the top and bottom of the Yellow line like the above example.

You can also give the line a different Cap option for other line types. The default is the Butt Cap option seen on the example above. At right are the other options and what they look like.

  Butt Cap

  Round Cap

  Square Cap

 

You can also use the above techniques for dashed lines that are either straight or curvy. At right are several examples of what a dashed line may look like with different Cap options.

  Butt Cap

  Round Cap

  Square Cap

 

When you get the basics down you can use variations of this technique to create other effects such as Glowing Neon Piping for example. Above I used a very thick 12pt Black line and about a 2pt colored line. Then I gave them both a Round Cap and Blended them together.