The Subtract Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.
Subtracts the width and height of one
LogicalSize structure from another
LogicalSize structure.
Syntax
Parameters
- size1
- The first LogicalSize on the left side of the subtraction operator.
- size2
- The second LogicalSize on the right side of the subtraction operator.
Example
This example subtracts two size structures.
Visual Basic | Copy Code |
---|
'''This example subtracts two size structures.
Public Sub LogicalSize_Subtract()
Dim sz1 As LogicalSize = New LogicalSize(200, 300, LogicalUnit.Pixel)
Dim sz2 As LogicalSize = New LogicalSize(1.5F, 2f, LogicalUnit.Inch)
Dim s As String = String.Format("sz1 - sz2 = {0}", LogicalSize.Subtract(sz1,sz2))
MessageBox.Show(s)
End Sub |
C# | Copy Code |
---|
///This example subtracts two size structures.
public void LogicalSize_Subtract()
{
LogicalSize sz1 = new LogicalSize(200, 300, LogicalUnit.Pixel);
LogicalSize sz2 = new LogicalSize(1.5F, 2f, LogicalUnit.Inch);
string s = string.Format("sz1 - sz2 = {0}", LogicalSize.Subtract(sz1,sz2));
MessageBox.Show(s);
} |
Remarks
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