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 to`pts`

points on`v`

's screentype in the axis`ax`

; or return`0`

if`v`

's screentype is`NIL`

. Equivalent to`ROUND (ToPixels (v, pts, ax))`

PROCEDURE ToPixels (v: VBT.T; pts: REAL; ax: Axis.T): REAL;

Return the number of pixels that correspond to`pts`

points on`v`

's screentype in the axis`ax`

; or return`0`

if`v`

's screentype is`NIL`

.

PROCEDURE FromPixels (v: VBT.T; pixels: REAL; ax: Axis.T): REAL;

Return the number of points that correspond to`pixels`

pixels on`v`

's screentype in the axis`ax`

; or return`0`

if`v`

's screentype is`NIL`

.

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.