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
 PanZoom Demo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

plumothy

United Kingdom
7 Posts

Posted - Nov 16 2012 :  06:00:01  Show Profile  Reply
Delphi XE3 Professional.
ImageEn v4.1.4.

I have just purchased ImageEn and am looking at the PanZoom demo.

It will not compile because of errors like:
- "[dcc32 Error] uMain.pas(145): E2003 Undeclared identifier: '[dcc32 Error] uMain.pas(145): E2003 Undeclared identifier: 'TransitionRectMaintainAspectRatio'"

TImageEnView does not have a property or method called "TransitionRectMaintainAspectRatio".

How can I get this demo to work, please.

Steve Bailey

w2m

USA
1990 Posts

Posted - Nov 16 2012 :  12:23:20  Show Profile  Reply
The current version no longer has:
AnImageEnView.TransitionRectMaintainAspectRatio,
AnImageEnView.TransitionStartRect,or
AnImageEnView.TransitionEndRect variables,
but
AnImageEnView.RunTransition has an overloaded method that handles these variables:

If you modify the demos source as shown below the application functions the same as it did in older versions.

// Perform a Pan Zoom transition effect
procedure TfrmMain.RunPanZoomTransition(AnImageEnView:TImageEnView;
                                        sFilename:string;
                                        StartRect:TRect;
                                        EndRect:TRect;
                                        iMilliseconds:Integer;
                                        Timing:TIETransitionTiming=iettLinear);
begin
  AnImageEnView.PrepareTransition;
  AnImageEnView.io.loadfromfile(sFilename);
  AnImageEnView.TransitionTiming:= Timing;
  Memo1.clear;
  Memo1.lines.add(format('Adjusted Start Rect: (%d,%d,%d,%d)  W: %d, H: %d',
                         [StartRect.left,
                          StartRect.top,
                          StartRect.right,
                          StartRect.bottom,
                          rectwidth(StartRect),
                          rectheight(StartRect)]));
  Memo1.lines.add(format('Adjusted End Rect: (%d,%d,%d,%d)  W: %d, H: %d',
                         [EndRect.left,
                          EndRect.top,
                          EndRect.right,
                          EndRect.bottom,
                          rectwidth(EndRect),
                          rectheight(EndRect)]));
  AnImageEnView.RunTransition(iettPanZoom, iMilliseconds, StartRect, EndRect, chkTransitionRectMaintainAspectRatio.checked);
  AnImageEnView.update;
  Memo1.lines.add(format('End Position: (%d,%d) %d%%',
    [AnImageEnView.ViewX,AnImageEnView.ViewY,round(AnImageEnView.Zoom)]));
end;

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

plumothy

United Kingdom
7 Posts

Posted - Nov 16 2012 :  13:56:06  Show Profile  Reply
Thank you!

(It looks like that demo needs to be updated then.)

Steve Bailey,
ImageEn 4.1.4
Delphi XE3 Professional
Windows 7 Professional
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: