Did you see...

Creating Dashed and Dotted Lines in Photoshop

The more I play around with Photoshop CS6, the more I like all the great new capabilities that have been added to this amazing program. Did you know, that in Photoshop CS6, shape layers are a thing of the past, replaced in their entirety by vector layers? This is a tremendously powerful feature, which we will explore in detail over many tutorials in the future. For today, we’ll focus on a small new feature, but one which solves a big problem that has existed forever in Photoshop – how to create a dashed or dotted line.

Since the brush engine was revamp0ed back in Photoshop 7.0, it has been possible to create some versions of dotted lines using some trickery, brush tip shapes, and brush engine presets. That’s way too complicated, and it is now officially kicked to the curb in favor of using the new vector layers in Photoshop CS6. Vectors in Photoshop, much as in its sister program Illustrator, now have a fill and a stroke, and that gives us an amazing amount of flexibility compared to the previous shape layers.

Let’s take a look. We’ll start with this document, and add an oval shape using the ellipse tool. All the settings are at their default at this point:

DashedLines-01

Notice right away the two areas I’ve highlighted: The toolbar, which is completely revamped compared to CS5, and the Layers Panel, which now shows the ellipse as a Vector Layer rather than the shape layer with a fill and vector mask as in the previous version.

We’ll take a close look at the toolbar to begin. The preset picker works the same way as before, and the previous three icons for “shape layer,” “path”,” and “fill pixels” are now changed to a dropdown list. Notice that in this example, we’re using “Shape,” which is necessary for the next steps to work:

DashedLines-02

From here on, things start to get really good. The next two sections of the toolbar are completely new, and for anyone who has used vector illustration programs, these will be a welcome sight: a Fill and Stroke dropdown list, with a size setting for the stroke. We can drop down the Fill swatch to choose a different solid fill color, a gradient fill, a pattern fill, or we can choose None. Since we’re going to focus on the stroke in this exercise, we’ll choose None:

DashedLines-03

Now, the shape has no fill or stroke – the path is still visible because the layer is selected:

DashedLines-04

Let’s add a stroke. We’ll use a high contrast color so we can see it well. We’ll drop down the stroke swatch, and choose a yellow color. We’ll leave the default size of 3 pt selected:

DashedLines-05

Now that we have a stroke, we can start to add special effects to the stroke itself. Moving just to the right, we have the Line Type drop down box. We can see immediately that we have the ability to change to a dashed or dotted line simply by choosing the presets. Here’s a dashed line, straight out of the canned preset:

DashedLines-06

Likewise, a dotted line is just a click away:

DashedLines-07

But wait, there’s more! (There usually is, in Photoshop). We can change the appearance of the dashed lines, customize and save our own presets. We’ll skip right over the three drop-down lists for Align, Caps, and Corners, because we’ll find them and more in the More Options… dialog – click the button at the bottom of the panel and see:

DashedLines-08

Within the Stroke options, we have the same three drop down lists for Align, Caps and Corners… except, in this dialog, they have descriptions. This can be a good thing, because the tiny icons in the previous box may be a little hard to discern until you’ve used them a few times. Here, you get the hint. For example, the Align parameter can be set to align the stroke inside the path (default), centered on the path, or outside the path. The changes are viewable in real time, so as soon as you make the change you can see the results without leaving the dialog:

DashedLines-09

We’ll change it to Center and move on to the section at the bottom – we’ll come back to Caps and Corners in a moment. The bottom section includes a checkbox for Dashed Line – when you create presets, this needs to be checked to enable the parameters just underneath. Here’s where the magic happens – you can create three different dashes and gaps between the dashes for any dashed line. How does this work? Let’s change the parameters, like so:

DashedLines-10

This creates a dash of length 4, with a gap of length 2, and another dash of length 1, followed by a gap of two. The pattern then repeats. The result is a pattern of alternating long and short dashes, with rounded ends:

DashedLines-11

Now, you might wonder, the short dashes of length 1 seem to be smaller than the gap of two – and the ratio of the longer to shorter dashes isn’t quite 4 to 1. To fully understand that, we need to understand how end caps are applied to the dash segments. There are three possible types:

  • Butt: The line ends squarely at the endpoint of the dashed segment.
  • Round: The line ends with a circular shape, the diameter of the stroke, centered on the endpoint (so it extends past the endpoint of the segment).
  • Square – The line ends with a square shape, the height of the stroke, but centered on the endpoint (so it extends past the segment).

The only way to see the true size of the Dash and Gap is to change the Caps to a Butt type, like so:

DashedLines-12

Now, you can see the squared off ends, and the dash and gap ratio make more sense. The final parameter is Corners, which can also be one of three settings:

  • Miter: The default – tries to square off any corners when the dashed line changes direction
  • Round – Rounds the corners off when the dashed line changes direction
  • Bevel – chamfers the corner by lopping off a piece at about a 45 degree angle when the dashed line changes direction.

To see this in action, we need to create a vector shape with a corner, such as a Rectangle Here’s the default Miter corner:

DashedLines-13

Here’s the same shape changed to a Round corner. Note that depending on your document resolution (number of pixels) and the size of the stroke, you may get a somewhat jagged “round” corner:

DashedLines-14

Finally, here’s the same shape with a Bevel corner setting. Again, you may see some jagged edges depending on document resolution:

DashedLines-15

Given these capabilities, we can create any number of unique custom settings for our stroked lines. For example, here’s a “phantom” line type with two long dashes and a short dash:

DashedLines-16

