Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
Convert Method
See Also  Example
Leadtools.Annotations Namespace > AnnUnitConverter Class : Convert Method




Converts a value from one unit to another.

Overload List

OverloadDescription
Convert(Single,AnnUnit,AnnUnit) Converts a value from one unit to another.  
Convert(Single,AnnAngularUnit,AnnAngularUnit) Converts an angular value from one unit to another.  

Example

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

Visual BasicCopy Code
Public Sub AnnUnitConverter_Convert()
   Dim result As Single = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch)
End Sub
C#Copy Code
public void AnnUnitConverter_Convert() 

   float result = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch); 
}

Remarks

This method uses the default DPI value of 96.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features