On Jan 19, 2008 12:53 AM, Richard Duivenvoorde <[EMAIL PROTECTED]> wrote: > Hi List, > > using the rubberband example I'm trying to do a plugin in which I can > add some 'blocks/geometries-of-interest' and add some labels to it > (annotation?). > > My map is now showing a rubberband/geometry, and some label, but when I > export it to an image, the label is there, but the geometry vanishes?
Right, rubberband is a map canvas item so it's not a part of the map. When exporting map as an image I think it's correct not to show map canvas items as they are usually used for some map tools. > Is that the implementation of the rubberband? > Or am I responsible myself for painting those 'temporary' features? > Or am I supposed to make some 'memory-vector'-layer, and add the > rubberband as a geometry to that using 'setToGeometry'? (Tried that, but > got an attribute-error (using 9.1 on debian)). > Or something else? No canvas items are exported to the images. If you need this behaviour you should be able to use function of ancestor of map canvas - QGraphicsView::render() - that can render the complete map canvas contents to output and not just the map. Martin _______________________________________________ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user