A canvas shadow param example

function canvasReady() {
  draw(document.getElementById('canvas').getContext('2d'));
}
function draw(ctx) {
  ctx.globalAlpha   = 1.0;
  ctx.font          = "24pt Arial";
  ctx.textBaseline  = "top";
  ctx.fillStyle     = "blue";

  ctx.shadowBlur = 10;
  ctx.shadowOffsetX = 10;
  ctx.shadowOffsetY = 10;
  ctx.shadowColor = "gray";

  var text = setShadow(ctx, "skyblue", -5, -10, 10);
  ctx.fillText("set param: " + text, 10, 20);
  ctx.fillText("get param: " + getShadow(ctx), 10, 60);

  text = setShadow(ctx, "gray", 4, 4, 4);
}
function setShadow(ctx, color, ox, oy, blur) {
  ctx.shadowColor = color;
  ctx.shadowOffsetX = ox;
  ctx.shadowOffsetY = oy;
  ctx.shadowBlur = blur;
  return [color, ox, oy, blur].join(", ");
}
function getShadow(ctx) {
  return [ ctx.shadowColor,
           ctx.shadowOffsetX,
           ctx.shadowOffsetY,
           ctx.shadowBlur ].join(", ");
}