Author |
Topic  |
|
KnightHawk
22 Posts |
Posted - 21 Aug 2009 : 13:36:23
|
I was wondering how many pixels long, or pixels high a LinearAxis can be. From a first glance, it seems that an axis can only be rendered to 2^15 pixels while the numericAxisLabels can still continue to display on a ChartView after 2^15 pixels. (The grid lines end, but the labels continue at 2^15 pixels).
Is there a way to have a linearAxis be more than 2^15 pixels long? |
|
KnightHawk
22 Posts |
Posted - 21 Aug 2009 : 14:50:53
|
2^15 = 32768.
I am creating a chart that is to be converted to an image, and then transferred to a .pdf. The .pdf has to be of high quality (very good resolution) and can be as long as needed. The data can have a range between 0 - 4000. The range corresponds to inches. So if I want a 72DPI resolution, I need 4000" * 72 DPI = 288000 pixels.
I found that a UserControl can only have 32767 pixels of width or height. This is because they use only a 16bit int value for the size of a window (width or height).
Do you know the theoretical limit to how large an axis can be?
The ChartView.getBufferedImage() can create charts over 32767 pixels long, (I can still see the numericAxisLabel write numbers out all the way to the bottom of the image), yet the LinearAxis stops at 32767 pixels.
How does the ChartView image display a NumericAxisLabel over 32767 pixels, but not the LinearAxis? |
 |
|
quinncurtis
1164 Posts |
Posted - 21 Aug 2009 : 15:03:13
|
Our previous reply was not correct, and was deleted.
In the conversion from physical to pixel coordinates, calculated pixel values must be "clamped" to reasonable values, otherwise users will try and plot values of 10^20 in plotting areas scaled for +-10^-10, resulting in numeric overflows in the GDI and elsewhere. So we clamp all pixel calculations to +-2^15, to prevent such overflows. If some anomaly permits the axis labels out farther than that, it's just an accident with no useful purpose in relation to normal use of the software. We have no plans to change these limits. If you want to experiment with this limit, just get the QCChart2D source code and we will point you at the constant you need change. |
 |
|
|
Topic  |
|
|
|