[Qgis-developer] Re: flickering on display through plugin

nitin quick quick.nitin at gmail.com
Mon Jun 26 04:20:21 EDT 2006


hello sir
For avoiding flickering i i reimplemented my class and inherited from
QgsMapCanvasItem.
i defined drawShape(QPainter &) in my code but it is never getting called
even after multiple call to updateCanvas().
I has studied Measure area maptool code. Where similar code is there and
same control flow do work. Can anybody advice on this issue while such thing
is happening?if there is need, i can post my code also.
regards
quick nitin


On 6/18/06, nitin quick < quick.nitin at gmail.com> wrote:
>
> thanks for replying
> sorry i didn't mentioned qgis version. Currently i am using qgis0.7.9 from
> svn , downloaded around 1 month before and which i think is nearer to 0.8.
> One place i got down whichi think is potential reason of flickering is i
> had connected render function of myplugin with signal emmitted by
> mQgisIface->getMapCanvas()->renderComplete(QPainter *). Why i connected
> these because i needed QPainter refrence for drawing on canvas. Is my
> reasoning  correct?
> If so , ihave tried to save the state of passed pointer in one of global
> variable in my plugin but global painter object is not active? is it
> possible to do so. I think it should happen may be smwhere i am making some
> mistake.
> Any tips on avoiding such kind of flickering. since i am using qgis0.8there is no bitblt() available.
>
>
> cya
> quick nitin
>
> On 6/16/06, Tim Sutton <tim at linfiniti.com> wrote:
> >
> > Hi
> >
> > You could try bitblt ing your points onto the canvas? Which version
> > of qgis is your plugin written for? 0.8 will use qcanvas as a basis
> > for map canvas...
> >
> > Regards
> >
> > Tim
> > On 16/06/2006, at 00:28, nitin quick wrote:
> >
> > > hello everybody,
> > > i currently working on a plugin which will dispaly points on
> > > current canvas with points read from a fifo.Plugin implementation
> > > is done as external plugin build tutorial. Plugin is also working.
> > > but i have problem of flickering. As i understood the interface for
> > > plugin building, after reading data i am calling for refresh of
> > > canvas using mQGisIface->getMapCanvas()->refresh() . After this i
> > > receives a signal which is renderComplete()  which is connected to
> > > render(QPainter *). It is very similar to NorthArrow plugin
> > > functionality.reading from a fifo is done through a thread which
> > > signal to gui thread after reading data every second. i think i am
> > > refreshing to everydrawing refreshing is bound to happen. But as no
> > > of elements on canvas increases it becomes very odd and ugly . I
> > > want to avoid it. Any advices how i can improve on it a nd get rid
> > > of flickering.
> > >
> > > thanks
> > > quick nitin
> > > _______________________________________________
> > > Qgis-developer mailing list
> > > Qgis-developer at lists.qgis.org
> > > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
> >
> > Tim Sutton
> > tim at linfiniti.com
> >
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20060626/2ae547e1/attachment.html


More information about the Qgis-developer mailing list