From a52064a7da38d97ad5f270d4a92042d08a4d10fe Mon Sep 17 00:00:00 2001 From: haru-s Date: Sat, 1 Jun 2024 13:39:42 +0900 Subject: [PATCH] Clean up --- source/dfl/printing.d | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/dfl/printing.d b/source/dfl/printing.d index bd299d2..e1b1e95 100644 --- a/source/dfl/printing.d +++ b/source/dfl/printing.d @@ -2514,7 +2514,6 @@ class PrintPreviewDialog : Form } } - /// class PreviewPrintController : PrintController { @@ -2615,16 +2614,16 @@ class PreviewPrintController : PrintController { const Point pos = layoutHelper.position(); const Rect paperRect = _paperRectFrom(page.settings); - const uint offScreenWidth = cast(uint)(paperRect.width * ratio); - const uint offScreenHeight = cast(uint)(paperRect.height * ratio); + const uint pageRenderWidth = cast(uint)(paperRect.width * ratio); + const uint pageRenderHeight = cast(uint)(paperRect.height * ratio); Graphics pageGraphics = page.graphics; SetStretchBltMode(pageGraphics.handle, STRETCH_DELETESCANS); // SRC StretchBlt( e.hDC, // DST pos.x, pos.y, - offScreenWidth, - offScreenHeight, + pageRenderWidth, + pageRenderHeight, pageGraphics.handle, // SRC 0, 0, @@ -2634,7 +2633,7 @@ class PreviewPrintController : PrintController ); pageGraphics.dispose(); // Created in onStartPage(). - layoutHelper.appendPageSize(offScreenWidth, offScreenHeight); + layoutHelper.appendPageSize(pageRenderWidth, pageRenderHeight); } }