title: Qt 5.5 draw filled pie
body: <p>The image below shows the grey pie, I would like to draw this using Qt 5.5</p>
  
  <p>X increases left to right
  Y increases top to bottom</p>
  
  <p>I have a start angle and an end angle which represents to the top and bottom of the arc, I am calculating the arc angle using:</p>
  
  <pre><code>double dblArcAngle = fmod(mcfltElevMaxLimit - mcfltElevMinLimit + 180.0, 360.0) - 180.0;
  </code></pre>
  
  <p>Where:</p>
  
  <pre><code>mcfltElevMaxLimit is 60 and mcfltElevMinLimit is -10
  </code></pre>
  
  <p>The call to drawPie looks like this:</p>
  
  <pre><code>objOffscrPainter.drawPie(QRect(rctGeom.left() + mcintElevLeftMargin
                                 ,rctGeom.top() + mcintElevBottomMargin
                                 ,rctGeom.width() - mcintElevLeftMargin
                                 ,rctGeom.height() - mcintElevBottomMargin)
                                 ,mcfltElevMaxLimit * 16, dblArcAngle * 16);
  </code></pre>
  
  <p>What I get is a very small polyline about midway up where the pie should be.</p>
  
  <p>(edit), just read in the documentation that both startAngle and spanAngle parameters 2 and 3 should be multiplied by 16, which does produce a pie, not in the correct orientation and not filled to the center but its progress.</p>
  
  <p>(edit 2), more progress, the image below now shows the results I'm getting, the rectangle I'm passing is the outer rectangle and includes the axis, yet for some reason the pie is offset???</p>
  
  <p><a href="https://i.stack.imgur.com/R7ngH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R7ngH.png" alt="enter image description here"></a></p>
  
  <p>What I want to accomplish is the pie tucked into the bottom left aligned with the white axis and filling the image.</p>
  
  <p>It looks like the passed rectangle is used to determine the center point for the pie.  If this is correct then the center of the rectangle must be adjusted to be the origin (bottom left) and the size also adjusted to fill the display.</p>