SVGRect bbox = ((SVGLocatable)textNode).getBBox();
Element rect = doc.getElementById("my-bg-rect"); if (rect == null) { rect = doc.createElementNS(SVGDOMImplementation.SVG_NAMESPACE_URI, "rect"); rect.setAttributeNS(null, "id", "my-bg-rect"); rect.setAttributeNS(null, "fill", "#CCDDFF"); rect.setAttributeNS(null, "stroke", "#000000"); rect.setAttributeNS(null, "stroke-width", "3"); } On Mon, Dec 21, 2009 at 3:07 PM, dao <dao.ho...@gmail.com> wrote: > hello, > > I'd like to highlight a text element of my svg file: > > <text transform="matrix(1 0 0 1 433.8965 494.4141)" style="fill:#00FFFF; > font-family:'CourierNewPSMT'; font-size:24;">00.00</text> > > > I cannot see any way to set the background of a text, or to get the box > size to draw a rectangle around it. > > Do you know how I can do this? > > regards > > > -- > Dao Hodac >