Revision: 6214
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6214&view=rev
Author: mdboom
Date: 2008-10-15 19:44:58 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
Fix bug in clipping in the simplifier
Modified Paths:
--------------
trunk/matplotlib/src/agg_py_path_iterator.h
Added Paths:
-----------
trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py
Added: trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py
(rev 0)
+++ trunk/matplotlib/examples/pylab_examples/simplification_clipping_test.py
2008-10-15 19:44:58 UTC (rev 6214)
@@ -0,0 +1,11 @@
+from pylab import *
+
+t = arange(0.0, 2.0, 0.01)
+s = sin(2*pi*t)
+plot(t, s, linewidth=1.0)
+
+ylim((-0.20, -0.28))
+
+title('Should see four lines extending from bottom to top')
+grid(True)
+show()
Modified: trunk/matplotlib/src/agg_py_path_iterator.h
===================================================================
--- trunk/matplotlib/src/agg_py_path_iterator.h 2008-10-15 18:48:00 UTC (rev
6213)
+++ trunk/matplotlib/src/agg_py_path_iterator.h 2008-10-15 19:44:58 UTC (rev
6214)
@@ -281,6 +281,10 @@
(*y < -1.0 && m_lasty < -1.0) ||
(*y > m_height && m_lasty > m_height)))
{
+ if (!m_clipped)
+ {
+ queue_push(agg::path_cmd_line_to, m_lastx, m_lasty);
+ }
m_lastx = *x;
m_lasty = *y;
m_clipped = true;
@@ -451,7 +455,7 @@
bool m_simplify;
double m_width, m_height;
- static const int m_queue_size = 6;
+ static const int m_queue_size = 7;
int m_queue_read;
int m_queue_write;
item m_queue[m_queue_size];
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins