Adding Lines


Copyright © June, 2006 SuzShook

sample image

dot   Script Summary:

This is a simple utility script whose purpose is to add lines to an image. The user can select whether to add horizontal or vertical lines, the starting point for the lines on the image, the ending point for the lines, the space between lines, and the size of the margins, if any, to be used on both ends of the lines. This script adds lines to images of any dimensions. The lines are created on a new layer using the Foreground Material, with the Width and Line Style extracted from the Tool Options palette for the Pen tool.


dot   Installation Instructions:

Place the ss-AddingLines script in your Scripts-Restricted folder, or run the script from this Quick Guide (see Running the Script below).


dot   Plugin Settings:

N/A


dot   Running the Script:

To run this script:

  1. Open the image to which you want to add lines.
  2. Select the material to be used for the lines in the Foreground Material box.
  3. Set the Width and Line Style to be used for the lines in the Tool Options palette for the Pen tool.
  4. Select the ss-AddingLines-00 script in the scripts list and press play.
run script icon Run Script for me.


dot   Change History:


Notes and Tips:
checkmark You can add more than one set of lines - here's a sample image with two sets of lines in different colors, and using different line styles:

two sets of lines

checkmark Because each set of lines is added to a new layer, you can manipulate the lines after you have created them. If you want a margin on only one end of a set of horizontal lines, for example, just use the Mover tool to shift the lines to one side:

lines shifted to right

checkmark Want diagonal lines? Make your image larger than you need it, make a set of horizontal (or vertical) lines, use the Deform tool (or Pick tool in PSP X) and rotate the lines the angle you want by setting the Angle parameter on the Deform/Pick tool Tool Options palette. Now move the lines so they're more centered on the image and crop to the size you want. Presto, diagonal lines! Here's a sample image with lines shifted 45 degrees:

diagonal lines

checkmark Here's an example of a "scrap tag" created with two sets of lines - one set horizontal, and the other, vertical. Thanks, Ila, for such a beautiful tag - and for allowing me to use it as an illustration!

sample tag made with checkerboard lines

checkmark Here's one last tip - if you find you're making lines all the time the same way, same space between them, starting at the same location, etc., you could make a copy of the script and make all the dialogs SILENT. Then change the defaults for each dialog to what you use all the time. For example, the DefaultValue for the 'Get Lines Direction' dialog is 1, or horizontal. The DefaultValue for the 'Get Spacing Number' dialog is 36. The DefaultValue for each of the other three dialogs - 'Get Starting Point', 'Get Ending Point' and 'Get Margin' - is 0. Just change the DefaultValue parameter in each of the dialogs to what you normally use, and the script will run lickety-split, with no stops! Now, that's slick!

Here's a sample dialog from the script - this one is the 'Get Spacing Number' dialog:

GetSpacingNumber dialog

I've highlighted the DialogTitle parameter in pink - that name will help you locate each of the dialogs. The DefaultValue parameter is highlighted in yellow - this is where you would enter YOUR value. Finally, the ExecutionMode parameter is near the bottom. In this screen shot, it's set to 'Interactive' which is highlighted in green - you'd want to change that word to 'Silent'. And don't be afraid to change the script - it won't bite! Even if you do mess it up, you can always download it again and start over!

checkmark Occasionally, the 'Line style' will "stick" in the Pen tool Tool Options palette, causing the previously-used 'Line style' to be used rather than the new 'Line style' you've chosen. If that happens to you, click the Presets droplist on the Tool Options palette (red arrow below) and then click the 'Reset to default' button (green arrow below):

Pen tool presets drop list