LEADTOOLS Forms (Leadtools.Forms assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
Add Method
See Also 
Leadtools.Forms Namespace > LogicalPoint Structure : Add Method



point
Specifies the LogicalPoint.
size
Specifies the LogicalSize.

The Add Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

point
Specifies the LogicalPoint.
size
Specifies the LogicalSize.
Returns a LogicalPoint that results from adding the width and height of LogicalSize structure to the X and Y coordinates of the LogicalPoint structure, respectively.

Syntax

Visual Basic (Declaration) 
Public Shared Function Add( _
   ByVal point As LogicalPoint, _
   ByVal size As LogicalSize _
) As LogicalPoint
Visual Basic (Usage)Copy Code
Dim point As LogicalPoint
Dim size As LogicalSize
Dim value As LogicalPoint
 
value = LogicalPoint.Add(point, size)
C# 
public static LogicalPoint Add( 
   LogicalPoint point,
   LogicalSize size
)
C++/CLI 
public:
static LogicalPoint Add( 
   LogicalPoint point,
   LogicalSize size
) 

Parameters

point
Specifies the LogicalPoint.
size
Specifies the LogicalSize.

Example

This example adds the size structure to point structure (offset).

Visual BasicCopy Code
'''This example adds two point structures.
Public Sub LogicalPoint_Add()
   Dim sz As LogicalSize = New LogicalSize(2, 3, LogicalUnit.Centimeter)
   Dim pt As LogicalPoint = New LogicalPoint(1.5F, 2f, LogicalUnit.Inch)
   Dim s As String = String.Format("pt + sz = {0}", LogicalPoint.Add(pt, sz))
   MessageBox.Show(s)
End Sub
C#Copy Code
///This example adds two point structures.
public void LogicalPoint_Add()
{
   LogicalSize sz = new LogicalSize(2, 3, LogicalUnit.Centimeter);
   LogicalPoint pt = new LogicalPoint(1.5F, 2f, LogicalUnit.Inch);
   string s = string.Format("pt + sz = {0}", LogicalPoint.Add(pt, sz));
   MessageBox.Show(s);
}

Remarks

The unit of measurement of the new LogicalPoint is the same as the unit of measurement of the passed LogicalPoint. The X-Coordinate of the new LogicalPoint equals the sum of the X-Coordinate of the passed LogicalPoint and the Width property of the passed LogicalSize, i.e. new X = X + Width. The Y-Coordinate of the new LogicalPoint equals the sum of the Y-Coordinate of the passed LogicalPoint and the Height property of the passed LogicalSize, i.e. new Y = Y + Height.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

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