跳转到内容

GraphItem

app.activeDocument.graphItems[index]

任何图形对象。参见示例 旋转图形项


app.activeDocument.graphItems[index].artworkKnockout

此对象是否用于创建挖空效果,如果是,挖空类型是什么。不能将此值设置为 KnockoutState.Unknown

KnockoutState


app.activeDocument.graphItems[index].blendingMode

合成对象时使用的模式。

BlendModes


app.activeDocument.graphItems[index].contentVariable

绑定到图形项的内容变量。

在绑定之前不需要设置 contentVariable 的类型。Illustrator 会自动将其类型设置为 GRAPH

Variable


app.activeDocument.graphItems[index].controlBounds

绑定到图形项的内容变量。

对象的边界,包括描边宽度和控件。

4个数字的数组;只读。


app.activeDocument.graphItems[index].editable

如果为 true,则此图形项可编辑。

布尔值;只读。


app.activeDocument.graphItems[index].geometricBounds

对象的边界,不包括描边宽度。

4个数字的数组;只读。


app.activeDocument.graphItems[index].height

图形项的高度。

数字(双精度);只读。


app.activeDocument.graphItems[index].hidden

如果为 true,则此图形项被隐藏。

布尔值。


app.activeDocument.graphItems[index].isIsolated

如果为 true,则此对象被隔离。

布尔值。


app.activeDocument.graphItems[index].layer

此图形项所属的图层。

Layer;只读。


app.activeDocument.graphItems[index].left

图形项左侧与页面左侧的偏移量(以点为单位)。

数字。


app.activeDocument.graphItems[index].locked

如果为 true,则此图形项被锁定。

布尔值。


app.activeDocument.graphItems[index].name

此图形项的名称。

字符串。


app.activeDocument.graphItems[index].note

分配给此项的注释。

字符串。


app.activeDocument.graphItems[index].opacity

对象的不透明度;值介于 0.0 到 100.0 之间。

数字(双精度)。


app.activeDocument.graphItems[index].parent

此对象的父对象。

LayerGroupItem


app.activeDocument.graphItems[index].position

graphItem 对象左上角的位置(以点为单位),格式为 [x, y]。不包括描边宽度。

2个数字的数组。


app.activeDocument.graphItems[index].selected

如果为 true,则此对象被选中。

布尔值。


app.activeDocument.graphItems[index].sliced

如果为 true,则图形项被切片。

默认值:false

布尔值。


app.activeDocument.graphItems[index].tags

此图形项中包含的标签。

Tags;只读。


app.activeDocument.graphItems[index].top

图形项顶部与页面底部的偏移量(以点为单位)。

数字(双精度)。


app.activeDocument.graphItems[index].typename

图形项的类型。

字符串;只读。


app.activeDocument.graphItems[index].uRL

分配给此图形项的 Adobe URL 标签的值。

字符串。


app.activeDocument.graphItems[index].visibilityVariable

绑定到图形项的可见性变量。

在绑定之前不需要设置 visibilityVariable 的类型。Illustrator 会自动将其类型设置为 VISIBILITY

Variable


app.activeDocument.graphItems[index].visibleBounds

图形项的可见边界,包括描边宽度。

4个数字的数组;只读。


app.activeDocument.graphItems[index].width

图形项的宽度。

范围:0.0 到 16348.0。

数字(双精度)。


app.activeDocument.graphItems[index].wrapInside

如果为 true,则文本框架对象应在此对象内部换行。

布尔值。


app.activeDocument.graphItems[index].wrapOffset

围绕此对象换行文本时使用的偏移量。

数字(双精度)。


app.activeDocument.graphItems[index].wrapped

如果为 true,则围绕此对象换行文本框架对象。(文本框架必须位于对象上方。)

布尔值。


app.activeDocument.graphItems[index].zOrderPosition

此艺术项在包含它的组或图层(父对象)中的堆叠顺序中的位置。

数字(长整型)。


app.activeDocument.graphItems[index].duplicate([relativeObject] [,insertionLocation])

创建选定对象的副本。

参数类型描述
relativeObject对象,可选要复制到的对象
insertionLocationElementPlacement,可选插入元素的位置

GraphItem


app.activeDocument.graphItems[index].move(relativeObject, insertionLocation)

移动对象。

参数类型描述
relativeObject对象要移动元素的对象
insertionLocationElementPlacement,可选移动元素到的位置

GraphItem


app.activeDocument.graphItems[index].remove()

删除此对象。

无。


app.activeDocument.graphItems[index].resize(
scaleX,
scaleY
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,changeLineWidths]
[,scaleAbout]
)

缩放艺术项,其中 scaleX 是水平缩放因子,scaleY 是垂直缩放因子。100.0 = 100%。

参数类型描述
scaleX数字(双精度)水平缩放因子
scaleY数字(双精度)垂直缩放因子
changePositions布尔值,可选是否影响艺术对象的位置和方向
changeFillPatterns布尔值,可选是否变换填充图案
changeFillGradients布尔值,可选是否变换填充渐变
changeStrokePattern布尔值,可选是否变换描边图案
changeLineWidths数字(双精度),可选缩放线宽的量
scaleAboutTransformation,可选用作锚点的点,用于变换

无。


app.activeDocument.graphItems[index].rotate(
angle
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,rotateAbout]
)

相对于当前旋转角度旋转艺术项。如果 angle 值为正,则对象逆时针旋转;如果为负,则顺时针旋转。

参数类型描述
angle数字(双精度)旋转元素的角度量
changePositions布尔值,可选是否影响艺术对象的位置和方向
changeFillPatterns布尔值,可选是否变换填充图案
changeFillGradients布尔值,可选是否变换填充渐变
changeStrokePattern布尔值,可选是否变换描边图案
rotateAboutTransformation,可选用作锚点的点,用于变换

无。


app.activeDocument.graphItems[index].transform(
transformationMatrix
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,changeLineWidths]
[,transformAbout]
)

通过应用变换矩阵来变换艺术项。

参数类型描述
transformationMatrixMatrix要应用的变换矩阵
changePositions布尔值,可选是否改变位置
changeFillPatterns布尔值,可选是否改变填充图案
changeFillGradients布尔值,可选是否改变填充渐变
changeStrokePattern布尔值,可选是否改变描边图案
changeLineWidths数字(双精度),可选缩放线宽的量
transformAboutTransformation,可选用作锚点的点,用于变换

无。


app.activeDocument.graphItems[index].translate(
[deltaX]
[,deltaY]
[,transformObjects]
[,transformFillPatterns]
[,transformFillGradients]
[,transformStrokePatterns]
)

相对于当前位置重新定位艺术项,其中 deltaX 是水平偏移量,deltaY 是垂直偏移量。

参数类型描述
deltaX数字(双精度),可选水平偏移量
deltaY数字(双精度),可选垂直偏移量
transformObjects布尔值,可选是否变换对象
transformFillPatterns布尔值,可选是否变换填充图案
transformFillGradients布尔值,可选是否变换填充渐变
transformStrokePatterns布尔值,可选是否变换描边图案

无。


app.activeDocument.graphItems[index].zOrder(zOrderCmd)

在包含此对象的组或图层(父对象)中排列艺术项的位置。

参数类型描述
zOrderCmdZOrderMethod堆叠顺序排列方法

无。