Code
Execute
<!DOCTYPE html> <html> <head> <title>wikitechy shadowoffsetx property in canvas</title> </head> <body> <h1>wikitechy shadowoffsetx property in canvas</h1> <canvas id="wikitechyCanvas" width="300" height="150" style="border:1px solid #d3d3d3;"> </canvas> <script> var c = document.getElementById("wikitechyCanvas"); var context = c.getContext("2d"); context.shadowBlur = 20; context.shadowOffsetX = 30; context.shadowColor = "red"; context.fillStyle= "blue"; context.fillRect(30, 30, 120, 100); </script> </body> </html>
Result