TracingObject
TracingObject
Section titled “TracingObject”TracingObject
Description
Section titled “Description”A tracing object, which associates source raster art item with a vector-art plug-in group created by tracing. Scripts can initiate tracing using PlacedItem.trace or RasterItem.trace().
The resulting PluginItem object represents the vector art group, and has this object in its tracing property.
A script can force the tracing operation by calling Application.redraw(). The operation is asynchronous, so a script should call redraw
after creating the tracing object, but before accessing its properties or expanding the tracing to convert it to an art item group.
The read-only properties that describe the tracing result have valid values only after the first tracing operation completes. A value of 0 indicates that the operation has not yet been completed.
Properties
Section titled “Properties”TracingObject.anchorCount
Section titled “TracingObject.anchorCount”tracingObject.anchorCount
Description
Section titled “Description”The number of anchors in the tracing result.
Number (long); read-only.
TracingObject.areaCount
Section titled “TracingObject.areaCount”tracingObject.areaCount
Description
Section titled “Description”The number of areas in the tracing result.
Number (long); read-only.
TracingObject.imageResolution
Section titled “TracingObject.imageResolution”tracingObject.imageResolution
Description
Section titled “Description”The resolution of the source image in pixels per inch.
Number (real); read-only.
TracingObject.parent
Section titled “TracingObject.parent”tracingObject.parent
Description
Section titled “Description”The object’s container.
Object; read-only.
TracingObject.pathCount
Section titled “TracingObject.pathCount”tracingObject.pathCount
Description
Section titled “Description”The number of paths in the tracing result.
Number (long); read-only.
TracingObject.sourceArt
Section titled “TracingObject.sourceArt”tracingObject.sourceArt
Description
Section titled “Description”The raster art used to create the associated vector art plug-in group.
TracingObject.tracingOptions
Section titled “TracingObject.tracingOptions”tracingObject.tracingOptions
Description
Section titled “Description”The options used to convert the raster artwork to vector art.
TracingObject.typename
Section titled “TracingObject.typename”tracingObject.typename
Description
Section titled “Description”The class name of the object.
String; read-only.
TracingObject.usedColorCount
Section titled “TracingObject.usedColorCount”tracingObject.usedColorCount
Description
Section titled “Description”The number of colors used in the tracing result.
Number (long); read-only.
Methods
Section titled “Methods”TracingObject.expandTracing()
Section titled “TracingObject.expandTracing()”tracingObject.expandTracing([viewed])
Description
Section titled “Description”Converts the vector art into a new group item. The new GroupItem object replaces the PluginItem object in the document.
By default, viewed
is false
, and the new group contains only the tracing result (the filled or stroked paths).
If viewed
is true
, the new group retains additional information that was specified for the viewing mode, such as outlines and overlays.
Deletes this object and its associated PluginItem object. Any group-level attributes that were applied to the plug-in item are applied to the top level of the new group item.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
viewed | Boolean, optional | todo |
Returns
Section titled “Returns”TracingObject.releaseTracing()
Section titled “TracingObject.releaseTracing()”tracingObject.releaseTracing()
Description
Section titled “Description”Reverts the artwork in the document to the original source raster art and removes the traced vector art. Returns the original object used to create the tracing, and deletes this object and its associated PluginItem object.