Adobe 26001360 Scripting Guide - Page 99
set {x, y} to aPoint, set rectLeft to x - itemWidth * pEllipseScale
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 99 highlights
Adobe Illustrator CS Scripting Guide 99 or class of selectedItems is text ¬ or class of item 1 of selectedItems is not path item then display dialog "Please select a single path item before running this script" else set pathItem to item 1 of selectedItems -- Set ellipse color based on document color space set docColorSpace to color space of current document if docColorSpace is RGB then set ellipseColor to {red:255.0, green:0.0, blue:0.0} else set ellipseColor to {cyan:0.0, magenta:100.0, yellow:100.0, black:0.0} end if -- Gather needed info about the path item to be embellished set itemWidth to width of pathItem set itemHeight to height of pathItem set pathPointList to anchor of every path point of pathItem -- Calculate the position and bounds for each ellipse repeat with aPoint in pathPointList set {x, y} to aPoint set rectLeft to x - (itemWidth * pEllipseScale) set rectRight to x + (itemWidth * pEllipseScale) set rectTop to y + (itemHeight * pEllipseScale) set rectBottom to y - (itemHeight * pEllipseScale) set ellipseRect to {rectLeft, rectTop, rectRight, rectBottom} make new ellipse at beginning of current document ¬ with properties {bounds:ellipseRect, inscribed:true ¬ , reversed:false, stroke color:ellipseColor, fill color:ellipseColor} ¬ end repeat end if end tell 12 Aug 03