Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I am new to shape layers in CS6, and am running up against this issue:

How do I create a stroked line path (with no fill) with precise dimensions?

All I'd like to do is create several horizontal rules exactly 306 pixels wide.

share|improve this question

2 Answers 2

One of the great factors of Photoshop CS6 is true vector elements. This means they can be altered after they are drawn to a greater degree than was ever possible in previous versions.

  1. Grab the Line Tool.
  2. Set the value for the weight you want your stroke in the Control bar.
  3. Draw a line.
  4. Change the "W" field in the Control bar to read "306px" and hit the Enter key.
  5. Done.

Note: You can return to the shape layer at any point later and change the "w" field again if you want to adjust the length or height of the line again. This is a HUGE step forward for Photoshop.

share|improve this answer
    
Good answer, I should update my PS version :) –  Yisela May 29 '12 at 21:59
    
The vector and 3D layers are dramatic improvements in CS6. Well worth the upgrade for those if you use them. :) –  Scott May 29 '12 at 22:05
    
Thank you. I'm jumping back into Photoshop after a few years in Illustrator (lured by the new vector shape layers, among other things, in CS6). I guess I was hoping that "true vector layers" meant having access to exact object dimensions after I've created a shape, as in AI. –  Blair-J May 30 '12 at 13:44
    
@Blair-J "having access to exact object dimensions after I've created a shape" -- it does. All you need do is highlight a shape layer and change dimensions in the Control Bar. –  Scott May 30 '12 at 18:42
    
Thanks Scott. You're right of course. –  Blair-J May 31 '12 at 13:39

I'd recommend using the rectangle tool. If you select the rectangle tool and click on the canvas, you can enter the exact dimensions you're after. In your case, that's 306×1.

Size by typing

Then, use the move tool (V) to drag the layer into place. Pressing command-J will duplicate the layer, and then the new layer can be moved again (you can also use LayerNewNew Layer via Copy. Once you've added all the lines, select all the layers and press command-E to merge all the shapes onto one layer (if that's what you want).

Recap:

  • Select the rectangle tool
  • Click on the canvas and enter the dimensions
  • Use the move tool to position
  • Duplicate with command-J
  • Move into position with the move tool
  • Repeat the last two steps for as many lines as you need
  • Select all the layers in the layers panel
  • Press command-E to merge

From there you'll have a single layer with all the lines that you can style using stroke, fill and layer effects.

Why use a rectangle instead of a line?

Photoshop (CS5 and CS6) draws a rectangle when you use the line tool, so they're essentially the same thing. There is one difference though — the rectangle tool in Photoshop CS6 can be created to a specific size by clicking on the canvas, where the line tool can't.

share|improve this answer
    
Thanks for the detailed recommendation, Marc. I'm kind of surprised that with the addition of true vector layers in CS6, there doesn't seem to be the equivalent basic flexibility of Illustrator's after-the-fact transform options. (I'm giving away my biases ;) Stroke FTL. –  Blair-J May 30 '12 at 13:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.