[ROOT] getting TText to fit in a TPaveText

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Thu Dec 07 2000 - 23:45:38 MET


I always run into the problem of having text extend past the boundaries of a
TPaveText.  For example, sometimes I have really long histogram titles, and
these titles extend out past the right boundary of the TPaveText when the
histogram is drawn.

Is there some way to get the text in a TPaveText to automatically resize
itself when the TPaveText is resized, so that the TText object(s) remain
inside the boundaries of the TPaveText?

I tried to program this myself, but I soon discovered that there didn't seem
to be a way to calculate the length of the text for a given font.
Therefore, there doesn't seem to be anyway to calculate a scale factor.

Thank you for any help.

Regards, Matt

--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET