TextSnapshot.getTextRunInfo: where is corner0x?

For a new Gynzy tool, I’m trying to detect coordinates of selected words in a static textfield. It’s not to difficult using the TextSnapshot object. The getTextRunInfo method returns an array of objects in which each object contains information about a specific character, including corner0x, corner0y, corner1x, corner1y, corner2x, corner2y, corner3x, and corner3y (the corners of the bounding box of the character).

It was a bit of a puzzle how to use these values, because Adobe didn’t document where corner 0, 1, 2 or 3 is situated. That’s why I’m publishing this list:

  • corner0x & corner0y : bottom left corner
  • corner1x & corner1y : bottom right corner
  • corner2x & corner2y : top right corner
  • corner3x & corner3y : top left corner

If you want to know what’s possible working with static textfields, have a look at this project: flashpages.


Leave a Reply

Your email address will not be published. Required fields are marked *