Implemented user dashes for PS print.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-02-24 11:53:52 +00:00
parent 8c419a5c4d
commit f081c944e8

View File

@@ -1037,12 +1037,26 @@ void wxPostScriptDC::SetPen( const wxPen& pen )
case wxSHORT_DASH: psdash = short_dashed; break;
case wxLONG_DASH: psdash = wxCoord_dashed; break;
case wxDOT_DASH: psdash = dotted_dashed; break;
case wxUSER_DASH:
{
wxDash *dashes;
int nDashes = m_pen.GetDashes (&dashes);
PsPrint ("[");
for (int i = 0; i < nDashes; ++i)
{
sprintf( buffer, "%d ", dashes [i] );
PsPrint( buffer );
}
PsPrint ("] 0 setdash\n");
psdash = 0;
}
break;
case wxSOLID:
case wxTRANSPARENT:
default: psdash = "[] 0"; break;
}
if ( (oldStyle != m_pen.GetStyle()) )
if ( psdash && (oldStyle != m_pen.GetStyle()) )
{
PsPrint( psdash );
PsPrint( " setdash\n" );