Categories: Known Issue | Java ME | Scalable 2D Vector Graphics API (JSR-226) | S60 3rd Edition, Feature Pack 1
This page was last modified 09:29, 14 September 2007.
KIJ000741 - JSR-226: SVGLocatableElement.getScreenBBox() and SVGLocatableElement.getScreenCTM() may return wrong values for group elements
From Forum Nokia Wiki
| ID | KIJ000741 | Creation date | September 14, 2007 |
| Platform | S60 3rd Edition, FP1 MIDP SDK | Devices | |
| Category | Java | Subcategory | Scalable 2D Vector Graphics API (JSR-226) |
Overview
When using the Scalable 2D Vector Graphics API, the methods SVGLocatableElement.getScreenBBox() and SVGLocatableElement.getScreenCTM() may return wrong values in certain cases.
Description
The box coordinates are in the screen coordinate space, which is connected to the current user coordinate space by the matrix returned by SVGLocatableElement.getScreenCTM(). This happens when the group includes another <group> element which contains transformations.
How to reproduce
This issue affects JSR-226 when running on the emulator.
<svg viewBox="-100 -100 240 320">
<g id="group1" transform="translate(10, 20)" fill="red" >
<rect id="rect1" transform="scale(2)" x="10" y="10" width="50" height="50"/>
<rect id="rect2" x="10" y="10" width="100" height="100"/>
<g id="group2" transform="translate(10, 20)" >
<rect id="rect3" x="0" y="10" width="150" height="50"/>
<circle id="circle1" cx="20" cy="20" r="100" />
</g>
</g>
</svg>
svgImage.setViewportWidth( 240 );
svgImage.setViewportHeight( 320 );
SVGLocatableElement group1Elem = (SVGLocatableElement)
svgImage.getDocument().getElementById( group1 );
SVGRect screenBBox = group1Elem.getScreenBBox();
SVGMatrix m = group1Elem.getScreenCTM();
The returned values are:
screenBBox = [-60, -40, 230, 200] m = [1, 0, 0; 1, 10, 20];
The correct values are:
screenBBox = [40, 60, 230, 200] m = [1, 0, 0; 1, 110, 120]
Solution
No solution available.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to implement a ListBox? | xianwentong | General Symbian C++ | 1 | 2003-09-27 07:40 |
| Access Point Group | fransgunawan | Symbian Networking & Messaging | 0 | 2006-07-07 08:50 |
| modify data in jar file | haamoon | Mobile Java General | 5 | 2007-12-22 23:13 |
| 6680 doesn't run midlet | sammy8306 | Mobile Java General | 6 | 2006-03-20 16:27 |
| DataOutputStream Probem in FileConnection | nicenouman | Mobile Java Tools & SDKs | 11 | 2006-09-15 00:30 |

