←Select platform

Subtraction Operator

Summary

Returns a LogicalPoint that results from subtracting the width and height of a LogicalSize structure from the X and Y coordinates of the LogicalPoint structure, respectively.

Syntax

C#
VB
C++
public static LogicalPoint operator -( 
   LogicalPoint point, 
   LogicalSize size 
) 
  
Public Operator -( _ 
   ByVal point As Leadtools.Forms.LogicalPoint, _ 
   ByVal size As Leadtools.Forms.LogicalSize _ 
) As Leadtools.Forms.LogicalPoint 

Parameters

point
Specifies the LogicalPoint.

size
Specifies the LogicalSize.

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 subtraction of the Width property of the passed LogicalSize from the X-Coordinate of the passed LogicalPoint, i.e. new X = X - Width. The Y-Coordinate of the new LogicalPoint equals the subtraction of the Height property of the passed LogicalSize from the Y-Coordinate of the passed LogicalPoint, i.e. new Y = Y - Height.

Example

This example subtracts the point structure by size structure (offset).

C#
VB
using Leadtools.Forms; 
 
///This example subtracts two point structures. 
public void LogicalPoint_OperatorMinus() 
{ 
   LogicalSize sz = new LogicalSize(2, 3, LogicalUnit.Centimeter); 
   LogicalPoint pt = new LogicalPoint(1.5F, 2f, LogicalUnit.Inch); 
   string s = string.Format("pt - sz = {0}", pt - sz); 
   MessageBox.Show(s); 
} 
Imports Leadtools.Forms 
 
'''This example subtracts two point structures. 
Public Sub LogicalPoint_OperatorMinus() 
   Dim sz As LogicalSize = New LogicalSize(2, 3, LogicalUnit.Centimeter) 
   Dim pt As LogicalPoint = New LogicalPoint(1.5F, 2.0F, LogicalUnit.Inch) 
   Dim s As String = String.Format("pt - sz = {0}", pt - sz) 
   MessageBox.Show(s) 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms Assembly