Class ScaleModeExtensions
- Namespace
- RDCore.Forms.Model
- Assembly
- RDCore.Forms.dll
Conversions between a ScaleMode's units and twips.
public static class ScaleModeExtensions
- Inheritance
-
ScaleModeExtensions
- Inherited Members
Fields
TwipsPerPixel
The twips in a pixel: TwipsPerDip. The model's pixel is a device-independent pixel, 1/96 inch, whatever the screen.
public const double TwipsPerPixel = 15
Field Value
Methods
TwipsPerUnit(ScaleMode)
How many twips one unit of mode is, across and down.
public static (double Across, double Down) TwipsPerUnit(this ScaleMode mode)
Parameters
modeScaleModeThe scale mode.
Returns
- (double Width, double Height)
The twips per unit, across and down. A Character unit is not square: a character cell is 120 twips across and 240 down. A pixel is TwipsPerPixel.
Exceptions
- ArgumentOutOfRangeException
modeis User, which has no fixed unit (its unit is the container's size over its scale), or is not a scale mode.