ctx.save(); // Save the current state
ctx.setFillStyle("#FFF"); // Make changes to the settings
ctx.setGlobalAlpha(0.5);
ctx.fillRect(30, 30, 90, 90); // Draw a rectangle with new settings
ctx.restore(); // Restore previous state
ctx.fillRect(45, 45, 60, 60); // Draw a rectangle with restored settings
ctx.restore(); // Restore original state
ctx.fillRect(60, 60, 30, 30); // Draw a rectangle with restored settings
}