Re: Issue with QwtPlotRescaler
Brought to you by:
rathmann
|
From: Uwe R. <Uwe...@ti...> - 2019-09-10 09:54:10
|
Hi Sebastien, > I add some code in RectItem::draw() to illustrate this (see code > below). It displays the ratio between the y scale and the x scale and > then we can see that the ratio is exactly 1 only if the canvas is a > square. The main problem of the rescaler is the composite architecture of QwtPlot. So the rescaler tries to adjust the scales according to expectations what the layout code will do later. I did a quick test with resizing the window of the example in Fixed mode and for smaller windows I can observe that the error increases with an increasing ratio for canvas.width() / canvas.height(). The worst size for the circle I had was for a canvas size of ~1000x200 that resulted in a "circle" of ~311x307. The difference between x_scale and y_scale ( according to your code snippet ) goes above 0.1, what indicates, that there is indeed a mismatch between what the rescaler expects and what the layout is doing. Please file a bug report, but as this is not a simple one it might take some time until I will be able to work on it. If you want to do some investigations on your own please let me know what you find out. Uwe |