From: <md...@us...> - 2009-09-17 14:56:11
|
Revision: 7774 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7774&view=rev Author: mdboom Date: 2009-09-17 14:56:00 +0000 (Thu, 17 Sep 2009) Log Message: ----------- Fix bug whereby non-finite values in the path were not being ignored by the view limits finding algorithm. Modified Paths: -------------- branches/v0_99_maint/src/_path.cpp Modified: branches/v0_99_maint/src/_path.cpp =================================================================== --- branches/v0_99_maint/src/_path.cpp 2009-09-17 14:35:55 UTC (rev 7773) +++ branches/v0_99_maint/src/_path.cpp 2009-09-17 14:56:00 UTC (rev 7774) @@ -270,12 +270,14 @@ double* xm, double* ym) { typedef agg::conv_transform<PathIterator> transformed_path_t; - typedef agg::conv_curve<transformed_path_t> curve_t; + typedef PathNanRemover<transformed_path_t> nan_removed_t; + typedef agg::conv_curve<nan_removed_t> curve_t; double x, y; unsigned code; transformed_path_t tpath(path, trans); - curve_t curved_path(tpath); + nan_removed_t nan_removed(tpath, true, path.has_curves()); + curve_t curved_path(nan_removed); curved_path.rewind(0); @@ -283,11 +285,6 @@ { if ((code & agg::path_cmd_end_poly) == agg::path_cmd_end_poly) continue; - /* if (MPL_notisfinite64(x) || MPL_notisfinite64(y)) - continue; - We should not need the above, because the path iterator - should already be filtering out invalid values. - */ if (x < *x0) *x0 = x; if (y < *y0) *y0 = y; if (x > *x1) *x1 = x; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |