title: Get un-translated, un-rotated (x,y) coordinate of a point from a Javascript canvas
body: <p>In Javascript we often render graphics by rotating and translating the coordinate plane before sending things</p>
  
  <pre><code>ctx.save();
  ctx.translate(someX, someY);
  ctx.rotate(someAngle * Math.PI / 180);
  
  ctx.beginPath();
  ctx.moveTo(x1, y1);    // What's the actual (x1,y1)?
  ctx.lineTo(x2, y2);    // What's the actual (x2,y2)?
  ctx.stroke();
  
  ctx.restore();
  </code></pre>
  
  <p>So having done this, how do I figure out the actual values of the endpoints of that line segment I've drawn?  Because after that translating and rotating, (x1,y1) and (x2,y2) are somewhere far away from where they'd be without the translating and rotating.  Is there an easy way to find out what their actual values are?</p>