c = document.createElement('canvas');
ctx = c.getContext('2d');
never use CSS to size a canvas
always size the canvas directly, defining the number of pixels
they are unitless. just integer values
c.width = 500; c.height = 500;
ctx.strokeStyle = '#ddd'; ctx.beginPath(); ctx.moveTo(x-dx, y-dy); ctx.lineTo(x, y); ctx.stroke();
ctx.fillStyle = '#fc09'; ctx.beginPath(); ctx.arc(x, y, rx, 0, 2*Math.PI); ctx.fill();