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 .
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
Post a Comment