>>>>> "RL" == Randy Leonard <[EMAIL PROTECTED]> writes:
RL> I am new to SVG, so please excuse what may be a simple question. RL> I am interested in generating menu buttons for web portal RL> applications using Batik. Some menu buttons will be fixed length, RL> others should vary depending upon embedded text. From my research RL> to date, it seems I cannot write SVG which expands/contracts the RL> size of the generated image based on text measurement. Correct. RL> As such, it seems I must read an SVG template using SVGDOM and RL> manipulate the SVG prior to passing it off to the Transcoder for RL> jpeg creation. Yup. RL> My question is... does this seem like a reasonable approach. If RL> so, is there a class which permits text measurement so I can RL> adjust the SVG to accomodate variable text size. It does seem like a reasonable approach and for most simple text should be fairly straight forward. The part of the SVG DOM that you are interested in is the SVGTextContentElement interface in section 10.17 of the SVG specification. Only last week Batik got support for this interface so you will need to use a CVS copy of Batik to do your work (at this point CVS is generally better than the last release anyway). This lets you query all the information you could ever want about the text. You might also take a look at SVGLocatable which can give simple bounding box information (which may be all you need for your text elements). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]