The way he had stated it i if the canvas were drawn on THEN re-sized it would do that. I have the canvas sized then drawing on it.
By the way he had stated it:
Draw a 10x10 square
Resize canvas to 1/2 height or so
Square is now a rectangle that is 5x10
What I am pointing out:
Size a...
Been a while been busy ...
From my css file
canvas.main
{
width:100%;
height:40%;
}
the canvas element
<canvas id="main" class="main" onClick="javascript:draw()">
This text is displayed if your browser does not support HTML5 Canvas.
</canvas>
And the script. Draw a red...
So I have a page with 2 canvas elements.
Used JS to draw a 10x10 rectangle to each canvas. And they looked correct.
Then resized the canvas elements with a css class using the width and height properties. Instead of pixles I used percentage. First canvas width 100% height 88%. Second...