Don’t forget to save your presets! Once you click save, the new preset appears in the list of available stroke types. There’s no naming, it is a visual-only list:

DashedLines-18

 

Customized dashed and dotted strokes now available in Photoshop. Amazing! And don’t forget, while we’ve been looking at applying these strokes to shapes using the shape tools, it works equally well to freeform vector paths you create with the Pen tool.

And – Bonus Tip! Don’t be afraid to add a Layer Style stroke to a vector stroke, for double stroke goodness, as you can see with the Ampersand-shaped path in the center of this image:

DashedLines-19

That’s all for this tip! I hope you find this information helpful. See you next week!

About Michael Hoffman (224 Articles)
Mike has been a photographer, artist, educator, and technophile for most of his life. Early in his career, he created technical illustrations and photographs for electronic equipment manufacturers, and taught classes in computer aided drafting and 3D modeling software. When digital cameras became widely available in the late 1990s, the move was a natural one, and has led to a happy combination of technology, software, photography and art. Mike is an Adobe Certified Expert in Photoshop and Acrobat, and is well versed in Lightroom and Photoshop Elements, as well as Illustrator and InDesign. He has also contributed his time and efforts to the excellent work being done by Operation Photo Rescue, in restoring photographs damaged by natural disasters. As an active member of the National Association of Photoshop Professionals, he continues his quest for excellence in art, excellence in design, and excellence in education.

31 Comments on Creating Dashed and Dotted Lines in Photoshop

  1. Very clear instructions. I’m so glad they added this feature.

  2. This is an amazing addition that will get cheers and claps from graphic designers worldwide.

  3. shmuel // 28/10/2012 at 12:22 pm //

    Hello Michael,
    How do write a free dashed line as you “wrote” the word Dashes and the end of the tutorials?
    Thanks
    Shmuel

  4. HI Shmuel,

    I created the words “Dashes & Dots” as paths using the pen tool, then stroked them with the same techniques applied to shapes previously in the tutorial.

    mh++

  5. henry powers // 07/12/2012 at 12:07 pm //

    I would like to get started with CS6 but I’m confused as to what to buy and who to buy it from. The only experience I have is with basic things in Gimp. I have a Mac. Thanks for any ideas you might give me.

  6. Very Cool….
    Thanks

  7. shirleyr // 04/07/2013 at 3:04 pm //

    is there a way to make custom caps? also what if i want to cap the 2 ends of the line with an arrow-head? thanks.

  8. I have CS6 and I must be missing something because I can find none of these options for preset line types. I’m not a novice nor am I an expert user but I really need to create a dashed line so hope to figure this out. I’m using Photoshop CS6 13.0 x 64 if that helps.

  9. Janet, I suspect you are not starting with a “Shape” as shown in the 2nd image at the beginning. If you choose to draw “Pixels” or “Path” you will not see the line type options.

    mh++

  10. I have the dots in place how I want them, but I can’t get rid of the original circle upon which the dots are located. Is there a way to make the line disappear?

  11. Nithin Rajan // 18/08/2013 at 10:34 am //

    wow, didnt know about this feature since i have been using cs5 until now. now m gonna download cs6 coz i dont want to get deprived of the flexibility in working which photoshop has to offer over vector illustration softwares!

  12. Me also facing the same problem. Trying to get rid of the original circle but not be able to do that. Anyone can help?

  13. Rebecca Fryer // 26/12/2013 at 9:51 pm //

    Little rusty with Photoshop I’ve moved onto CC now but this is a lovely tip. Thank you.

  14. Bruno De Mauro // 21/01/2014 at 2:39 pm //

    Thx

  15. sombody help me to get the software for printing vehicles side stickers

  16. I am creating a new web site and this is just what I was looking for. Thanks so much for the great post on creating dashed and dotted lines. I am working on a full screen slider that does not offer layers so I will create my ads on the main background image. Text will have a dashed line around it.

  17. Very effective post. Now, I can create dotted line by myself in Photoshop with the help of this tutorial. Thanks for sharing it 🙂

  18. Helpful tutorial…!!

  19. Very effective article to increase the design knowledge. Thanks for sharing the helpful article.

  20. Tutorials are very helpful. waiting for more tutorials.

  21. Lovely photoshop tutorial about creating Dashed and dotted. Thank you so much.

  22. Amazing Photoshop tutorial about dashed and dotted lines in photoshop. Thanks for sharing this with us. keep up the good work.

  23. wow awesome post about Photoshop loved it❤

  24. truly helpful tutorial, learning a lot everyday form your blog so thank you so much and keep posting great stuff.

  25. Really informative and helpful tips!These tips have been of great benefit to my work.I would like to get something more modern from this site.Thanks For Sharing and Keep Up the Good Work.

  26. Hi!
    This is a great article! I just started my own blog and I am totally taking a lot of your advice to heart! Thank you so much!!

  27. Really informative and helpful tips!Thanks For Sharing and Keep Up the Good Work.

  28. Michael Hoffman

    This is basic thing for a designer. I hope in future we can gate more Advance from you.

    M Steve Smith

  29. Haha! Took 11 years for you to find it, some may argue he was ahead of his time!
    Oh, and there’s a better way to do this now, see how long it takes you to find it, there’s a tutorial on this very website.

  30. Awesome article shared by you about this topic. Next time in my project I will follow your instructions. Thanks for sharing this.

  31. I appreciate you sharing this blog post. Thanks Again. Cool.

1 Trackbacks & Pingbacks

  1. Photoshop Dotted Line | Wallpapers

Leave a comment

Your email address will not be published.


*