RasterItem
RasterItem
Section titled “RasterItem”app.activeDocument.rasterItems[index]
Description
Section titled “Description”A bitmap art item in a document. A script can create a raster item from an external file, or by copying an existing raster item with the duplicate
method.
Properties
Section titled “Properties”RasterItem.artworkKnockout
Section titled “RasterItem.artworkKnockout”app.activeDocument.rasterItems[index].artworkKnockout
Description
Section titled “Description”Is this object used to create a knockout, and if so, what kind of knockout.
RasterItem.bitsPerChannel
Section titled “RasterItem.bitsPerChannel”app.activeDocument.rasterItems[index].bitsPerChannel
Description
Section titled “Description”The number of bits per channel.
Number (long); read-only.
RasterItem.blendingMode
Section titled “RasterItem.blendingMode”app.activeDocument.rasterItems[index].blendingMode
Description
Section titled “Description”The blend mode used when compositing an object.
RasterItem.boundingBox
Section titled “RasterItem.boundingBox”app.activeDocument.rasterItems[index].boundingBox
Description
Section titled “Description”The dimensions of the placed art item regardless of transformations.
Array of 4 numbers
RasterItem.channels
Section titled “RasterItem.channels”app.activeDocument.rasterItems[index].channels
Description
Section titled “Description”The number of channels.
Number (long); read-only.
RasterItem.colorants
Section titled “RasterItem.colorants”app.activeDocument.rasterItems[index].colorants
Description
Section titled “Description”The colorants used in the raster art.
Array of string; read-only.
RasterItem.colorizedGrayscale
Section titled “RasterItem.colorizedGrayscale”app.activeDocument.rasterItems[index].colorizedGrayscale
Description
Section titled “Description”If true
, the raster art is a colorized grayscale image.
Boolean; read-only.
RasterItem.contentVariable
Section titled “RasterItem.contentVariable”app.activeDocument.rasterItems[index].contentVariable
Description
Section titled “Description”The content variable bound to the item.
RasterItem.controlBounds
Section titled “RasterItem.controlBounds”app.activeDocument.rasterItems[index].controlBounds
Description
Section titled “Description”The bounds of the object including stroke width and controls.
Array of 4 numbers; read-only.
RasterItem.editable
Section titled “RasterItem.editable”app.activeDocument.rasterItems[index].editable
Description
Section titled “Description”If true
, this item is editable.
Boolean; read-only.
RasterItem.embedded
Section titled “RasterItem.embedded”app.activeDocument.rasterItems[index].embedded
Description
Section titled “Description”If true
, the raster art item is embedded in the illustration.
Boolean
RasterItem.file
Section titled “RasterItem.file”app.activeDocument.rasterItems[index].file
Description
Section titled “Description”The file containing the artwork.
File object; read-only.
RasterItem.geometricBounds
Section titled “RasterItem.geometricBounds”app.activeDocument.rasterItems[index].geometricBounds
Description
Section titled “Description”The bounds of the object excluding stroke width.
Array of 4 numbers; read-only.
RasterItem.height
Section titled “RasterItem.height”app.activeDocument.rasterItems[index].height
Description
Section titled “Description”The height of the group item.
Number (double)
RasterItem.hidden
Section titled “RasterItem.hidden”app.activeDocument.rasterItems[index].hidden
Description
Section titled “Description”If true
, this item is hidden.
Boolean
RasterItem.imageColorSpace
Section titled “RasterItem.imageColorSpace”app.activeDocument.rasterItems[index].imageColorSpace
Description
Section titled “Description”The color space of the raster image.
ImageColorSpace; read-only.
RasterItem.isIsolated
Section titled “RasterItem.isIsolated”app.activeDocument.rasterItems[index].isIsolated
Description
Section titled “Description”If true
, this object is isolated.
Boolean
RasterItem.layer
Section titled “RasterItem.layer”app.activeDocument.rasterItems[index].layer
Description
Section titled “Description”The layer to which this item belongs.
Layer; read-only.
RasterItem.left
Section titled “RasterItem.left”app.activeDocument.rasterItems[index].left
Description
Section titled “Description”The position of the left side of the item (in points, measured from the left side of the page).
Number (double)
RasterItem.locked
Section titled “RasterItem.locked”app.activeDocument.rasterItems[index].locked
Description
Section titled “Description”If true
, this item is locked.
Boolean
RasterItem.matrix
Section titled “RasterItem.matrix”app.activeDocument.rasterItems[index].matrix
Description
Section titled “Description”The transformation matrix of the placed artwork.
RasterItem.name
Section titled “RasterItem.name”app.activeDocument.rasterItems[index].name
Description
Section titled “Description”The name of this item.
String
RasterItem.note
Section titled “RasterItem.note”app.activeDocument.rasterItems[index].note
Description
Section titled “Description”The note assigned to this item.
String
RasterItem.opacity
Section titled “RasterItem.opacity”app.activeDocument.rasterItems[index].opacity
Description
Section titled “Description”The opacity of the object.
Range: 0.0 to 100.0
Number (double)
RasterItem.overprint
Section titled “RasterItem.overprint”app.activeDocument.rasterItems[index].overprint
Description
Section titled “Description”If true
, the raster art overprints.
Boolean
RasterItem.parent
Section titled “RasterItem.parent”app.activeDocument.rasterItems[index].parent
Description
Section titled “Description”The parent of this object.
RasterItem.position
Section titled “RasterItem.position”app.activeDocument.rasterItems[index].position
Description
Section titled “Description”The position (in points) of the top left corner of the rasterItem
object in the format [x, y]. Does not include stroke weight.
Array of 2 numbers; read-only.
RasterItem.selected
Section titled “RasterItem.selected”app.activeDocument.rasterItems[index].selected
Description
Section titled “Description”If true
, this item is selected.
Boolean
RasterItem.sliced
Section titled “RasterItem.sliced”app.activeDocument.rasterItems[index].sliced
Description
Section titled “Description”If true
, the item sliced.
Default: false
Boolean
RasterItem.status
Section titled “RasterItem.status”app.activeDocument.rasterItems[index].status
Description
Section titled “Description”Status of the linked image.
RasterItem.tags
Section titled “RasterItem.tags”app.activeDocument.rasterItems[index].tags
Description
Section titled “Description”The tags contained in this item.
Tags; read-only.
RasterItem.top
Section titled “RasterItem.top”app.activeDocument.rasterItems[index].top
Description
Section titled “Description”The position of the top of the item (in points, measured from the bottom of the page).
Number (double)
RasterItem.transparent
Section titled “RasterItem.transparent”app.activeDocument.rasterItems[index].transparent
Description
Section titled “Description”If true
, the raster art is transparent.
Boolean; read-only.
RasterItem.typename
Section titled “RasterItem.typename”app.activeDocument.rasterItems[index].typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
RasterItem.uRL
Section titled “RasterItem.uRL”app.activeDocument.rasterItems[index].uRL
Description
Section titled “Description”The value of the Adobe URL tag assigned to this item.
String
RasterItem.visibilityVariable
Section titled “RasterItem.visibilityVariable”app.activeDocument.rasterItems[index].visibilityVariable
Description
Section titled “Description”The visibility variable bound to the item.
RasterItem.visibleBounds
Section titled “RasterItem.visibleBounds”app.activeDocument.rasterItems[index].visibleBounds
Description
Section titled “Description”The visible bounds of the item including stroke width.
Array of 4 numbers; read-only.
RasterItem.width
Section titled “RasterItem.width”app.activeDocument.rasterItems[index].width
Description
Section titled “Description”The width of the item.
Number (double)
RasterItem.wrapInside
Section titled “RasterItem.wrapInside”app.activeDocument.rasterItems[index].wrapInside
Description
Section titled “Description”If true
, the text frame object should be wrapped inside this object.
Boolean
RasterItem.wrapOffset
Section titled “RasterItem.wrapOffset”app.activeDocument.rasterItems[index].wrapOffset
Description
Section titled “Description”The offset to use when wrapping text around this object.
Number (double)
RasterItem.wrapped
Section titled “RasterItem.wrapped”app.activeDocument.rasterItems[index].wrapped
Description
Section titled “Description”If true
, wrap text frame objects around this object (text frame must be above the object).
Boolean
RasterItem.zOrderPosition
Section titled “RasterItem.zOrderPosition”app.activeDocument.rasterItems[index].zOrderPosition
Description
Section titled “Description”The position of this item within the stacking order of the group or layer (parent
) that contains the item.
Number; read-only.
Methods
Section titled “Methods”RasterItem.colorize()
Section titled “RasterItem.colorize()”app.activeDocument.rasterItems[index].colorize(rasterizeColor)
Description
Section titled “Description”Colorizes the raster item with a CMYK or RGB Color.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
rasterizeColor | Color | CMYK or RGB Color to rasterize with |
Returns
Section titled “Returns”Nothing.
RasterItem.duplicate()
Section titled “RasterItem.duplicate()”app.activeDocument.rasterItems[index].duplicate([relativeObject][, insertionLocation])
Description
Section titled “Description”Creates a duplicate of the selected object.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
relativeObject | Object, optional | Object to duplicate to |
insertionLocation | ElementPlacement, optional | Location to insert element |
Returns
Section titled “Returns”RasterItem.move()
Section titled “RasterItem.move()”app.activeDocument.rasterItems[index].move(relativeObject, insertionLocation)
Description
Section titled “Description”Moves the object.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
relativeObject | Object | Object to move element within |
insertionLocation | ElementPlacement, optional | Location to move element to |
Returns
Section titled “Returns”RasterItem.remove()
Section titled “RasterItem.remove()”app.activeDocument.rasterItems[index].remove()
Description
Section titled “Description”Deletes this object.
Returns
Section titled “Returns”Nothing.
RasterItem.resize()
Section titled “RasterItem.resize()”app.activeDocument.rasterItems[index].resize( scaleX, scaleY [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,changeLineWidths] [,scaleAbout])
Description
Section titled “Description”Scales the art item where scaleX
is the horizontal scaling factor and scaleY
is the vertical scaling factor. 100.0 = 100%.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
scaleX | Number (double) | Horizontal scaling factor |
scaleY | Number (double) | Vertical scaling factor |
changePositions | Boolean, optional | Whether to effect art object positions and orientations |
changeFillPatterns | Boolean, optional | Whether to transform fill patterns |
changeFillGradients | Boolean, optional | Whether to transform fill gradients |
changeStrokePattern | Boolean, optional | Whether to transform stroke patterns |
changeLineWidths | Number (double), optional | The amount to scale line widths |
scaleAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
RasterItem.rotate()
Section titled “RasterItem.rotate()”app.activeDocument.rasterItems[index].rotate( angle [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,rotateAbout])
Description
Section titled “Description”Rotates the art item relative to the current rotation.
The object is rotated counter-clockwise if the angle
value is positive, clockwise if the value is negative.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
angle | Number (double) | The angle amount to rotate the element |
changePositions | Boolean, optional | Whether to effect art object positions and orientations |
changeFillPatterns | Boolean, optional | Whether to transform fill patterns |
changeFillGradients | Boolean, optional | Whether to transform fill gradients |
changeStrokePattern | Boolean, optional | Whether to transform stroke patterns |
rotateAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
RasterItem.trace()
Section titled “RasterItem.trace()”app.activeDocument.rasterItems[index].trace()
Description
Section titled “Description”Converts the raster art for this object to vector art, using default options.
Reorders the raster art into the source art of a plug-in group, and converts it into a group of filled and/or stroked paths that resemble the original image.
Creates and returns a PluginItem object that references a TracingObject object.
Returns
Section titled “Returns”RasterItem.transform()
Section titled “RasterItem.transform()”app.activeDocument.rasterItems[index].transform( transformationMatrix [, changePositions] [, changeFillPatterns] [, changeFillGradients] [, changeStrokePattern] [, changeLineWidths] [, transformAbout])
Description
Section titled “Description”Transforms the art item by applying a transformation matrix.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
transformationMatrix | Matrix | Transformation matrix to apply |
changePositions | Boolean, optional | Whether to change Positions |
changeFillPatterns | Boolean, optional | Whether to change Fill Patterns |
changeFillGradients | Boolean, optional | Whether to change Fill Gradients |
changeStrokePattern | Boolean, optional | Whether to change Stroke Pattern |
changeLineWidths | Number (double), optional | The amount to scale line widths |
transformAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
RasterItem.translate()
Section titled “RasterItem.translate()”app.activeDocument.rasterItems[index].translate( [deltaX] [, deltaY] [, transformObjects] [, transformFillPatterns] [, transformFillGradients] [, transformStrokePatterns])
Description
Section titled “Description”Repositions the art item relative to the current position, where deltaX
is the horizontal offset and deltaY
is the vertical offset.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
deltaX | Number (double), optional | Horizontal offset |
deltaY | Number (double), optional | Vertical offset |
transformObjects | Boolean, optional | Whether to transform Objects |
transformFillPatterns | Boolean, optional | Whether to transform Fill Patterns |
transformFillGradients | Boolean, optional | Whether to transform Fill Gradients |
transformStrokePatterns | Boolean, optional | Whether to transform Stroke Patterns |
Returns
Section titled “Returns”Nothing.
RasterItem.zOrder()
Section titled “RasterItem.zOrder()”app.activeDocument.rasterItems[index].zOrder(zOrderCmd)
Description
Section titled “Description”Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
zOrderCmd | ZOrderMethod | Stacking order arrangement method |
Returns
Section titled “Returns”Nothing.