Corrected XPM-related cast in resource.cpp; added generic Blitting code in wxPostScriptDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2173,7 +2173,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
|
|||||||
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
|
"Forgot to use wxResourceLoadBitmapData?"), (const char*) name);
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
}
|
}
|
||||||
return wxBitmap((const char **)item->GetValue1());
|
return wxBitmap((char **)item->GetValue1());
|
||||||
#else
|
#else
|
||||||
wxLogWarning(_("No XPM facility available!"));
|
wxLogWarning(_("No XPM facility available!"));
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1474,7 +1474,7 @@ bool wxPostScriptDC::Blit( long xdest, long ydest,
|
|||||||
long fwidth, long fheight,
|
long fwidth, long fheight,
|
||||||
wxDC *source,
|
wxDC *source,
|
||||||
long xsrc, long ysrc,
|
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( m_ok && m_pstream, FALSE, "invalid postscript dc" );
|
||||||
|
|
||||||
@@ -1495,6 +1495,12 @@ bool wxPostScriptDC::Blit( long xdest, long ydest,
|
|||||||
gdk_window_copy_area( bitmap.GetPixmap(), gc, 0, 0,
|
gdk_window_copy_area( bitmap.GetPixmap(), gc, 0, 0,
|
||||||
srcDC->GetWindow(),
|
srcDC->GetWindow(),
|
||||||
xsrc, ysrc, fwidth, fheight );
|
xsrc, ysrc, fwidth, fheight );
|
||||||
|
#else
|
||||||
|
wxMemoryDC memDC;
|
||||||
|
memDC.SelectObject(bitmap);
|
||||||
|
// TODO: Do we want to blit transparently?
|
||||||
|
memDC.Blit(0, 0, fwidth, fheight, source, xsrc, ysrc, rop);
|
||||||
|
memDC.SelectObject(wxNullBitmap);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* draw bitmap. scaling and positioning is done there */
|
/* draw bitmap. scaling and positioning is done there */
|
||||||
|
Reference in New Issue
Block a user