Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/UglyToad.PdfPig/Geometry/PdfPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,27 @@ internal PdfVector ToVector()
return new PdfVector(X, Y);
}

/// <summary>
/// Returns a value indicating whether this <see cref="PdfPoint"/> is equal to a specified <see cref="PdfPoint"/> .
/// </summary>
/// <param name="obj"></param>
public override bool Equals(object obj)
{
if (obj is PdfPoint point)
{
return point.X == this.X && point.Y == this.Y;
}
return false;
}

/// <summary>
/// Returns the hash code for this <see cref="PdfPoint"/>.
/// </summary>
public override int GetHashCode()
{
return (X, Y).GetHashCode();
}

/// <summary>
/// Get a string representation of this point.
/// </summary>
Expand Down