From 7d7e4ed073fcb6be745f936cb8f19138117ebfcc Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 7 Dec 2006 05:47:43 +0000 Subject: [PATCH] minor cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/gnome/gprint.cpp | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index aae14b5993..8949d9f3f2 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -171,6 +171,8 @@ public: wxDL_METHOD_DEFINE( GtkWidget*, gnome_print_job_preview_new, (GnomePrintJob *gpm, const guchar *title), (gpm, title), NULL ) + + DECLARE_NO_COPY_CLASS(wxGnomePrintLibrary) }; wxGnomePrintLibrary::wxGnomePrintLibrary() @@ -846,6 +848,7 @@ wxGnomePrintDC::wxGnomePrintDC( wxGnomePrinter *printer ) m_layout = gs_lgp->gnome_print_pango_create_layout( m_gpc ); m_fontdesc = pango_font_description_from_string( "Sans 12" ); + m_context = NULL; m_currentRed = 0; m_currentBlue = 0; @@ -871,6 +874,7 @@ wxGnomePrintDC::wxGnomePrintDC( const wxPrintData& data ) m_layout = gs_lgp->gnome_print_pango_create_layout( m_gpc ); m_fontdesc = pango_font_description_from_string( "Sans 12" ); + m_context = NULL; m_currentRed = 0; m_currentBlue = 0; @@ -952,25 +956,25 @@ void wxGnomePrintDC::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoo while (alpha2 > 360) alpha2 -= 360; } - if (m_brush.GetStyle() != wxTRANSPARENT) - { - SetBrush( m_brush ); - gs_lgp->gnome_print_moveto ( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc) ); - gs_lgp->gnome_print_arcto( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc), XLOG2DEVREL((int)radius), alpha1, alpha2, 0 ); + if (m_brush.GetStyle() != wxTRANSPARENT) + { + SetBrush( m_brush ); + gs_lgp->gnome_print_moveto ( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc) ); + gs_lgp->gnome_print_arcto( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc), XLOG2DEVREL((int)radius), alpha1, alpha2, 0 ); - gs_lgp->gnome_print_fill( m_gpc ); - } + gs_lgp->gnome_print_fill( m_gpc ); + } - if (m_pen.GetStyle() != wxTRANSPARENT) - { - SetPen (m_pen); - gs_lgp->gnome_print_newpath( m_gpc ); - gs_lgp->gnome_print_moveto ( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc) ); - gs_lgp->gnome_print_arcto( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc), XLOG2DEVREL((int)radius), alpha1, alpha2, 0 ); - gs_lgp->gnome_print_closepath( m_gpc ); + if (m_pen.GetStyle() != wxTRANSPARENT) + { + SetPen (m_pen); + gs_lgp->gnome_print_newpath( m_gpc ); + gs_lgp->gnome_print_moveto ( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc) ); + gs_lgp->gnome_print_arcto( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc), XLOG2DEVREL((int)radius), alpha1, alpha2, 0 ); + gs_lgp->gnome_print_closepath( m_gpc ); - gs_lgp->gnome_print_stroke( m_gpc ); - } + gs_lgp->gnome_print_stroke( m_gpc ); + } CalcBoundingBox (x1, y1); CalcBoundingBox (x2, y2); -- 2.45.2