Introduction

Welcome to the 'Smooth and efficient zooming and panning' documentation. In this documentation, you will find information on how to use the program, which features it supports and, of course, a complete overview and documentation of all source files.
Robert Fizimayer, 0025821.
e0025821@student.tuwien.ac.at
User documentation
Requirements
Before you start using the program, you should read this. There are a few requirements:
- Borland Delphi 7.0 (or Delphi 2005) to compile the program; win32 binary is of course also included. Compilation with freepascal was not tested, but it may also work.
- At least 256MB RAM
- 40MB free disk space
- 1.0GHz CPU or higher
- Microsoft DirectX 9.0c (or a newer version)
- Microsoft Windows 2000/Windows XP/Vista. Note, that the program is not designed to run on Windows 9x platform, nevertheless it may work there.
A graphics card with Shader Model 2.0 support is recommeneded (because these cards usually have more that 64 MB onboard memory), but the program will also run on pre-shader hardware. Just make sure, that DirectX 9.0c is installed and your hardware supports at least 24bit depth buffer.
Running the program
To run the program, simply execute the zoompan.exe file, which is located in the bin directory. The program should need only a few seconds to load and the user interface should then be displayed. You will see two areas where the map is rendered - the left one has dimensions 800x600, the right one is much smaller and can be used for fast navigation.
If the map is not rendered in the left window, checkout the developer documentation to get information about compilation with debug information. This may help you to fix the problem.
User Interface
It is really easy to handle the user interface. In this section, the complete feature set will be explained.
Navigation on map
To navigate on the map, you can leftclick on any position eighter on the left view or also on the small preview image on the right of the user interface. After you selected a new location, a smooth animation will be performed to this position. You can change the animation with two free parameters:
- Free parameter Rho: This parameter can be used to adjust animation path height.
- Free parameter speed: This parameter can be used to adjust the animation speed. 1.0 stands for original animation speed (should be a good choice in most cases), 0.5 stands for half of the original speed, 2.0 stands for double speed, etc.
How to zoom in/out
You can adjust the zoom level by pressing the zoom-in/zoom out buttons. Hold them down until the desired zoom level is reached.
How to save locations
To save locations, you can simple point at them on the big map and open the dialog with a rightclick. You will be asked then to enter a name for the new location - enter any name (but no empty string) and press ENTER to save the new location. It will automatically be saved to the city.dat file.
How to zoom/pan to stored locations
To visit previously stored locations, simply select them from the combo box. The program will then perform immediately the animation to this location.
Developer documentation
In this chapter you can find some useful information for developers.
Compilation
The program compiles well with Delphi 7 Professional (and any other Delphi 7 Studio version). Delphi 2005 and even Delphi 6. Delphi 5 may work, but it was not tested. It may also compile with freepascal/lazarus, but this was not tested eighter.
Please make sure, that you compile the program with compiler optimizations turned on for maximum performance.
Also, it is always a good idea to eighter delete all .dcu files in the dcu folder before compilation, or to use "create project" instead of compile in the compiler menu.
Debugging output
If you have problems running the program, it may help to enable the debug output. To do this, just enter debug=true as compiler option. When running the program, you will then find a debug.txt file in the folder of the executable, which can help you to identify and solve the problem. Note, that you need to recompile the program (see subsection above) to enable the debug output.

How to generate the documentation
To generate the documentation, you need a few utilities (which are all available as freeware):
- Pasdoc - a free pascal documentation generator. You can download it at http://pasdoc.sipsolutions.net. Just make sure, that the directory where the pasdoc.exe file is located is set in the computer's PATH options. Of course, you can also copy the file to your Windows folder.
- MiKTeX - LaTeX for Windows - this is necessary if you want to generate also a pdf and tex version of the help (strongly recommended). You can download it at http://www.miktex.org. Just install it and it should work fine.
- HTML Help Workshop - a very useful utility from Microsoft (yes, it is really possible) which allows to create .chm help files from the generated html help. This should be done in any case, because it really simplifies development tasks. Make sure that the folder where hhc.exe is located is added to your PATH variable.
After you installed all the above utilities successfully, just call the pasdoc_genhelp.bat file to generate the documentation. Note: if you created new source files which are not located within the classes, units or forms folder (or even in subdirectories of these folders), you need to update the pasdoc_filelist.txt file.
Source code documentation
If you perform any sourcecode modifications, you should always use the pasdoc ducumentation style to avoid problems during help generation described above. Details can be found at the pasdoc project page as well as in the pasdoc documentation which is delivered with the executable.