};
void wxWindowDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1),
- wxColour* WXUNUSED(col), int WXUNUSED(style) )
+ const wxColour& WXUNUSED(col), int WXUNUSED(style) )
{
// TODO
};
XLOG2DEV_2 (x), YLOG2DEV_2 (y),wd,hd,start,end);
}
- if (!m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
{
if (m_autoSetting)
SetPen (m_pen);
if (!theFont->Ok())
{
// TODO: this should be an error log function
- cerr << "wxWindows warning - set a valid font before calling GetTextExtent!\n";
+ wxFAIL_MSG("set a valid font before calling GetTextExtent!");
+
*width = -1;
*height = -1;
return;
int w, h;
if (m_window)
{
- // TODO: should we get the virtual size?
m_window->GetSize(&w, &h);
if (m_window && m_window->GetBackingPixmap())
m_brush = saveBrush;
};
+void wxWindowDC::Clear(const wxRect& rect)
+{
+ if (!Ok()) return;
+
+ int x = rect.x; int y = rect.y;
+ int w = rect.width; int h = rect.height;
+
+ wxBrush saveBrush = m_brush;
+ SetBrush (m_backgroundBrush);
+
+ XFillRectangle ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, x, y, w, h);
+
+ if (m_window && m_window->GetBackingPixmap())
+ XFillRectangle ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking, x, y, w, h);
+
+ m_brush = saveBrush;
+};
+
void wxWindowDC::SetFont( const wxFont &font )
{
if (!Ok()) return;
m_currentPenDash = m_pen.GetDash();
if (m_currentStyle == wxSTIPPLE)
- m_currentStipple = m_pen.GetStipple ();
+ m_currentStipple = * m_pen.GetStipple ();
bool sameStyle = (oldStyle == m_currentStyle &&
oldFill == m_currentFill &&
{
Pixmap myStipple;
- oldStipple = (wxBitmap*) NULL; // For later reset!!
+ oldStipple = wxNullBitmap; // For later reset!!
switch (m_currentFill)
{
m_currentFill = m_brush.GetStyle ();
if (m_currentFill == wxSTIPPLE)
- m_currentStipple = m_brush.GetStipple ();
+ m_currentStipple = * m_brush.GetStipple ();
wxColour oldBrushColour(m_currentColour);
m_currentColour = m_brush.GetColour ();