PrintDocument for WinForms | ComponentOne
C1.PrintDocument.6 Assembly / C1.C1Preview Namespace / Utils Class / ConvertUnits(Double,UnitTypeEnum,UnitTypeEnum,Single,Single) Method
The value to convert.
The source unit of measurement.
The target unit of measurement.
The source DPI (used if from is UnitTypeEnum.Pixel).
The target DPI (used if to is UnitTypeEnum.Pixel).

In This Topic
    ConvertUnits(Double,UnitTypeEnum,UnitTypeEnum,Single,Single) Method
    In This Topic
    Converts a value from one unit of measurement to another.
    Syntax
    'Declaration
     
    Public Shared Function ConvertUnits( _
       ByVal value As Double, _
       ByVal from As UnitTypeEnum, _
       ByVal to As UnitTypeEnum, _
       ByVal fromDpi As Single, _
       ByVal toDpi As Single _
    ) As Double
    public static double ConvertUnits( 
       double value,
       UnitTypeEnum from,
       UnitTypeEnum to,
       float fromDpi,
       float toDpi
    )

    Parameters

    value
    The value to convert.
    from
    The source unit of measurement.
    to
    The target unit of measurement.
    fromDpi
    The source DPI (used if from is UnitTypeEnum.Pixel).
    toDpi
    The target DPI (used if to is UnitTypeEnum.Pixel).

    Return Value

    value converted to to units.
    See Also