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
 Moving an existing Circle selection 1 pixel upwards?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

864 Posts

Posted - Jul 28 2021 :  07:26:23  Show Profile  Reply
To programmatically move an existing selection in ImageEnView one pixel upwards, I have to use this code:

var R := ImageEnView1.SelectedRect;
ImageEnView1.Select(R.x, R.y - 1, R.x + R.width, R.y + R.height - 1);


However, this works only if the existing selection is a RECTANGLE - because in the case of an existing Circle selection the selection is transformed to a rectangular selection. So how can I get the selection type from an existing selection?

And how can I move a Polygon selection one pixel?
And how can I move a MagicWand selection one pixel?

P.S.: Working with selections would be a lot easier with a powerful TSelection class...

xequte

38202 Posts

Posted - Jul 28 2021 :  16:10:51  Show Profile  Reply
Hi Peter

Yes, a TSelection class would be a good addition for a future version.

Please use:

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

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

PeterPanino

864 Posts

Posted - Jul 30 2021 :  10:36:34  Show Profile  Reply
Hi Nigel

Thanks, this is very useful to programmatically move and resize all kinds of selections.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: