getRect

getRect() function

Get coordinates of rect that bounds portion. The rect includes all the lines of text in portion, including empty ones.

Result

Rectangle2D.Float