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
 Clone interactions ImageEnView1 to ImageEnView2
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

lago

40 Posts

Posted - May 21 2020 :  04:59:46  Show Profile  Reply
Hello, is there a function to duplicate the interactions made on one imageenview on another? I have two imageenview with a different image in each one, and I would like to compare one with the other, for example duplicating the zoom applied in the first one, as well as the displacement on the image

Something like choosing a candidate in lightroom, here a more visual example
https://www.youtube.com/watch?v=asNEZ4Sg3Z0
Minute: 6.00

Thanks!

xequte

38128 Posts

Posted - May 21 2020 :  16:17:14  Show Profile  Reply
Hi

How about something like this (untested):


// Assign this event to ImageEnView1 and ImageEnView2 to synchronize the view
procedure TForm1.ImageEnView1ViewChange(Sender: TObject; Change: Integer);
var
  Dest : TImageEnView;
begin
  if fUpdatingView then
    exit;

  if Sender = ImageEnView2 then
    Dest := ImageEnView1
  else
    Dest := ImageEnView2;

  fUpdatingView := True;
  Dest.LockUpdate();
  try
    Dest.Zoom := TImageEnView( Sender ).Zoom;
    Dest.SetViewXY( TImageEnView( Sender ).ViewX, TImageEnView( Sender ).ViewY );
  finally
    Dest.UnlockUpdate();
    fUpdatingView := False;
  end;
end;


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

lago

40 Posts

Posted - May 22 2020 :  04:37:07  Show Profile  Reply
Work fine! thanks Nigel!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: