>>>>> "BF" == Bertrand Fontaine <[EMAIL PROTECTED]> writes:

BF> Hello!  We are using Batik/SVG to dynamically generate images
BF> displaying text. We are currently creating a SVG template that we
BF> load using the appropriate Batik API, we replace the text in the
BF> template by the text desired, and we then use a transcoder to save
BF> the result in an image file. What we would like to do now is to
BF> automatically adjust the width of the image file to the width of
BF> the text it displays in order to limit as much as possible the
BF> weight of the image file obtained (i.e., we don't want to have a
BF> large white region at the right of the text). Is there any way
BF> with Batik to know the smaller rectangle that would contain the
BF> info to display, what would allow us adjust the width of the SVG
BF> document as required?

    I believe Batik now implements getBBox from SVGElement.  So if you
get the SVGTextElement from the DOM you should be able to call that
method to get the text's bounding box.

BF> Thank you very much,

    Hope that helps.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to