Adobe 23101335 - Photoshop - PC Manual page 70

Scripting guide
Hide thumbs Also See for 23101335 - Photoshop - PC:
Table of Contents

Advertisement

VB:
selRef.Stroke strokeColor, Width:=5, Location:=psInsideStroke, _
JS:
activeDocument.selection.stroke (strokeColor, 2,
IMPO R TAN T:
3.11.3 Inverting selections
When you invert a selection, you are masking the selection so you can work on the rest of the
document, layer or channel while protecting the selection. Here's how to invert the current
selection:
AS: invert selection of current document
VB: selRef.Invert
JS:
3.11.4 Expand, contract and feather selections
These three commands are used to change the size of the selection. The values are passed in
ruler units, the value of which are stored in Photoshop preferences and can be changed by your
scripts. Feathering a selection will smooth its corners by the specified number of units while
expand and contract will grow and shrink the selection.
If your ruler units are set to pixels, then the following examples will expand, contract and
feather by five pixels. See section
examples of how to change ruler units.
AS:
expand selection of current document by pixels 5
contract selection of current document by pixels 5
feather selection of current document by pixels 5
VB:
Dim appRef As Photoshop.Application
Set appRef = CreateObject("Photoshop.Application")
'remember unit settings; and set to pixels
Photoshop 7.0 Scripting Guide
mode:=psVividLightBlend, Opacity:=75, _
PreserveTransparency:=False
StrokeLocation.OUTSIDE, ColorBlendMode.VIVIDLIGHT, 75,
false);
The transpareny parameter cannot be used for background layers.
selRef.invert();
3.5.3, "Changing ruler and type units" on page 48
Scripting Photoshop
Selections
for
3
70

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents