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); }
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;
int GetDashes(wxDash **ptr) const;
int GetDashCount() const;
wxDash* GetDash() const;
+ wxBitmap *GetStipple() const;
private:
virtual wxGDIRefData *CreateGDIRefData() const;
public:
wxBrushRefData()
{
- m_style = 0;
+ m_style = wxBRUSHSTYLE_INVALID;
}
wxBrushRefData( const wxBrushRefData& data )
{
m_refData = new wxBrushRefData;
M_BRUSHDATA->m_style = (wxBrushStyle)style;
- M_BRUSHDATA->m_colour = colour;
+ M_BRUSHDATA->m_colour = col;
}
#endif
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()
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;
}
}
#endif
-wxPen::~wxPen()
-{
- // m_refData unrefed in ~wxObject
-}
-
wxGDIRefData *wxPen::CreateGDIRefData() const
{
return new wxPenRefData;
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 )
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") );
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;
}
return M_PENDATA->m_colour;
}
+
+wxBitmap *wxPen::GetStipple() const
+{
+ return NULL;
+}
+