On Mon, 22 Mar 2004 20:43:39 +0100, Uffe Nielsen wrote
> ----- Original Message -----
> From: Gerard Vermeulen <gvermeul@...>
> Date: Mon, 22 Mar 2004 20:13:14 +0100
> To: qwt-interest@...
> Subject: Re: Marker turn on
> > On Mon, 22 Mar 2004 12:12:38 -0600
> > John Cummings <jcummings2@...> wrote:
> > > I will caution that I switched from the old zooming approach used in the
> > > example (using outlining) to the new QwtPlotZoomer class largely because of
> > > the stacked zoom feature as well as the purported ease of use.
> > >
> > > However, I have run into several nuances related to axis rescaling that the
> > > default plot zoomer does not handle. For instance, manually adjusting the
> > > axis scales can causes unpredictable results with the zoomer. The old
> > > approach worked well in this area since it always looked at the current
> > > scales. While the zoomer is generally useful, it does have its own share of
> > > "features" to get used to. So, be careful; you may get reports of undefined
> > > or unexpected behavior back from your users- I sure did.
> > >
> > > John Cummings
> > You are right. I also had my own zooming with a very simple stack accepting
> > pushes and pops only.
> > QwtPlotZoomer has quite a lot of features but also some quirks:
> > (1) after setting the axes to autoscaling one has to do a replot() before
> > calling setZoomBase(). This quirk drove me nuts.
> > (2) it would be nice if one could put "zoom rectangles" anywhere in the
> > stack to accomodate for the rectangles that do not originate from
> > QwtPlotZoomer's mouse/keyboard handling. (I have an example where I would
> > like to set the zoom base but not necessarily reset the zoom stack).
> > However, QwtPicker does not suffer from those quirks. It has less features :-)
> > Anyhow, the API of QwtPlotZoomer looks flexible enough so that you can
> > implement a JCPlotZoomer that has at least the features of point (2) and
> > that probably works around point (1) too.
> > QwtPlotZoomer is new, so feedback and suggestions are welcome.
> Although I will consider changing, I am still zooming manually, i.e.
> using QwtPlot::setAxisScale(). I found QwtPlotPicker handy for
> drawing a rubberband, though.
> However, I have run into a small problem, as the axis scales are
> erased after zooming. It would seem to be related to buffering, as
> if part of the axis rectangle is covered and then uncovered the area
> that was covered is repainted. With the old version it worked fine,
> so I wonder if this is one of the quirks mentioned? Is there a
> workaround for this problem?
No, I have never seen this. The quirks are all related to axis changes
that QwtPlotZoomer does not know about.
It would be helpful if you could tell:
(1) if it also happens in one of the example programs
(2) or if you could sent a small single file program demonstrating showing
(3) Qt version
You can also try to disable double buffering. See the docs on
QwtPaintBuffer for how to do this.
I also remember having fixed a bug in the event filter example
that messed up double buffering, see the CVS commit description for
Click on diff to previous 1.3 to see the fix.
It may be a different problem, though. Right now, I do not remember
if QwtPaintBuffer buffers the widget (as the doc says) or only the
plot canvas (don't have easy access to the source on this computer).