I have a canvas object that I want to put an image in for a web application. I can get the image loaded, but I\'ve run into 2 problems: The image won\'t stretch to the canva
Both CSS and height and width attributes can be used and do not need to agree in size. The CSS style will determine the displayed size, you asked for a canvas that can stretch. The width and height control the number of pixels the canvas uses for drawing.
for example this will be scaled 10 to 1, and with anti-aliasing scrolling an drawing in this canvas would be as smooth as silk.
If CSS is not used, their defaults will be the width and height attributes of the canvas element.