[Qgis-developer] how to know if QPainter comes from a print job ?
A Huarte
ahuarte47 at yahoo.es
Mon Nov 4 03:07:27 PST 2013
Hi Marco, thank you very much for your reply,
I will try it!
>________________________________
> De: Marco Hugentobler <marco.hugentobler at sourcepole.ch>
>Para: qgis-developer at lists.osgeo.org
>Enviado: Lunes 4 de noviembre de 2013 11:37
>Asunto: Re: [Qgis-developer] how to know if QPainter comes from a print job ?
>
>
>
>Hi
>
>You cannot get that information from the painter itself (a print
composition can be printed into QImage, pdf, QPrinter, etc...).
The safest guess is probably to look at the QgsRenderContext. If
the parameter 'scaleFactor' is very close to 1.0, it is most
likely the rendering comes from a print composition.
>
>Regards,
>Marco
>
>On 04.11.2013 11:28, A Huarte wrote:
>
>Hi!
>>
>>
>>Within of qgis_core I need know if a QgsRenderContext comes from a print job (from composer) in order to disable one functionality.
>>
>>
>>I get that information from QPainter, QPaintDevice, QPaintEngine::Type ?
>>
>>
>>
>>Thank your very much!
>>
>>
>>
>>
>>_______________________________________________
Qgis-developer mailing list Qgis-developer at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland marco.hugentobler at sourcepole.ch http://www.sourcepole.ch Technical Advisor QGIS Project Steering Committee
>
>_______________________________________________
>Qgis-developer mailing list
>Qgis-developer at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131104/8cb4c2e1/attachment-0001.html>
More information about the Qgis-developer
mailing list