title: How Android Zoom works properly?
body: <p>Circle 1 in the image shows the correct location.But when I draw the same circle in the second circle area, there is a different background. I have trouble solving the problem.Can you help me ?</p>
  
  <p><img src="https://i.stack.imgur.com/jExe3.jpg" alt="encountered error image"></p>
  
  <pre><code>if (zooming) {
    zMatrix!!.reset()
    zMatrix!!.postScale(2 f, 2 f, zoomPos!!.x, zoomPos!!.y)
    zPaint!!.shader.setLocalMatrix(zMatrix)
    val src = RectF(zoomPos!!.x - 50, zoomPos!!.y - 50, zoomPos!!.x + 50, zoomPos!!.y + 50)
    val dst = RectF(0 f, 0 f, 100 f, 100 f)
    zMatrix!!.setRectToRect(src, dst, Matrix.ScaleToFit.CENTER)
    zMatrix!!.postScale(2 f, 2 f)
    zPaint!!.shader.setLocalMatrix(zMatrix)
    zPaint!!.color = Color.BLACK
    canvas ? .drawCircle(100 f, 100 f, 100 f, zPaint) // 1 Circle
    canvas ? .drawCircle(zoomPos!!.x, zoomPos!!.y, 100 f, zPaint) // 2 Circle
  }
  </code></pre>