ImageEn, unit imageenview

TImageEnView.RestoreSelection

TImageEnView.RestoreSelection


Declaration

function RestoreSelection(Remove: Boolean=true; Options: TIERSOptions = iersMoveToAdapt): boolean;


Description

Restore a saved selection from the selections stack. RestoreSelection returns false when there aren't any selections saved in the stack.

Options specifies how the selection is adapted when it comes from an image with different size or position.

Note: To share the same selection among layers you must use iersSyncLayers.

Remove allows you to remove restored selection from selections stack.


Example

ImageEnView1.Select(10, 10, 100, 100);
ImageEnView1.SaveSelection;
ImageEnView1.Select(200, 200, 150, 150);
ImageEnView1.SaveSelection;
ImageEnView1.Deselect;

ImageEnView1.RestoreSelection;  // reload 200,200,150,150
..
ImageEnVIew1.RestoreSelection;  // reload 10,10,100,100