X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea6f44b5ec30afe787845ec33bbfcd20c1c5e469..a3f4e9e81afa4f435b137ebbfb5b07e98a698271:/src/generic/dcpsg.cpp diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 211d81b63e..f592a769c8 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -64,11 +64,6 @@ #endif -#ifdef __WXGTK__ -#include "gtk/gtk.h" -#include "gdk/gdk.h" -#endif - //----------------------------------------------------------------------------- // start and end of document/page //----------------------------------------------------------------------------- @@ -1474,28 +1469,19 @@ bool wxPostScriptDC::Blit( long xdest, long ydest, long fwidth, long fheight, wxDC *source, long xsrc, long ysrc, - int WXUNUSED(rop), bool WXUNUSED(useMask) ) + int rop, bool WXUNUSED(useMask) ) { wxCHECK_MSG( m_ok && m_pstream, FALSE, "invalid postscript dc" ); wxCHECK_MSG( source, FALSE, "invalid source dc" ); - wxClientDC *srcDC = (wxClientDC*)source; + /* blit into a bitmap */ wxBitmap bitmap( fwidth, fheight ); - -#ifdef __WXGTK__ - /* just take any GC so we don't have to create our own. */ - - GtkStyle *style = gtk_widget_get_default_style (); - GdkGC *gc = style->white_gc; - - /* copy from either window or bitmap */ - - gdk_window_copy_area( bitmap.GetPixmap(), gc, 0, 0, - srcDC->GetWindow(), - xsrc, ysrc, fwidth, fheight ); -#endif + wxMemoryDC memDC; + memDC.SelectObject(bitmap); + memDC.Blit(0, 0, fwidth, fheight, source, xsrc, ysrc, rop); /* TODO: Blit transparently? */ + memDC.SelectObject(wxNullBitmap); /* draw bitmap. scaling and positioning is done there */ @@ -1512,9 +1498,9 @@ long wxPostScriptDC::GetCharHeight() return 12; } -void wxPostScriptDC::GetTextExtent (const wxString& string, long *x, long *y, - long *descent, long *externalLeading, wxFont *theFont, - bool WXUNUSED(use16)) +void wxPostScriptDC::GetTextExtent( const wxString& string, long *x, long *y, + long *descent, long *externalLeading, wxFont *theFont, + bool WXUNUSED(use16) ) { wxFont *fontToUse = theFont;