X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f65e33794fca0c936227235515a40e7df5c56e3..0cd9bfe8dacee998429236912c831fd2472163a8:/src/gtk/dcclient.cpp diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index dd64b45428..6f44374a4b 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -100,6 +100,9 @@ wxPaintDC::wxPaintDC( wxWindow *window ) m_cmap = gtk_widget_get_colormap( window->m_wxwindow ); else m_cmap = gtk_widget_get_colormap( window->m_widget ); + + m_isDrawable = TRUE; + SetUpDC(); long x = 0; @@ -241,7 +244,7 @@ void wxPaintDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset ) long x2 = XLOG2DEV(points[i+1].x + xoffset); long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste long y2 = YLOG2DEV(points[i+1].y + yoffset); - gdk_draw_line( m_window, m_brushGC, x1, y1, x2, y2 ); + gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); }; }; @@ -260,7 +263,7 @@ void wxPaintDC::DrawLines( wxList *points, long xoffset, long yoffset ) long x2 = XLOG2DEV(npoint->x + xoffset); long y1 = YLOG2DEV(point->y + yoffset); // and again... long y2 = YLOG2DEV(npoint->y + yoffset); - gdk_draw_line( m_window, m_brushGC, x1, y1, x2, y2 ); + gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); node = node->Next(); }; }; @@ -517,7 +520,18 @@ void wxPaintDC::Clear(void) if (!Ok()) return; DestroyClippingRegion(); - gdk_window_clear( m_window ); + + if (m_isDrawable) + { + gdk_window_clear( m_window ); + } + else + { + int width = 0; + int height = 0; + GetSize( &width, &height ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, 0, 0, width, height ); + }; }; void wxPaintDC::SetFont( const wxFont &font )