Extends Item
The Layer item represents a layer in an Illustrator document.
The layer which is currently active can be accessed through document.activeLayer. An array of all layers in a document can be accessed through document.layers.
Sample code:
print(document.activeLayer.name); // 'Layer 1' var layer = new Layer(); layer.name = 'A new layer'; layer.activate(); print(document.activeLayer.name); // 'A new layer' print(document.layers.length); // 2
Constructors
Functions
Inheritance
- Item
-
- name
- position
- style
- selected
- fullySelected
- locked
- visible
- clipMask
- targeted
- blendMode
- opacity
- isolated
- knockout
- alphaIsShape
- data
- document
- layer
- parent
- children
- firstChild
- lastChild
- nextSibling
- previousSibling
- index
- bounds
- strokeBounds
- controlBounds
- strokeColor
- strokeWidth
- strokeCap
- strokeJoin
- dashOffset
- dashArray
- miterLimit
- strokeOverprint
- fillColor
- fillOverprint
- windingRule
- resolution
- rasterize(items[, type[, resolution, antialiasing[, width, height]]])
- remove()
- removeChildren()
- copyTo(item)
- clone()
- getKnockout(inherited)
- reverseChildren()
- hitTest(point[, request[, tolerance]])
- hitTest(point, tolerance)
- expand([flags[, steps]])
- rasterize([type[, resolution[, antialiasing[, width, height]]]])
- hasChildren()
- isEditable()
- isValid()
- appendTop(item)
- appendBottom(item)
- moveAbove(item)
- moveBelow(item)
- isAbove(item)
- isBelow(item)
- isParent(item)
- isChild(item)
- isDescendant(item)
- isAncestor(item)
- isGroupedWith(item)
- scale(sx, sy[, center])
- scale(scale[, center])
- translate(t)
- rotate(angle[, center])
- shear(shx, shy)
- transform(matrix[, flags])