Revision: 7622
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7622&view=rev
Author:   jouni
Date:     2009-09-01 05:24:38 +0000 (Tue, 01 Sep 2009)

Log Message:
-----------
Small fix to Gouraud triangles in pdf

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

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py     2009-08-31 
20:10:35 UTC (rev 7621)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py     2009-09-01 
05:24:38 UTC (rev 7622)
@@ -141,6 +141,11 @@
         r = "%.10f" % obj
         return r.rstrip('0').rstrip('.')
 
+    # Booleans. Needs to be tested before integers since
+    # isinstance(True, int) is true.
+    elif isinstance(obj, bool):
+        return ['false', 'true'][obj]
+
     # Integers are written as such.
     elif isinstance(obj, (int, long)):
         return "%d" % obj
@@ -170,10 +175,6 @@
         r.append("]")
         return fill(r)
 
-    # Booleans.
-    elif isinstance(obj, bool):
-        return ['false', 'true'][obj]
-
     # The null keyword.
     elif obj is None:
         return 'null'
@@ -1080,7 +1081,7 @@
                   'BitsPerComponent': 8,
                   'BitsPerFlag': 8,
                   'ColorSpace': Name('DeviceRGB'),
-                  'AntiAlias': 1,
+                  'AntiAlias': True,
                   'Decode': [points_min[0], points_max[0],
                              points_min[1], points_max[1],
                              0, 1, 0, 1, 0, 1]


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to