diff --git a/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs b/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs index 3d3fd255..662780b3 100644 --- a/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs +++ b/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs @@ -45,7 +45,7 @@ "UglyToad.PdfPig.Content.Page", "UglyToad.PdfPig.Content.PageSize", "UglyToad.PdfPig.Content.Word", - "UglyToad.PdfPig.Content.Line", + "UglyToad.PdfPig.Content.TextLine", "UglyToad.PdfPig.Content.TextDirection", "UglyToad.PdfPig.Core.TransformationMatrix", "UglyToad.PdfPig.CrossReference.CrossReferenceTable", diff --git a/src/UglyToad.PdfPig/Content/Line.cs b/src/UglyToad.PdfPig/Content/TextLine.cs similarity index 100% rename from src/UglyToad.PdfPig/Content/Line.cs rename to src/UglyToad.PdfPig/Content/TextLine.cs diff --git a/src/UglyToad.PdfPig/Geometry/PdfLine.cs b/src/UglyToad.PdfPig/Geometry/PdfLine.cs index 0b8bdb6f..4903db44 100644 --- a/src/UglyToad.PdfPig/Geometry/PdfLine.cs +++ b/src/UglyToad.PdfPig/Geometry/PdfLine.cs @@ -17,7 +17,8 @@ { get { - decimal l = (Point1.X - Point1.X) * (Point1.X - Point1.X) + (Point1.Y - Point1.Y) * (Point1.Y - Point1.Y); + decimal l = (Point1.X - Point2.X) * (Point1.X - Point2.X) + + (Point1.Y - Point2.Y) * (Point1.Y - Point2.Y); return (decimal)System.Math.Sqrt((double)l); } }