Cairo print, on GTK: use a better DPI definition to avoid artifacts rendering (GTK specific)
Previously, a 600 DPI was used to set device scale (can create minor visible rounding issues). Using now 4800 DPI to reduce these rounding artifacts. Fixes: lp:1845229 https://bugs.launchpad.net/kicad/+bug/1845229
This commit is contained in:
parent
3cd12088a3
commit
281d77f6b3
|
@ -69,11 +69,13 @@ CAIRO_PRINT_CTX::CAIRO_PRINT_CTX( wxDC* aDC )
|
|||
#ifdef __WXGTK__
|
||||
m_ctx = static_cast<cairo_t*>( gctx->GetNativeContext() );
|
||||
m_surface = cairo_get_target( m_ctx );
|
||||
// On linux, cairo printers are 72 DPI by default. This is an ususable resolution for us.
|
||||
// A reasonable resolution is 600 DPI
|
||||
// On linux, cairo printers have 72 DPI by default.
|
||||
// This is an unusable resolution for us.
|
||||
// A better resolution could be 4800 DPI (at 600 DPI, we still have minor
|
||||
// but visible artifacts, for instance with arcs, but not at 4800 DPI)
|
||||
// so modify the default:
|
||||
#define DEFAULT_DPI 72.0
|
||||
#define KICAD_PRINTER_DPI 600.0
|
||||
#define KICAD_PRINTER_DPI 4800.0
|
||||
// our device scale is DEFAULT_DPI / KICAD_PRINTER_DPI
|
||||
cairo_surface_set_device_scale( m_surface, DEFAULT_DPI/KICAD_PRINTER_DPI, DEFAULT_DPI/KICAD_PRINTER_DPI );
|
||||
m_dpi = KICAD_PRINTER_DPI;
|
||||
|
|
Loading…
Reference in New Issue