Revision: 8417
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8417&view=rev
Author:   mdehoon
Date:     2010-06-12 07:48:54 +0000 (Sat, 12 Jun 2010)

Log Message:
-----------
No CGContextGetLineWidth in Cocoa; pass the line width from Python instead.

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
    trunk/matplotlib/src/_macosx.m

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py  2010-06-12 
06:53:03 UTC (rev 8416)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py  2010-06-12 
07:48:54 UTC (rev 8417)
@@ -52,12 +52,14 @@
     def draw_path(self, gc, path, transform, rgbFace=None):
         if rgbFace is not None:
             rgbFace = tuple(rgbFace)
-        gc.draw_path(path, transform, rgbFace)
+        linewidth = gc.get_linewidth()
+        gc.draw_path(path, transform, linewidth, rgbFace)
 
     def draw_markers(self, gc, marker_path, marker_trans, path, trans, 
rgbFace=None):
         if rgbFace is not None:
             rgbFace = tuple(rgbFace)
-        gc.draw_markers(marker_path, marker_trans, path, trans, rgbFace)
+        linewidth = gc.get_linewidth()
+        gc.draw_markers(marker_path, marker_trans, path, trans, linewidth, 
rgbFace)
 
     def draw_path_collection(self, gc, master_transform, paths, all_transforms,
                              offsets, offsetTrans, facecolors, edgecolors,

Modified: trunk/matplotlib/src/_macosx.m
===================================================================
--- trunk/matplotlib/src/_macosx.m      2010-06-12 06:53:03 UTC (rev 8416)
+++ trunk/matplotlib/src/_macosx.m      2010-06-12 07:48:54 UTC (rev 8417)
@@ -864,6 +864,7 @@
     PyObject* path;
     PyObject* transform;
     PyObject* rgbFace;
+    float linewidth;
 
     int n;
 
@@ -878,9 +879,10 @@
         return NULL;
     }
 
-    if(!PyArg_ParseTuple(args, "OO|O",
+    if(!PyArg_ParseTuple(args, "OOf|O",
                                &path,
                                &transform,
+                               &linewidth,
                                &rgbFace)) return NULL;
 
     if(rgbFace==Py_None) rgbFace = NULL;
@@ -891,7 +893,7 @@
                                   0,
                                   rect,
                                   QUANTIZE_AUTO,
-                                  CGContextGetLineWidth(self),
+                                  linewidth,
                                   rgbFace == NULL);
     if (!iterator)
     {
@@ -969,7 +971,7 @@
                                           0,
                                           rect,
                                           QUANTIZE_AUTO,
-                                          CGContextGetLineWidth(self),
+                                          linewidth,
                                           0);
             if (!iterator)
             {
@@ -995,6 +997,7 @@
     PyObject* marker_transform;
     PyObject* path;
     PyObject* transform;
+    float linewidth;
     PyObject* rgbFace;
 
     int ok;
@@ -1015,11 +1018,12 @@
         return NULL;
     }
 
-    if(!PyArg_ParseTuple(args, "OOOO|O",
+    if(!PyArg_ParseTuple(args, "OOOOf|O",
                                &marker_path,
                                &marker_transform,
                                &path,
                                &transform,
+                               &linewidth,
                                &rgbFace)) return NULL;
 
     if(rgbFace==Py_None) rgbFace = NULL;
@@ -1046,7 +1050,7 @@
                                  0,
                                  rect,
                                  mode,
-                                 CGContextGetLineWidth(self),
+                                 linewidth,
                                  0);
     if (!iterator)
     {


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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to