Re: large values outside fixed scale
Brought to you by:
rathmann
From: Uwe R. <Uwe...@ti...> - 2007-07-23 06:32:04
|
On Saturday 21 July 2007 00:27, Chris Cortopassi wrote: > I've been using Qwt with great success for a software oscilloscope > application, but I've had trouble recently trying to implement large scale > factors (resulting in large values clipped off the plot). The code below > will crash on Windows XP with Qt4.3.0. Although behavior is still strange, > it doesn't crash on Win Qt4.2.3 nor Linux (Qt 4.2.3 or 4.3.0). For painting a curve all points are mapped into coordinates of the paint device ( here the plot canvas). For Qt3 compatibility Qwt still uses integers. ( Of course Qt4 would also has to map to integers for paint devices like a X11 widget - only devices like PDF can make use of floats ). Your points are so far below/above the visible area, that the coordinates are below/above the range of an integer. I checked {-2e8, 2e8} on Linux/X11 and qRound simply maps the x-values to { 0, 0 }. I didn't check on Windows, but in general the raster paint engine is the most unstable one, because it is a home brew implementation - not only a frontend to one of the stable native graphics subsystems. I guess if you print to a QImage on X11, you will notice similar effects/crashs like on Windows. > I realize > this isn't quite standard usage, but can you please provide any insight, > workarounds, known limitations, etc. Could this be a bug in Qt and/or Qwt? Well, the problem in the Qwt code will disappear as soon as I use qReal instead of ints. But this has no high priority for me. Uwe |