How to create tile-perfect diagonal lines in Illustrator

Creating diagonal lines in Adobe Illustrator is somewhat of a pain.  I'm creating the graphics for our new Web 2.0 site, and had a hard time creating diagonal lines.  But here I'll show you how to create angled 45deg Web 2.0 lines in Illustrator with relative ease.

 

First, turn snap to grid on.

 image

Select the line tool, set the stroke width to 5pt (or your desired width).

image

Make sure your stroke color is the color you want it.  In this example, my stroke color is black.  Next, on the canvas, draw a diagonal line that is slightly larger than the major grid box.

image

image

Next, Move-Copy the line 12px away from the first line.

image

image

Hit the copy button.  Once your copy appears on the canvas, press CTRL-D to repeat.  You need to repeat until you have a major grid completely covered.  Like so:

image

Next, select all the diagonals then go to Object>Path>Outline Stroke as shown below:

image

image

image

Next, draw a square (with no fill and no stroke) as the same size of a major grid box (72px by 72px) and place it over the covered major grid like this:

image

Your square should be 72px width and height.  Next, select all, and click Divide on your Path Finder as shown below:

image

image

image

Ungroup and cut the excess diagonals from the major square:

image

image

image

Now you should have a nice cut pattern like the one above.  Select your pattern and drag it to your swatches.  Once you see your pattern in your swatches palette you can then use the swatch and apply a fill to your irregular pattern and archive the following results:

image

Pretty cool! :)  Hope that helps! happy0122.gif

Helpful Tip:

If you want to apply a radial gradient or a fill color to your stripes, you'll notice that this method wont work.  But to make it work, you just need to continue a little more.  Select the original pattern you created:

image

Next, Merge:

image

(This effectively merges the original invisible (no stroke no fill) square with your diagonals.)

If you choose to stop here, you'll notice the pattern diagonals still act like individual objects when a fill is applied, and you get something like a diamond shape when applying a radial gradient:

image

To unify the stripes as a single object do the following (and ultimately, have the gradient applied to the diagonals as a whole, instead of individually), Ungroup:

image

Then Add Shape Area in your path finder tools:

image

Then click Expand:

image

Now you have the gradient applied to the whole shape instead of each individual diagonal line:

image

There we go!  Hope that helps!

Comments

# re: How to create tile-perfect diagonal lines in Illustrator
Gravatar thank you so much!!! this really worked wonders!
Left by AMANDA on 8/12/2008 8:58 AM
# re: How to create tile-perfect diagonal lines in Illustrator
Gravatar thank you soo much!!
it was quick and easy. thanks for sharing! :)
Left by Fran on 10/12/2008 5:18 AM
# re: How to create tile-perfect diagonal lines in Illustrator
Gravatar nice tutorial, thanks!
The only problem is that the pattern doesn't align any more if I choose thicker lines or wider spaces than you, does it?
Any idea what to do in that case?
Left by Matt on 1/5/2009 8:01 AM
# re: How to create tile-perfect diagonal lines in Illustrator
Gravatar Very Thanks ! I needed it
Left by Boboss on 1/18/2009 7:27 AM
# re: How to create tile-perfect diagonal lines in Illustrator
Gravatar I'm going to try this with circles. How do I do this...I have two circles, one with the pattern and one without. I want to overlap the circles, how do you get the effect where just the overlap has the diagonal lines, and 2)in another illustration the area that is not overlapped just shows the lines?
Left by Margaret on 3/2/2009 9:52 AM
# re: How to create tile-perfect diagonal lines in Illustrator
Gravatar Thanks mate, helped a lot!
Left by AZN on 4/30/2009 1:57 PM
# re: How to create tile-perfect diagonal lines in Illustrator
Gravatar Hey! this is great, thanks!
Can It be done using type? so you fill the font shapes with lines instead of the box?
Left by ben on 7/1/2009 7:58 AM

Leave Your Comment

Title*
Name*
Email (never displayed)
 (will show your gravatar)
Url
Comment*

Please add 2 and 5 and type the answer here:

Preview Your Comment.