This commit is contained in:
haru-s 2024-06-01 13:39:42 +09:00
parent 218ae04c59
commit a52064a7da

View file

@ -2514,7 +2514,6 @@ class PrintPreviewDialog : Form
} }
} }
/// ///
class PreviewPrintController : PrintController class PreviewPrintController : PrintController
{ {
@ -2615,16 +2614,16 @@ class PreviewPrintController : PrintController
{ {
const Point pos = layoutHelper.position(); const Point pos = layoutHelper.position();
const Rect paperRect = _paperRectFrom(page.settings); const Rect paperRect = _paperRectFrom(page.settings);
const uint offScreenWidth = cast(uint)(paperRect.width * ratio); const uint pageRenderWidth = cast(uint)(paperRect.width * ratio);
const uint offScreenHeight = cast(uint)(paperRect.height * ratio); const uint pageRenderHeight = cast(uint)(paperRect.height * ratio);
Graphics pageGraphics = page.graphics; Graphics pageGraphics = page.graphics;
SetStretchBltMode(pageGraphics.handle, STRETCH_DELETESCANS); // SRC SetStretchBltMode(pageGraphics.handle, STRETCH_DELETESCANS); // SRC
StretchBlt( StretchBlt(
e.hDC, // DST e.hDC, // DST
pos.x, pos.x,
pos.y, pos.y,
offScreenWidth, pageRenderWidth,
offScreenHeight, pageRenderHeight,
pageGraphics.handle, // SRC pageGraphics.handle, // SRC
0, 0,
0, 0,
@ -2634,7 +2633,7 @@ class PreviewPrintController : PrintController
); );
pageGraphics.dispose(); // Created in onStartPage(). pageGraphics.dispose(); // Created in onStartPage().
layoutHelper.appendPageSize(offScreenWidth, offScreenHeight); layoutHelper.appendPageSize(pageRenderWidth, pageRenderHeight);
} }
} }