ImageEn, unit imageenview

TImageEnView.LayersClear

TImageEnView.LayersClear


Declaration

procedure LayersClear(ClearLayer0: Boolean = True);


Description

Removes all layers, and optionally clears the background image (Layer 0).

Note:
After completion only the background layer will remain (as an ImageEnView always requires at least one layer). If ClearLayer0 = True, the background layer is cleared (filled with the background color).
If you want to fully clear the content, including resetting the background layer, use ClearAll instead


Comparison of Methods

Method Description
Clear Fills the current image with the background color and removes the alpha channel
Blank Calls Clear and resets the image size to 1 x 1
LayersClear Removes all of the layers
ClearAll Resets the image (calling Blank) and removes all layers (calling LayersClear)


Examples

// Remove all layers, but keep the background image (Layer 0)
ImageEnView1.LayersClear();


See Also

LayersRemove