title: Determines the origin point of canvas (javascript)
body: <p>I need to figure out how to know if the origin point of a canvas is at top/left or center/center or whatever.
  Maybe a way to get the coordinates of origin point (even if I know the coordinates of origin point at center/center is also 0, 0).</p>
  
  <p>I have several canvas which I convert to image with toDataUrl function. I need to set a background color to these canvas before converting. So to do this :</p>
  
  <pre><code>var curContext = curCanvas.getContext('2d');
  curContext.globalCompositeOperation = "destination-over";
  curContext.fillStyle = '#FFFFFF'; // or random color
  curContext.fillRect(0, 0, curCanvas.width, curCanvas.height);
  var image = curCanvas.toDataURL('image/jpeg', 1));
  </code></pre>
  
  <p>These code works with canvas with an origin point at top/left but some canvas (generated by puglin like hypertree) has an origin point at center/center so my fillRect has to be like this :</p>
  
  <pre><code>curContext.fillRect(-curCanvas.width/2, -curCanvas.height/2, curCanvas.width, curCanvas.height);
  </code></pre>
  
  <p>So, I need to know for a canvas, what is the origin point to know how use <code>fillRect</code> function (x and y arguments).</p>
  
  <p>Thanks for your help!</p>