]> git.saurik.com Git - wxWidgets.git/commitdiff
Implemented user dashes for PS print.
authorRobert Roebling <robert@roebling.de>
Fri, 24 Feb 2006 11:53:52 +0000 (11:53 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 24 Feb 2006 11:53:52 +0000 (11:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/dcpsg.cpp

index f5dad23ae79f60aca9360a4191be42720c0bd227..ed99c1cf253f8884d2605188a6b18ff52d334173 100644 (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" );