<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><span style="font-size: 12pt;">>The
        ScaleFactor is distinct of 1 when the composition engine must
        paint the map to one specific map scale.</span><br>
      <br>
      I think you are mixing up QgsRenderContext::scaleFactor() and
      QgsRenderContext::rendererScale().<br>
      <br>
      Regards,<br>
      Marco<br>
      <br>
      On 04.11.2013 16:29, A Huarte wrote:<br>
    </div>
    <blockquote
      cite="mid:1383578987.48723.YahooMailNeo@web28904.mail.ir2.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff;
        font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
        Lucida Grande, sans-serif;font-size:12pt">
        <div><span>Hi, Marco, finally I added a flag in '</span><span
            style="font-size: 12pt;">QgsRenderContext</span><span
            style="font-size: 12pt;">' class indicating that it works in
            a 'print composition' task.</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 12pt; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; background-color: transparent;
          font-style: normal;"><span style="font-size: 12pt;">The
            ScaleFactor is distinct of 1 when the composition engine
            must paint the map to one specific map scale.</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 12pt; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; background-color: transparent;
          font-style: normal;"><br>
        </div>
        <div style="background-color: transparent;"><span>At any rate,
            thank you very much!<br>
          </span></div>
        <div style="background-color: transparent; color: rgb(0, 0, 0);
          font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue',
          Helvetica, Arial, 'Lucida Grande', sans-serif; font-style:
          normal;"><span><br>
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 12pt; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; background-color: transparent;
          font-style: normal;"><span style="font-size: 12pt;"><br>
          </span></div>
        <div><br>
        </div>
        <blockquote style="border-left: 2px solid rgb(16, 16, 255);
          margin-left: 5px; margin-top: 5px; padding-left: 5px;">
          <div style="font-family: HelveticaNeue, 'Helvetica Neue',
            Helvetica, Arial, 'Lucida Grande', sans-serif; font-size:
            12pt;">
            <div style="font-family: HelveticaNeue, 'Helvetica Neue',
              Helvetica, Arial, 'Lucida Grande', sans-serif; font-size:
              12pt;">
              <div dir="ltr">
                <hr size="1"> <font face="Arial" size="2"> <b><span
                      style="font-weight:bold;">De:</span></b> Marco
                  Hugentobler <a class="moz-txt-link-rfc2396E" href="mailto:marco.hugentobler@sourcepole.ch"><marco.hugentobler@sourcepole.ch></a><br>
                  <b><span style="font-weight: bold;">Para:</span></b>
                  <a class="moz-txt-link-abbreviated" href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a> <br>
                  <b><span style="font-weight: bold;">Enviado:</span></b>
                  Lunes 4 de noviembre de 2013 11:37<br>
                  <b><span style="font-weight: bold;">Asunto:</span></b>
                  Re: [Qgis-developer] how to know if QPainter comes
                  from a print job ?<br>
                </font> </div>
              <div class="y_msg_container"><br>
                <div id="yiv9767305386">
                  <div>
                    <div class="yiv9767305386moz-cite-prefix">Hi <br
                        clear="none">
                      <br clear="none">
                      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.<br clear="none">
                      <br clear="none">
                      Regards,<br clear="none">
                      Marco<br clear="none">
                      <br clear="none">
                      On 04.11.2013 11:28, A Huarte wrote:<br
                        clear="none">
                    </div>
                    <blockquote type="cite">
                      <div class="yiv9767305386yqt3386251864"
                        id="yiv9767305386yqt99291">
                        <div style="color: rgb(0, 0, 0);
                          background-color: rgb(255, 255, 255);
                          font-family: HelveticaNeue, 'Helvetica Neue',
                          Helvetica, Arial, 'Lucida Grande', sans-serif;
                          font-size: 12pt;">
                          <div>Hi!</div>
                          <div><br clear="none">
                          </div>
                          <div style="color: rgb(0, 0, 0); font-size:
                            16px; font-family: HelveticaNeue, 'Helvetica
                            Neue', Helvetica, Arial, 'Lucida Grande',
                            sans-serif; background-color: transparent;
                            font-style: normal;">Within of qgis_core I
                            need know if a QgsRenderContext comes from a
                            print job (from composer) in order to
                            disable one functionality.</div>
                          <div><br clear="none">
                          </div>
                          <div style="background-color:transparent;">I
                            get that information from QPainter,
                            QPaintDevice, QPaintEngine::Type ?<br
                              clear="none">
                          </div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: HelveticaNeue, 'Helvetica
                            Neue', Helvetica, Arial, 'Lucida Grande',
                            sans-serif; font-style: normal;"><br
                              clear="none">
                          </div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: HelveticaNeue, 'Helvetica
                            Neue', Helvetica, Arial, 'Lucida Grande',
                            sans-serif; font-style: normal;">Thank your
                            very much!</div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: HelveticaNeue, 'Helvetica
                            Neue', Helvetica, Arial, 'Lucida Grande',
                            sans-serif; font-style: normal;"><br
                              clear="none">
                          </div>
                        </div>
                      </div>
                      <br clear="none">
                      <fieldset
                        class="yiv9767305386mimeAttachmentHeader"></fieldset>
                      <br clear="none">
                      <pre>_______________________________________________
Qgis-developer mailing list
<a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv9767305386moz-txt-link-abbreviated" ymailto="mailto:Qgis-developer@lists.osgeo.org" target="_blank" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
<a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv9767305386moz-txt-link-freetext" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
                    </blockquote>
                    <br clear="none">
                    <br clear="none">
                    <pre class="yiv9767305386moz-signature">-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
<a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv9767305386moz-txt-link-abbreviated" ymailto="mailto:marco.hugentobler@sourcepole.ch" target="_blank" href="mailto:marco.hugentobler@sourcepole.ch">marco.hugentobler@sourcepole.ch</a> <a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv9767305386moz-txt-link-freetext" target="_blank" href="http://www.sourcepole.ch/">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee </pre>
                  </div>
                </div>
                <br>
                <div class="yqt3386251864" id="yqt69454">_______________________________________________<br
                    clear="none">
                  Qgis-developer mailing list<br clear="none">
                  <a moz-do-not-send="true" shape="rect"
                    ymailto="mailto:Qgis-developer@lists.osgeo.org"
                    href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br
                    clear="none">
                  <a moz-do-not-send="true" shape="rect"
                    href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
                    target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
                <br>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
<a class="moz-txt-link-abbreviated" href="mailto:marco.hugentobler@sourcepole.ch">marco.hugentobler@sourcepole.ch</a> <a class="moz-txt-link-freetext" href="http://www.sourcepole.ch">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee </pre>
  </body>
</html>