title: Set "internal" dimensions of canvas?
body: <p>I can set the width and height of my canvas by setting the <code>width</code> and <code>height</code> attributes like so:</p>
  
  <pre><code>&lt;canvas id="canvas" width="510" height="510"&gt;&lt;/canvas&gt;
  </code></pre>
  
  <p>But I don't want to hard-code all my drawing code to depend on these values. I'd like set the "internal" width/height to say, 100x100 and then draw everything in those coordinates, and have the canvas scale it out (the same way I do in OpenGL). That way if I ever resize my canvas, it still renders nicely.</p>
  
  <p>I figured out that if I set the CSS width and height on the canvas I can make it larger, but keep the same units, but I found that it actually stretches the result and it blurs and looks terrible (I thought it still render like a vector, nice and crisp).</p>
  
  <p>Is there a way to do this?</p>