title: DrawArc on image, positioning issue
body: <p>I have a drawable of a gauge and I try to draw a line on it. (Fixed position, not fixed value)</p>
  
  <p>Unfortunately I don't have any experience with drawing. (And I think its hard to understand)</p>
  
  <p>At the moment it looks like this:
  <a href="https://i.stack.imgur.com/5tkXEl.png" rel="nofollow noreferrer">https://i.stack.imgur.com/5tkXEl.png</a></p>
  
  <p>As you can see, its not positioned right and I'm quite afraid of looking at it on other devices.</p>
  
  <p>Code (Class extends View):</p>
  
  <pre><code>private void init(Context context) {
      bounds = new Rect();
      gaugeBackground = ContextCompat.getDrawable(context, R.drawable.gauge);
      arcPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
      arcPaint.setColor(Color.RED);
      arcPaint.setStyle(Paint.Style.STROKE);
      arcPaint.setStrokeWidth(7f);
  }
  
  protected void onDraw(Canvas canvas) {
      canvas.getClipBounds(bounds);
      gaugeBackground.setBounds(bounds);
      gaugeBackground.draw(canvas);
  
      float padding = 5;
      float size = getWidth() &lt; getHeight() ? getWidth() : getHeight();
      float width = size - (2 * padding);
      float height = size - (2 * padding);
      float radius = (width &lt; height ? width /2 : height /2);
  
      float rectLeft = (width /2) - radius + padding;
      float rectTop = (getHeight() /2) - radius + padding;
      float rectRight = (getWidth() /2) - radius + padding + width;
      float rectBottom = (getHeight() /2) - radius + padding + height;
  
      RectF mRect = new RectF(rectLeft, rectTop, rectRight, rectBottom);
      canvas.drawArc(mRect, 119f, 300f, false, arcPaint);
  }
  </code></pre>
  
  <p>Can someone provide helpful information? I hope I finally get the whole RectF/Drawing stuff..</p>