Class UnitHelper
Provides methods for conversion between units.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Utilities
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public static class UnitHelper
Methods
CmToDip(Double)
Converts centimeters to dips.
Declaration
public static double CmToDip(double value)
Parameters
System. Centimeters. |
Returns
System. Pixels. |
DipToCm(Double)
Converts dips to centimeters.
Declaration
public static double DipToCm(double value)
Parameters
System. Pixels. |
Returns
System. Centimeters. |
DipToEmu(Double)
Converts dips to EMUs.
Declaration
public static double DipToEmu(double value)
Parameters
System. Dips. |
Returns
System. EMUs. |
DipToInch(Double)
Converts dips to inches.
Declaration
public static double DipToInch(double value)
Parameters
System. Pixels. |
Returns
System. Inches. |
DipToMm(Double)
Converts dips to milimeters.
Declaration
public static double DipToMm(double value)
Parameters
System. Pixels. |
Returns
System. Millimeters. |
DipToPica(Double)
Converts dips to picas.
Declaration
public static double DipToPica(double value)
Parameters
System. Pixels. |
Returns
System. Picas. |
DipToPoint(Double)
Converts dips to points.
Declaration
public static double DipToPoint(double value)
Parameters
System. Pixels. |
Returns
System. Points. |
DipToPointI(Double)
Converts dips to points.
Declaration
public static int DipToPointI(double value)
Parameters
System. Pixels. |
Returns
System. Points. |
DipToTwip(Double)
Converts dips to twips.
Declaration
public static double DipToTwip(double value)
Parameters
System. Pixels. |
Returns
System. Twips. |
DipToTwipF(Double)
Converts dips to twips.
Declaration
public static float DipToTwipF(double value)
Parameters
System. Pixels. |
Returns
System. Twips. |
DipToTwipI(Double)
Converts dips to twips.
Declaration
public static int DipToTwipI(double value)
Parameters
System. Pixels. |
Returns
System. Twips. |
DipToUnit(Double, UnitType)
Converts DIPs to units.
Declaration
public static double DipToUnit(double value, UnitType type)
Parameters
System. Pixels. |
Unit Unit type. |
Returns
System. Units. |
EmuToDip(Double)
Converts EMUs to dips.
Declaration
public static double EmuToDip(double value)
Parameters
System. EMUs. |
Returns
System. Pixels. |
ExcelColumnWidthToPixelWidth(Workbook, Double)
Converts excel column width to pixels width.
Declaration
public static double ExcelColumnWidthToPixelWidth(Workbook workbook, double width)
Parameters
Workbook
workbook
The workbook. |
System. The width. |
Returns
System.
|
InchToDip(Double)
Converts inches to dips.
Declaration
public static double InchToDip(double value)
Parameters
System. Inches. |
Returns
System. Pixels. |
MmToDip(Double)
Converts milimeteres to dips.
Declaration
public static double MmToDip(double value)
Parameters
System. Millimeteres. |
Returns
System. Pixels. |
PicaToDip(Double)
Converts to points dips.
Declaration
public static double PicaToDip(double value)
Parameters
System. Picas. |
Returns
System. Pixels. |
PixelWidthToExcelColumnWidth(Workbook, Double)
Converts column width in pixels to excel column width.
Declaration
public static double PixelWidthToExcelColumnWidth(Workbook workbook, double pixels)
Parameters
Workbook
workbook
The workbook. |
System. The pixels. |
Returns
System.
|
PointToDip(Double)
Converts points to dips.
Declaration
public static double PointToDip(double value)
Parameters
System. Points. |
Returns
System. Pixels. |
TwipToDip(Double)
Converts twips to dips.
Declaration
public static double TwipToDip(double value)
Parameters
System. Twips. |
Returns
System. Pixels. |
TwipToDipF(Double)
Converts twips to dips.
Declaration
public static float TwipToDipF(double value)
Parameters
System. Twips. |
Returns
System. Dips. |
TwipToDipI(Double)
Converts twips to dips.
Declaration
public static int TwipToDipI(double value)
Parameters
System. Twips. |
Returns
System. Dips. |
UnitToDip(Double, UnitType)
Converts Units to dips.
Declaration
public static double UnitToDip(double value, UnitType type)
Parameters
System. Units. |
Unit Unit type. |
Returns
System. Pixels. |