Package | com.adobe.photoshop |
Class | public class Document |
Inheritance | Document ![]() ![]() ![]() |
Since : | CS5 |
Property | Defined By | ||
---|---|---|---|
activeChannels : Array
The selected channels. | Document | ||
activeHistoryBrushSource : HistoryState
The history state to use with the history brush. | Document | ||
activeHistoryState : HistoryState
The current history state for this document. | Document | ||
activeLayer : Layer
The selected layer. | Document | ||
artLayers : ArtLayers [read-only]
The art layers collection in the document. | Document | ||
backgroundLayer : ArtLayer [read-only]
The background layer for the document. | Document | ||
bitsPerChannel : BitsPerChannelType
The number of bits per channel. | Document | ||
channels : Channels [read-only]
The channels collection in this document. | Document | ||
colorProfileName : String
The name of the color profile. | Document | ||
colorProfileType : ColorProfile
Type of color profile management for document. | Document | ||
colorSamplers : ColorSamplers [read-only]
The current color samplers associated with the document. | Document | ||
componentChannels : Array [read-only]
The color component channels for this document. | Document | ||
countItems : CountItems [read-only]
The current count items in the document. | Document | ||
fullName : File [read-only]
The full path name of the document. | Document | ||
guides : Guides [read-only]
the guides in this document
| Document | ||
height : Object [read-only]
The height of the document. | Document | ||
histogram : Array [read-only]
A histogram showing the number of pixels at each color intensity level for the composite channel. | Document | ||
historyStates : HistoryStates [read-only]
The history states collection in this document. | Document | ||
![]() | hostObjectDelegate : HostObject Getter for the delegate | CSHostObject | |
info : DocumentInfo [read-only]
Metadata about the document. | Document | ||
layerComps : LayerComps [read-only]
The layer comps collection in this document. | Document | ||
layers : Layers [read-only]
The layers collection in the document. | Document | ||
layerSets : LayerSets [read-only]
The layer sets collection in the document. | Document | ||
managed : Boolean [read-only]
If true, the document is a workgroup document. | Document | ||
measurementScale : MeasurementScale [read-only]
The measurement scale of the document. | Document | ||
mode : DocumentMode [read-only]
The color profile. | Document | ||
name : String [read-only]
The document name. | Document | ||
![]() | parent : * [read-only] | PhotoshopHostObject | |
path : File [read-only]
The path to the document. | Document | ||
pathItems : PathItems [read-only]
The path items collection in this document. | Document | ||
pixelAspectRatio : Number
The (custom) pixel aspect ratio of the document. | Document | ||
printSettings : DocumentPrintSettings [read-only]
Document print settings. | Document | ||
quickMaskMode : Boolean
If true, the document is in Quick Mask mode. | Document | ||
resolution : Number [read-only]
The resolution of the document (in pixels per inch)
| Document | ||
saved : Boolean [read-only]
If true, the document been saved since the last change. | Document | ||
selection : Selection [read-only]
The selected area of the document. | Document | ||
width : Object [read-only]
The width of the document. | Document | ||
xmpMetadata : XmpMetadata [read-only]
The XMP properties of the document. | Document |
Method | Defined By | ||
---|---|---|---|
Counts the objects in the document. | Document | ||
Changes the mode of the document. | Document | ||
close(saving:SaveOptions = null):void
Closes the document. | Document | ||
convertProfile(destinationProfile:String, intent:Intent, blackPointCompensation:Boolean, dither:Boolean = true):void
Converts the document from using one color profile to using another. | Document | ||
crop(bounds:Array, angle:Number = 0, width:Object = null, height:Object = null):void
Crops the document. | Document | ||
Duplicate this object. | Document | ||
Exports the document. | Document | ||
![]() | 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 | |
flatten():void
Flattens all layers. | Document | ||
flipCanvas(direction:Direction):void
Flips the canvas horizontally or vertically. | Document | ||
![]() | 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 | |
![]() | 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 | |
importAnnotations(file:File):void
Imports annotations into the document. | Document | ||
![]() | 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 | |
mergeVisibleLayers():void
Flattens all visible layers in the document. | Document | ||
Pastes contents of the clipboard into the document. | Document | ||
print(sourceSpace:SourceSpaceType = null, printSpace:String = null, intent:Intent = null, blackPointCompensation:Boolean = true):void
Prints the document. | Document | ||
printOneCopy():void
Print one copy of the document. | Document | ||
rasterizeAllLayers():void
Rasterizes all layers. | Document | ||
recordMeasurements(source:MeasurementSource = null, dataPoints:Object = null):void
Records the measurements of document. | Document | ||
![]() | replaceDefaultArgs(args:Array, defaultArgs:Array):Array
Function to tidy up arguments prior to call. | CSHostObject | |
resizeCanvas(width:Object = null, height:Object = null, anchor:AnchorPosition = null):void
Changes the size of the canvas. | Document | ||
resizeImage(width:Object = null, height:Object = null, resolution:Number, resampleMethod:ResampleMethod = null):void
Changes the size of the image. | Document | ||
revealAll():void
Expands the document to show clipped sections. | Document | ||
rotateCanvas(angle:Number):void
Rotates the canvas. | Document | ||
save():void
Saves the document. | Document | ||
Saves the document with the specified save options. | Document | ||
splitChannels():Object
Splits the channels of the document. | Document | ||
suspendHistory(historyString:String, javaScriptString:String):void
Provides a single history state for the entire script. | Document | ||
trap(width:Number):void
Applies trapping to a CMYK document. | Document | ||
trim(type:TrimType = null, top:Boolean = true, left:Boolean = true, bottom:Boolean = true, right:Boolean = true):void
Trims the transparent area around the image on the specified sides of the canvas. | Document | ||
![]() | wrapReturnedHostObject(rawObject:Object, expectedReturnType:Class, client:CSHostObject, propertyName:String):* [static]
Method used on static/normal get/ hostcalls
| CSHostObject |
activeChannels | property |
activeChannels:Array
Since : | CS5 |
The selected channels.
public function get activeChannels():Array
public function set activeChannels(value:Array):void
activeHistoryBrushSource | property |
activeHistoryBrushSource:HistoryState
Since : | CS5 |
The history state to use with the history brush.
public function get activeHistoryBrushSource():HistoryState
public function set activeHistoryBrushSource(value:HistoryState):void
activeHistoryState | property |
activeHistoryState:HistoryState
Since : | CS5 |
The current history state for this document.
public function get activeHistoryState():HistoryState
public function set activeHistoryState(value:HistoryState):void
activeLayer | property |
activeLayer:Layer
Since : | CS5 |
The selected layer.
public function get activeLayer():Layer
public function set activeLayer(value:Layer):void
artLayers | property |
artLayers:ArtLayers
[read-only] Since : | CS5 |
The art layers collection in the document.
public function get artLayers():ArtLayers
backgroundLayer | property |
backgroundLayer:ArtLayer
[read-only] Since : | CS5 |
The background layer for the document.
public function get backgroundLayer():ArtLayer
bitsPerChannel | property |
bitsPerChannel:BitsPerChannelType
Since : | CS5 |
The number of bits per channel.
public function get bitsPerChannel():BitsPerChannelType
public function set bitsPerChannel(value:BitsPerChannelType):void
channels | property |
channels:Channels
[read-only] Since : | CS5 |
The channels collection in this document.
public function get channels():Channels
colorProfileName | property |
colorProfileName:String
Since : | CS5 |
The name of the color profile. Valid only when no value is specified for color profile kind (to indicate a custom color profile).
public function get colorProfileName():String
public function set colorProfileName(value:String):void
colorProfileType | property |
colorProfileType:ColorProfile
Since : | CS5 |
Type of color profile management for document. Note: If you want to set a custom color profile, do not set a value for color profile kind; rather, set the appropriate color profile name.
public function get colorProfileType():ColorProfile
public function set colorProfileType(value:ColorProfile):void
colorSamplers | property |
colorSamplers:ColorSamplers
[read-only] Since : | CS5 |
The current color samplers associated with the document.
public function get colorSamplers():ColorSamplers
componentChannels | property |
componentChannels:Array
[read-only] Since : | CS5 |
The color component channels for this document.
public function get componentChannels():Array
countItems | property |
countItems:CountItems
[read-only] Since : | CS5 |
The current count items in the document.
public function get countItems():CountItems
fullName | property |
fullName:File
[read-only] Since : | CS5 |
The full path name of the document.
public function get fullName():File
guides | property |
guides:Guides
[read-only] Since : | CS5 |
the guides in this document
public function get guides():Guides
height | property |
height:Object
[read-only] Since : | CS5 |
The height of the document.
public function get height():Object
histogram | property |
histogram:Array
[read-only] Since : | CS5 |
A histogram showing the number of pixels at each color intensity level for the composite channel. Valid only when 'mode' = RGB, CMYK, or indexed.
public function get histogram():Array
historyStates | property |
historyStates:HistoryStates
[read-only] Since : | CS5 |
The history states collection in this document.
public function get historyStates():HistoryStates
info | property |
info:DocumentInfo
[read-only] Since : | CS5 |
Metadata about the document.
public function get info():DocumentInfo
layerComps | property |
layerComps:LayerComps
[read-only] Since : | CS5 |
The layer comps collection in this document.
public function get layerComps():LayerComps
layers | property |
layers:Layers
[read-only] Since : | CS5 |
The layers collection in the document.
public function get layers():Layers
layerSets | property |
layerSets:LayerSets
[read-only] Since : | CS5 |
The layer sets collection in the document.
public function get layerSets():LayerSets
managed | property |
managed:Boolean
[read-only] Since : | CS5 |
If true, the document is a workgroup document.
public function get managed():Boolean
measurementScale | property |
measurementScale:MeasurementScale
[read-only] Since : | CS5 |
The measurement scale of the document.
public function get measurementScale():MeasurementScale
mode | property |
mode:DocumentMode
[read-only] Since : | CS5 |
The color profile.
public function get mode():DocumentMode
name | property |
name:String
[read-only] Since : | CS5 |
The document name.
public function get name():String
path | property |
path:File
[read-only] Since : | CS5 |
The path to the document.
public function get path():File
pathItems | property |
pathItems:PathItems
[read-only] Since : | CS5 |
The path items collection in this document.
public function get pathItems():PathItems
pixelAspectRatio | property |
pixelAspectRatio:Number
Since : | CS5 |
The (custom) pixel aspect ratio of the document. Range: 0.100 to 10.000.
public function get pixelAspectRatio():Number
public function set pixelAspectRatio(value:Number):void
printSettings | property |
printSettings:DocumentPrintSettings
[read-only] Since : | CS5 |
Document print settings.
public function get printSettings():DocumentPrintSettings
quickMaskMode | property |
quickMaskMode:Boolean
Since : | CS5 |
If true, the document is in Quick Mask mode.
public function get quickMaskMode():Boolean
public function set quickMaskMode(value:Boolean):void
resolution | property |
resolution:Number
[read-only] Since : | CS5 |
The resolution of the document (in pixels per inch)
public function get resolution():Number
saved | property |
saved:Boolean
[read-only] Since : | CS5 |
If true, the document been saved since the last change.
public function get saved():Boolean
selection | property |
selection:Selection
[read-only] Since : | CS5 |
The selected area of the document.
public function get selection():Selection
width | property |
width:Object
[read-only] Since : | CS5 |
The width of the document.
public function get width():Object
xmpMetadata | property |
xmpMetadata:XmpMetadata
[read-only] Since : | CS5 |
The XMP properties of the document. The Camera RAW settings are stored here.
public function get xmpMetadata():XmpMetadata
autoCount | () | method |
public function autoCount(channel:Channel, threshold:Number):void
Since : | CS5 |
Counts the objects in the document.
Parameters
channel:Channel — (com.adobe.photoshop.Channel) The channel to use for counting.
| |
threshold:Number — (Number) Threshold to use for counting. Range: 0 to 255. ( 0 - 255 )
|
changeMode | () | method |
public function changeMode(destinationMode:ChangeMode, options:DocumentConversionOptions = null):void
Since : | CS5 |
Changes the mode of the document.
Parameters
destinationMode:ChangeMode — (com.adobe.photoshop.ChangeMode) The mode to change to.
| |
options:DocumentConversionOptions (default = null ) — (com.adobe.photoshop.DocumentConversionOptions) Options for changing the mode.
|
close | () | method |
public function close(saving:SaveOptions = null):void
Since : | CS5 |
Closes the document.
Parameters
saving:SaveOptions (default = null ) — (com.adobe.photoshop.SaveOptions) Specifies whether changes should be saved before closing. ( default: SaveOptions.PROMPTTOSAVECHANGES )
|
convertProfile | () | method |
public function convertProfile(destinationProfile:String, intent:Intent, blackPointCompensation:Boolean, dither:Boolean = true):void
Since : | CS5 |
Converts the document from using one color profile to using another.
Parameters
destinationProfile:String — (String) The color profile to convert to. Either a string specifying a color profile, one of the working color spaces, or Lab color.
| |
intent:Intent — (com.adobe.photoshop.Intent) The conversion intent.
| |
blackPointCompensation:Boolean (default = NaN ) — (Boolean) If true, black point compensation is used.
| |
dither:Boolean (default = true ) — (Boolean) If true, dither is used. ( default: true )
|
crop | () | method |
public function crop(bounds:Array, angle:Number = 0, width:Object = null, height:Object = null):void
Since : | CS5 |
Crops the document.
Parameters
bounds:Array — (Array) The area to crop.
| |
angle:Number (default = 0 ) — (Number) The angle of cropping bounds. ( default: 0.0 )
| |
width:Object (default = null ) — (Object) The width of the resulting document.
| |
height:Object (default = null ) — (Object) The height of the resulting document.
|
duplicate | () | method |
public function duplicate(name:String = null, mergeLayersOnly:Boolean):Document
Since : | CS5 |
Duplicate this object.
Parameters
name:String (default = null ) — (String) The name of the new document.
| |
mergeLayersOnly:Boolean (default = NaN ) — (Boolean) If ture, duplicates merged layers only.
|
Document |
exportDocument | () | method |
public function exportDocument(exportIn:File, exportAs:ExportType = null, options:ExportOptions = null):void
Since : | CS5 |
Exports the document.
Parameters
exportIn:File — (flash.filesystem.File) The file to export to.
| |
exportAs:ExportType (default = null ) — (com.adobe.photoshop.ExportType) The type of export. ( default: ExportType.ILLUSTRATORPATHS )
| |
options:ExportOptions (default = null ) — (com.adobe.photoshop.ExportOptions) Options for the specified export type.
|
flatten | () | method |
public function flatten():void
Since : | CS5 |
Flattens all layers.
flipCanvas | () | method |
public function flipCanvas(direction:Direction):void
Since : | CS5 |
Flips the canvas horizontally or vertically.
Parameters
direction:Direction — (com.adobe.photoshop.Direction) The direction in which to flip the canvas.
|
importAnnotations | () | method |
public function importAnnotations(file:File):void
Since : | CS5 |
Imports annotations into the document.
Parameters
file:File — (flash.filesystem.File) The document to import annotations from.
|
mergeVisibleLayers | () | method |
public function mergeVisibleLayers():void
Since : | CS5 |
Flattens all visible layers in the document.
paste | () | method |
public function paste(intoSelection:Boolean = false):ArtLayer
Since : | CS5 |
Pastes contents of the clipboard into the document.
Parameters
intoSelection:Boolean (default = false ) — (Boolean) If true, contents are pasted into the current selection. ( default: false )
|
ArtLayer |
() | method |
public function print(sourceSpace:SourceSpaceType = null, printSpace:String = null, intent:Intent = null, blackPointCompensation:Boolean = true):void
Since : | CS5 |
Prints the document.
Parameters
sourceSpace:SourceSpaceType (default = null ) — (com.adobe.photoshop.SourceSpaceType) The color space for the source. ( default: SourceSpaceType.DOCUMENT )
| |
printSpace:String (default = null ) — (String) The color space for the printer. Can be "nothing" (meaning same as source); one of the working spaces or Lab color; or a string specifying a color space. Default: nothing.
| |
intent:Intent (default = null ) — (com.adobe.photoshop.Intent) The color conversion intent. ( default: Intent.RELATIVECOLORIMETRIC )
| |
blackPointCompensation:Boolean (default = true ) — (Boolean) If true, black point compensation is used. ( default: true )
|
printOneCopy | () | method |
public function printOneCopy():void
Since : | CS5 |
Print one copy of the document.
rasterizeAllLayers | () | method |
public function rasterizeAllLayers():void
Since : | CS5 |
Rasterizes all layers.
recordMeasurements | () | method |
public function recordMeasurements(source:MeasurementSource = null, dataPoints:Object = null):void
Since : | CS5 |
Records the measurements of document.
Parameters
source:MeasurementSource (default = null ) — (com.adobe.photoshop.MeasurementSource) The source of the measurements to record.
| |
dataPoints:Object (default = null ) — (Object) An array of identifiers of data points to record. Any data points not appropriate for the specified source are ignored.
|
resizeCanvas | () | method |
public function resizeCanvas(width:Object = null, height:Object = null, anchor:AnchorPosition = null):void
Since : | CS5 |
Changes the size of the canvas.
Parameters
width:Object (default = null ) — (Object) The desired width of the canvas.
| |
height:Object (default = null ) — (Object) The desired height of the canvas.
| |
anchor:AnchorPosition (default = null ) — (com.adobe.photoshop.AnchorPosition) The anchor point to resize around. ( default: AnchorPosition.MIDDLECENTER )
|
resizeImage | () | method |
public function resizeImage(width:Object = null, height:Object = null, resolution:Number, resampleMethod:ResampleMethod = null):void
Since : | CS5 |
Changes the size of the image.
Parameters
width:Object (default = null ) — (Object) The desired width of the image.
| |
height:Object (default = null ) — (Object) The desired height of the image.
| |
resolution:Number (default = NaN ) — (Number) The resolution (in pixels per inch)
| |
resampleMethod:ResampleMethod (default = null ) — (com.adobe.photoshop.ResampleMethod) The downsample method. ( default: ResampleMethod.BICUBIC )
|
revealAll | () | method |
public function revealAll():void
Since : | CS5 |
Expands the document to show clipped sections.
rotateCanvas | () | method |
public function rotateCanvas(angle:Number):void
Since : | CS5 |
Rotates the canvas.
Parameters
angle:Number — (Number) The number of degrees to rotate. A positive angle rotates the canvas clockwise; a negative value rotates the canvas counter-clockwise.
|
save | () | method |
public function save():void
Since : | CS5 |
Saves the document.
saveAs | () | method |
public function saveAs(saveIn:File, options:Object = null, asCopy:Boolean, extensionType:Extension = null):void
Since : | CS5 |
Saves the document with the specified save options.
Parameters
saveIn:File — (flash.filesystem.File) The file to save to, specified as a string containing the full file path or an alias. If not specified, the document is saved to its existing file.
| |
options:Object (default = null ) — (Object) Options for the specified file type.
| |
asCopy:Boolean (default = NaN ) — (Boolean) Saves the document as a copy, leaving the original open.
| |
extensionType:Extension (default = null ) — (com.adobe.photoshop.Extension) Appends the specified extension to the file name.
|
splitChannels | () | method |
public function splitChannels():Object
Since : | CS5 |
Splits the channels of the document.
ReturnsObject |
suspendHistory | () | method |
public function suspendHistory(historyString:String, javaScriptString:String):void
Since : | CS5 |
Provides a single history state for the entire script. Allows a single undo for all actions taken in the script.
Parameters
historyString:String — (String) The string to use for the history state.
| |
javaScriptString:String — (String) A string of JavaScript code to execute during the suspension of history.
|
trap | () | method |
public function trap(width:Number):void
Since : | CS5 |
Applies trapping to a CMYK document. Valid only when 'mode' = CMYK.
Parameters
width:Number — (Number) The trap width in pixels.
|
trim | () | method |
public function trim(type:TrimType = null, top:Boolean = true, left:Boolean = true, bottom:Boolean = true, right:Boolean = true):void
Since : | CS5 |
Trims the transparent area around the image on the specified sides of the canvas.
Parameters
type:TrimType (default = null ) — (com.adobe.photoshop.TrimType) The color or type of pixels to base the trim on. ( default: TrimType.TOPLEFT )
| |
top:Boolean (default = true ) — (Boolean) If true, trims away the top of the document. ( default: true )
| |
left:Boolean (default = true ) — (Boolean) If true, trims away the left of the document. ( default: true )
| |
bottom:Boolean (default = true ) — (Boolean) If true, trims away the bottom of the document. ( default: true )
| |
right:Boolean (default = true ) — (Boolean) If true, trims away the right of the document. ( default: true )
|