PhotoshopCC 2015.5
Object

Selection

The selected area of the document or layer.

Properties

NameType AccessDescription
UnitRect readonly The bounding rectangle of the entire selection.
The readonly The object's container.
Boolean readonly If true, the bounding rectangle a solid rectangle.
String readonly The class name of the object.

Methods

void

Clears the selection and does not copy it to the clipboard.

void

Contracts the selection.

by UnitValue The amount to contract the selection.
void

Copies the selection to the clipboard.

merge? Boolean If true the copy includes all visible layers. If false, copies only from the current layer.
void

Cuts the current selection to the clipboard.

void

Deselects the current selection.

void

Expands the selection.

by UnitValue The amount to expand the selection.
void

Feathers the edges of the selection.

by UnitValue The amount to feather the edge.
void

Fills the selection.

fillType Varies The color or history state with which to fill the object.
mode? ColorBlendMode The color blend mode.
opacity? Int 1–100 The opacity as a percentage. Range: 1 to 100.
preserveTransparency? Boolean If true, perserves transparencies.
void

Grows the selection to include all adjacent pixels falling within the specified tolerance range.

tolerance Int 0–255 The tolerance range. Range: 0 to 255.
antiAlias Boolean If true, anti-aliasing is used.
void

Inverts the selection.

void

Loads the selection from the specified channel.

from Channel The channel to load the selection from.
combination? SelectionType How to combine the channel contents with the existing selection.
inverting? Boolean If true, selects the inverse of the channel contents.
void

Makes this selection item the workpath for this document.

tolerance? Number The tolerance in pixels.
void

Resizes the selected area to the specified dimensions and anchor position.

horizontal? Number The amount to scale the selection horizontally (as a percentage).
vertical? Number The amount to scale the selection vertically (as a percentage).
anchor? AnchorPosition The point to scale around.
void

Scales the boundary of the selection.

horizontal? Number The amount to scale the object horizontally (as a percentage).
vertical? Number The amount to scale the object vertically (as a percentage).
anchor? AnchorPosition The point to scale around.
void

Rotates the object.

angle Number The number of degrees to rotate the object.
anchor? AnchorPosition The point to rotate about.
void

Rotates the boundary of the selection.

angle Number The rotation angle (in degrees)
anchor? AnchorPosition The point to rotate about.
void

Selects the specified region.

region Varies[] Array of x and y coordinates that describe the corners of the selection, in the format [[x1, y1], [x2,y2],[x3, y3], [x4,y4]]
type? SelectionType The method for combining the new selection with the existing selection.
feather? Number The feather amount.
antiAlias? Boolean If true, anti-aliasing is used.
void

Selects the entire layer.

void

Selects the selection border only (in the specified width); subsequent actions do not affect the selected area within the borders.

width UnitValue The width of the border selection.
void

Grows the selection to include pixels throughout the image falling within the tolerance range.

tolerance Int 0–255 The tolerance range. Range: 0 to 255.
antiAlias Boolean If true, anti-aliasing is used.
void

Cleans up stray pixels left inside or outside a color-based selection (within the radius specified in pixels).

radius Int 0–100 The sample radius in pixels. Range: 0 to 100.
void

Saves the selection as a channel.

into Channel The channel to save the selection to.
combination? SelectionType How to add the selection to the existing contents of the channel.
void

Strokes the selection.

strokeColor Varies The color to stroke the selection with.
width Int The stroke width.
location? StrokeLocation The stroke location.
mode? ColorBlendMode The color blend mode.
opacity? Int 1–100 The opacity of the stroke color as a percentage. Range: 1 to 100.
preserveTransparency? Boolean If true, preserves transparency.
void

Moves the object relative to its current position.

deltaX? UnitValue The amount to move the object horizontally.
deltaY? UnitValue The amount to move the object vertically.
void

Moves the boundary of selection relative to its current position.

deltaX? UnitValue The amount to move the object horizontally.
deltaY? UnitValue The amount to move the object vertically.

Object of 1

Properties elsewhere that hold a Selection.