Leadtools.Forms Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ConvertToPixels Method
See Also 
Leadtools.Forms Namespace > LogicalUnitConverter Class : ConvertToPixels Method



sourceValue
The value that is going to be converted.
sourceUnit
The unit of measurement of the source value.
destinationDpi
Represents the DPI of the destination value.
sourceValue
The value that is going to be converted.
sourceUnit
The unit of measurement of the source value.
destinationDpi
Represents the DPI of the destination value.
Returns the value of the source value, converted to its equivalent measurement in .Pixel.

Syntax

Visual Basic (Declaration) 
Public Shared Function ConvertToPixels( _
   ByVal sourceValue As Double, _
   ByVal sourceUnit As LogicalUnit, _
   ByVal destinationDpi As Double _
) As Double
Visual Basic (Usage)Copy Code
Dim sourceValue As Double
Dim sourceUnit As LogicalUnit
Dim destinationDpi As Double
Dim value As Double
 
value = LogicalUnitConverter.ConvertToPixels(sourceValue, sourceUnit, destinationDpi)
C# 
public static double ConvertToPixels( 
   double sourceValue,
   LogicalUnit sourceUnit,
   double destinationDpi
)
C++/CLI 
public:
static double ConvertToPixels( 
   double sourceValue,
   LogicalUnit sourceUnit,
   double destinationDpi
) 

Parameters

sourceValue
The value that is going to be converted.
sourceUnit
The unit of measurement of the source value.
destinationDpi
Represents the DPI of the destination value.

Example

For an example, refer to Width.

Remarks

Convert converts a value measured in any unit that is specified by to pixels. The DPI is needed to define the area that is occuppied by one pixel.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

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