title: How to find the current translate position in Canvas?
body: <p>How do I get the current translate position from a Canvas? I am trying to draw stuff where my coordinates are a mix of relative (to each other) and absolute (to canvas).</p>
  
  <p>Lets say I want to do</p>
  
  <pre><code>canvas.translate(x1, y1);
  canvas.drawSomething(0, 0); // will show up at (x1, y1), all good
  // now i want to draw a point at x2,y2
  canvas.translate(x2, y2);
  canvas.drawSomething(0, 0); // will show up at (x1+x2, y1+y2)
  // i could do
  canvas.drawSomething(-x1, -y1);
  // but i don't always know those coords
  </code></pre>
  
  <p>This works but is dirty:</p>
  
  <pre><code>private static Point getCurrentTranslate(Canvas canvas) {
      float [] pos = new float [2];
      canvas.getMatrix().mapPoints(pos);
      return new Point((int)pos[0], (int)pos[1]);
  }
  ...
  Point p = getCurrentTranslate(canvas);
  canvas.drawSomething(-p.x, -p.y);
  </code></pre>
  
  <p>The canvas has a getMatrix method, it has a <code>setTranslate</code> but no <code>getTranslate</code>. I don't want to use <code>canvas.save()</code> and <code>canvas.restore()</code> because the way I'm drawing things it's a little tricky (and probably messy ...)</p>
  
  <p>Is there a cleaner way to get these current coordinates?</p>