- default :
- break;
- }
-
- if ((dashData != NULL) && (count > 0))
- {
- CGPatternRef patternRef;
- RGBColor col;
- long result;
- bool useMultibit;
-
- useMultibit = true;
- result = CreatePatternFromDashes( &patternRef, (const wxDash*)dashData, count, useMultibit );
- if (result == 0)
- {
- col = MAC_WXCOLORREF( pen.GetColour().GetPixel() );
- CGContextSetRGBStrokeColor(
- m_cgContext, (float) col.red / 65536.0,
- (float) col.green / 65536.0, (float) col.blue / 65536.0, 1.0 );
-
- EstablishPatternColorSpace( m_cgContext, useMultibit, false );
-
- alphaArray[0] = 1.0;
- CGContextSetStrokePattern( m_cgContext, patternRef, alphaArray );
- CGPatternRelease( patternRef );
- }
-
- if (result != 0)
- wxLogDebug( wxT("CreatePatternFromDashes failed: result [%ld]"), result );
- }
-#else
- const float *lengths = NULL ;
- float *userLengths = NULL ;
-
- const float dotted[] = { 3 , 3 };
- const float dashed[] = { 19 , 9 };
- const float short_dashed[] = { 9 , 6 };
- const float dotted_dashed[] = { 9 , 6 , 3 , 3 };
-
- switch( pen.GetStyle() )