GraphItem
GraphItem
Section titled “GraphItem”app.activeDocument.graphItems[index]
任何图形对象。参见示例 旋转图形项。
GraphItem.artworkKnockout
Section titled “GraphItem.artworkKnockout”app.activeDocument.graphItems[index].artworkKnockout
此对象是否用于创建挖空效果,如果是,挖空类型是什么。不能将此值设置为 KnockoutState.Unknown
。
GraphItem.blendingMode
Section titled “GraphItem.blendingMode”app.activeDocument.graphItems[index].blendingMode
合成对象时使用的模式。
GraphItem.contentVariable
Section titled “GraphItem.contentVariable”app.activeDocument.graphItems[index].contentVariable
绑定到图形项的内容变量。
在绑定之前不需要设置 contentVariable
的类型。Illustrator 会自动将其类型设置为 GRAPH
。
GraphItem.controlBounds
Section titled “GraphItem.controlBounds”app.activeDocument.graphItems[index].controlBounds
绑定到图形项的内容变量。
对象的边界,包括描边宽度和控件。
4个数字的数组;只读。
GraphItem.editable
Section titled “GraphItem.editable”app.activeDocument.graphItems[index].editable
如果为 true
,则此图形项可编辑。
布尔值;只读。
GraphItem.geometricBounds
Section titled “GraphItem.geometricBounds”app.activeDocument.graphItems[index].geometricBounds
对象的边界,不包括描边宽度。
4个数字的数组;只读。
GraphItem.height
Section titled “GraphItem.height”app.activeDocument.graphItems[index].height
图形项的高度。
数字(双精度);只读。
GraphItem.hidden
Section titled “GraphItem.hidden”app.activeDocument.graphItems[index].hidden
如果为 true
,则此图形项被隐藏。
布尔值。
GraphItem.isIsolated
Section titled “GraphItem.isIsolated”app.activeDocument.graphItems[index].isIsolated
如果为 true
,则此对象被隔离。
布尔值。
GraphItem.layer
Section titled “GraphItem.layer”app.activeDocument.graphItems[index].layer
此图形项所属的图层。
Layer;只读。
GraphItem.left
Section titled “GraphItem.left”app.activeDocument.graphItems[index].left
图形项左侧与页面左侧的偏移量(以点为单位)。
数字。
GraphItem.locked
Section titled “GraphItem.locked”app.activeDocument.graphItems[index].locked
如果为 true
,则此图形项被锁定。
布尔值。
GraphItem.name
Section titled “GraphItem.name”app.activeDocument.graphItems[index].name
此图形项的名称。
字符串。
GraphItem.note
Section titled “GraphItem.note”app.activeDocument.graphItems[index].note
分配给此项的注释。
字符串。
GraphItem.opacity
Section titled “GraphItem.opacity”app.activeDocument.graphItems[index].opacity
对象的不透明度;值介于 0.0 到 100.0 之间。
数字(双精度)。
GraphItem.parent
Section titled “GraphItem.parent”app.activeDocument.graphItems[index].parent
此对象的父对象。
GraphItem.position
Section titled “GraphItem.position”app.activeDocument.graphItems[index].position
graphItem
对象左上角的位置(以点为单位),格式为 [x, y]。不包括描边宽度。
2个数字的数组。
GraphItem.selected
Section titled “GraphItem.selected”app.activeDocument.graphItems[index].selected
如果为 true
,则此对象被选中。
布尔值。
GraphItem.sliced
Section titled “GraphItem.sliced”app.activeDocument.graphItems[index].sliced
如果为 true
,则图形项被切片。
默认值:false
。
布尔值。
GraphItem.tags
Section titled “GraphItem.tags”app.activeDocument.graphItems[index].tags
此图形项中包含的标签。
Tags;只读。
GraphItem.top
Section titled “GraphItem.top”app.activeDocument.graphItems[index].top
图形项顶部与页面底部的偏移量(以点为单位)。
数字(双精度)。
GraphItem.typename
Section titled “GraphItem.typename”app.activeDocument.graphItems[index].typename
图形项的类型。
字符串;只读。
GraphItem.uRL
Section titled “GraphItem.uRL”app.activeDocument.graphItems[index].uRL
分配给此图形项的 Adobe URL 标签的值。
字符串。
GraphItem.visibilityVariable
Section titled “GraphItem.visibilityVariable”app.activeDocument.graphItems[index].visibilityVariable
绑定到图形项的可见性变量。
在绑定之前不需要设置 visibilityVariable
的类型。Illustrator 会自动将其类型设置为 VISIBILITY
。
GraphItem.visibleBounds
Section titled “GraphItem.visibleBounds”app.activeDocument.graphItems[index].visibleBounds
图形项的可见边界,包括描边宽度。
4个数字的数组;只读。
GraphItem.width
Section titled “GraphItem.width”app.activeDocument.graphItems[index].width
图形项的宽度。
范围:0.0 到 16348.0。
数字(双精度)。
GraphItem.wrapInside
Section titled “GraphItem.wrapInside”app.activeDocument.graphItems[index].wrapInside
如果为 true
,则文本框架对象应在此对象内部换行。
布尔值。
GraphItem.wrapOffset
Section titled “GraphItem.wrapOffset”app.activeDocument.graphItems[index].wrapOffset
围绕此对象换行文本时使用的偏移量。
数字(双精度)。
GraphItem.wrapped
Section titled “GraphItem.wrapped”app.activeDocument.graphItems[index].wrapped
如果为 true
,则围绕此对象换行文本框架对象。(文本框架必须位于对象上方。)
布尔值。
GraphItem.zOrderPosition
Section titled “GraphItem.zOrderPosition”app.activeDocument.graphItems[index].zOrderPosition
此艺术项在包含它的组或图层(父对象)中的堆叠顺序中的位置。
数字(长整型)。
GraphItem.duplicate()
Section titled “GraphItem.duplicate()”app.activeDocument.graphItems[index].duplicate([relativeObject] [,insertionLocation])
创建选定对象的副本。
参数 | 类型 | 描述 |
---|---|---|
relativeObject | 对象,可选 | 要复制到的对象 |
insertionLocation | ElementPlacement,可选 | 插入元素的位置 |
GraphItem.move()
Section titled “GraphItem.move()”app.activeDocument.graphItems[index].move(relativeObject, insertionLocation)
移动对象。
参数 | 类型 | 描述 |
---|---|---|
relativeObject | 对象 | 要移动元素的对象 |
insertionLocation | ElementPlacement,可选 | 移动元素到的位置 |
GraphItem.remove()
Section titled “GraphItem.remove()”app.activeDocument.graphItems[index].remove()
删除此对象。
无。
GraphItem.resize()
Section titled “GraphItem.resize()”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 | 数字(双精度),可选 | 缩放线宽的量 |
scaleAbout | Transformation,可选 | 用作锚点的点,用于变换 |
无。
GraphItem.rotate()
Section titled “GraphItem.rotate()”app.activeDocument.graphItems[index].rotate( angle [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,rotateAbout])
相对于当前旋转角度旋转艺术项。如果 angle
值为正,则对象逆时针旋转;如果为负,则顺时针旋转。
参数 | 类型 | 描述 |
---|---|---|
angle | 数字(双精度) | 旋转元素的角度量 |
changePositions | 布尔值,可选 | 是否影响艺术对象的位置和方向 |
changeFillPatterns | 布尔值,可选 | 是否变换填充图案 |
changeFillGradients | 布尔值,可选 | 是否变换填充渐变 |
changeStrokePattern | 布尔值,可选 | 是否变换描边图案 |
rotateAbout | Transformation,可选 | 用作锚点的点,用于变换 |
无。
GraphItem.transform()
Section titled “GraphItem.transform()”app.activeDocument.graphItems[index].transform( transformationMatrix [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,changeLineWidths] [,transformAbout])
通过应用变换矩阵来变换艺术项。
参数 | 类型 | 描述 |
---|---|---|
transformationMatrix | Matrix | 要应用的变换矩阵 |
changePositions | 布尔值,可选 | 是否改变位置 |
changeFillPatterns | 布尔值,可选 | 是否改变填充图案 |
changeFillGradients | 布尔值,可选 | 是否改变填充渐变 |
changeStrokePattern | 布尔值,可选 | 是否改变描边图案 |
changeLineWidths | 数字(双精度),可选 | 缩放线宽的量 |
transformAbout | Transformation,可选 | 用作锚点的点,用于变换 |
无。
GraphItem.translate()
Section titled “GraphItem.translate()”app.activeDocument.graphItems[index].translate( [deltaX] [,deltaY] [,transformObjects] [,transformFillPatterns] [,transformFillGradients] [,transformStrokePatterns])
相对于当前位置重新定位艺术项,其中 deltaX
是水平偏移量,deltaY
是垂直偏移量。
参数 | 类型 | 描述 |
---|---|---|
deltaX | 数字(双精度),可选 | 水平偏移量 |
deltaY | 数字(双精度),可选 | 垂直偏移量 |
transformObjects | 布尔值,可选 | 是否变换对象 |
transformFillPatterns | 布尔值,可选 | 是否变换填充图案 |
transformFillGradients | 布尔值,可选 | 是否变换填充渐变 |
transformStrokePatterns | 布尔值,可选 | 是否变换描边图案 |
无。
GraphItem.zOrder()
Section titled “GraphItem.zOrder()”app.activeDocument.graphItems[index].zOrder(zOrderCmd)
在包含此对象的组或图层(父对象)中排列艺术项的位置。
参数 | 类型 | 描述 |
---|---|---|
zOrderCmd | ZOrderMethod | 堆叠顺序排列方法 |
无。