From: Andrew R. <and...@us...> - 2004-06-24 08:09:03
|
Update of /cvsroot/plplot/plplot/examples/c++ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19778/examples/c++ Modified Files: x09.cc x15.cc x16.cc x22.cc Log Message: Make plstream::tr[012] and plstream::fill static member functions so they can be used as arguments to the contouring and shading functions. Update examples to use these rather than the C versions. Fixes make check failure on some of the C++ examples. Index: x15.cc =================================================================== RCS file: /cvsroot/plplot/plplot/examples/c++/x15.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- x15.cc 3 Mar 2004 17:41:16 -0000 1.5 +++ x15.cc 24 Jun 2004 08:08:53 -0000 1.6 @@ -145,7 +145,7 @@ shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, - plfill, 1, NULL, NULL ); + plstream::fill, 1, NULL, NULL ); pls->col0(1); pls->box("bcnst", 0.0, 0, "bcnstv", 0.0, 0); @@ -180,7 +180,7 @@ shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, - plfill, 1, NULL, NULL ); + plstream::fill, 1, NULL, NULL ); } pls->col0(1); Index: x09.cc =================================================================== RCS file: /cvsroot/plplot/plplot/examples/c++/x09.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- x09.cc 3 Mar 2004 17:41:16 -0000 1.5 +++ x09.cc 24 Jun 2004 08:08:53 -0000 1.6 @@ -196,11 +196,11 @@ pls->env(-1.0, 1.0, -1.0, 1.0, 0, 0); pls->col0(2); pls->cont(z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, - pltr1, (void *) &cgrid1 ); + plstream::tr1, (void *) &cgrid1 ); pls->styl(1, &mark, &space); pls->col0(3); pls->cont(w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, - pltr1, (void *) &cgrid1 ); + plstream::tr1, (void *) &cgrid1 ); pls->styl(0, NULL, NULL); pls->col0(1); pls->lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); @@ -223,11 +223,11 @@ pls->env(-1.0, 1.0, -1.0, 1.0, 0, 0); pls->col0(2); pls->cont(z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, - pltr2, (void *) &cgrid2 ); + plstream::tr2, (void *) &cgrid2 ); pls->styl(1, &mark, &space); pls->col0(3); pls->cont(w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, - pltr2, (void *) &cgrid2 ); + plstream::tr2, (void *) &cgrid2 ); pls->styl(0, &mark, &space); pls->col0(1); pls->lab("X Coordinate", "Y Coordinate", "Streamlines of flow"); @@ -314,7 +314,7 @@ pls->col0(2); pls->cont( z, RPTS, THETAPTS, 1, RPTS, 1, THETAPTS, lev, 10, - pltr2, (void *) &cgrid2); + plstream::tr2, (void *) &cgrid2); pls->col0(1); pls->lab("", "", "Polar Contour Plot"); @@ -445,14 +445,14 @@ // Negative contours pls->lsty(2); pls->cont( z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, - clevelneg, nlevelneg, pltr2, (void *) &cgrid2 ); + clevelneg, nlevelneg, plstream::tr2, (void *) &cgrid2 ); } if(nlevelpos >0) { // Positive contours pls->lsty(1); pls->cont( z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, - clevelpos, nlevelpos, pltr2, (void *) &cgrid2 ); + clevelpos, nlevelpos, plstream::tr2, (void *) &cgrid2 ); } // Draw outer boundary Index: x22.cc =================================================================== RCS file: /cvsroot/plplot/plplot/examples/c++/x22.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- x22.cc 21 May 2004 15:09:25 -0000 1.7 +++ x22.cc 24 Jun 2004 08:08:53 -0000 1.8 @@ -90,7 +90,7 @@ pls->env(xmin, xmax, ymin, ymax, 0, 0); pls->lab("(x)", "(y)", "#frPLplot Example 22 - circulation"); pls->col0(2); - pls->vect(u,v,nx,ny,0.0,pltr2,(void *)&cgrid2); + pls->vect(u,v,nx,ny,0.0,plstream::tr2,(void *)&cgrid2); pls->col0(1); } @@ -135,7 +135,7 @@ pls->env(xmin, xmax, ymin, ymax, 0, 0); pls->lab("(x)", "(y)", "#frPLplot Example 22 - constriction"); pls->col0(2); - pls->vect(u,v,nx,ny,-0.5,pltr2,(void *)&cgrid2); + pls->vect(u,v,nx,ny,-0.5,plstream::tr2,(void *)&cgrid2); pls->col0(1); } @@ -214,13 +214,13 @@ } pls->col0(3); pls->lsty(2); - pls->cont(z,nr,ntheta,1,nr,1,ntheta,clevel,nlevel,pltr2,(void *) &cgrid2); + pls->cont(z,nr,ntheta,1,nr,1,ntheta,clevel,nlevel,plstream::tr2,(void *) &cgrid2); pls->lsty(1); pls->col0(1); // Plot the vectors of the gradient of the potential pls->col0(2); - pls->vect(u,v,nr,ntheta,25.0,pltr2,(void *)&cgrid2); + pls->vect(u,v,nr,ntheta,25.0,plstream::tr2,(void *)&cgrid2); pls->col0(1); // Plot the perimeter of the cylinder Index: x16.cc =================================================================== RCS file: /cvsroot/plplot/plplot/examples/c++/x16.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- x16.cc 3 Mar 2004 17:41:16 -0000 1.6 +++ x16.cc 24 Jun 2004 08:08:53 -0000 1.7 @@ -238,7 +238,7 @@ pls->shades(z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns+1, fill_width, cont_color, cont_width, - plfill, 1, NULL, NULL); + plstream::fill, 1, NULL, NULL); pls->col0(1); pls->box("bcnst", 0.0, 0, "bcnstv", 0.0, 0); @@ -256,7 +256,7 @@ pls->shades(z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns+1, fill_width, cont_color, cont_width, - plfill, 1, pltr1, (void *) &cgrid1); + plstream::fill, 1, pls->tr1, (void *) &cgrid1); pls->col0(1); pls->box("bcnst", 0.0, 0, "bcnstv", 0.0, 0); @@ -275,7 +275,7 @@ pls->shades(z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns+1, fill_width, cont_color, cont_width, - plfill, 0, pltr2, (void *) &cgrid2); + plstream::fill, 0, pls->tr2, (void *) &cgrid2); pls->col0(1); pls->box("bcnst", 0.0, 0, "bcnstv", 0.0, 0); @@ -295,7 +295,7 @@ pls->shades(z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns+1, fill_width, 2, 3, - plfill, 0, pltr2, (void *) &cgrid2); + plstream::fill, 0, pls->tr2, (void *) &cgrid2); pls->col0(1); pls->box("bcnst", 0.0, 0, "bcnstv", 0.0, 0); @@ -316,7 +316,7 @@ pls->shades(z, nx, ny, zdefined, -1., 1., -1., 1., shedge, ns+1, fill_width, cont_color, cont_width, - plfill, 0, pltr2, (void *) &cgrid2); + plstream::fill, 0, pls->tr2, (void *) &cgrid2); pls->col0(1); pls->box("bcnst", 0.0, 0, "bcnstv", 0.0, 0); @@ -355,7 +355,7 @@ pls->shades(z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns+1, fill_width, cont_color, cont_width, - plfill, 0, pltr2, (void *) &cgrid2); + plstream::fill, 0, pls->tr2, (void *) &cgrid2); // Now we can draw the perimeter. (If do before, shade stuff may overlap.) for (i = 0; i < PERIMETERPTS; i++) { |