Code
Execute
<!DOCTYPE html> <html> <head> <title>wikitechy-Scale() method</title> </head> <body> <h1>Wikitechy-Scale() method</h1> <canvas id="wikitechyCanvas" width="300" height="170" style="border:1px solid #d3d3d3;"> </canvas> <script> var canvas = document.getElementById("wikitechyCanvas"); var context = canvas.getContext("2d"); context.strokeRect(5, 5, 25, 15); context.scale(2, 2); context.strokeRect(5, 5, 25, 15); context.scale(2, 2); context.strokeRect(5, 5, 25, 15); context.scale(2, 2); context.strokeRect(5, 5, 25, 15); </script> </body> </html>
Result