X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f52b4e15cbb816d8127d0131d3d8316262d2b4f..1dde66dda68a3d712d2f4de0388c4bb3a3375b36:/src/msw/dcprint.cpp diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 27ea98fe59..c0f9a2c097 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -38,7 +38,11 @@ #if wxUSE_PRINTING_ARCHITECTURE #include "wx/msw/private.h" + +#if wxUSE_WXDIB #include "wx/msw/dib.h" +#endif + #include "wx/dcprint.h" #include "math.h" @@ -276,7 +280,7 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) GlobalFree(pd.hDevMode); pd.hDevMode=NULL; } - return ( deviceName != wxT("") ); + return ( deviceName != wxEmptyString ); } // Gets an HDC for the specified printer configuration @@ -341,6 +345,7 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc, const wxBitmap& bmp, wxCoord x, wxCoord y) { +#if wxUSE_WXDIB wxDIB dib(bmp); if ( !dib.IsOk() ) return FALSE; @@ -373,6 +378,9 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc, } return TRUE; +#else + return FALSE; +#endif } void wxPrinterDC::DoDrawBitmap(const wxBitmap& bmp, @@ -400,7 +408,7 @@ void wxPrinterDC::DoDrawBitmap(const wxBitmap& bmp, bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, - wxCoord xsrc, wxCoord ysrc, + wxCoord WXUNUSED(xsrc), wxCoord WXUNUSED(ysrc), int WXUNUSED(rop), bool useMask, wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask)) { @@ -436,7 +444,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest, else // no mask { if ( !(::GetDeviceCaps(GetHdc(), RASTERCAPS) & RC_STRETCHDIB) || - !DrawBitmapUsingStretchDIBits(GetHdc(), bmp, xsrc, ysrc) ) + !DrawBitmapUsingStretchDIBits(GetHdc(), bmp, xdest, ydest) ) { // no support for StretchDIBits