Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 09:04, 14 September 2007.

KIJ000740 - JSR-226: SVGLocatableElement.getBBox() returns wrong value when a transformation is applied for the inner elements

From Forum Nokia Wiki


ID KIJ000740 Creation date September 14, 2007
Platform S60 3rd Edition, FP1 MIDP SDK Devices  
Category Java Subcategory Scalable 2D Vector Graphics API


Description

Overview

When using the Scalable 2D Vector Graphics API, the method SVGLocatableElement.getBBox() returns a wrong value when a transformation is applied. The bounding box for an element is in that element's user space, which does not take the transformation of the element into account.

Detailed description

The correct value for the group’s bounding box is the one that does not take the transformation of inner elements into account.

How to reproduce

This issue affects JSR-226 when running on the emulator.

<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>
SVGLocatableElement group1Elem = (SVGLocatableElement)
           svgImage.getDocument().getElementById(group1);
  
  SVGRect group1BBox = group1Elem.getBBox();
  
  group1BBox = [-80, -80, 230, 200]
  The correct value is: [-70, -60, 230, 200]

Solution

This issue is fixed in S60 3rd Edition, FP2 MIDP SDK.

Related Discussions
Thread Thread Starter Forum Replies Last Post
where to download the JSR-75(FileConnection API) jackchang1@gmail.com Mobile Java General 2 2005-12-01 16:45
how to hide (no data) text FetFrumos Mobile Java General 3 2005-06-30 08:00
skin support nicholasgaye Symbian User Interface 1 2005-05-24 14:43
J2ME List abhi4busy Mobile Java General 2 2008-05-30 14:44
Pin and lists xarris_ Mobile Java General 1 2007-05-09 05:17
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZKnownIssueQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX