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 do I make a selection zoom in when I click on

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
save0804 Posted - Mar 06 2019 : 21:04:00
How do I select an image as a miselect and zoom in by clicking on the selection?











3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 07 2019 : 02:11:29
Hi

The whole code would be something like:

procedure TMDIChild.ImageEnView1MouseDown(Sender: TObject; Button: TMouseButton;
                                          Shift: TShiftState; X, Y: Integer);
var
  sel: TIERectangle;
begin
  if ImageEnView1.Selected and
     ( ImageEnView1.XScr2Bmp( X ) > ImageEnView1.SelX1 ) and
     ( ImageEnView1.YScr2Bmp( Y ) > ImageEnView1.SelY1 ) and
     ( ImageEnView1.XScr2Bmp( X ) < ImageEnView1.SelX2 ) and
     ( ImageEnView1.YScr2Bmp( Y ) < ImageEnView1.SelY2 ) then
  begin
    sel := ImageEnView1.SelectedRect;
    ImageEnView1.VisibleBitmapRect := Rect( sel.x, sel.y, sel.x + sel.width, sel.y + sel.height );
  end;
end;


Also, there is a MouseInteract items that performs a similar function: miSelectZoom.

Nigel
Xequte Software
www.imageen.com
save0804 Posted - Mar 06 2019 : 23:36:10

I want to zoom in when I click on a selection area like in a photo.

xequte Posted - Mar 06 2019 : 22:57:49
Hi

You can use:
// Zoom into the selected area of the image
procedure TMainForm.Button1Click(Sender: TObject);
var
  sel: TIERectangle;
begin
  if ImageEnView1.Selected then
  begin
    sel := ImageEnView1.SelectedRect;
    ImageEnView1.VisibleBitmapRect := Rect( sel.x, sel.y, sel.x + sel.width, sel.y + sel.height );
  end;
end;


Nigel
Xequte Software
www.imageen.com