←Select platform

Convert(float,AnnUnit,AnnUnit) Method

Summary

Converts a value from one unit to another.

Syntax

C#
VB
C++
public static float Convert( 
   float value, 
   AnnUnit srcUnit, 
   AnnUnit destUnit 
) 
  
Public Overloads Shared Function Convert( _ 
   ByVal value As Single, _ 
   ByVal srcUnit As Leadtools.Annotations.AnnUnit, _ 
   ByVal destUnit As Leadtools.Annotations.AnnUnit _ 
) As Single 
public: 
static float Convert(  
   float value, 
   Leadtools.Annotations.AnnUnit srcUnit, 
   Leadtools.Annotations.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.

C#
VB
using Leadtools; 
using Leadtools.Annotations; 
 
public void AnnUnitConverter_Convert() 
{ 
   float result = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch); 
} 
Imports Leadtools 
Imports Leadtools.Annotations 
 
Public Sub AnnUnitConverter_Convert() 
   Dim result As Single = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch) 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations Assembly