Skip to content

Commit

Permalink
Updated for new core libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
DJGosnell committed Feb 8, 2023
1 parent 16343ec commit 16cf584
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/DtronixPdf.Tests/PdfPageRenderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/DtronixPdf.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/DtronixPdf/DtronixPdf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\DtronixPdf.props" />
<PropertyGroup>
<Description>Tool to view and perform common modifications to PDFs. Based on PDFium.</Description>
<Version>1.1.1.0</Version>
<Version>1.1.2.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
Expand All @@ -16,7 +16,7 @@
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<PackageReference Include="DtronixCommon" Version="0.6.6" />
<PackageReference Include="PDFiumCore" Version="109.0.5378" />
<PackageReference Include="DtronixCommon" Version="0.7.0" />
<PackageReference Include="PDFiumCore" Version="112.0.5579" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/DtronixPdf/PdfBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PdfBitmap : IDisposable

public float Scale { get; }

public Boundary Viewport { get; }
public BoundaryF Viewport { get; }

public IntPtr Pointer { get; }

Expand All @@ -35,7 +35,7 @@ internal PdfBitmap(
FpdfBitmapT pdfBitmap,
PdfActionSynchronizer synchronizer,
float scale,
Boundary viewport)
BoundaryF viewport)
{
_pdfBitmap = pdfBitmap;
Stride = fpdfview.FPDFBitmapGetStride(_pdfBitmap);
Expand Down
2 changes: 1 addition & 1 deletion src/DtronixPdf/PdfPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
2 changes: 1 addition & 1 deletion src/DtronixPdf/PdfPageRenderConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
2 changes: 1 addition & 1 deletion src/DtronixPdfBenchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 16cf584

Please sign in to comment.