+wxGDIRefData *wxPen::CreateGDIRefData() const
+{
+ return new wxPenRefData;
+}
+
+wxGDIRefData *wxPen::CloneGDIRefData(const wxGDIRefData *data) const
+{
+ return new wxPenRefData(*wx_static_cast(const wxPenRefData *, data));
+}
+
+bool wxPen::operator==(const wxPen& pen) const
+{
+ const wxPenRefData *penData = (wxPenRefData *)pen.m_refData;
+
+ // an invalid pen is only equal to another invalid pen
+ return m_refData ? penData && *M_PENDATA == *penData : !penData;
+}
+
+wxColour& wxPen::GetColour() const
+{
+ wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
+
+ return M_PENDATA->m_colour;
+}
+
+int wxPen::GetWidth() const
+{
+ wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+
+ return M_PENDATA->m_width;
+}
+
+wxPenStyle wxPen::GetStyle() const
+{
+ wxCHECK_MSG( Ok(), wxPENSTYLE_INVALID, wxT("invalid pen") );
+
+ return M_PENDATA->m_style;
+}
+
+wxPenJoin wxPen::GetJoin() const
+{
+ wxCHECK_MSG( Ok(), wxJOIN_INVALID, wxT("invalid pen") );
+
+ return M_PENDATA->m_join;
+}
+
+wxPenCap wxPen::GetCap() const
+{
+ wxCHECK_MSG( Ok(), wxCAP_INVALID, wxT("invalid pen") );
+
+ return M_PENDATA->m_cap;
+}
+
+int wxPen::GetDashes(wxDash **ptr) const
+{
+ wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+
+ *ptr = M_PENDATA->m_dash;
+ return M_PENDATA->m_nbDash;
+}
+
+wxBitmap *wxPen::GetStipple() const
+{
+ wxCHECK_MSG( Ok(), NULL, wxT("invalid pen") );
+
+ return &M_PENDATA->m_stipple;