OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000152OMNeT++IDE / result analysispublic2010-04-16 10:082010-05-06 09:30
andras 
andras 
normalmajoralways
resolvedfixed 
4.1b3 
4.1rc1 
0000152: Chart zooming broken: coordinate overflows reported too soon
On a line chart, after clicking Zoom a few times (0000002:0000011 times), the chart reports "coordinate overflows". 11 clicks correspond to 2^11 = ~2000 zoom factor, which the chart should be able to handle.

With a 2000x zoom, the full (say 1000 pixel wide) chart would be only 2,000,000 pixels. The range of a 32-bit int is about +-2 billion, so with 32-bit coordinates, the chart should be able to support a 2,000,000x zoom not 2000x, not to speak of the 64-bit coordinates used by LargeScrollableCanvas which the chart subclasses from.
Open any line chart, and click Zoom 11 times. The text "There were coordinate overflows during plotting, and the resulting chart may not be accurate. Please decrease zoom level." appears. It should only appear after about 20 (32-bit coords) or 50 (64-bit coords) clicks.
No tags attached.
Issue History
2010-04-16 10:08andrasNew Issue
2010-04-16 10:11andrasDescription Updated
2010-05-06 09:25andrasNote Added: 0000275
2010-05-06 09:30andrasNote Added: 0000276
2010-05-06 09:30andrasStatusnew => resolved
2010-05-06 09:30andrasFixed in Version => 4.1rc1
2010-05-06 09:30andrasResolutionopen => fixed
2010-05-06 09:30andrasAssigned To => andras

Notes
(0000275)
andras   
2010-05-06 09:25   
Looks like the limit was built in there because Windows GDI drawing chokes on coordinates greater than about 2 million.

On Linux, Cairo has the +-32768 pixels limit.
(0000276)
andras   
2010-05-06 09:30   
Fixed: now we compute all coordinates as 64-bit integers, and perform a rough pre-clipping before passing drawing operations to the SWT Graphics. Pre-clipping clips or discards drawing operations that fall outside the range that can be safely handled by the graphics engines (GDI, Cairo) underlying SWT; this range is assumed to be +-10,000 pixels.