From 16cf584cd055d17bb8730b7b9cbf3438251ee554 Mon Sep 17 00:00:00 2001 From: DJGosnell Date: Wed, 8 Feb 2023 01:45:02 -0500 Subject: [PATCH] Updated for new core libraries. --- src/DtronixPdf.Tests/PdfPageRenderTests.cs | 4 ++-- src/DtronixPdf.sln | 2 +- src/DtronixPdf/DtronixPdf.csproj | 6 +++--- src/DtronixPdf/PdfBitmap.cs | 4 ++-- src/DtronixPdf/PdfPage.cs | 2 +- src/DtronixPdf/PdfPageRenderConfig.cs | 2 +- src/DtronixPdfBenchmark/Program.cs | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/DtronixPdf.Tests/PdfPageRenderTests.cs b/src/DtronixPdf.Tests/PdfPageRenderTests.cs index 242fb83..d0a363e 100644 --- a/src/DtronixPdf.Tests/PdfPageRenderTests.cs +++ b/src/DtronixPdf.Tests/PdfPageRenderTests.cs @@ -49,12 +49,12 @@ public void PixelTest_1() var renderPage = page.Render( 1, (uint)Color.White.ToArgb(), - new Boundary(522, 477, 3, 3)); + new BoundaryF(522, 477, 3, 3)); var renderPage2 = page.Render( 1, (uint)Color.White.ToArgb(), - new Boundary(522, 477, 30, 30)); + new BoundaryF(522, 477, 30, 30)); renderPage2.Image.SaveAsPng("png1Crop.png"); diff --git a/src/DtronixPdf.sln b/src/DtronixPdf.sln index 6ce6bf4..57e6201 100644 --- a/src/DtronixPdf.sln +++ b/src/DtronixPdf.sln @@ -9,7 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DtronixPdf.Tests", "Dtronix EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DtronixPdfBenchmark", "DtronixPdfBenchmark\DtronixPdfBenchmark.csproj", "{2639F2B5-D7A0-4566-B00A-BBFF0181C27F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DtronixPdf.ImageSharp", "DtronixPdf.ImageSharp\DtronixPdf.ImageSharp.csproj", "{59A2B9DB-514C-4463-8AB8-3779B62FD99E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DtronixPdf.ImageSharp", "DtronixPdf.ImageSharp\DtronixPdf.ImageSharp.csproj", "{59A2B9DB-514C-4463-8AB8-3779B62FD99E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E77BD9A3-165B-4B7B-A011-C79F7AB476D2}" ProjectSection(SolutionItems) = preProject diff --git a/src/DtronixPdf/DtronixPdf.csproj b/src/DtronixPdf/DtronixPdf.csproj index f17effd..4de5e03 100644 --- a/src/DtronixPdf/DtronixPdf.csproj +++ b/src/DtronixPdf/DtronixPdf.csproj @@ -2,7 +2,7 @@ Tool to view and perform common modifications to PDFs. Based on PDFium. - 1.1.1.0 + 1.1.2.0 true @@ -16,7 +16,7 @@ - - + + diff --git a/src/DtronixPdf/PdfBitmap.cs b/src/DtronixPdf/PdfBitmap.cs index 3945f7c..40c78ed 100644 --- a/src/DtronixPdf/PdfBitmap.cs +++ b/src/DtronixPdf/PdfBitmap.cs @@ -12,7 +12,7 @@ public class PdfBitmap : IDisposable public float Scale { get; } - public Boundary Viewport { get; } + public BoundaryF Viewport { get; } public IntPtr Pointer { get; } @@ -35,7 +35,7 @@ internal PdfBitmap( FpdfBitmapT pdfBitmap, PdfActionSynchronizer synchronizer, float scale, - Boundary viewport) + BoundaryF viewport) { _pdfBitmap = pdfBitmap; Stride = fpdfview.FPDFBitmapGetStride(_pdfBitmap); diff --git a/src/DtronixPdf/PdfPage.cs b/src/DtronixPdf/PdfPage.cs index 23a5dd6..7a5a53b 100644 --- a/src/DtronixPdf/PdfPage.cs +++ b/src/DtronixPdf/PdfPage.cs @@ -63,7 +63,7 @@ public PdfBitmap Render(float scale, CancellationToken cancellationToken = defau var config = new PdfPageRenderConfig() { Scale = scale, - Viewport = new Boundary(0, 0, Width * scale, Height * scale), + Viewport = new BoundaryF(0, 0, Width * scale, Height * scale), CancellationToken = cancellationToken, }; diff --git a/src/DtronixPdf/PdfPageRenderConfig.cs b/src/DtronixPdf/PdfPageRenderConfig.cs index b4d6b51..42eeddc 100644 --- a/src/DtronixPdf/PdfPageRenderConfig.cs +++ b/src/DtronixPdf/PdfPageRenderConfig.cs @@ -8,7 +8,7 @@ namespace DtronixPdf public record class PdfPageRenderConfig { public float Scale { get; init; } - public Boundary Viewport { get; init; } + public BoundaryF Viewport { get; init; } public uint? BackgroundColor { get; init; } diff --git a/src/DtronixPdfBenchmark/Program.cs b/src/DtronixPdfBenchmark/Program.cs index 76787bd..0825fe4 100644 --- a/src/DtronixPdfBenchmark/Program.cs +++ b/src/DtronixPdfBenchmark/Program.cs @@ -43,7 +43,7 @@ static async Task RenderViewportScaling() Point center = new Point(0, 0); Size size = new Size(1920, 1080); - var viewport = new Boundary( + var viewport = new BoundaryF( 0, 0, 1920,