Error processing SSI file
LEADTOOLS Annotations (Leadtools.Annotations assembly)

Show in webframe

Convert(Single,AnnUnit,AnnUnit) Method






Value to be converted. This is in srcUnit units.
Source AnnUnit unit.
Destination AnnUnit unit.
Converts a value from one unit to another.
Syntax
public static float Convert( 
   float value,
   AnnUnit srcUnit,
   AnnUnit destUnit
)
'Declaration
 
Public Overloads Shared Function Convert( _
   ByVal value As Single, _
   ByVal srcUnit As AnnUnit, _
   ByVal destUnit As AnnUnit _
) As Single
'Usage
 
Dim value As Single
Dim srcUnit As AnnUnit
Dim destUnit As AnnUnit
Dim value As Single
 
value = AnnUnitConverter.Convert(value, srcUnit, destUnit)

            

            
public:
static float Convert( 
   float value,
   AnnUnit srcUnit,
   AnnUnit destUnit
) 

Parameters

value
Value to be converted. This is in srcUnit units.
srcUnit
Source AnnUnit unit.
destUnit
Destination AnnUnit unit.

Return Value

The converted value.
Remarks
This method uses the default DPI value of 96.
Example

This example converts a value of 200 pixels to inches at 96 DPI.

Copy Code  
Imports Leadtools
Imports Leadtools.Annotations

Public Sub AnnUnitConverter_Convert()
   Dim result As Single = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch)
End Sub
using Leadtools;
using Leadtools.Annotations;

public void AnnUnitConverter_Convert()
{
   float result = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch);
}
Requirements

Target Platforms

See Also

Reference

AnnUnitConverter Class
AnnUnitConverter Members
Overload List

Error processing SSI file
(Deprecated, use Leadtools.Annotations.Core instead)