Coordinates
I open a photoshop document xx.psd in illustrator (15.1) and then add a textframe to the document, and specify the position of this text frame. I then place some contents in the text frame. For the purpose of my investigation, I make these contents the coordinates of the position I specified, eg "(100,100)". The text frame appears to be postioned using an ordinary cartesian right handed coordinate system, where x gets bigger to the right, and y gets bigger in the "up" direction (demonstrated by writing several text frames at different locations). When I inspect the rulers used in Illustrator, both the artboard and global rulers use coordinate systems where y increases in the "down" direction. Can anyone clarify what coordinate system scripting uses?
When I look at my bits of text, hovering over the handles shows (100,100) to be at (-106.76pt, 372.76pt) and it is below and to the left of the actual photoshop image when rulers is set to "artboard", and the ruler origin is the top left of the photoshop image.
When I look at my bits of text with the global rulers active, the handles of (100,100) are now at (100pt, -89.96pt) (implies a 10pt text size, as the handles are at the bottom of the text)
So the second part of my question is why is the global ruler origin where it is? The top left of my photoshop image appears at (206.76pt,-462.72pt) in the global ruler system. which is (0,0) in the artboard ruler system.
The only scripting manipulations I do before adding the text frame is to create a reference to the active document (I already have illustrator open with the photoshop doc (now xx.ai) as the active doc) . I then do a docref.textFrames.add to return a reference to a text frame, and I set its position and contents, as described above.
Any suggestions welcome. Please excuse my ignorance - I am new to illustrator but not new to scripting.
