Take the 2-minute tour ×  I now draw a dot on the canvas, which
may be zoomed in or out.  As far as I know, the drawing
function, canvas.drawCircle() takes in the coordinates in canvas
coordinate system. Furthermore, the co-ordinates remain
unchanged when the canvas is zoomed.  E.g. previously you draw a
dot at (50, 50) in the canvas coordinate system, and then you
zoom in the canvas, the dot's coordinates in the canvas still
remain (50, 50). But obviously, the dot has been moved w.r.t.
the screen.  When the canvas is zoomed, the dot should be kept
at the same position on the screen. *i.e. After the dot moves
w.r.t. to the screen, I want to move it back to its original
position w.r.t. the screen.*  My onDraw() function is as
follows:  public void onDraw(Canvas canvas) {      canvasWidth =
canvas.getWidth();     canvasHeight = canvas.getHeight();
canvas.translate(mPosX, mPosY);     canvas.scale(mScaleFactor,
mScaleFactor);     mImage.draw(canvas); // draw the map as the
background              Paint Point