From: Robert Roebling Date: Mon, 24 Sep 2007 14:04:44 +0000 (+0000) Subject: Use line width code from GTK+ print in GNOME print X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f62edb0ecd881e790dd72b7f49da29e943200edb Use line width code from GTK+ print in GNOME print git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 993cba2195..a676664ff1 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -1613,7 +1613,14 @@ void wxGnomePrintDC::SetPen( const wxPen& pen ) m_pen = pen; - gs_libGnomePrint->gnome_print_setlinewidth( m_gpc, XLOG2DEVREL( 1000 * m_pen.GetWidth() ) / 1000.0f ); + double width; + + if (m_pen.GetWidth() <= 0) + width = 0.1; + else + width = (double) m_pen.GetWidth(); + + gs_libGnomePrint->gnome_print_setlinewidth( m_gpc, width * DEV2PS * m_scaleX ); static const double dotted[] = {2.0, 5.0}; static const double short_dashed[] = {4.0, 4.0}; @@ -1858,6 +1865,7 @@ void wxGnomePrintDC::DoGetSize(int* width, int* height) const if (width) *width = wxRound( pw * PS2DEV ); + if (height) *height = wxRound( ph * PS2DEV ); }