Thanks, I've also found the attribute 'text-anchor' for the text element. Its values are: end (right justify), middle (center justify), and start (left justify).
-----Original Message----- From: Archie Cobbs [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 30, 2004 11:04 AM To: Batik Users Subject: Re: Right Justified Text Litton, Tom - CEPM wrote: > What is the best way to justify text in a bounding box? > > I'm drawing a rectangle and I need to justify text within it. Is there > an easy way of either center or right justifying the text? Is there an > attribute on the text element itself that can help? Can I specify this > with a css entry? Funny, I'm just starting to look into doing a similar thing. The first option I've come up with is to define your text in a <symbol> with a viewbox, then reference it with a <use> that defines the rectangle within which to map the text. Then you can scale, clip, stretch (or not) as desired using preserveAspectRatio and friends. I haven't actually tried this yet though... -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com * Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. * --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
