PointF::Subtraction Operator (PointF, SizeF)

 
equivalentCodeEntityM:System.Drawing.PointF.Subtract(System.Drawing.PointF,System.Drawing.SizeF)

Translates a PointF by the negative of a specified SizeF.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public:
static PointF operator -(
	PointF pt,
	SizeF sz
)

Parameters

pt
Type: System.Drawing::PointF

The PointF to translate.

sz
Type: System.Drawing::SizeF

The SizeF that specifies the numbers to subtract from the coordinates of pt.

Return Value

Type: System.Drawing::PointF

The translated PointF.

The Subtraction operator subtracts the Width of the specified size from the x-coordinate of the PointF and the Height from the y-coordinate of the PointF.

The following code example demonstrates how to use the Subtraction operator. To run this example, paste the following code into a Windows Form. Handle the form's Paint event and call opSubtractionExample, passing e as PaintEventArgs.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: