<!DOCTYPE html> <html> <body> <canvas id="mycanvas" width="300" height="240" style="border: 1px solid blue"> </canvas> <script> var mycanvas = document.getElementById('mycanvas'); var mycontext=mycanvas.getContext("2d"); mycontext.fillStyle = "#FF0000"; mycontext.fillRect(50,50,150,100); mycontext.save(); mycontext.fillStyle = "#0000FF"; mycontext.fillRect(75,75,150,100); mycontext.restore(); mycontext.fillRect(100,100,150,100); </script> </body> </html>Dosyayı İndir