ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Process multiple selections?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

864 Posts

Posted - Dec 03 2022 :  12:55:46  Show Profile  Reply
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.

PeterPanino

864 Posts

Posted - Dec 04 2022 :  05:56:44  Show Profile  Reply
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;
Go to Top of Page

xequte

38222 Posts

Posted - Dec 04 2022 :  18:21:10  Show Profile  Reply
Hi Peter

Yes, that is correct, multiple selections are treated as one selection mask.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

864 Posts

Posted - Dec 05 2022 :  06:27:58  Show Profile  Reply
Hi Nigel

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.
Go to Top of Page

xequte

38222 Posts

Posted - Dec 05 2022 :  14:07:09  Show Profile  Reply
Thanks at the suggestion, Peter, We'll look at this for a future version.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: