From: <and...@us...> - 2013-05-10 20:29:49
|
Revision: 12338 http://sourceforge.net/p/plplot/code/12338 Author: andrewross Date: 2013-05-10 20:29:46 +0000 (Fri, 10 May 2013) Log Message: ----------- Fix up C++ bindings so the line width arguments in the various plshade* functions are PLFLT not PLINT. Modified Paths: -------------- trunk/bindings/c++/plstream.cc trunk/bindings/c++/plstream.h trunk/examples/c++/x15.cc trunk/examples/c++/x16.cc trunk/examples/c++/x21.cc Modified: trunk/bindings/c++/plstream.cc =================================================================== --- trunk/bindings/c++/plstream.cc 2013-05-10 20:16:29 UTC (rev 12337) +++ trunk/bindings/c++/plstream.cc 2013-05-10 20:29:46 UTC (rev 12338) @@ -1695,9 +1695,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -1717,9 +1717,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -1737,8 +1737,8 @@ plstream::shades( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, - const PLFLT *clevel, PLINT nlevel, PLINT fill_width, - PLINT cont_color, PLINT cont_width, + const PLFLT *clevel, PLINT nlevel, PLFLT fill_width, + PLINT cont_color, PLFLT cont_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -1755,8 +1755,8 @@ plstream::shades( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, - const PLFLT *clevel, PLINT nlevel, PLINT fill_width, - PLINT cont_color, PLINT cont_width, + const PLFLT *clevel, PLINT nlevel, PLFLT fill_width, + PLINT cont_color, PLFLT cont_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -1771,9 +1771,9 @@ void plstream::shade( Contourable_Data & d, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, bool rectangular, Coord_Xformer *pcxf ) { @@ -1806,9 +1806,9 @@ void plstream::shade( Contourable_Data & d, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, PLINT rectangular, Coord_Xformer *pcxf ) { @@ -1832,9 +1832,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -1855,9 +1855,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -1880,9 +1880,9 @@ PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -1907,9 +1907,9 @@ PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) Modified: trunk/bindings/c++/plstream.h =================================================================== --- trunk/bindings/c++/plstream.h 2013-05-10 20:16:29 UTC (rev 12337) +++ trunk/bindings/c++/plstream.h 2013-05-10 20:29:46 UTC (rev 12338) @@ -728,9 +728,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -738,8 +738,8 @@ void shades( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, - const PLFLT * clevel, PLINT nlevel, PLINT fill_width, - PLINT cont_color, PLINT cont_width, + const PLFLT * clevel, PLINT nlevel, PLFLT fill_width, + PLINT cont_color, PLFLT cont_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -750,9 +750,9 @@ void shade( Contourable_Data& d, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, bool rectangular, Coord_Xformer *pcxf ); @@ -760,9 +760,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -774,9 +774,9 @@ PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), bool rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1167,9 +1167,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1177,17 +1177,17 @@ void shades( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, - const PLFLT * clevel, PLINT nlevel, PLINT fill_width, - PLINT cont_color, PLINT cont_width, + const PLFLT * clevel, PLINT nlevel, PLFLT fill_width, + PLINT cont_color, PLFLT cont_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); void shade( Contourable_Data& d, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, PLINT rectangular, Coord_Xformer *pcxf ); @@ -1195,9 +1195,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1209,9 +1209,9 @@ PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, - PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, - PLINT min_color, PLINT min_width, - PLINT max_color, PLINT max_width, + PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, + PLINT min_color, PLFLT min_width, + PLINT max_color, PLFLT max_width, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); Modified: trunk/examples/c++/x15.cc =================================================================== --- trunk/examples/c++/x15.cc 2013-05-10 20:16:29 UTC (rev 12337) +++ trunk/examples/c++/x15.cc 2013-05-10 20:29:46 UTC (rev 12338) @@ -105,8 +105,10 @@ void x15::plot1( PLFLT **z, PLFLT zmin, PLFLT zmax ) { PLFLT shade_min, shade_max, sh_color; - int sh_cmap = 0, sh_width; - int min_color = 0, min_width = 0, max_color = 0, max_width = 0; + int sh_cmap = 0; + PLFLT sh_width; + int min_color = 0, max_color = 0; + PLFLT min_width = 0.0, max_width = 0.0; pls->adv( 0 ); pls->vpor( 0.1, 0.9, 0.1, 0.9 ); @@ -117,11 +119,11 @@ shade_min = zmin + ( zmax - zmin ) * 0.4; shade_max = zmin + ( zmax - zmin ) * 0.6; sh_color = 7; - sh_width = 2; + sh_width = 2.0; min_color = 9; max_color = 2; - min_width = 2; - max_width = 2; + min_width = 2.0; + max_width = 2.0; pls->psty( 8 ); @@ -143,8 +145,10 @@ void x15::plot2( PLFLT **z, PLFLT zmin, PLFLT zmax ) { PLFLT shade_min, shade_max, sh_color; - int sh_cmap = 0, sh_width; - int min_color = 0, min_width = 0, max_color = 0, max_width = 0; + int sh_cmap = 0; + PLFLT sh_width; + int min_color = 0, max_color = 0; + PLFLT min_width = 0.0, max_width = 0.0; int i; static PLINT nlin[10] = { 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 }; static PLINT inc[10][2] = { { 450, 0 }, { -450, 0 }, { 0, 0 }, { 900, 0 }, @@ -154,7 +158,7 @@ { 2000, 2000 }, { 2000, 2000 }, { 2000, 2000 }, { 2000, 2000 }, { 2000, 2000 }, { 4000, 4000 }, { 4000, 2000 } }; - sh_width = 2; + sh_width = 2.0; pls->adv( 0 ); pls->vpor( 0.1, 0.9, 0.1, 0.9 ); Modified: trunk/examples/c++/x16.cc =================================================================== --- trunk/examples/c++/x16.cc 2013-05-10 20:16:29 UTC (rev 12337) +++ trunk/examples/c++/x16.cc 2013-05-10 20:29:46 UTC (rev 12338) @@ -139,20 +139,21 @@ x16::x16( int argc, const char ** argv ) { - int i, j; - PLFLT x, y, argx, argy, distort, r, t, zmin, zmax; - PLFLT *px = new PLFLT[PERIMETERPTS]; - PLFLT *py = new PLFLT[PERIMETERPTS]; - PLFLT *xg1 = new PLFLT[nx]; - PLFLT *yg1 = new PLFLT[ny]; - PLFLT **z; - PLFLT **w; - PLcGrid cgrid1; - PLcGrid2 cgrid2; - PLFLT *clevel = new PLFLT[ns]; - PLFLT *shedge = new PLFLT[ns + 1]; - const int fill_width = 2, cont_color = 0, cont_width = 0; - PLFLT colorbar_width, colorbar_height; + int i, j; + PLFLT x, y, argx, argy, distort, r, t, zmin, zmax; + PLFLT *px = new PLFLT[PERIMETERPTS]; + PLFLT *py = new PLFLT[PERIMETERPTS]; + PLFLT *xg1 = new PLFLT[nx]; + PLFLT *yg1 = new PLFLT[ny]; + PLFLT **z; + PLFLT **w; + PLcGrid cgrid1; + PLcGrid2 cgrid2; + PLFLT *clevel = new PLFLT[ns]; + PLFLT *shedge = new PLFLT[ns + 1]; + const int cont_color = 0; + const PLFLT fill_width = 2.0, cont_width = 0.0; + PLFLT colorbar_width, colorbar_height; #define NUM_AXES 1 PLINT n_axis_opts = NUM_AXES; @@ -406,7 +407,7 @@ pls->shades( z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, - 2, 3, + 2, 3.0, plstream::fill, false, plstream::tr2, (void *) &cgrid2 ); if ( colorbar ) Modified: trunk/examples/c++/x21.cc =================================================================== --- trunk/examples/c++/x21.cc 2013-05-10 20:16:29 UTC (rev 12337) +++ trunk/examples/c++/x21.cc 2013-05-10 20:29:46 UTC (rev 12338) @@ -316,7 +316,7 @@ pls->col0( 15 ); pls->lab( "X", "Y", title[alg - 1] ); pls->shades( zg, xp, yp, NULL, xm, xM, ym, yM, - clev, nl, 1, 0, 1, pls->fill, true, NULL, NULL ); + clev, nl, 1.0, 0, 1.0, pls->fill, true, NULL, NULL ); pls->col0( 2 ); } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |