X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93de378435d2b8fcdd6bd5f819fe6a3308e86921..5573f5b828ea7388a25df8402145b149e95c06ad:/src/gtk/dcclient.cpp diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 2896f3c5b2..f192e6e05c 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -448,17 +448,22 @@ void wxGTKWindowImplDC::DoGetSize( int* width, int* height ) const m_owner->GetSize(width, height); } -extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, - const wxColour & col, int style); - bool wxGTKWindowImplDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style) { +#if wxUSE_IMAGE + extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, + const wxColour & col, int style); + return wxDoFloodFill(this, x, y, col, style); +#else + return false; +#endif } bool wxGTKWindowImplDC::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const { +#if wxUSE_IMAGE // Generic (and therefore rather inefficient) method. // Could be improved. wxMemoryDC memdc; @@ -470,6 +475,9 @@ bool wxGTKWindowImplDC::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) cons wxImage image = bitmap.ConvertToImage(); col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0)); return true; +#else // !wxUSE_IMAGE + return false; +#endif // wxUSE_IMAGE/!wxUSE_IMAGE } void wxGTKWindowImplDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 ) @@ -1619,6 +1627,7 @@ void wxGTKWindowImplDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y ) void wxGTKWindowImplDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, double angle ) { +#if wxUSE_IMAGE if (!m_window || text.empty()) return; @@ -1717,6 +1726,7 @@ void wxGTKWindowImplDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCo // update the bounding box CalcBoundingBox(x + minX, y + minY); CalcBoundingBox(x + maxX, y + maxY); +#endif // wxUSE_IMAGE } void wxGTKWindowImplDC::DoGetTextExtent(const wxString &string,