Skip to main content
Participating Frequently
August 2, 2008
Question

How to get one line rectangle for text frame

  • August 2, 2008
  • 4 replies
  • 936 views
As the title indicates, I want to get the rectangle for certain line of text frame, how to do it? For instance, the following text:
"text1
text2
..."

I want to get the rectangle of "text2", how to get it?
thanks
This topic has been closed for replies.

4 replies

_duandc_Author
Participating Frequently
August 9, 2008
Thanks! guys. Maybe I should give up my idea or work around. Anyway, thanks!
A. Patterson
Inspiring
August 8, 2008
Oh, I see what you mean. Yeah, Jeshua is right, I don't believe you can get the bounds of text runs, just the overall art unfortunately. In fact, I just checked and there's nothing that returns any kind of *Rect object for the entire text engine.
3DTOPO
Inspiring
August 8, 2008
I could be wrong, but I don't think it is possible to get bounds of individual words unless (perhaps) they are separate 'runs'.
A. Patterson
Inspiring
August 5, 2008
You mean the bounds? If so, AIArtSuite::GetArtBounds() is what you want.