Adobe 65014912 Scripting Guide - Page 67
Defining the area of a selection object
UPC - 883919160382
View all Adobe 65014912 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 67 highlights
CHAPTER 3: Scripting Photoshop Advanced Scripting 67 ➤ Apply a wave filter to the selection. NOTE: The wave is a truncated sine curve. Defining the area of a selection object To define the area of a selection object, we 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 is a closed selection path. NOTE: See "Photoshop Object Model" on page 11 for information on selection objects and other Photoshop objects. The array values in order are: ➤ Upper left corner of the selection: 0,0 ➣ 0 indicates the left-most column in the document. ➣ 0 indicates the top row in the document. ➤ Upper right corner of the selection: theDocWidthInPixels / 2, 0 ➣ theDocWidthInPixels / 2 indicates the column in the middle of the document; that is, the column whose coordinate is the total number of columns in the document divided by 2. NOTE: The value of theDocWidthInPixels is the total number of pixels that defines the document's horizontal dimension. Columns are arranged horizontally. ➣ 0 indicates the top row in the document. ➤ Lower right corner: theDocWidthInPixels / 2, theDocHeightInPixels ➣ theDocWidthInPixels / 2 indicates the middle of the document. ➣ theDocHeightInPixels indicates the bottom row in the document; that is row whose coordinate is the total number of rows in the document. NOTE: The value of theDocHeightInPixels is the total number of pixels that determine the vertical dimension of the document. Rows are stacked vertically. ➤ Lower left corner: 0, theDocHeightInPixels ➣ 0 indicates the left-most column in the document. ➣ theDocHeightInPixels indicates the bottom row in the document ➤ Upper left corner of the selection: 0,0 ➣ This closes the selection path back at the initial point.