>>>>> "GS" == Geeta Shukla <[EMAIL PROTECTED]> writes:

GS> The input to my project are SVG files with just text and lines
GS> elements. The requirement is that the user would right click on
GS> any of the text nodes and select a background color for the
GS> same. How can I set a background color to a text element?

    In SVG text has no background (after all it get's quite tricky to
define what 'background' is for text on a path for example).

    However if you are dealing with 'simple' cases like a single line
of text not on a path, you can use the 'getBBox' method from
SVGLocatable to calculate a rectangle that can be inserted into the
DOM tree immediately before the text element to give the same visual
effect as setting the background.

GS> Looking forward to a reply, Geeta Shukla, India

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

Reply via email to