// wxPenRefData HPEN management
// ----------------------------------------------------------------------------
-#ifdef wxHAVE_EXT_CREATE_PEN
-
static int ConvertPenStyle(int style)
{
switch ( style )
{
- case wxDOT:
- return PS_DOT;
-
- case wxDOT_DASH:
- return PS_DASHDOT;
-
case wxSHORT_DASH:
case wxLONG_DASH:
return PS_DASH;
case wxTRANSPARENT:
return PS_NULL;
- case wxUSER_DASH:
- return PS_USERSTYLE;
-
default:
wxFAIL_MSG( _T("unknown pen style") );
// fall through
+#ifdef wxHAVE_EXT_CREATE_PEN
+ case wxDOT:
+ return PS_DOT;
+
+ case wxDOT_DASH:
+ return PS_DASHDOT;
+
+ case wxUSER_DASH:
+ return PS_USERSTYLE;
+
case wxSTIPPLE:
case wxBDIAGONAL_HATCH:
case wxCROSSDIAG_HATCH:
case wxHORIZONTAL_HATCH:
case wxVERTICAL_HATCH:
case wxSOLID:
+#endif // wxHAVE_EXT_CREATE_PEN
+
return PS_SOLID;
}
}
+#ifdef wxHAVE_EXT_CREATE_PEN
+
static int ConvertJoinStyle(int join)
{
switch( join )
return M_PENDATA && !M_PENDATA->HasHPEN();
}
-wxObjectRefData* wxPen::CreateRefData() const
+wxGDIRefData* wxPen::CreateGDIRefData() const
{
return new wxPenRefData;
}
-wxObjectRefData* wxPen::CloneRefData(const wxObjectRefData* data) const
+wxGDIRefData* wxPen::CloneGDIRefData(const wxGDIRefData* data) const
{
return new wxPenRefData(*wx_static_cast(const wxPenRefData*, data));
}