Adobe PHOTOSHOP CS 2.0 - SCRIPTING GUIDE Manual page 83

Table of Contents

Advertisement

Adobe Photoshop CS2 Scripting Guide
Apply a wave filter to the selection.
Note:
Defining the Area of a Selection Object
To define the area of a selection object, we will create an array of coordinates, or points specified in pixels
within the document. The array indicates the coordinates that define the outside corners of a rectangular
area that begins at the top left corner of the document and extends half way across the document.
Note:
You can define any number of points for a selected area. The number of coordinates determines the
shape of the selection. The last coordinate defined must be the same as the first so that the area.
Note:
See
other Photoshop CS2 objects.
The array values in order are:
Upper left corner of the selection:
indicates the left-most column in the document.
0
indicates the top row in the document.
0
Upper right corner of the selection:
theDocWidthInPixels / 2
column whose coordinate is the total number of columns in the document divided by 2.
Note:
indicates the top row in the document.
0
Lower right corner:
theDocWidthInPixels / 2
theDocHeightInPixels
is the total number of rows in the document.
Note:
Lower left corner:
theDocWidthInPixels / 2
0
Upper left corner of the selection:
AS
To select an area and apply a wave filter to it:
1. Type the following code into the script file
restore original preferences:
--create new variables to contain the document object's width and height
--determine width and height values by multiplying the
--width and height in inches by the resolution
--(which equals the number of pixels per inch)
The wave is a truncated sine curve.
'Photoshop CS2's Object Model' on page 8
The value of
theDocWidthInPixels
horizontal dimension. Columns are arranged horizontally.
theDocWidthInPixels / 2, theDocHeightInPixels
indicates the bottom row in the document; that is row whose coordinate
The value of
theDocHeightInPixels
dimension of the document. Rows are stacked vertically.
theDocWidthInPixels / 2, 0
Photoshop CS2
0,0
theDocWidthInPixels / 2, 0
indicates the column in the middle of the document; that is, the
is the total number of pixels that defines the document's
indicates the middle of the document.
is the total number of pixels that determine the vertical
0,0
HelloWorldDoc
Scripting Photoshop CS2
for information on selection objects and
just above the commented statements that
79

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs2

Table of Contents