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
 How to transform an existing rectangle selection into a circle selection?

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 27 2021 : 12:46:03
How can I TRANSFORM an EXISTING Rectangular Selection into a Circular Selection? Just setting:

ImageEnView1.MouseInteractGeneral := [miSelectCircle];


...does not do the job.
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 28 2021 : 00:23:18
Hi Peter

You can use:

// Convert existing (e.g. rectangular) selection to circular
var
  w, h: Integer;
begin
  if ImageEnView1.Selected then
  begin
    w := ImageEnView1.SelX2 - ImageEnView1.SelX1;
    h := ImageEnView1.SelY2 - ImageEnView1.SelY1;
    ImageEnView1.SelectEllipse( ImageEnView1.SelX1 + w div 2,
                                ImageEnView1.SelY1 + h div 2,
                                w, h );
  end;
end;


Nigel
Xequte Software
www.imageen.com