wxPrinterDC bitmap is drawn at wrong offset on wxMSW. (Issue #24673)

8 views
Skip to first unread message

dsa-t

unread,
Jul 3, 2024, 12:01:26 PM (2 days ago) Jul 3
to wx-...@googlegroups.com, Subscribed

Description

Using this patch with printing sample:

diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp
index 7c4d7254db..541c7f04ee 100644
--- a/samples/printing/printing.cpp
+++ b/samples/printing/printing.cpp
@@ -207,7 +207,7 @@ void MyApp::Draw(wxDC&dc)
 
     wxIcon my_icon = wxICON(sample);
 
-    dc.DrawIcon( my_icon, dc.FromDIP(100), dc.FromDIP(100));
+    dc.DrawIcon(my_icon, 0, 0);
 
     if (m_bitmap.IsOk())
         dc.DrawBitmap( m_bitmap, dc.FromDIP(10), dc.FromDIP(10) );

The printed result differs from both the preview and the non-printer DC.

Printed to JPG using clawPDF:

ClawTest11.jpg (view on web)

wxWidgets Preview screenshot:

wx-preview.png (view on web)

Platform and version information

  • wxWidgets version you use: 3.3 (master)
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 11


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24673@github.com>

Reply all
Reply to author
Forward
0 new messages