Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
PeterPanino
Posted - Dec 03 2022 : 12:55:46 I need to process multiple selections, for example:
I need to copy the selections to a TImageEnMView, so from this example, I would get four images in the ImageEnMView. I have found no method in the documentation for how to do this.
4 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Dec 05 2022 : 14:07:09 Thanks at the suggestion, Peter, We'll look at this for a future version.
However, it would be nice if you could implement a method to iterate between multiple selections.
This could be done in the following way: Each time the user creates a selection, it is added to an internal array arraySelections. Also, "negative selections" (i.e., those selections created with the CTRL key pressed) are added to this array and calculated for intersections with the other selections. Then, this array should make it easy to iterate between the multiple selections.
xequte
Posted - Dec 04 2022 : 18:21:10 Hi Peter
Yes, that is correct, multiple selections are treated as one selection mask.
Posted - Dec 04 2022 : 05:56:44 It seems it is not possible to iterate through multiple selections. So now instead I do it after every single selection:
procedure TForm1.AddCurrentSelectionToImageCollection;
begin
var BM := TIEBitmap.Create;
try
ImageEnView1.CopySelectionToBitmap(BM);
ImageEnMViewImageCollection.InsertImage(0, BM);
finally
BM.Free;
end;
end;