more compilation fixes after pen/brush styles changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-03-22 02:58:41 +00:00
parent 1d043598b7
commit 1d57de4858
3 changed files with 23 additions and 21 deletions

View File

@ -42,8 +42,6 @@ public:
wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
#endif
virtual ~wxPen();
bool operator==(const wxPen& pen) const;
bool operator!=(const wxPen& pen) const { return !(*this == pen); }
@ -54,6 +52,7 @@ public:
void SetStyle( wxPenStyle style );
void SetWidth( int width );
void SetDashes( int number_of_dashes, const wxDash *dash );
void SetStipple(const wxBitmap& stipple);
wxColour &GetColour() const;
wxPenCap GetCap() const;
@ -63,6 +62,7 @@ public:
int GetDashes(wxDash **ptr) const;
int GetDashCount() const;
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
private:
virtual wxGDIRefData *CreateGDIRefData() const;

View File

@ -27,7 +27,7 @@ class wxBrushRefData: public wxGDIRefData
public:
wxBrushRefData()
{
m_style = 0;
m_style = wxBRUSHSTYLE_INVALID;
}
wxBrushRefData( const wxBrushRefData& data )
@ -68,7 +68,7 @@ wxBrush::wxBrush(const wxColour& col, int style)
{
m_refData = new wxBrushRefData;
M_BRUSHDATA->m_style = (wxBrushStyle)style;
M_BRUSHDATA->m_colour = colour;
M_BRUSHDATA->m_colour = col;
}
#endif
@ -80,9 +80,9 @@ wxBrush::wxBrush( const wxBitmap &stippleBitmap )
M_BRUSHDATA->m_stipple = stippleBitmap;
if (M_BRUSHDATA->m_stipple.GetMask())
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
else
M_BRUSHDATA->m_style = wxSTIPPLE;
M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK;
}
wxBrush::~wxBrush()
@ -157,11 +157,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
M_BRUSHDATA->m_stipple = stipple;
if (M_BRUSHDATA->m_stipple.GetMask())
{
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
}
M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
else
{
M_BRUSHDATA->m_style = wxSTIPPLE;
}
M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK;
}

View File

@ -106,11 +106,6 @@ wxPen::wxPen(const wxColour& colour, int width, int style)
}
#endif
wxPen::~wxPen()
{
// m_refData unrefed in ~wxObject
}
wxGDIRefData *wxPen::CreateGDIRefData() const
{
return new wxPenRefData;
@ -127,7 +122,7 @@ bool wxPen::operator == ( const wxPen& pen ) const
if (!m_refData || !pen.m_refData) return false;
return ( *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData );
return *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData;
}
void wxPen::SetColour( const wxColour &colour )
@ -180,6 +175,11 @@ void wxPen::SetWidth( int width )
M_PENDATA->m_width = width;
}
void wxPen::SetStipple(const wxBitmap& WXUNUSED(stipple))
{
wxFAIL_MSG( "stippled pens not supported" );
}
int wxPen::GetDashes( wxDash **ptr ) const
{
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
@ -204,21 +204,21 @@ wxDash* wxPen::GetDash() const
wxPenCap wxPen::GetCap() const
{
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
wxCHECK_MSG( Ok(), wxCAP_INVALID, wxT("invalid pen") );
return M_PENDATA->m_capStyle;
}
wxPenJoin wxPen::GetJoin() const
{
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
wxCHECK_MSG( Ok(), wxJOIN_INVALID, wxT("invalid pen") );
return M_PENDATA->m_joinStyle;
}
wxPenStyle wxPen::GetStyle() const
{
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
wxCHECK_MSG( Ok(), wxPENSTYLE_INVALID, wxT("invalid pen") );
return M_PENDATA->m_style;
}
@ -236,3 +236,9 @@ wxColour &wxPen::GetColour() const
return M_PENDATA->m_colour;
}
wxBitmap *wxPen::GetStipple() const
{
return NULL;
}