Package | com.adobe.photoshop |
Class | public class Selection |
Inheritance | Selection ![]() ![]() ![]() |
Since : | CS5 |
Property | Defined By | ||
---|---|---|---|
bounds : Array [read-only]
The bounding rectangle of the entire selection. | Selection | ||
![]() | hostObjectDelegate : HostObject Getter for the delegate | CSHostObject | |
![]() | parent : * [read-only] | PhotoshopHostObject | |
solid : Boolean [read-only]
If true, the bounding rectangle a solid rectangle. | Selection |
Method | Defined By | ||
---|---|---|---|
clear():void
Clears the selection and does not copy it to the clipboard. | Selection | ||
contract(by:Object):void
Contracts the selection. | Selection | ||
copy(merge:Boolean):void
Copies the selection to the clipboard. | Selection | ||
cut():void
Cuts the current selection to the clipboard. | Selection | ||
deselect():void
Deselects the current selection. | Selection | ||
expand(by:Object):void
Expands the selection. | Selection | ||
feather(by:Object):void
Feathers the edges of the selection. | Selection | ||
fill(fillType:Object, mode:ColorBlendMode = null, opacity:Number = 100, preserveTransparency:Boolean):void
Fills the selection. | Selection | ||
![]() | filterArgsForHBAPI(args:Array):Array [static]
Function to clean up the argument list and put it into a format that
makes sense for HBAPI. | CSHostObject | |
![]() | filterSingleObjectForHBAPI(value:Object):Object [static]
| CSHostObject | |
![]() | getClassObjectForName(className:String):HostObject [static] This returns a "Class" object, meaning, a HostObject that can be used
to make static function calls or get static properties
| CSHostObject | |
![]() | getSpecialTranslation(className:String, ho:HostObject, expectedReturnType:Class, ownerName:String):* [static] | CSHostObject | |
grow(tolerance:Number, antiAlias:Boolean):void
Grows the selection to include all adjacent pixels falling within the specified tolerance range. | Selection | ||
![]() | hostCall(name:String, expectedReturnType:Class, rawargs:Array):*
Encapsulates a function call to the host
| CSHostObject | |
![]() | hostCallStatic(className:String, methodName:String, expectedReturnType:Class, rawargs:Array):* [static]
Implements a safe call of a static method on the host
| CSHostObject | |
![]() | hostGet(name:String, expectedReturnType:Class):*
Encapsulates a property get to the host
| CSHostObject | |
![]() | hostGetIndex(idx:Object, expectedReturnType:Class):*
Encapsulates a indexed get to the host
| CSHostObject | |
![]() | hostGetStatic(className:String, propertyName:String, expectedReturnType:Class):* [static]
Implements a safe get of a static property on the host
Used by for instance, all the enum implementations. | CSHostObject | |
![]() | hostSet(name:String, rawvalue:*):void
Encapsulates a property set to the host
| CSHostObject | |
![]() | hostSetStatic(className:String, propertyName:String, rawvalue:*):* [static]
Implements a safe set of a static property on the host
| CSHostObject | |
invert():void
Inverts the selection. | Selection | ||
![]() | isDescendedFrom(clz:Class, ancClass:Class):Boolean [static] Efficiently determines whether or not one class descends from
another in inheritance hierarchy- class relationships are cached
by the ClassUtils implementation-
(uses org.as3commons lib to quickly discover class hierarchy. | CSHostObject | |
Loads the selection from the specified channel. | Selection | ||
makeWorkPath(tolerance:Number):void
Makes this selection item the workpath for this document. | Selection | ||
![]() | replaceDefaultArgs(args:Array, defaultArgs:Array):Array
Function to tidy up arguments prior to call. | CSHostObject | |
resize(horizontal:Number = 100, vertical:Number = 100, anchor:AnchorPosition = null):void
Resizes the selected area to the specified dimensions and anchor position. | Selection | ||
resizeBoundary(horizontal:Number = 100, vertical:Number = 100, anchor:AnchorPosition = null):void
Scales the boundary of the selection. | Selection | ||
rotate(angle:Number, anchor:AnchorPosition = null):void
Rotates the object. | Selection | ||
rotateBoundary(angle:Number, anchor:AnchorPosition = null):void
Rotates the boundary of the selection. | Selection | ||
select(region:Object, type:SelectionType = null, feather:Number = 0, antiAlias:Boolean = true):void
Selects the specified region. | Selection | ||
selectAll():void
Selects the entire layer. | Selection | ||
selectBorder(width:Object):void
Selects the selection border only (in the specified width); subsequent actions do not affect the selected area within the borders. | Selection | ||
similar(tolerance:Number, antiAlias:Boolean):void
Grows the selection to include pixels throughout the image falling within the tolerance range. | Selection | ||
smooth(radius:Number):void
Cleans up stray pixels left inside or outside a color-based selection (within the radius specified in pixels). | Selection | ||
Saves the selection as a channel. | Selection | ||
stroke(strokeColor:Object, width:Number, location:StrokeLocation = null, mode:ColorBlendMode = null, opacity:Number = 100, preserveTransparency:Boolean):void
Strokes the selection. | Selection | ||
translate(deltaX:Object = null, deltaY:Object = null):void
Moves the object relative to its current position. | Selection | ||
translateBoundary(deltaX:Object = null, deltaY:Object = null):void
Moves the boundary of selection relative to its current position. | Selection | ||
![]() | wrapReturnedHostObject(rawObject:Object, expectedReturnType:Class, client:CSHostObject, propertyName:String):* [static]
Method used on static/normal get/ hostcalls
| CSHostObject |
bounds | property |
bounds:Array
[read-only] Since : | CS5 |
The bounding rectangle of the entire selection.
public function get bounds():Array
solid | property |
solid:Boolean
[read-only] Since : | CS5 |
If true, the bounding rectangle a solid rectangle.
public function get solid():Boolean
clear | () | method |
public function clear():void
Since : | CS5 |
Clears the selection and does not copy it to the clipboard.
contract | () | method |
public function contract(by:Object):void
Since : | CS5 |
Contracts the selection.
Parameters
by:Object — (Object) The amount to contract the selection.
|
copy | () | method |
public function copy(merge:Boolean):void
Since : | CS5 |
Copies the selection to the clipboard.
Parameters
merge:Boolean (default = NaN ) — (Boolean) If true the copy includes all visible layers. If false, copies only from the current layer.
|
cut | () | method |
public function cut():void
Since : | CS5 |
Cuts the current selection to the clipboard.
deselect | () | method |
public function deselect():void
Since : | CS5 |
Deselects the current selection.
expand | () | method |
public function expand(by:Object):void
Since : | CS5 |
Expands the selection.
Parameters
by:Object — (Object) The amount to expand the selection.
|
feather | () | method |
public function feather(by:Object):void
Since : | CS5 |
Feathers the edges of the selection.
Parameters
by:Object — (Object) The amount to feather the edge.
|
fill | () | method |
public function fill(fillType:Object, mode:ColorBlendMode = null, opacity:Number = 100, preserveTransparency:Boolean):void
Since : | CS5 |
Fills the selection.
Parameters
fillType:Object — (Object) The color or history state with which to fill the object.
| |
mode:ColorBlendMode (default = null ) — (com.adobe.photoshop.ColorBlendMode) The color blend mode. ( default: ColorBlendMode.NORMAL )
| |
opacity:Number (default = 100 ) — (Number) The opacity as a percentage. Range: 1 to 100. ( default: 100 )
| |
preserveTransparency:Boolean (default = NaN ) — (Boolean) If true, perserves transparencies.
|
grow | () | method |
public function grow(tolerance:Number, antiAlias:Boolean):void
Since : | CS5 |
Grows the selection to include all adjacent pixels falling within the specified tolerance range.
Parameters
tolerance:Number — (Number) The tolerance range. Range: 0 to 255. ( 0 - 255 )
| |
antiAlias:Boolean — (Boolean) If true, anti-aliasing is used.
|
invert | () | method |
public function invert():void
Since : | CS5 |
Inverts the selection.
load | () | method |
public function load(from:Channel, combination:SelectionType = null, inverting:Boolean = false):void
Since : | CS5 |
Loads the selection from the specified channel.
Parameters
from:Channel — (com.adobe.photoshop.Channel) The channel to load the selection from.
| |
combination:SelectionType (default = null ) — (com.adobe.photoshop.SelectionType) How to combine the channel contents with the existing selection. ( default: SelectionType.REPLACE )
| |
inverting:Boolean (default = false ) — (Boolean) If true, selects the inverse of the channel contents. ( default: false )
|
makeWorkPath | () | method |
public function makeWorkPath(tolerance:Number):void
Since : | CS5 |
Makes this selection item the workpath for this document.
Parameters
tolerance:Number (default = NaN ) — (Number) The tolerance in pixels.
|
resize | () | method |
public function resize(horizontal:Number = 100, vertical:Number = 100, anchor:AnchorPosition = null):void
Since : | CS5 |
Resizes the selected area to the specified dimensions and anchor position.
Parameters
horizontal:Number (default = 100 ) — (Number) The amount to scale the selection horizontally (as a percentage). ( default: 100.0 )
| |
vertical:Number (default = 100 ) — (Number) The amount to scale the selection vertically (as a percentage). ( default: 100.0 )
| |
anchor:AnchorPosition (default = null ) — (com.adobe.photoshop.AnchorPosition) The point to scale around. ( default: AnchorPosition.MIDDLECENTER )
|
resizeBoundary | () | method |
public function resizeBoundary(horizontal:Number = 100, vertical:Number = 100, anchor:AnchorPosition = null):void
Since : | CS5 |
Scales the boundary of the selection.
Parameters
horizontal:Number (default = 100 ) — (Number) The amount to scale the object horizontally (as a percentage). ( default: 100.0 )
| |
vertical:Number (default = 100 ) — (Number) The amount to scale the object vertically (as a percentage). ( default: 100.0 )
| |
anchor:AnchorPosition (default = null ) — (com.adobe.photoshop.AnchorPosition) The point to scale around. ( default: AnchorPosition.MIDDLECENTER )
|
rotate | () | method |
public function rotate(angle:Number, anchor:AnchorPosition = null):void
Since : | CS5 |
Rotates the object.
Parameters
angle:Number — (Number) The number of degrees to rotate the object.
| |
anchor:AnchorPosition (default = null ) — (com.adobe.photoshop.AnchorPosition) The point to rotate about. ( default: AnchorPosition.MIDDLECENTER )
|
rotateBoundary | () | method |
public function rotateBoundary(angle:Number, anchor:AnchorPosition = null):void
Since : | CS5 |
Rotates the boundary of the selection.
Parameters
angle:Number — (Number) The rotation angle (in degrees)
| |
anchor:AnchorPosition (default = null ) — (com.adobe.photoshop.AnchorPosition) The point to rotate about. ( default: AnchorPosition.MIDDLECENTER )
|
select | () | method |
public function select(region:Object, type:SelectionType = null, feather:Number = 0, antiAlias:Boolean = true):void
Since : | CS5 |
Selects the specified region.
Parameters
region:Object — (Object) 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 (default = null ) — (com.adobe.photoshop.SelectionType) The method for combining the new selection with the existing selection. ( default: SelectionType.REPLACE )
| |
feather:Number (default = 0 ) — (Number) The feather amount. ( default: 0.0 )
| |
antiAlias:Boolean (default = true ) — (Boolean) If true, anti-aliasing is used. ( default: true )
|
selectAll | () | method |
public function selectAll():void
Since : | CS5 |
Selects the entire layer.
selectBorder | () | method |
public function selectBorder(width:Object):void
Since : | CS5 |
Selects the selection border only (in the specified width); subsequent actions do not affect the selected area within the borders.
Parameters
width:Object — (Object) The width of the border selection.
|
similar | () | method |
public function similar(tolerance:Number, antiAlias:Boolean):void
Since : | CS5 |
Grows the selection to include pixels throughout the image falling within the tolerance range.
Parameters
tolerance:Number — (Number) The tolerance range. Range: 0 to 255.
| |
antiAlias:Boolean — (Boolean) If true, anti-aliasing is used.
|
smooth | () | method |
public function smooth(radius:Number):void
Since : | CS5 |
Cleans up stray pixels left inside or outside a color-based selection (within the radius specified in pixels).
Parameters
radius:Number — (Number) The sample radius in pixels. Range: 0 to 100. ( 0 - 100 )
|
store | () | method |
public function store(into:Channel, combination:SelectionType = null):void
Since : | CS5 |
Saves the selection as a channel.
Parameters
into:Channel — (com.adobe.photoshop.Channel) The channel to save the selection to.
| |
combination:SelectionType (default = null ) — (com.adobe.photoshop.SelectionType) How to add the selection to the existing contents of the channel. ( default: SelectionType.REPLACE )
|
stroke | () | method |
public function stroke(strokeColor:Object, width:Number, location:StrokeLocation = null, mode:ColorBlendMode = null, opacity:Number = 100, preserveTransparency:Boolean):void
Since : | CS5 |
Strokes the selection.
Parameters
strokeColor:Object — (Object) The color to stroke the selection with.
| |
width:Number — (Number) The stroke width.
| |
location:StrokeLocation (default = null ) — (com.adobe.photoshop.StrokeLocation) The stroke location. ( default: StrokeLocation.CENTER )
| |
mode:ColorBlendMode (default = null ) — (com.adobe.photoshop.ColorBlendMode) The color blend mode. ( default: ColorBlendMode.NORMAL )
| |
opacity:Number (default = 100 ) — (Number) The opacity of the stroke color as a percentage. Range: 1 to 100. ( default: 100 )
| |
preserveTransparency:Boolean (default = NaN ) — (Boolean) If true, preserves transparency.
|
translate | () | method |
public function translate(deltaX:Object = null, deltaY:Object = null):void
Since : | CS5 |
Moves the object relative to its current position.
Parameters
deltaX:Object (default = null ) — (Object) The amount to move the object horizontally.
| |
deltaY:Object (default = null ) — (Object) The amount to move the object vertically.
|
translateBoundary | () | method |
public function translateBoundary(deltaX:Object = null, deltaY:Object = null):void
Since : | CS5 |
Moves the boundary of selection relative to its current position.
Parameters
deltaX:Object (default = null ) — (Object) The amount to move the object horizontally.
| |
deltaY:Object (default = null ) — (Object) The amount to move the object vertically.
|