| Reply | « Previous Thread | Next Thread » |
|
Hi there !
I am developing a J2ME MIDlet using JSR 226. By using the following <svg> tag the SVG image is stretched and scaled to fill the entire Canvas. <svg version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" preserveAspectRatio="none" width="200.0" height="150.0" viewBox="0 0 200.0 150.0"> By setting the SVG width and height attributes and the width and height of the viewBox to the same values, the SVG image is always scaled to match different device screen sizes (Of course the ViewPort parameters of the SVGImage are set fill out the whole canvas in my MIDlet). This method works fine with the Sun WTK, however it fails with the Nokia S60 MIDP emulator: Instead of scaling the image to fit the screen, only a part of the image is visible. After testing a bit, it seems to me like as if the viewBox attribute of the <svg> tag is completely ignored by the Nokia S40 & S60 emulators. Any suggestions or hints? P.S: I can't test the MIDlet on a real device yet:( |
|
Hi,
I've got the same Problem. I think the problem is the width and height spezified in the rootElement of the SVGImage. It is obviously set to 100x100 when a new SVGImage is created. I tried: rootElement.setFloatTrait("width",200.0f); rootElement.setFloatTrait("height",200.0f); the Traits are altered (tested with rootElement.getFloatTrait("width")...), but the outcome is the same as before, without any ErrorMessage... If I test it with altered "width" and "height" on my device (Nokia 6131) I get "trait not supported on this element". Therefore it is no EmulatorBug... |
| SilentBob470 |
| View Public Profile |
| Find all posts by SilentBob470 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| JSR 226 RI setTraintNS() bug? | jessicay | Mobile Java General | 3 | 2008-12-02 20:12 |
| JSR 226 compatible implementation for J2SE | The.French.DJ | Mobile Java Tools & SDKs | 1 | 2007-02-19 21:25 |
| Problem with service attribute propagation and service attribute retrieval | pfrey | Bluetooth Technology | 4 | 2006-09-05 16:15 |
| JSR 226 and lag | gutmand | Mobile Java General | 6 | 2006-08-30 10:09 |
| Jsr 226 Ri | Nit1507 | Mobile Java Media (Graphics & Sounds) | 0 | 2005-08-17 14:50 |