Set the dimensions for the layer.