Export (0) Print
Expand All

Point.Addition Operator

Translates a Point by a given Size.

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

static let inline (+)
        pt:Point * 
        sz:Size  : Point

Parameters

pt
Type: System.Drawing.Point

The Point to translate.

sz
Type: System.Drawing.Size

A Size that specifies the pair of numbers to add to the coordinates of pt.

Return Value

Type: System.Drawing.Point
The translated Point.

The following code example creates points and sizes using several of the overloaded operators defined for these types. It also demonstrates how to use the SystemPens class.

This example is designed to be used with Windows Forms. Create a form that contains a Button named subtractButton. Paste the code into the form and call the CreatePointsAndSizes method from the form's Paint event-handling method, passing e as PaintEventArgs.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft