Upgrading to 5.0 - code changes

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Upgrading to 5.0 - code changes

Postby Rex Jackson » Tue Jul 28, 2009 1:14 am

I am considering moving up from version 3.5 to 5.0. I understand that (using the DLL) I would need to call VpeSetUnitTransformation(hDoc,1000) in order to keep using the old coordinates with the .01 mm units. Is the old code upwardly compatible otherwise? If not, what kinds of changes would have to be made? Thanks.
Rex Jackson
 
Posts: 1
Joined: Fri Dec 10, 2004 4:46 am

Postby IDEAL Software Support » Tue Jul 28, 2009 2:00 am

With VPE v4.0, released in August 2007, we also did release versions for Linux, Mac OS X and Solaris. This forced us to implement our own font rendering system to gain consistent layout across all platforms.

To make your old v3.x source code compatible with VPE v4.0 and higher, you need to insert two lines of code:

VPE.UnitTransformation = VUNIT_FACTOR_MM10
VPE.EngineRenderMode = VENGINE_RENDER_MODE_VER3

In addition, all coodinates supplied to the VPE API are now of type double instead of long. And the type of all handles has been changed from long to VpeHandle. The VpeHandle type is typedef'd as a void pointer, which is a 32-bit integer on 32-bit platforms and a 64-bit integer on 64-bit platforms.

The new internal coordinate system now has a precision of 1/10.000 mm.

Lastly, due to the new internal coordinate system, the values of the V-Flags needed to be changed. If you have always used the V-Flags in your source code, then you need nothing to do, but recompile your program. If you have used constant values like -1 instead of VFREE, then you need to change your source code. If you change it, you should start using the V-Flags.
IDEAL Software Support
 
Posts: 1622
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 201 guests