private Canvas getCanvas(int layer) {
        Canvas canvas = layeredCanvas[layer];
        if (canvas == null) {
            createBitmapAndCanvas(layer);
            canvas = layeredCanvas[layer];
        }
        return canvas;
    }
private Canvas getCanvas(int layer) {
        Canvas canvas = layeredCanvas[layer];
        if (canvas == null) {
            createBitmapAndCanvas(layer);
            canvas = layeredCanvas[layer];
        }
        return canvas;
    }
private Canvas getCanvas ( int layer ) { Canvas canvas = layeredCanvas [ layer ] ; if ( canvas == null ) { createBitmapAndCanvas ( layer ) ; canvas = layeredCanvas [ layer ] ; } return canvas ; }
Get the canvas for the layer index

@param layer layer index
@return canvas
Get the canvas for the layer index