git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52574
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxPENSTYLE_LONG_DASH = wxLONG_DASH,
wxPENSTYLE_SHORT_DASH = wxSHORT_DASH,
wxPENSTYLE_DOT_DASH = wxDOT_DASH,
wxPENSTYLE_LONG_DASH = wxLONG_DASH,
wxPENSTYLE_SHORT_DASH = wxSHORT_DASH,
wxPENSTYLE_DOT_DASH = wxDOT_DASH,
- wxPENSTYLE_USER_DOT = wxUSER_DASH,
+ wxPENSTYLE_USER_DASH = wxUSER_DASH,
wxPENSTYLE_TRANSPARENT = wxTRANSPARENT,
wxPENSTYLE_TRANSPARENT = wxTRANSPARENT,
wxPENSTYLE_LONG_DASH,
wxPENSTYLE_SHORT_DASH,
wxPENSTYLE_DOT_DASH,
wxPENSTYLE_LONG_DASH,
wxPENSTYLE_SHORT_DASH,
wxPENSTYLE_DOT_DASH,
font->GetWeight () == weight &&
font->GetUnderlined () == underline )
{
font->GetWeight () == weight &&
font->GetUnderlined () == underline )
{
- wxFontFamily fontFamily = font->GetFamily();
+ wxFontFamily fontFamily = (wxFontFamily)font->GetFamily();
#if defined(__WXGTK__)
// under GTK the default family is wxSWISS, so looking for a font
#if defined(__WXGTK__)
// under GTK the default family is wxSWISS, so looking for a font
+ m_style = wxPENSTYLE_STIPPLE;
+ m_style = wxPENSTYLE_SOLID;
+ m_style = wxPENSTYLE_STIPPLE;
m_width = width;
m_stipple = stipple;
m_width = width;
m_stipple = stipple;
- case wxSHORT_DASH:
- case wxLONG_DASH:
+ case wxPENSTYLE_SHORT_DASH:
+ case wxPENSTYLE_LONG_DASH:
+ case wxPENSTYLE_TRANSPARENT:
// fall through
#ifdef wxHAVE_EXT_CREATE_PEN
// fall through
#ifdef wxHAVE_EXT_CREATE_PEN
+ case wxPENSTYLE_DOT_DASH:
+ case wxPENSTYLE_USER_DASH:
- 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;
#endif // wxHAVE_EXT_CREATE_PEN
return PS_SOLID;
if ( m_hPen )
return false;
if ( m_hPen )
return false;
- if ( m_style == wxTRANSPARENT )
+ if ( m_style == wxPENSTYLE_TRANSPARENT )
{
m_hPen = (HPEN)::GetStockObject(NULL_PEN);
return true;
{
m_hPen = (HPEN)::GetStockObject(NULL_PEN);
return true;
LOGBRUSH lb;
switch( m_style )
{
LOGBRUSH lb;
switch( m_style )
{
+ case wxPENSTYLE_STIPPLE:
lb.lbStyle = BS_PATTERN;
lb.lbHatch = wxPtrToUInt(m_stipple.GetHBITMAP());
break;
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;
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;
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;
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_FDIAGONAL;
break;
+ case wxPENSTYLE_CROSS_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_CROSS;
break;
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;
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_HORIZONTAL;
break;
+ case wxPENSTYLE_VERTICAL_HATCH:
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_VERTICAL;
break;
lb.lbStyle = BS_HATCHED;
lb.lbHatch = HS_VERTICAL;
break;
lb.lbColor = col;
DWORD *dash;
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;
{
dash = new DWORD[m_nbDash];
int rw = m_width > 1 ? m_width : 1;
IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
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, 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)
}
wxPen::wxPen(const wxBitmap& stipple, int width)
wxPenStyle wxPen::GetStyle() const
{
wxPenStyle wxPen::GetStyle() const
{
- return m_refData ? M_PENDATA->GetStyle() : 0;
+ return m_refData ? M_PENDATA->GetStyle() : wxPENSTYLE_MAX;
}
wxPenJoin wxPen::GetJoin() const
{
}
wxPenJoin wxPen::GetJoin() const
{
- return m_refData ? M_PENDATA->GetJoin() : 0;
+ return m_refData ? M_PENDATA->GetJoin() : wxJOIN_INVALID;
}
wxPenCap wxPen::GetCap() const
{
}
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
}
int wxPen::GetDashes(wxDash** ptr) const