Basics

<< Click to Display Table of Contents >>

Navigation:  Programming Techniques >

Basics

Previous pageReturn to chapter overviewNext page

All objects of VPE are positioned and sized with an internal precision of 0.0001 mm. You can select programmatically, whether you supply coordinates to VPE in centimeter or inch units by setting the property:

VPE.UnitTransformation = VUNIT_FACTOR_CM       // centimeters

VPE.UnitTransformation = VUNIT_FACTOR_INCH     // inch

 

Throughout this manual - as well as the reference manuals and the demo source codes - all examples are using the centimeter unit coordinate system.

 

Most output functions need a starting coordinate (x, y) which specifies the upper left corner, and some need an ending coordinate (x2, y2) for the lower right corner of an object - for example a line or some text. X and X2 specify the offset to the left page margin. Y and Y2 specify the offset to the top page margin.

To draw a line starting at 1.58cm from the right and 2.5cm from the top of a page, ending at 5cm from the right and 5cm from the top of a page, you would enter:

Line(1.58, 2.5, 5, 5)