| ImageEn, unit imageenview |
|
TImageEnView.LayersCreateFromSelection
TImageEnView.LayersCreateFromSelection
Declaration
function LayersCreateFromSelection(Index: Integer = -1): Integer;
Description
Creates a new
image layer from the current selection. This might be used to copy & paste selections, for example.
Index specifies the insertion index for the layer, or -1 to append.
Returns the index of the new layer.
Example
// Select an ellipse
ImageEnView1.SelectEllipse(150, 150, 50, 50);
// Copy selected area and create a new layer
ImageEnView1.LayersCreateFromSelection;
// Move the new layer
ImageEnView1.CurrentLayer.PosX := 100;
ImageEnView1.CurrentLayer.PosY := 100;
// Paste to the background
ImageEnView1.LayersMerge(0, 1);