Point.Addition(Point, Vector) Operator
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
static System::Windows::Point operator +(System::Windows::Point point, System::Windows::Vector vector);
public static System.Windows.Point operator + (System.Windows.Point point, System.Windows.Vector vector);
static member ( + ) : System.Windows.Point * System.Windows.Vector -> System.Windows.Point
Public Shared Operator + (point As Point, vector As Vector) As Point
Parameters
- point
- Point
The point to translate.
- vector
- Vector
The amount by which to translate point
.
Returns
The result of translating the specified point by the specified vector.
Examples
The following example shows how to add a Point to a Vector using the overloaded (+) operator.
private Point overloadedAdditionOperatorExample()
{
Point point1 = new Point(10, 5);
Vector vector1 = new Vector(20, 30);
// Add point to a Vector using the overloaded (+) operator.
// pointResult is equal to (30,35).
Point pointResult = point1 + vector1;
return pointResult;
}
Private Function overloadedAdditionOperatorExample() As Point
Dim point1 As New Point(10, 5)
Dim vector1 As New Vector(20, 30)
' Add point to a Vector using the overloaded (+) operator.
' pointResult is equal to (30,35).
Dim pointResult As Point = point1 + vector1
Return pointResult
End Function
Applies to
See also
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om