LeprovostQuentin / mt4j

Automatically exported from code.google.com/p/mt4j
GNU General Public License v2.0
0 stars 0 forks source link

MTSvg always returns false when using containsPointGlobal #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Apparently there are no decent bounds created when an SVG image is 
instantiated. Thus the call to containsPointGlobal always fails.

Original issue reported on code.google.com by michael....@gmail.com on 25 Mar 2011 at 9:55

GoogleCodeExporter commented 8 years ago
this should be fixed in the latest /trunk.

Although we dont set the bounds using setBounds() because then we would pick 
the svg by the rectangular bounds and not the exact shapes of the svg which 
isnt desireable most of the time

not tested - please verify

Original comment by sirhc.f...@gmail.com on 28 Mar 2011 at 9:11

GoogleCodeExporter commented 8 years ago
Confirmed with a test. Fixed!

Original comment by michael....@gmail.com on 28 Mar 2011 at 10:10

GoogleCodeExporter commented 8 years ago

Original comment by sirhc.f...@gmail.com on 28 Mar 2011 at 12:56

GoogleCodeExporter commented 8 years ago
note that the containspoint method will use rectangular bounds. if you need to 
check the exact shapes, you should recursively check all children of the svg 
and call their containspoint method..

Original comment by sirhc.f...@gmail.com on 28 Mar 2011 at 12:59