LEADTOOLS Forms (Leadtools.Forms assembly)
LEAD Technologies, Inc

ConvertTo Method (LogicalPoint)

Example 





Represents the DPI of the source value along the x-axis. 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. 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. 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 y-axis. This value is only used if the source unit of measure is Leadtools.Forms.LogicalUnit.Pixel.
Returns this LogicalPoint structure, converted to its equivalent in the specified destination unit of measure.
Syntax
'Declaration
 
Public Function ConvertTo( _
   ByVal sourceDpiX As Double, _
   ByVal sourceDpiY As Double, _
   ByVal destinationUnit As LogicalUnit, _
   ByVal destinationDpiX As Double, _
   ByVal destinationDpiY As Double _
) As LogicalPoint
'Usage
 
Dim instance As LogicalPoint
Dim sourceDpiX As Double
Dim sourceDpiY As Double
Dim destinationUnit As LogicalUnit
Dim destinationDpiX As Double
Dim destinationDpiY As Double
Dim value As LogicalPoint
 
value = instance.ConvertTo(sourceDpiX, sourceDpiY, destinationUnit, destinationDpiX, destinationDpiY)
 function Leadtools.Forms.LogicalPoint.ConvertTo( 
   sourceDpiX ,
   sourceDpiY ,
   destinationUnit ,
   destinationDpiX ,
   destinationDpiY 
)

Parameters

sourceDpiX
Represents the DPI of the source value along the x-axis. 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. 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. 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 y-axis. 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
 
Private Sub LogicalPoint_ConvertTo()
   ' create a new logical point that is 1.5 and 2 inches
   Dim pt1 As LogicalPoint = New LogicalPoint(1.5f, 2f, LogicalUnit.Inch)
   ' show the point
   Dim s As String = String.Format("{0}", pt1)
   MessageBox.Show(s)

   ' convert the point to pixels
   Dim pt2 As LogicalPoint = pt1.ConvertTo(150, 150, LogicalUnit.Pixel, 150, 150)

   ' show
   s = String.Format("{0}", pt2)
   MessageBox.Show(s)
End Sub
private void LogicalPoint_ConvertTo()
{
   // create a new logical point that is 1.5 and 2 inches
   LogicalPoint pt1 = new LogicalPoint(1.5f, 2f, LogicalUnit.Inch);
   // show the point
   string s = string.Format("{0}", pt1);
   MessageBox.Show(s);

   // convert the point to pixels
   LogicalPoint pt2 = pt1.ConvertTo(150, 150, LogicalUnit.Pixel, 150, 150);

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

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LogicalPoint Structure
LogicalPoint Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 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