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
 How to transform an existing rectangle selection into a circle selection?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

859 Posts

Posted - Jul 27 2021 :  12:46:03  Show Profile  Reply
How can I TRANSFORM an EXISTING Rectangular Selection into a Circular Selection? Just setting:

ImageEnView1.MouseInteractGeneral := [miSelectCircle];


...does not do the job.

xequte

38176 Posts

Posted - Jul 28 2021 :  00:23:18  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: