compilation fixes for wxUSE_IMAGE==0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-11 00:02:11 +00:00
parent 3c029873c6
commit c052164410
5 changed files with 36 additions and 4 deletions

View File

@@ -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,