From f081c944e891b0cc76ba648982175279bdbce904 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 24 Feb 2006 11:53:52 +0000 Subject: [PATCH] Implemented user dashes for PS print. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/dcpsg.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index f5dad23ae7..ed99c1cf25 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -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" ); -- 2.45.2