| Reply | « Previous Thread | Next Thread » |
|
Was checking out JSR 226 SVGT RI. Trying with Nokia prototype SDK.
simple.svg file <?xml version="1.0" encoding="UTF-8"?> <svg width="176" height="176" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" version="1.1" baseProfile="tiny"> <defs> <rect id="rect" width="20" height="30" rx="3" fill="blue"/> <circle id="circle" cx="15" cy="15" r="10" fill="yellow"/> </defs> <use id="displayshape" xlink:href="#rect"/> </svg> My MIDlet just trying to change the displayshape to circle instead. use the following code, //get Document first SVGElement shape = (SVGElement)(doc.getElementById("displayshape")); shape.setFloatTrait("x", 30); shape.setFloatTrait("y", 30); shape.setTraitNS("http://www.w3.org/1999/xlink", "href", "#circle"); System.out.println("new href is"+shape.getTraitNS("http://www.w3.org/1999/xlink", "xlink:href")); the element shown on screen does change the coordinates accordingly but not the shape, though the print out info for "new href" is "#circle". It does not matter if I use "xlink:href" instead of "href". Counldn't find anything wrong. Anybody got ideas? Thanks, |
|
Quote:
*Sigh* .. 1.5 years later and this bug stilll seems not to be fixed. I try to change the "xlink:href" attribute in a <use> tag by invoking: Code:
m_CurrentElement.setTraitNS("http://www.w3.org/1999/xlink", "href", "#Entry3");
Last edited by quarus : 2007-04-12 at 11:30.
|
|
Hi,
Are there any news on this bug? thks |
|
I see you wrote this in September 2003 .
Not exactly a timely reply then .... I had a similar problem when I declared the elements I wanted to reuse in a defs element. This worked OK on the Sun emulator but not the Nokia S60 emulators. I believe lack of support for the defs element in SVG Tiny is the culprit. If I put the element I wanted to reuse in a g element instead which is supported by SVG Tiny 1.1 it worked Ok on the Nokia S60 emulators. eg SVGElement g = (SVGElement) doc.createElementNS(root.getNamespaceURI(), "g"); g.setId("example"); //Add elements for reuse as children to group g element. ... root.appendChild(g); //Starting reusing group SVGElement use = (SVGElement) doc.createElementNS(root.getNamespaceURI(), "use"); use.setTraitNS("http://www.w3.org/1999/xlink", "href", "#example"); use.setFloatTrait("x", x1); use.setFloatTrait("y", y1); root.appendChild(use); |
| muntergator |
| View Public Profile |
| Find all posts by muntergator |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Jsr 226 Ri | Nit1507 | Mobile Java Media (Graphics & Sounds) | 0 | 2005-08-17 14:50 |
| S60 prototype SDK JSR 226 | Simon.Chen | Mobile Java Media (Graphics & Sounds) | 0 | 2005-07-26 10:58 |
| A bug: setColor with offscreen graphics - PLEASE, REPLY THIS TIME | palmcrust | Mobile Java General | 11 | 2003-12-04 13:43 |
| Firmware bug or code bug displaying list on 3650 | blackjack75 | Mobile Java General | 2 | 2003-09-24 20:52 |
| ** Important ** Event bug in phone and emulator. | fnagaton | General Symbian C++ | 8 | 2003-07-11 13:56 |