ImageLayer il = (ImageLayer)layer;
canvas.setAlpha(nalpha);
canvas.drawImage(il.image(), 0, 0);
} else if (layer instanceof ImmediateLayer) {
ImmediateLayer il = (ImmediateLayer)layer;
il.renderer().render(new CanvasSurface(canvas.setAlpha(nalpha)));
}
canvas.restore();
}