function drawImage(ctx, image, x, y, w, h)
	{
		ctx.save();
		
		if (aspect)
		{
			var iw = image.width;
			var ih = image.height;
			
			var s = Math.min(w / iw, h / ih);
			var x0 = (w - iw * s) / 2;
			var y0 = (h - ih * s) / 2;
			
			x += x0;
			y += y0;
			w = iw * s;
			h = ih * s;
		}
		
		var s = this.state.scale;

		if (flipH)
		{
			ctx.translate(2 * x + w, 0);
			ctx.scale(-1, 1);
		}
		
		if (flipV)
		{
			ctx.translate(0, 2 * y + h);
			ctx.scale(1, -1);
		}

		ctx.drawImage(image, x, y, w, h);
		ctx.restore();
	}
Function: setShadowOffset

Enables or disables and configures the current shadow.