Revision: 4870
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4870&view=rev
Author:   mdboom
Date:     2008-01-15 12:00:50 -0800 (Tue, 15 Jan 2008)

Log Message:
-----------
Fix problem with color changing in Ps backend.  (Ticks were same color
as line).  Thanks Paul Novak.

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/backends/backend_ps.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py      2008-01-15 
19:32:47 UTC (rev 4869)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py      2008-01-15 
20:00:50 UTC (rev 4870)
@@ -759,16 +759,6 @@
         fill = (fill and rgbFace is not None and
                 (len(rgbFace) <= 3 or rgbFace[3] != 0.0))
 
-        if stroke:
-            self.set_linewidth(gc.get_linewidth())
-            jint = gc.get_joinstyle()
-            self.set_linejoin(jint)
-            cint = gc.get_capstyle()
-            self.set_linecap(cint)
-            self.set_linedash(*gc.get_dashes())
-            if self.linewidth > 0 and stroke:
-                self.set_color(*gc.get_rgb()[:3])
-
         cliprect = gc.get_clip_rectangle()
         if cliprect:
             x,y,w,h=cliprect.bounds
@@ -782,17 +772,23 @@
         write(ps.strip())
         write("\n")
 
+        hatch = gc.get_hatch()
+        if hatch:
+            self.set_hatch(hatch)
+
         if fill:
             #print 'rgbface', rgbFace
             write("gsave\n")
             self.set_color(store=0, *rgbFace[:3])
             write("fill\ngrestore\n")
 
-        hatch = gc.get_hatch()
-        if (hatch):
-            self.set_hatch(hatch)
-
-        if self.linewidth > 0 and stroke:
+        if stroke and gc.get_linewidth() > 0.0:
+            self.set_linewidth(gc.get_linewidth())
+            jint = gc.get_joinstyle()
+            self.set_linejoin(jint)
+            cint = gc.get_capstyle()
+            self.set_linecap(cint)
+            self.set_linedash(*gc.get_dashes())
             self.set_color(*gc.get_rgb()[:3])
             write("stroke\n")
         else:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to