LEADTOOLS Forms (Leadtools.Forms assembly)

Convert Method (LogicalUnitConverter)

Show in webframe





The value that is going to be converted.
The unit of measurement for the source value.
Represents the DPI of the source value. This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
The unit of measurement for the destination value.
Represents the DPI of the destination value. This value is only used if the destination unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
Returns the value of the source value, converted to its equivalent in the specified destination unit of measure.
Syntax
public static double Convert( 
   double sourceValue,
   LogicalUnit sourceUnit,
   double sourceDpi,
   LogicalUnit destinationUnit,
   double destinationDpi
)
'Declaration
 
Public Shared Function Convert( _
   ByVal sourceValue As Double, _
   ByVal sourceUnit As LogicalUnit, _
   ByVal sourceDpi As Double, _
   ByVal destinationUnit As LogicalUnit, _
   ByVal destinationDpi As Double _
) As Double
'Usage
 
Dim sourceValue As Double
Dim sourceUnit As LogicalUnit
Dim sourceDpi As Double
Dim destinationUnit As LogicalUnit
Dim destinationDpi As Double
Dim value As Double
 
value = LogicalUnitConverter.Convert(sourceValue, sourceUnit, sourceDpi, destinationUnit, destinationDpi)

            

            
public:
static double Convert( 
   double sourceValue,
   LogicalUnit sourceUnit,
   double sourceDpi,
   LogicalUnit destinationUnit,
   double destinationDpi
) 

Parameters

sourceValue
The value that is going to be converted.
sourceUnit
The unit of measurement for the source value.
sourceDpi
Represents the DPI of the source value. This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
destinationUnit
The unit of measurement for the destination value.
destinationDpi
Represents the DPI of the destination value. This value is only used if the destination unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
Remarks
Convert converts a value measured in a unit specified by sourceUnit to any unit that is specified by destinationUnit. The DPI is only needed when Leadtools.Forms.LogicalUnit.Pixel is used define the the area that is occuppied by one pixel.
Example
For an example, refer to Width.
Requirements

Target Platforms

See Also

Reference

LogicalUnitConverter Class
LogicalUnitConverter Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.Forms requires a Forms Module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features