[Qgis-developer] Incremental rendering update
wonder.sk at gmail.com
Wed Oct 24 07:48:02 EDT 2007
sorry for the delayed answer :)
On 10/19/07, Hugentobler Marco <marco.hugentobler at karto.baug.ethz.ch> wrote:
> But does QPixmap already provide antialiasing on X11? Because until now, I preferred QImage because of the nice antialiasing.
AFAIK it supports antialiasing, however drawing to QPixmap with
antialiasing was much slower than antialiasing with QImage.
> >As you write "repainRequested signal is still emitted when the layer
> >thinks it should be re-rendered" - I think that's the problem - when
> >that signal is used to signal both need to re-render and to signal
> >need to just update the image in canvas... do I make sense?
> Ah, I see what you mean. Afaik at the moment, only the need for a screen update is signaled with 'repaintRequested'. Maybe we need a different name for the signal, like 'screenUpdateRequested'. The need to re-rendering would occure if something in the layer has changed, e.g. an editing action or maybe a symbology change, right?
Yes, that was my point.
> At the moment, the dialogs trigger a complete canvas re-rendering in these cases. Do you think it would be good to have a dedicated signal for this and to trigger the update from within the maplayer?
I would prefer to put such signal to the rendering context class, it
would be a bit cleaner.
> >I think that would be really bad to use a member like
> >"mDrawingIsCancelled" again. What sounds more reasonable to me is to
> >create a class called e.g. QgsRenderContext which will contain all
> >information about rendering that we now pass to draw() functions as
> >arguments. Moreover it could get also the information about whether
> >the drawing should continue. QgsMapRender or QgsMapCanvas would store
> >reference to this context, so they could modify the context to tell
> >the layers to stop rendering. How does it sound to you?
> And a reference to the rendering context would be passed to the draw() methods of maplayers? Sounds good to me at first glance.
Yes, that's my idea.
More information about the Qgis-developer