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
 Selection XY coordinates
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

141 Posts

Posted - Oct 04 2018 :  14:11:53  Show Profile  Reply
Using ImageEnView, I like to draw with the mouse [miselect] multiple selections and save the XY coordinates of each rectangle in order to restore the exact position of the multiple selections on other images.

Could you please give me a hint, how to:

- add a selection without pushing the Shift button;
- read the XY coordinates of the selections;
- create the rectangles as selections (not as layer) on an image?

Thanks a lot,
Ale

xequte

39052 Posts

Posted - Oct 05 2018 :  00:32:46  Show Profile  Reply
Hi Ale

Use ShiftKeyLock to force selection addition (without using shift key)

https://www.imageen.com/help/TImageEnView.ShiftKeyLock.html

You can save and reload selections using:

https://www.imageen.com/help/TImageEnView.SaveSelectionToFile.html



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

aleatprog

141 Posts

Posted - Oct 05 2018 :  09:45:41  Show Profile  Reply
Perfect. Thank you, Nigel.
Go to Top of Page

aleatprog

141 Posts

Posted - Oct 07 2018 :  05:09:59  Show Profile  Reply
The output file created by TImageEnView.SaveSelectionToFile doesn't give me access to the XY coordinates of each single selection of the multiple selection, but I need them as I like to assign a different operation to each single selection.

I'll give your following approach a try:
https://www.imageen.com/ieforum/topic.asp?TOPIC_ID=990
Go to Top of Page

xequte

39052 Posts

Posted - Oct 07 2018 :  18:38:08  Show Profile  Reply
Hi

You should iterate through the selection using the PolySelPoints array:

https://www.imageen.com/help/TImageEnView.PolySel.html

If there are multiple selections, they will be separated by the point($FFFFF, $FFFFF)

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