Browse Source

Fix DPI value in Cairo printing on MSW.

Linux will need a different fix.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20477 on MSW


(cherry picked from commit 2a36da6723)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
pull/18/head
dsa-t 4 months ago
parent
commit
7616b7aed8
  1. 3
      common/gal/cairo/cairo_print.cpp

3
common/gal/cairo/cairo_print.cpp

@ -95,7 +95,8 @@ CAIRO_PRINT_CTX::CAIRO_PRINT_CTX( wxDC* aDC ) :
m_hdc = g->GetHDC();
m_surface = cairo_win32_printing_surface_create( static_cast<HDC>( m_hdc ) );
m_ctx = cairo_create( m_surface );
m_dpi = GetDeviceCaps( static_cast<HDC>( m_hdc ), LOGPIXELSX );
wxASSERT( aDC->GetPPI().x == aDC->GetPPI().y );
m_dpi = aDC->GetPPI().x;
#endif /* __WXMSW__ */
#ifdef __WXMAC__

Loading…
Cancel
Save