[Qgis-developer] rendering objects on canvas

Martin Dobias wonder.sk at gmail.com
Wed May 10 07:07:55 EDT 2006


On 5/10/06, nitin quick <quick.nitin at gmail.com> wrote:
> Hello developers,
> I am currently trying to code a module which will put some primitives or
> object on qgis canvas irrespective of map. Lets  assume i have a algo
> generating some points  and now i want to plot these points on canvas with
> background of my map.Basic Operations like zooming , panning etc. should
> still work while algo may be generating hese points after some unknoown
> interval.
> Problem is these object directly relates to acetate layer so one way is to
> use acetate object hierarchy. But i couldn't found anyoone of renderer class
> supporting it in code.

Hi,

from your mail I assume that you're using QGIS version 0.7. I suggest
you to switch to newer version which is in SVN trunk which will be
released as 0.8. This version has many improvements in map canvas. Map
canvas widget is now derived from Q3Canvas class and enables you to
create and use "map canvas items" - QgsMapCanvasItem. Acetate layer
and acetate object have been removed in favour of map canvas items,
which are much more flexible and allow you to change them or their
position without the need of re-rendering the map background. You can
refer to this page for more information:
http://wiki.qgis.org/qgiswiki/MapCanvas_API

> Other class relating to my problem is QgsSymbol which let me associate a
> picture to co-ordinate. But same thing here i couldn't find any renedere
> class supporting it directly.
> I am thinking of deriving one clss from one of rendere classes but i
> couldn't decide which one to use. I am not completely clear about
> QgsSiMaRendere, QgsGraduatedMarendere, QgsUValMaRenderer classes.
> Also say if i donot want a map in backgrond , just want to plot these points
> or objects and later i may add.. etc etc.

I'm not an expert in renderers area, but there's a
QgsSingeSymbolRenderer class which is used for rendering symbols. In
older version I think it was named QgsSiSyRenderer.


> Any help in this regard will be appreciabe and will save me good amount of
> time in prototyping.

Hope it helps a bit :-)

Bye,
Martin

> cya
> nitin quick
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>
>



More information about the Qgis-developer mailing list