Copyright (C) 1994, Digital Equipment Corp.
The
Pts interface contains utilities to convert between points
and pixels. VBTkit uses 72 points per inch and 25.4 millimeters
per inch.
The locking level is arbitrary for all procedures in this interface.
INTERFACEPts ; IMPORT Axis, VBT; PROCEDURE ToScreenPixels (v: VBT.T; pts: REAL; ax: Axis.T): INTEGER;
Return the number of screen pixels that correspond toptspoints onv's screentype in the axisax; or return0ifv's screentype isNIL. Equivalent toROUND (ToPixels (v, pts, ax))
PROCEDURE ToPixels (v: VBT.T; pts: REAL; ax: Axis.T): REAL;
Return the number of pixels that correspond toptspoints onv's screentype in the axisax; or return0ifv's screentype isNIL.
PROCEDURE FromPixels (v: VBT.T; pixels: REAL; ax: Axis.T): REAL;
Return the number of points that correspond topixelspixels onv's screentype in the axisax; or return0ifv's screentype isNIL.
CONST PtsPerInch = 72.0; MMPerInch = 25.4; PROCEDURE FromMM (mm: REAL): REAL;
Convert from millimeters to points.
PROCEDURE ToMM (pts: REAL): REAL;
Convert from points to millimeters.
END Pts.