From ced3a86293fea747f6873b6f3b49d9823b8d3d4f Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Thu, 30 Nov 2017 23:49:53 +0000 Subject: [PATCH] add gethashcode for transformation matrix --- src/UglyToad.Pdf/Core/TransformationMatrix.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/UglyToad.Pdf/Core/TransformationMatrix.cs b/src/UglyToad.Pdf/Core/TransformationMatrix.cs index 7d7c49be..371154fd 100644 --- a/src/UglyToad.Pdf/Core/TransformationMatrix.cs +++ b/src/UglyToad.Pdf/Core/TransformationMatrix.cs @@ -2,6 +2,7 @@ { using System; using Geometry; + using System.Collections.Generic; /// /// Specifies the conversion from the transformed coordinate space to the original untransformed coordinate space. @@ -153,6 +154,14 @@ return true; } + public override int GetHashCode() + { + var hashCode = 1113510858; + hashCode = hashCode * -1521134295 + base.GetHashCode(); + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(value); + return hashCode; + } + public override string ToString() { return $"{A}, {B}, 0\r\n{C}, {D}, 0\r\n{E}, {F}, 1";