SF.net SVN: matplotlib:[7057] trunk/matplotlib/lib/matplotlib/backends/ backend_ps.py

2009-04-23 Thread mdboom
Revision: 7057
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7057&view=rev
Author:   mdboom
Date: 2009-04-23 14:20:27 + (Thu, 23 Apr 2009)

Log Message:
---
Fix clipping of images in PS backend.

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  2009-04-21 
03:12:53 UTC (rev 7056)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py  2009-04-23 
14:20:27 UTC (rev 7057)
@@ -428,8 +428,8 @@
 ps = []
 last_points = None
 if clip:
-clip = (0.0, 0.0, self.width * self.imagedpi,
-self.height * self.imagedpi)
+clip = (0.0, 0.0, self.width * 72.0,
+self.height * 72.0)
 else:
 clip = None
 for points, code in path.iter_segments(transform, clip=clip):


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

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7058] trunk/matplotlib/src/path_converters.h

2009-04-23 Thread mdboom
Revision: 7058
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7058&view=rev
Author:   mdboom
Date: 2009-04-23 14:21:38 + (Thu, 23 Apr 2009)

Log Message:
---
Fix some uninitialized variable errors in valgrind.

Modified Paths:
--
trunk/matplotlib/src/path_converters.h

Modified: trunk/matplotlib/src/path_converters.h
===
--- trunk/matplotlib/src/path_converters.h  2009-04-23 14:20:27 UTC (rev 
7057)
+++ trunk/matplotlib/src/path_converters.h  2009-04-23 14:21:38 UTC (rev 
7058)
@@ -270,7 +270,8 @@
 PathClipper(VertexSource& source, bool do_clipping,
 double width, double height) :
 m_source(&source), m_do_clipping(do_clipping),
-m_cliprect(0.0, 0.0, width, height), m_moveto(true)
+m_cliprect(0.0, 0.0, width, height), m_moveto(true),
+m_has_next(false)
 {
 // empty
 }
@@ -278,7 +279,7 @@
 PathClipper(VertexSource& source, bool do_clipping,
 const agg::rect_base& rect) :
 m_source(&source), m_do_clipping(do_clipping),
-m_cliprect(rect), m_moveto(true)
+m_cliprect(rect), m_moveto(true), m_has_next(false)
 {
 // empty
 }


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

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7059] trunk/matplotlib/src/_path.cpp

2009-04-23 Thread mdboom
Revision: 7059
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7059&view=rev
Author:   mdboom
Date: 2009-04-23 14:21:52 + (Thu, 23 Apr 2009)

Log Message:
---
Fix theoretical memory leak.

Modified Paths:
--
trunk/matplotlib/src/_path.cpp

Modified: trunk/matplotlib/src/_path.cpp
===
--- trunk/matplotlib/src/_path.cpp  2009-04-23 14:21:38 UTC (rev 7058)
+++ trunk/matplotlib/src/_path.cpp  2009-04-23 14:21:52 UTC (rev 7059)
@@ -569,6 +569,7 @@
(PyArray_NDIM(offsets) == 2 && PyArray_DIM(offsets, 1) != 2) ||
(PyArray_NDIM(offsets) == 1 && PyArray_DIM(offsets, 0) != 0))
 {
+Py_XDECREF(offsets);
 throw Py::ValueError("Offsets array must be Nx2");
 }
 


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

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7060] trunk/matplotlib/src/agg_py_path_iterator.h

2009-04-23 Thread mdboom
Revision: 7060
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7060&view=rev
Author:   mdboom
Date: 2009-04-23 14:22:11 + (Thu, 23 Apr 2009)

Log Message:
---
Fix theoretical memory leak.

Modified Paths:
--
trunk/matplotlib/src/agg_py_path_iterator.h

Modified: trunk/matplotlib/src/agg_py_path_iterator.h
===
--- trunk/matplotlib/src/agg_py_path_iterator.h 2009-04-23 14:21:52 UTC (rev 
7059)
+++ trunk/matplotlib/src/agg_py_path_iterator.h 2009-04-23 14:22:11 UTC (rev 
7060)
@@ -52,6 +52,8 @@
 if (!m_vertices ||
 PyArray_DIM(m_vertices, 1) != 2)
 {
+Py_XDECREF(m_vertices);
+m_vertices = NULL;
 throw Py::ValueError("Invalid vertices array.");
 }
 
@@ -59,10 +61,18 @@
 {
 m_codes = (PyArrayObject*)PyArray_FromObject
   (codes_obj.ptr(), PyArray_UINT8, 1, 1);
-if (!m_codes)
+if (!m_codes) {
+Py_XDECREF(m_vertices);
+m_vertices = NULL;
 throw Py::ValueError("Invalid codes array.");
-if (PyArray_DIM(m_codes, 0) != PyArray_DIM(m_vertices, 0))
+}
+if (PyArray_DIM(m_codes, 0) != PyArray_DIM(m_vertices, 0)) {
+Py_XDECREF(m_vertices);
+m_vertices = NULL;
+Py_XDECREF(m_codes);
+m_codes = NULL;
 throw Py::ValueError("Codes array is wrong length");
+}
 }
 
 m_should_simplify= should_simplify_obj.isTrue();


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

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7061] trunk/matplotlib/src/cntr.c

2009-04-23 Thread mdboom
Revision: 7061
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7061&view=rev
Author:   mdboom
Date: 2009-04-23 14:22:27 + (Thu, 23 Apr 2009)

Log Message:
---
Fix theoretical memory leak.

Modified Paths:
--
trunk/matplotlib/src/cntr.c

Modified: trunk/matplotlib/src/cntr.c
===
--- trunk/matplotlib/src/cntr.c 2009-04-23 14:22:11 UTC (rev 7060)
+++ trunk/matplotlib/src/cntr.c 2009-04-23 14:22:27 UTC (rev 7061)
@@ -1410,7 +1410,7 @@
 PyObject *
 cntr_trace(Csite *site, double levels[], int nlevels, int points, long nchunk)
 {
-PyObject *c_list;
+PyObject *c_list = NULL;
 double *xp0;
 double *yp0;
 long *nseg0;
@@ -1502,6 +1502,7 @@
 error:
 PyMem_Free(xp0); PyMem_Free(yp0); PyMem_Free(nseg0);
 site->xcp = NULL; site->ycp = NULL;
+Py_XDECREF(c_list);
 return NULL;
 }
 


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

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins