PSSetUnit()

Syntax

Function PSSetUnit(nUnit)
TPageScript:SetUnit(nUnit)

Returns

The old unit.

Description

PSSetUnit() lets you decide the unit of measurement you want to use. You have the choice of eight different units to work with, depending on your needs. It is even possible to switch between units while printing a document. For example, you may feel more comfortable to represent the placement of text using TEXT coordinates but draw frames and lines using millimeters for more precision.

Argument

nUnit An integer value with one of the following units.

Constant Value Description
APS_TEXT 0 Unit is text coordinates (Row, Col) or (Col / Row)
APS_MILL 1 Unit is millimeters (25.4 mm per inch)
APS_CENT 2 Unit is centimeters (2.54 cent per inch)
APS_INCH 3 Unit is inchs (1 : 1)
APS_PIXEL 4 Unit is pixels (device dependant)
APS_PICA 5 Unit is picas (6 picas per inch)
APS_POINT 6 Unit is points (72 points per inch)
APS_TWIPS 7 Unit is twips (1440 twips per inch)
APS_CLIP 8 Unit is text coordinates (Row, Col) or (Col / Row) but compatible with PageScript for Clipper APS_TEXT unit