// subcanvas
x = 80;
canvas.drawRectangle(x, y, width, height, gray);
Canvas subcanvas = canvas.createSubcanvas(x + 1, y + 1, width - 1, height - 1);
subcanvas.drawRectangle(0, 0, width - 2, height - 2, blue);
x = 150;
canvas.drawRectangle(x, y, width, height, gray);
subcanvas = canvas.createSubcanvas(x + 1, y + 1, width - 1, height - 1);