Table of Contents

Class Units

Namespace
RDCore.Forms.Model
Assembly
RDCore.Forms.dll

Conversions between the model's unit, the device-independent pixel (DIP, 1/96 inch), and the units of legacy forms code: twips (VB6) and points (MSForms).

public static class Units
Inheritance
Units
Inherited Members

Remarks

A length converts by a constant: 1 DIP is 15 twips and 0.75 point. Lengths are Doubles, so a conversion keeps fractions.

Fields

PointsPerDip

The points in a DIP: 0.75, as a point is 1/72 inch.

public const double PointsPerDip = 0.75

Field Value

double

TwipsPerDip

The twips in a DIP: 15, as a twip is 1/1440 inch.

public const double TwipsPerDip = 15

Field Value

double

Methods

FromPoints(double)

A length in points, in DIP.

public static double FromPoints(double points)

Parameters

points double

The length in points.

Returns

double

The length in DIP: points over PointsPerDip.

FromTwips(double)

A length in twips, in DIP.

public static double FromTwips(double twips)

Parameters

twips double

The length in twips.

Returns

double

The length in DIP: twips over TwipsPerDip.

ToPoints(double)

A length in DIP, in points.

public static double ToPoints(double dips)

Parameters

dips double

The length in DIP.

Returns

double

The length in points: dips times PointsPerDip.

ToTwips(double)

A length in DIP, in twips.

public static double ToTwips(double dips)

Parameters

dips double

The length in DIP.

Returns

double

The length in twips: dips times TwipsPerDip.