Skip to main content
Participating Frequently
November 10, 2009
Question

InlineGraphicElement Relative Coordinates

  • November 10, 2009
  • 1 reply
  • 538 views

Hello,

I am trying to figure out how I can determine the (x,y) coordinates of an InlineGraphicElement that is inserted into the textFlow of a Spark TextArea control.

For that matter, how can you determine the rectangular coordinates of a given selected block of text in a TextFlow?

This topic has been closed for replies.

1 reply

Adobe Employee
November 11, 2009

The graphic is placed in a TextLine and its x,y coordinate are relative to the TextLine.

A selection is made up of a set of rectangles.  You can map from the selection position to the TextLine containing the selection and then look at the atom bounds comprising the characters making up the selected characters.

Richard

emansouriAuthor
Participating Frequently
November 11, 2009

Thank you Richard.  This gets me pointed in the right direction.

Should you have any relevant code samples in this domain, I'd be most grateful indeed.