Addition Operator
Collapse the table of content
Expand the table of content

Point.Addition Operator (Point, Size)

 

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
Available since 1.1
Return to top
Show:
© 2016 Microsoft