On Tue, Dec 16, 2014 at 6:01 PM, Sandro Santilli <[email protected]> wrote: > > According to documentation for the QgsRasterLayer class [1], a raster > layer can export its legend as a pixmap using a legendPixmap() method, > but the code doesn't not contain any such virtual method. > > [1] http://qgis.org/api/classQgsRasterLayer.html > > Instead, the class has a (non-virtual) method to retrieve a legend > in form of a list of name/color pairs. > > A pure image legend is not accounted for in the raster interface > anymore. Still, beside the documentation, there's also a LegendUrl > property under the "Metadata" tab of raster layer properties, which > does not seem to be used at all either. >
Looks like an ancient artifact in the API documentation. I would guess such method was removed even before QGIS 1.0) Is there a plan to allow raster layers to expose their layer again > as an image ? > No. If someone wants legend image for a layer (or more of them), there is now QgsLegendRenderer class for rendering it. Martin
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
