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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Moving an existing Circle selection 1 pixel upwards?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Jul 28 2021 : 07:26:23
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...
2   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Jul 30 2021 : 10:36:34
Hi Nigel

Thanks, this is very useful to programmatically move and resize all kinds of selections.
xequte Posted - Jul 28 2021 : 16:10:51
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