title: Qpainter.rotate() question - qgis
body: <p>I am customising QuantumGIS that uses Qt's Qpainter to draw and paint...</p>
  
  <p>I am trying to draw a polyline on the canvas that is coming as a  update through message queues..the draw is very fine...but in the polyline or polygon objects that i get as an update also include an angle field that is to be used for rotation of an object.
  The problem is that when i try to rotate the line just before the polyline is drawn by the qpainter using painter.rotate() method,the line is rotated fine but the position of the line drawn changes..and it changes at every zoom and pan of the Qgis canvas..
  Before setting painter.rotate() i am saving the painter state and after drawing- again restoring its state which i believe is analogous to OpenGL's push/popMatrix functions.
  Does the Qpainter's save restore functions work similar to push/popMatrix functions of opengl??</p>
  
  <p>here is a code snippet:</p>
  
  <pre><code>p-&gt;save();
    //p-&gt;rotate(45);
    p-&gt;scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor );
    p-&gt;drawPolyline( pa );
    p-&gt;restore();
  </code></pre>
  
  <p>Help is appreciated.
  Thanks.</p>