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
TwipsPerDip
The twips in a DIP: 15, as a twip is 1/1440 inch.
public const double TwipsPerDip = 15
Field Value
Methods
FromPoints(double)
A length in points, in DIP.
public static double FromPoints(double points)
Parameters
pointsdoubleThe length in points.
Returns
- double
The length in DIP:
pointsover PointsPerDip.
FromTwips(double)
A length in twips, in DIP.
public static double FromTwips(double twips)
Parameters
twipsdoubleThe length in twips.
Returns
- double
The length in DIP:
twipsover TwipsPerDip.
ToPoints(double)
A length in DIP, in points.
public static double ToPoints(double dips)
Parameters
dipsdoubleThe length in DIP.
Returns
- double
The length in points:
dipstimes PointsPerDip.
ToTwips(double)
A length in DIP, in twips.
public static double ToTwips(double dips)
Parameters
dipsdoubleThe length in DIP.
Returns
- double
The length in twips:
dipstimes TwipsPerDip.