Revision: 3989
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3989&view=rev
Author:   mdboom
Date:     2007-10-23 12:47:43 -0700 (Tue, 23 Oct 2007)

Log Message:
-----------
Fix bug in clipping rectangle in PDF

Modified Paths:
--------------
    branches/transforms/lib/matplotlib/backends/backend_pdf.py

Modified: branches/transforms/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- branches/transforms/lib/matplotlib/backends/backend_pdf.py  2007-10-23 
19:20:21 UTC (rev 3988)
+++ branches/transforms/lib/matplotlib/backends/backend_pdf.py  2007-10-23 
19:47:43 UTC (rev 3989)
@@ -32,7 +32,7 @@
 from matplotlib.ft2font import FT2Font, FIXED_WIDTH, ITALIC, LOAD_NO_SCALE, \
     LOAD_NO_HINTING, KERNING_UNFITTED
 from matplotlib.mathtext import MathTextParser
-from matplotlib.transforms import Bbox
+from matplotlib.transforms import Bbox, BboxBase
 from matplotlib.path import Path
 from matplotlib import ttconv
 # MGDTODO: Move this stuff
@@ -172,11 +172,8 @@
         return pdfRepr(r)
 
     # A bounding box
-    elif isinstance(obj, Bbox):
-        r = ["["]
-        r.extend([pdfRepr(val) for val in obj.lbrt])
-        r.append("]")
-        return fill(r)
+    elif isinstance(obj, BboxBase):
+        return fill([pdfRepr(val) for val in obj.bounds])
     
     else:
         raise TypeError, \
@@ -1043,7 +1040,7 @@
             self.beginStream(
                 object.id, None,
                 {'Type': Name('XObject'), 'Subtype': Name('Form'),
-                 'BBox': bbox })
+                 'BBox': list(bbox.lbrt) })
             self.writePath(path, trans)
             if fillp:
                 self.output(Op.fill_stroke)


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to