I am trying to draw a rectangle which is 38 px wide and 38px long.
<div id="dpi1" style="height: 38px ; width: 38px;background-color: red"></div>
This works as expected. But, when i try do draw the rectangle on a canvas using this code
var cxt=canvas.getContext("2d");
cxt.beginPath();
cxt.rect(0, 0, 38, 38);
cxt.fillStyle = 'yellow';
cxt.fill();
cxt.stroke();
I get a smaller rectangle.Why is this so ? Does that mean the grid in canvas(x,y cordinates) is less than 1 pixels ?