Functions for TRVUnits conversion

<< Click to display table of contents >>

Functions for TRVUnits conversion

unit RVFuncs;

function RV_UnitsPerInch(Units: TRVUnits): TRVLength;
function RV_UnitsToTwips(Value: TRVLength; Units: TRVUnits): Integer;
function RV_TwipsToUnits(Value: Integer; Units: TRVUnits): TRVLength;
function RV_UnitsToUnits(Value: TRVLength; OldUnits, NewUnits: TRVUnits): TRVLength;
function RV_UnitsToPixels(Value: TRVLength; Units: TRVUnits; PixelsPerInch: Integer): Integer;

RV_UnitsPerInch returns the amount of Units in 1 inch.

RV_UnitsToTwips converts Value from Units to twips.

RV_TwipsToUnits converts Value from twips to Units.

RV_UnitsToUnits converts Value from OldUnits to NewUnits.

RV_UnitsToPixels converts Value from Units to pixels in the specified resolution.

See also

Units of measurement in TRichView