Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b2f47e

Browse files
committed
Merged revisions 7774 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint ........ r7774 | mdboom | 2009-09-17 10:56:00 -0400 (Thu, 17 Sep 2009) | 2 lines Fix bug whereby non-finite values in the path were not being ignored by the view limits finding algorithm. ........ svn path=/trunk/matplotlib/; revision=7775
1 parent 33c0375 commit 5b2f47e

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/_path.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,24 +270,21 @@ void get_path_extents(PathIterator& path, const agg::trans_affine& trans,
270270
double* xm, double* ym)
271271
{
272272
typedef agg::conv_transform<PathIterator> transformed_path_t;
273-
typedef agg::conv_curve<transformed_path_t> curve_t;
273+
typedef PathNanRemover<transformed_path_t> nan_removed_t;
274+
typedef agg::conv_curve<nan_removed_t> curve_t;
274275
double x, y;
275276
unsigned code;
276277

277278
transformed_path_t tpath(path, trans);
278-
curve_t curved_path(tpath);
279+
nan_removed_t nan_removed(tpath, true, path.has_curves());
280+
curve_t curved_path(nan_removed);
279281

280282
curved_path.rewind(0);
281283

282284
while ((code = curved_path.vertex(&x, &y)) != agg::path_cmd_stop)
283285
{
284286
if ((code & agg::path_cmd_end_poly) == agg::path_cmd_end_poly)
285287
continue;
286-
/* if (MPL_notisfinite64(x) || MPL_notisfinite64(y))
287-
continue;
288-
We should not need the above, because the path iterator
289-
should already be filtering out invalid values.
290-
*/
291288
if (x < *x0) *x0 = x;
292289
if (y < *y0) *y0 = y;
293290
if (x > *x1) *x1 = x;

0 commit comments

Comments
 (0)