bounding rect of text

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Just popping in
Just popping in
Posts: 20
Joined: Wed Jul 06, 2005 09:42

bounding rect of text

Postby Sachin » Tue Aug 02, 2005 08:43


Is there a way to get the bounding rectangle of some text.. i mean i want to create a generic message box..i also want that wen the constructor of the message box receives some text it should automatically resize itself according to the text size. (ofcourse the font size will also play a role in this)

User avatar
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England

Re: bounding rect of text

Postby CrazyEddie » Thu Aug 04, 2005 09:44

Look at

Font::getFormattedLineCount and Font::getFormattedTextExtent

Though you might find a catch-22 situation because the space occupied by a given text will be determined by the area in which you render it and the formatting used.

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests