+int wxPenRefData::GetCocoaLineDash(const float **pattern)
+{
+ int count;
+ switch( m_style )
+ {
+ case wxDOT:
+ count = scm_countDot;
+ if(pattern)
+ *pattern = scm_patternDot;
+ break;
+ case wxLONG_DASH:
+ count = scm_countLongDash;
+ if(pattern)
+ *pattern = scm_patternLongDash;
+ break;
+ case wxSHORT_DASH:
+ count = scm_countShortDash;
+ if(pattern)
+ *pattern = scm_patternShortDash;
+ break;
+ case wxDOT_DASH:
+ count = scm_countDotDash;
+ if(pattern)
+ *pattern = scm_patternDotDash;
+ break;
+ case wxUSER_DASH:
+ count = m_nbDash;
+ if(pattern)
+ {
+ if(!m_cocoaDash)
+ {
+ m_cocoaDash = new float[count];
+ for(int i=0; i<count; i++)
+ m_cocoaDash[i] = m_dash[i];
+ }
+ *pattern = m_cocoaDash;
+ }
+ break;
+ case wxTRANSPARENT:
+ case wxSTIPPLE:
+ case wxBDIAGONAL_HATCH:
+ case wxCROSSDIAG_HATCH:
+ case wxFDIAGONAL_HATCH:
+ case wxCROSS_HATCH:
+ case wxHORIZONTAL_HATCH:
+ case wxVERTICAL_HATCH:
+ case wxSOLID:
+ default:
+ count = 0;
+ if(pattern)
+ *pattern = NULL;
+ }
+ return count;
+}
+