@@ -1439,8 +1439,9 @@ RendererAgg::draw_lines(const Py::Tuple& args) {
14391439 double lastx (-2.0 ), lasty (-2.0 );
14401440
14411441 size_t i (0 );
1442+ bool more (true );
14421443 for (i=0 ; i<Nx; i++) {
1443-
1444+ more = true ;
14441445 thisx = *(double *)(xa->data + i*xa->strides [0 ]);
14451446 thisy = *(double *)(ya->data + i*ya->strides [0 ]);
14461447
@@ -1487,9 +1488,11 @@ RendererAgg::draw_lines(const Py::Tuple& args) {
14871488 moveto = false ;
14881489 if ((i>0 ) & (i%10000 )==0 ) {
14891490 // draw the path in chunks
1491+ // std::cout << "rendering chunk " << i << std::endl;
14901492 _render_lines_path (path, gc);
14911493 path.remove_all ();
14921494 path.move_to (thisx, thisy);
1495+ more = false ;
14931496 }
14941497
14951498
@@ -1502,8 +1505,9 @@ RendererAgg::draw_lines(const Py::Tuple& args) {
15021505 // typedef agg::conv_transform<agg::path_storage, agg::trans_affine> path_t;
15031506 // path_t transpath(path, xytrans);
15041507 _VERBOSE (" RendererAgg::draw_lines rendering lines path" );
1505- if ((i> 0 ) & ((i% 10000 )!= 0 )) {
1508+ if (more) {
15061509 // render the rest
1510+ // /std::cout << "rendering the rest" << std::endl;
15071511 _render_lines_path (path, gc);
15081512 }
15091513
@@ -1520,11 +1524,11 @@ RendererAgg::_process_alpha_mask(const GCAgg& gc)
15201524 if (gc.clippath ==NULL ) {
15211525 return false ;
15221526 }
1523- if (gc.clippath ==lastclippath) {
1527+ if (0 &( gc.clippath ==lastclippath) ) {
15241528 // std::cout << "seen it" << std::endl;
15251529 return true ;
15261530 }
1527- rendererBaseAlphaMask->clear (agg::gray8 (0 ,0 ));
1531+ rendererBaseAlphaMask->clear (agg::gray8 (0 , 0 ));
15281532 gc.clippath ->rewind (0 );
15291533 theRasterizer->add_path (*(gc.clippath ));
15301534 rendererAlphaMask->color (agg::gray8 (255 ,255 ));
@@ -1576,6 +1580,7 @@ RendererAgg::_render_lines_path(PathSource &path, const GCAgg& gc) {
15761580 typedef agg::renderer_scanline_aa_solid<amask_ren_type> renderer_type;
15771581 renderer_type ren (r);
15781582 ren.color (gc.color );
1583+ // std::cout << "render clippath" << std::endl;
15791584 agg::render_scanlines (*theRasterizer, *slineP8, ren);
15801585 }
15811586 else {
0 commit comments