javascript - How to automatically scale pixel positions in HTML5 Canvas? -


i have created html5 based drawing application used html5 canvas element . have written code draw sketches on canvas .

enter image description here

the original size of canvas 500 px x 500 px . drawings made according . problem need change canvas size 1000 x 1000 , want make drawings cover entire new canvas . there easy way rather tinker pixel positions directly ?

you change canvas size using css , keep width , height properties of canvas element constant. create stretching need.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -