LEADTOOLS Forms (Leadtools.Forms assembly)

Convert Method (LogicalSize)

Show in webframe
Example 





Represents the DPI of the source value along the x-axis (width). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
Represents the DPI of the source value along the y-axis (height). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
The unit of measurement of the destination value.
Represents the DPI of the destination value along the x-axis (width). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
Represents the DPI of the destination value along the x-axis (width). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
Converts this LogicalSize structure to the specified unit of measure.
Syntax
public void Convert( 
   double sourceDpiX,
   double sourceDpiY,
   LogicalUnit destinationUnit,
   double destinationDpiX,
   double destinationDpiY
)
'Declaration
 
Public Sub Convert( _
   ByVal sourceDpiX As Double, _
   ByVal sourceDpiY As Double, _
   ByVal destinationUnit As LogicalUnit, _
   ByVal destinationDpiX As Double, _
   ByVal destinationDpiY As Double _
) 
'Usage
 
Dim instance As LogicalSize
Dim sourceDpiX As Double
Dim sourceDpiY As Double
Dim destinationUnit As LogicalUnit
Dim destinationDpiX As Double
Dim destinationDpiY As Double
 
instance.Convert(sourceDpiX, sourceDpiY, destinationUnit, destinationDpiX, destinationDpiY)

            

            
public:
void Convert( 
   double sourceDpiX,
   double sourceDpiY,
   LogicalUnit destinationUnit,
   double destinationDpiX,
   double destinationDpiY
) 

Parameters

sourceDpiX
Represents the DPI of the source value along the x-axis (width). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
sourceDpiY
Represents the DPI of the source value along the y-axis (height). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
destinationUnit
The unit of measurement of the destination value.
destinationDpiX
Represents the DPI of the destination value along the x-axis (width). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
destinationDpiY
Represents the DPI of the destination value along the x-axis (width). This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
Remarks
The specified LogicalUnit is used to do the actual conversion.
Example
Copy Code  
Imports Leadtools.Forms

Private Sub LogicalSize_LogicalSize()
   ' create a new logical size that is 1.5 and 2 inches
   Dim sz As LogicalSize = New LogicalSize(1.5f, 2f, LogicalUnit.Inch)
   ' show the size
   Dim s As String = String.Format("{0}", sz)
   MessageBox.Show(s)

   ' convert the size to pixels
   sz.Convert(150, 150, LogicalUnit.Pixel, 150, 150)

   ' show
   s = String.Format("{0}", sz)
   MessageBox.Show(s)
End Sub
using Leadtools.Forms;

private void LogicalSize_LogicalSize()
{
   // create a new logical size that is 1.5 and 2 inches
   LogicalSize sz = new LogicalSize(1.5f, 2f, LogicalUnit.Inch);
   // show the size
   string s = string.Format("{0}", sz);
   MessageBox.Show(s);

   // convert the size to pixels
   sz.Convert(150, 150, LogicalUnit.Pixel, 150, 150);

   // show
   s = string.Format("{0}", sz);
   MessageBox.Show(s);
}
Requirements

Target Platforms

See Also

Reference

LogicalSize Structure
LogicalSize 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