{
Free();
- m_style = wxSTIPPLE;
+ m_style = wxPENSTYLE_STIPPLE;
m_stipple = stipple;
}
{
Init();
- m_style = wxSOLID;
+ m_style = wxPENSTYLE_SOLID;
m_width = 1;
}
{
Init();
- m_style = wxSTIPPLE;
+ m_style = wxPENSTYLE_STIPPLE;
m_width = width;
m_stipple = stipple;
{
switch ( style )
{
- case wxSHORT_DASH:
- case wxLONG_DASH:
+ case wxPENSTYLE_SHORT_DASH:
+ case wxPENSTYLE_LONG_DASH:
return PS_DASH;
- case wxTRANSPARENT:
+ case wxPENSTYLE_TRANSPARENT:
return PS_NULL;
default:
// fall through
#ifdef wxHAVE_EXT_CREATE_PEN
- case wxDOT:
+ case wxPENSTYLE_DOT:
return PS_DOT;
- case wxDOT_DASH:
+ case wxPENSTYLE_DOT_DASH:
return PS_DASHDOT;
- case wxUSER_DASH:
+ case wxPENSTYLE_USER_DASH:
return PS_USERSTYLE;
- case wxSTIPPLE:
- case wxBDIAGONAL_HATCH:
- case wxCROSSDIAG_HATCH:
- case wxFDIAGONAL_HATCH:
- case wxCROSS_HATCH:
- case wxHORIZONTAL_HATCH:
- case wxVERTICAL_HATCH:
- case wxSOLID:
+ case wxPENSTYLE_STIPPLE:
+ case wxPENSTYLE_BDIAGONAL_HATCH:
+ case wxPENSTYLE_CROSSDIAG_HATCH:
+ case wxPENSTYLE_FDIAGONAL_HATCH:
+ case wxPENSTYLE_CROSS_HATCH:
+ case wxPENSTYLE_HORIZONTAL_HATCH:
+ case wxPENSTYLE_VERTICAL_HATCH:
+ case wxPENSTYLE_SOLID:
#endif // wxHAVE_EXT_CREATE_PEN
return PS_SOLID;
if ( m_hPen )
return false;
- if ( m_style == wxTRANSPARENT )
+ if ( m_style == wxPENSTYLE_TRANSPARENT )
{
m_hPen = (HPEN)::GetStockObject(NULL_PEN);
return true;
LOGBRUSH lb;
switch( m_style )
{
- case wxSTIPPLE:
+ case wxPENSTYLE_STIPPLE:
lb.lbStyle = BS_PATTERN;
lb.lbHatch = wxPtrToUInt(m_stipple.GetHBITMAP());
break;
- case wxBDIAGONAL_HATCH:
+ case wxPENSTYLE_BDIAGONAL_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_BDIAGONAL;
break;
- case wxCROSSDIAG_HATCH:
+ case wxPENSTYLE_CROSSDIAG_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_DIAGCROSS;
break;
- case wxFDIAGONAL_HATCH:
+ case wxPENSTYLE_FDIAGONAL_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_FDIAGONAL;
break;
- case wxCROSS_HATCH:
+ case wxPENSTYLE_CROSS_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_CROSS;
break;
- case wxHORIZONTAL_HATCH:
+ case wxPENSTYLE_HORIZONTAL_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_HORIZONTAL;
break;
- case wxVERTICAL_HATCH:
+ case wxPENSTYLE_VERTICAL_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_VERTICAL;
break;
lb.lbColor = col;
DWORD *dash;
- if ( m_style == wxUSER_DASH && m_nbDash && m_dash )
+ if ( m_style == wxPENSTYLE_USER_DASH && m_nbDash && m_dash )
{
dash = new DWORD[m_nbDash];
int rw = m_width > 1 ? m_width : 1;
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
-wxPen::wxPen(const wxColour& col, int width, int style)
+wxPen::wxPen(const wxColour& col, int width, wxPenStyle style)
{
m_refData = new wxPenRefData(col, width, style);
}
wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
{
- m_refData = new wxPenRefData(col, width, (wxPenStyle)style);
+ m_refData = new wxPenRefData(colour, width, (wxPenStyle)style);
}
wxPen::wxPen(const wxBitmap& stipple, int width)
wxPenStyle wxPen::GetStyle() const
{
- return m_refData ? M_PENDATA->GetStyle() : 0;
+ return m_refData ? M_PENDATA->GetStyle() : wxPENSTYLE_MAX;
}
wxPenJoin wxPen::GetJoin() const
{
- return m_refData ? M_PENDATA->GetJoin() : 0;
+ return m_refData ? M_PENDATA->GetJoin() : wxJOIN_INVALID;
}
wxPenCap wxPen::GetCap() const
{
- return m_refData ? M_PENDATA->GetCap() : 0;
+ return m_refData ? M_PENDATA->GetCap() : wxCAP_INVALID;
}
int wxPen::GetDashes(wxDash** ptr) const