// wxGTK uses its own version, no need to add never used code
#ifndef __WXGTK__
wxClientDC dc((wxWindow *)this);
- wxBrush brush(GetBackgroundColour(), wxSOLID);
+ wxBrush brush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID);
dc.SetBackground(brush);
dc.Clear();
#endif // __WXGTK__
void wxBrushRefData::DoSetStipple(const wxBitmap& stipple)
{
m_stipple = stipple;
- m_style = stipple.GetMask() ? wxSTIPPLE_MASK_OPAQUE : wxSTIPPLE;
+ m_style = stipple.GetMask() ? wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE
+ : wxBRUSHSTYLE_STIPPLE;
}
// ----------------------------------------------------------------------------
{
switch ( style )
{
- case wxBDIAGONAL_HATCH: return HS_BDIAGONAL;
- case wxCROSSDIAG_HATCH: return HS_DIAGCROSS;
- case wxFDIAGONAL_HATCH: return HS_FDIAGONAL;
- case wxCROSS_HATCH: return HS_CROSS;
- case wxHORIZONTAL_HATCH:return HS_HORIZONTAL;
- case wxVERTICAL_HATCH: return HS_VERTICAL;
+ case wxBRUSHSTYLE_BDIAGONAL_HATCH: return HS_BDIAGONAL;
+ case wxBRUSHSTYLE_CROSSDIAG_HATCH: return HS_DIAGCROSS;
+ case wxBRUSHSTYLE_FDIAGONAL_HATCH: return HS_FDIAGONAL;
+ case wxBRUSHSTYLE_CROSS_HATCH: return HS_CROSS;
+ case wxBRUSHSTYLE_HORIZONTAL_HATCH:return HS_HORIZONTAL;
+ case wxBRUSHSTYLE_VERTICAL_HATCH: return HS_VERTICAL;
default: return -1;
}
}
{
switch ( m_style )
{
- case wxTRANSPARENT:
+ case wxBRUSHSTYLE_TRANSPARENT:
m_hBrush = (HBRUSH)::GetStockObject(NULL_BRUSH);
break;
- case wxSTIPPLE:
+ case wxBRUSHSTYLE_STIPPLE:
m_hBrush = ::CreatePatternBrush(GetHbitmapOf(m_stipple));
break;
- case wxSTIPPLE_MASK_OPAQUE:
+ case wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE:
m_hBrush = ::CreatePatternBrush((HBITMAP)m_stipple.GetMask()
->GetMaskBitmap());
break;
wxFAIL_MSG( _T("unknown brush style") );
// fall through
- case wxSOLID:
+ case wxBRUSHSTYLE_SOLID:
m_hBrush = ::CreateSolidBrush(m_colour.GetPixel());
break;
}
// it employs wxCAP_BUTT hack to have line of width 1.
dc.SetLogicalFunction(wxINVERT);
- wxPen pen(*wxBLACK,1,wxDOT);
+ wxPen pen(*wxBLACK, 1, wxPENSTYLE_DOT);
pen.SetCap(wxCAP_BUTT);
dc.SetPen(pen);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
::SetBkColor(hdc, wxColourToRGB(colBg));
// draw children with the same colour as the parent
- wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBg, wxSOLID);
-
+ wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBg,
+ wxBRUSHSTYLE_SOLID);
hbr = (WXHBRUSH)brush->GetResourceHandle();
-
}
// if we use custom background, we should set foreground ourselves too
wxColourChanger::wxColourChanger(wxMSWDCImpl& dc) : m_dc(dc)
{
const wxBrush& brush = dc.GetBrush();
- if ( brush.IsOk() && brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE )
+ if ( brush.IsOk() && brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE )
{
HDC hdc = GetHdcOf(dc);
m_colFgOld = ::GetTextColor(hdc);
}
SetBkMode(hdc,
- dc.GetBackgroundMode() == wxTRANSPARENT ? TRANSPARENT
- : OPAQUE);
+ dc.GetBackgroundMode() == wxBRUSHSTYLE_TRANSPARENT
+ ? TRANSPARENT : OPAQUE);
// flag which telsl us to undo changes in the dtor
m_changed = true;
wxCoord xxx2 = (wxCoord) (xxc+ray);
wxCoord yyy2 = (wxCoord) (yyc+ray);
- if ( m_brush.IsOk() && m_brush.GetStyle() != wxTRANSPARENT )
+ if ( m_brush.IsOk() && m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT )
{
// Have to add 1 to bottom-right corner of rectangle
// to make semi-circles look right (crooked line otherwise).
// (i.e. drawn with a transparent pen) one pixel smaller in both directions
// and we want them to have the same size regardless of which pen is used
#ifndef __WXWINCE__
- if ( m_pen.GetStyle() == wxTRANSPARENT )
+ if ( m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
{
x2dev++;
y2dev++;
// Windows draws the filled rectangles without outline (i.e. drawn with a
// transparent pen) one pixel smaller in both directions and we want them
// to have the same size regardless of which pen is used - adjust
- if ( m_pen.GetStyle() == wxTRANSPARENT )
+ if ( m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
{
x2++;
y2++;
old_background = SetBkColor(GetHdc(), m_textBackgroundColour.GetPixel() );
}
- SetBkMode(GetHdc(), m_backgroundMode == wxTRANSPARENT ? TRANSPARENT
+ SetBkMode(GetHdc(), m_backgroundMode == wxBRUSHSTYLE_TRANSPARENT ? TRANSPARENT
: OPAQUE);
#ifdef __WXWINCE__
::SetBkMode(GetHdc(), TRANSPARENT);
// default bg colour is pne of the window
- SetBackground(wxBrush(m_window->GetBackgroundColour(), wxSOLID));
+ SetBackground(wxBrush(m_window->GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
// since we are a window dc we need to grab the palette from the window
#if wxUSE_PALETTE
dc2.SetBackground(* wxWHITE_BRUSH);
dc2.Clear();
- dc2.SetBackgroundMode(wxTRANSPARENT);
+ dc2.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc2.SetTextForeground(* wxLIGHT_GREY);
dc2.DrawText(str, 0, 0);
dc2.DrawText(str, 1, 0);
m_refData = new wxPenRefData(col, width, style);
}
+/* error: `wxBrushStyle' has not been declared
wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
{
m_refData = new wxPenRefData(colour, width, (wxPenStyle)style);
}
+*/
wxPen::wxPen(const wxBitmap& stipple, int width)
{
void SurfaceImpl::PenColour(ColourAllocated fore) {
- hdc->SetPen(wxPen(wxColourFromCA(fore), 1, wxSOLID));
+ hdc->SetPen(wxPen(wxColourFromCA(fore)));
}
void SurfaceImpl::BrushColour(ColourAllocated back) {
- hdc->SetBrush(wxBrush(wxColourFromCA(back), wxSOLID));
+ hdc->SetBrush(wxBrush(wxColourFromCA(back)));
}
void SurfaceImpl::SetFont(Font &font_) {
if (((SurfaceImpl&)surfacePattern).bitmap)
br = wxBrush(*((SurfaceImpl&)surfacePattern).bitmap);
else // Something is wrong so display in red
- br = wxBrush(*wxRED, wxSOLID);
+ br = wxBrush(*wxRED);
hdc->SetPen(*wxTRANSPARENT_PEN);
hdc->SetBrush(br);
hdc->DrawRectangle(wxRectFromPRectangle(rc));
SetFont(font);
hdc->SetTextForeground(wxColourFromCA(fore));
- hdc->SetBackgroundMode(wxTRANSPARENT);
+ hdc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
// ybase is where the baseline should be, but wxWin uses the upper left
// corner, so I need to calculate the real position for the text...
hdc->DrawText(stc2wx(s, len), rc.left, ybase - font.ascent);
- hdc->SetBackgroundMode(wxSOLID);
+ hdc->SetBackgroundMode(wxBRUSHSTYLE_SOLID);
}