| When I try this, the CSSStyleDeclaration ends up containing an "element" member of type SVGOMPathElement that has attributes "fill" and "d", but the CSSStyleDeclaration "values" member HashMap is empty. When I call style.getPropertyCSSValue("stroke") I get a null pointer exception, even though this value exists up in the main svg element. Any ideas? Do I have to search all the way up the tree for the stroke attribute? (although getComputedStyle() on the SVG element does not seem to work either). I have included the SVG file I am trying to work with below: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'> <svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" xmlns="http://www.w3.org/2000/svg" font-family="'Helvetica'" font-style="normal" stroke-linejoin="miter" font-size="12" stroke-dashoffset="0" image-rendering="auto"> <!--Generated by the Batik Graphics2D SVG Generator--> <defs id="genericDefs" /> <g> <g id="Page 0"> <g stroke-linecap="round" text-rendering="optimizeLegibility" image-rendering="optimizeQuality" color-rendering="optimizeQuality" stroke-linejoin="round" color-interpolation="linearRGB"> <path fill="none" d="M146 123 L146 122" /> </g> </g> </g> </svg> On Feb 1, 2006, at 5:19 PM, Cameron McCormack wrote:
|
- Re: How do I parse style information to get Java Color? James Balnaves
- Re: How do I parse style information to get Java Col... Tonny Kohar
- Re: How do I parse style information to get Java... James Balnaves
- Re: How do I parse style information to get ... thomas . deweese
- Re: How do I parse style information to ... James Balnaves
