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

X Property (LogicalPoint)

Example 





Gets or sets a value that represents the X coordinate for this LogicalPoint.
Syntax
[DisplayNameAttribute("			X")]
[CategoryAttribute("	Location")]
[LEADPropertyOrderAttribute(1)]
[DescriptionAttribute("X position in units")]
public double X {get; set;}
'Declaration
 
<DisplayNameAttribute("			X")>
<CategoryAttribute("	Location")>
<LEADPropertyOrderAttribute(1)>
<DescriptionAttribute("X position in units")>
Public Property X As Double
'Usage
 
Dim instance As LogicalPoint
Dim value As Double
 
instance.X = value
 
value = instance.X
[DisplayNameAttribute("			X")]
[CategoryAttribute("	Location")]
[LEADPropertyOrderAttribute(1)]
[DescriptionAttribute("X position in units")]
public double X {get; set;}
DisplayNameAttribute("			X")
CategoryAttribute("	Location")
LEADPropertyOrderAttribute(1)
DescriptionAttribute("X position in units")
 get_X();
set_X(value);
[DisplayNameAttribute("			X")]
[CategoryAttribute("	Location")]
[LEADPropertyOrderAttribute(1)]
[DescriptionAttribute("X position in units")]
public:
property double X {
   double get();
   void set (    double value);
}

Property Value

The x-coordinate of this LogicalPoint.
Example
 
Public Sub LogicalPoint_ConvertedXY()
   ' create a new logical point at location 1.5, 2 in inches
   Dim pt As LogicalPoint = New LogicalPoint(1.5f, 2f, LogicalUnit.Inch)
   Dim s As String
   ' show the point
   s = String.Format("Point is {0}", pt)
   MessageBox.Show(s)

   ' show the x and y components converted to pixels
      s = String.Format("x and y is {0}, {1} Pixels", LogicalUnitConverter.Convert(pt.X, LogicalUnit.Inch, _
                                                                                   150, _
                                                                                   LogicalUnit.Pixel, 150), _
                        LogicalUnitConverter.ConvertToPixels(pt.Y, LogicalUnit.Inch, 150))
   MessageBox.Show(s)
End Sub
public void LogicalPoint_ConvertedXY()
{
   // create a new logical point at location 1.5, 2 in inches
   LogicalPoint pt = new LogicalPoint(1.5f, 2f, LogicalUnit.Inch);
   string s;
   // show the point
   s = string.Format("Point is {0}", pt);
   MessageBox.Show(s);

   // show the x and y components converted to pixels
   s = string.Format("x and y is {0}, {1} Pixels", LogicalUnitConverter.Convert(pt.X, 
                                                                                LogicalUnit.Inch, 
                                                                                150, 
                                                                                LogicalUnit.Pixel, 
                                                                                150), LogicalUnitConverter.ConvertToPixels(pt.Y, LogicalUnit.Inch, 150));
   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