(none) imager-devel
/ help / lists / applications / search /
 

Re: understanding the bounding_box

From:
02891@xyz.molar.is
Date: Tue 31 Jul 2001 - 21:55:52 UTC


On 31-Jul-2001 Arnar Mar Hrafnkelsson wrote:
> Calculate the center of the image, 150 in this case, and subtract from
> that half the width of the text which is 50, resulting in a left edge of
> the text at 100.
Or, more simply

start x = (width image + width text) / 2

> On Tue, 31 Jul 2001, Michael wrote:
>> I take it then by using the bounding_box I can then determine the size
>> of the string in pixels(for example 200 pixels) and then based on this,
>> given my image is say 300 pixels I know to start at 50 pixels with my
>> x_coord and wind up with the text centered.
>>
>> Is this the correct thinking/use for the bounding_box??
>>
>> Or am I missing the whole concept of what it is supposed to do?

This is the exact reason (text layout) I added bounding_box to Imager.

-Philip