
C
HAPTER
1: Introduction
Changes since CS3
14
➤
Two new methods were added to the
Document
class.
WindowCapture
captures the current document
to a TIFF image.
Rasterize
rasterizes the source art within a specified clip bounds.
➣
AppleScript —
capture
document
1
,
rasterize
document
1
➣
JavaScript —
app.activeDocument.windowCapture,
app.activeDocument.rasterize
➣
VBScript —
App.ActiveDocument.WindowCapture,
App.ActiveDocument.Rasterize
➤
A new method in the
Swatches
collection,
GetSelected
, returns a
SwatchList
of
Swatch
objects
currently selected.
➣
AppleScript —
get
selected
swatches
of
document
1
➣
JavaScript —
app.activeDocument.swatches.getSelected
➣
VBScript —
App.ActiveDocument.Swatches.GetSelected
➤
A new class,
SwatchGroup
, contains a group of
Swatch
objects. It has two methods:
GetAllSwatches
and
AddSwatch
.
➣
AppleScript —
swatch
group
1
of
document
1
➣
JavaScript —
app.activeDocument.swatchGroups[0]
➣
VBScript —
App.ActiveDocument.SwatchGroups(1)
➤
A new collection,
SwatchGroups
, contains all
SwatchGroup
objects in a document. It has two
methods:
Remove
and
Add
.
➣
AppleScript —
swatch
groups
in
document
1
➣
JavaScript —
app.activeDocument.swatchGroups
➣
VBScript —
App.ActiveDocument.SwatchGroups
➤
A new type,
SwatchList
, defines a collection of
Swatch
objects. It is used by the
SwatchGroup
object
and
Swatches
collection.
➤
A new property in the
GradientStop
class,
opacity
, allows each stop to define its own degree of
transparency. Alpha blending occurs between stops.
➣
AppleScript —
stop
opacity
of
gradient
stop
➣
JavaScript —
gradientStop.opacity
➣
VBScript —
GradientStop.Opacity
➤
A new property in the
OpenOptionsAutoCAD
class,
MergeLayers
, defines whether the layers in the
AutoCAD file being opened should be merged into a single layer in the Illustrator document.
➣
AppleScript —
merge
layers:
true
➣
JavaScript —
mergeLayers
=
true
➣
VBScript —
MergeLayers
=
true