diff --git a/src/Avalonia.Visuals/Point.cs b/src/Avalonia.Visuals/Point.cs
index d95512c976..a23ad98aeb 100644
--- a/src/Avalonia.Visuals/Point.cs
+++ b/src/Avalonia.Visuals/Point.cs
@@ -109,28 +109,6 @@ namespace Avalonia
return new Point(a._x + b.X, a._y + b.Y);
}
- ///
- /// Add a 2-tuple of double
- ///
- /// The point.
- /// 2-tuple of double
- /// A point that is the result of the addition.
- public static Point operator +(Point a, (double x, double y) b)
- {
- return new Point(a._x + b.x, a._y + b.y);
- }
-
- ///
- /// Add a double number to both coordinates
- ///
- /// The point.
- /// double number
- /// A point that is the result of the addition.
- public static Point operator +(Point a, double b)
- {
- return new Point(a._x + b, a._y + b);
- }
-
///
/// Subtracts two points.
///
@@ -153,28 +131,6 @@ namespace Avalonia
return new Point(a._x - b.X, a._y - b.Y);
}
- ///
- /// Subtracts a 2-tuple of double
- ///
- /// The point.
- /// 2-tuple of double
- /// A point that is the result of the subtraction.
- public static Point operator -(Point a, (double x, double y) b)
- {
- return new Point(a._x - b.x, a._y - b.y);
- }
-
- ///
- /// Subtracts a double number to both coordinates
- ///
- /// The point.
- /// double number
- /// A point that is the result of the subtraction.
- public static Point operator -(Point a, double b)
- {
- return new Point(a._x - b, a._y - b);
- }
-
///
/// Multiplies a point by a factor coordinate-wise
///
@@ -191,17 +147,6 @@ namespace Avalonia
/// Points having its coordinates multiplied
public static Point operator *(double k, Point p) => new Point(p.X * k, p.Y * k);
- ///
- /// Multiplies a 2-tuple of double
- ///
- /// The point.
- /// 2-tuple of double
- /// Points having its coordinates multiplied.
- public static Point operator *(Point a, (double x, double y) b)
- {
- return new Point(a._x * b.x, a._y * b.y);
- }
-
///
/// Divides a point by a factor coordinate-wise
///
@@ -210,17 +155,6 @@ namespace Avalonia
/// Points having its coordinates divided
public static Point operator /(Point p, double k) => new Point(p.X / k, p.Y / k);
- ///
- /// Divides a point by a 2-tuple of doubles
- ///
- /// The point.
- /// 2-tuple of double
- /// Points having its coordinates divided
- public static Point operator /(Point a, (double x, double y) b)
- {
- return new Point(a._x / b.x, a._y / b.y);
- }
-
///
/// Applies a matrix to a point.
///
@@ -344,26 +278,5 @@ namespace Avalonia
x = this._x;
y = this._y;
}
-
- ///
- /// Returns a boolean indicating whether the point coordinates are equal to 2-tuple of double
- ///
- /// 2-tuple of double
- ///
- /// True if is 2-tuple of double equals coordinates current point.
- ///
- public bool Equals((double x, double y) other)
- {
- return _x == other.x &&
- _y == other.y;
- }
-
- ///
- /// Gets a value indicating that point coordinates are zero
- ///
- public bool IsDefault
- {
- get { return (_x == 0) && (_y == 0); }
- }
}
}
diff --git a/src/Avalonia.Visuals/Size.cs b/src/Avalonia.Visuals/Size.cs
index f87b336b50..0faa4cc496 100644
--- a/src/Avalonia.Visuals/Size.cs
+++ b/src/Avalonia.Visuals/Size.cs
@@ -276,5 +276,16 @@ namespace Avalonia
{
return string.Format(CultureInfo.InvariantCulture, "{0}, {1}", _width, _height);
}
+
+ ///
+ /// Deconstructor for decomposition Size
+ ///
+ /// The width.
+ /// The height.
+ public void Deconstruct(out double width, out double height)
+ {
+ width = this._width;
+ height = this._height;
+ }
}
}
diff --git a/src/Avalonia.Visuals/Thickness.cs b/src/Avalonia.Visuals/Thickness.cs
index b03e91bf34..aba34e6895 100644
--- a/src/Avalonia.Visuals/Thickness.cs
+++ b/src/Avalonia.Visuals/Thickness.cs
@@ -272,5 +272,21 @@ namespace Avalonia
{
return $"{_left},{_top},{_right},{_bottom}";
}
+
+ ///
+ /// Deconstructor for decomposition Thickness
+ ///
+ /// The thickness on the left.
+ /// The thickness on the top.
+ /// The thickness on the right.
+ /// The thickness on the bottom.
+ public void Deconstruct(out double left, out double top, out double right, out double bottom)
+ {
+ left = this._left;
+ top = this._top;
+ right = this._right;
+ bottom = this._bottom;
+
+ }
}
}
diff --git a/src/Avalonia.Visuals/Vector.cs b/src/Avalonia.Visuals/Vector.cs
index 6059dc3971..ab8c6991dc 100644
--- a/src/Avalonia.Visuals/Vector.cs
+++ b/src/Avalonia.Visuals/Vector.cs
@@ -333,5 +333,16 @@ namespace Avalonia
///
public static Vector UnitY
=> new Vector(0, 1);
+
+ ///
+ /// Deconstructor for decomposition Vector
+ ///
+ /// The X component.
+ /// The Y poscomponentition.
+ public void Deconstruct(out double x, out double y)
+ {
+ x = this._x;
+ y = this._y;
+ }
}
}