::SetWindowOrgEx(GetHdc(), (int)m_logicalOriginX, (int)m_logicalOriginY, NULL);
}
-void wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style)
+bool wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style)
{
#ifdef __WXMICROWIN__
- if (!GetHDC()) return;
+ if (!GetHDC()) return FALSE;
#endif
- if ( !::ExtFloodFill(GetHdc(), XLOG2DEV(x), YLOG2DEV(y),
+ bool success = (0 != ::ExtFloodFill(GetHdc(), XLOG2DEV(x), YLOG2DEV(y),
col.GetPixel(),
style == wxFLOOD_SURFACE ? FLOODFILLSURFACE
- : FLOODFILLBORDER) )
+ : FLOODFILLBORDER) ) ;
+ if (!success)
{
// quoting from the MSDN docs:
//
}
CalcBoundingBox(x, y);
+
+ return success;
}
bool wxDC::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
// "upper left" and "upper right"
CalcBoundingBox(x, y);
- CalcBoundingBox(x + w*cos(rad), y - h*sin(rad));
+ CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(h*sin(rad)));
// "bottom left" and "bottom right"
x += (wxCoord)(h*sin(rad));
y += (wxCoord)(h*cos(rad));
CalcBoundingBox(x, y);
- CalcBoundingBox(x + h*sin(rad), y + h*cos(rad));
+ CalcBoundingBox(x + wxCoord(h*sin(rad)), y + wxCoord(h*cos(rad)));
}
#endif
}