javascript - HTML5 canvas drawImage and scale performance -


i hear ctx.drawimage destination width/height difference source width/height lead additional scale operation, isn't performance friendly operation. how this:

ctx.scale(0.5, 0.5);  for(var in img) {     ctx.drawimage(img[i], 0, 0); } 

is difference (in performance point of view) with:

for(var in img) {     ctx.drawimage(img[i], 0, 0, img[i].width, img[i].height, 0, 0, img[i].width * 0.5, img[i].height * 0.5); } 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -