Class UtilityMethods
Represents the conversion utilities.
Inheritance
Inherited Members
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public class UtilityMethods
Examples
UtilityMethods utility = new UtilityMethods();
//Convert emu to inch
double inch = UtilityMethods.EmuToInch(234);
//Convert emu to point
double point = UtilityMethods.EmuToPoint(234);
//Convert inch to emu
double emu = UtilityMethods.InchToEmu(12);
//Convert inch to pixel
float pixel = UtilityMethods.InchToPixel(34);
//convert inch to point
float inchToPoint = UtilityMethods.InchToPoint(540);
//Convert point to emu
double pointToEmu = UtilityMethods.PointToEmu(45.89);
//Convert point to pixel
double pointToPixel = UtilityMethods.PointToPixel(786.90);
Dim utility As New UtilityMethods()
'Convert emu to inch
Dim inch As Double = UtilityMethods.EmuToInch(234)
'Convert emu to point
Dim point As Double = UtilityMethods.EmuToPoint(234)
'Convert inch to emu
Dim emu As Double = UtilityMethods.InchToEmu(12)
'Convert inch to pixel
Dim pixel As Single = UtilityMethods.InchToPixel(34)
'convert inch to point
Dim inchToPoint As Single = UtilityMethods.InchToPoint(540)
'Convert point to emu
Dim pointToEmu As Double = UtilityMethods.PointToEmu(45.89)
'Convert point to pixel
Dim pointToPixel As Double = UtilityMethods.PointToPixel(786.9)
Constructors
UtilityMethods()
Declaration
public UtilityMethods()
Methods
EmuToInch(Int32)
Converts the specified Emu unit to the equivalent Inch unit.
Declaration
public static double EmuToInch(int emu)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | emu | Specifies the value in Emu unit. |
Returns
Type | Description |
---|---|
System.Double | Returns the value in Inch unit. |
EmuToPoint(Int32)
Converts the specified Emu unit to the equivalent Point unit.
Declaration
public static double EmuToPoint(int emu)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | emu | Specifies the value in Emu unit. |
Returns
Type | Description |
---|---|
System.Double | Returns the value in Point unit. |
EmuToPoint(Int64)
Converts the specified Emu unit to the equivalent Point unit.
Declaration
public static double EmuToPoint(long emu)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | emu | Specifies the value in Emu unit. |
Returns
Type | Description |
---|---|
System.Double | Returns the value in Point unit. |
InchToEmu(Double)
Converts the specified Inch unit to the equivalent Emu unit.
Declaration
public static int InchToEmu(double inch)
Parameters
Type | Name | Description |
---|---|---|
System.Double | inch | Specifies the value in Inch unit. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the value in Emu unit. |
InchToPixel(Double)
Converts the specified Inch unit to the equivalent Pixel unit.
Declaration
public static float InchToPixel(double inch)
Parameters
Type | Name | Description |
---|---|---|
System.Double | inch | Specifies the value in Inch unit. |
Returns
Type | Description |
---|---|
System.Single | Returns the value in Pixel unit. |
InchToPoint(Double)
Converts the specified Inch unit to the equivalent Point unit.
Declaration
public static float InchToPoint(double inch)
Parameters
Type | Name | Description |
---|---|---|
System.Double | inch | Specifies the value in Inch unit. |
Returns
Type | Description |
---|---|
System.Single | Returns the value in Point unit. |
PointToEmu(Double)
Converts the specified Point unit to the equivalent Emu unit.
Declaration
public static int PointToEmu(double point)
Parameters
Type | Name | Description |
---|---|---|
System.Double | point | Specifies the value in Point unit. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the value in Emu unit. |
PointToPixel(Double)
Converts the specified Point unit to the equivalent Pixel unit.
Declaration
public static int PointToPixel(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value to convert. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the converted value in Pixel unit. |
Remarks
1 inch equals 72 points.