detecting objects inside shape


so came script, , worked fine until tried on different file. have moved artboard around on "main" canvas (if called) , on 1 works on, seems work when artboard(top, left) positive values. on new file doesn't seem matter on artboard, wont work anywhere. should find textpath relative shapes position.

 

i thought coordinatesystem, doesn't seem fix it. ideas appreciated. been banging head against desk week on one. have feeling might because not understanding how canvas works (maybe math.abs(); bad idea?)

 

threw on gist because pretty big: https://gist.github.com/2951981

since cs4, coordinate system's 0,0 point @ upper left of artboard. x positive right , y positive down. used origin cartesian 1 0,0 @ lower left , positive y since photoshop , lot of other software (mostly images work) work upper left, adobe decided change ai match. there global , artboard rulers further confuse issue. hope helps.



More discussions in Illustrator Scripting


adobe

Comments