diff --git a/src/UglyToad.PdfPig/Geometry/PdfPoint.cs b/src/UglyToad.PdfPig/Geometry/PdfPoint.cs index 260c5d66..8ddc1bdf 100644 --- a/src/UglyToad.PdfPig/Geometry/PdfPoint.cs +++ b/src/UglyToad.PdfPig/Geometry/PdfPoint.cs @@ -82,6 +82,27 @@ return new PdfVector(X, Y); } + /// + /// Returns a value indicating whether this is equal to a specified . + /// + /// + public override bool Equals(object obj) + { + if (obj is PdfPoint point) + { + return point.X == this.X && point.Y == this.Y; + } + return false; + } + + /// + /// Returns the hash code for this . + /// + public override int GetHashCode() + { + return (X, Y).GetHashCode(); + } + /// /// Get a string representation of this point. ///