←Select platform

Subtraction Operator

Summary

Translates an AnnPoint by the negative of a given AnnSize.

Syntax

C#
VB
C++
public static AnnPoint operator -( 
   AnnPoint pt, 
   AnnSize sz 
) 
  
Public Operator -( _ 
   ByVal pt As Leadtools.Annotations.AnnPoint, _ 
   ByVal sz As Leadtools.Annotations.AnnSize _ 
) As Leadtools.Annotations.AnnPoint 

Parameters

pt
The AnnPoint to translate.

sz
The AnnSize that specifies the pair of numbers to subtract from the coordinates of pt.

Return Value

Returns the translated AnnPoint.

Example

This method subtracts a size from a point.

C#
VB
using Leadtools; 
using Leadtools.Annotations; 
 
public void AnnPoint_OperatorMinus() 
{ 
   AnnPoint pt = new AnnPoint(200, 300, AnnUnit.Pixel); 
   AnnSize sz = new AnnSize(1.5F, 2F, AnnUnit.Inch); 
 
   string s = string.Format("pt - sz = {0}", pt - sz); 
   MessageBox.Show(s); 
} 
Imports Leadtools 
Imports Leadtools.Annotations 
 
Public Sub AnnPoint_OperatorMinus() 
   Dim pt As AnnPoint = New AnnPoint(200, 300, AnnUnit.Pixel) 
   Dim sz As AnnSize = New AnnSize(1.5F, 2.0F, AnnUnit.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.Annotations Assembly