From: <hez...@us...> - 2013-05-01 01:11:45
|
Revision: 12312 http://sourceforge.net/p/plplot/code/12312 Author: hezekiahcarty Date: 2013-05-01 01:11:41 +0000 (Wed, 01 May 2013) Log Message: ----------- Propagate line width changes through C API This should cover pllegend, plcolorbar and the plshade functions in the C API. Affected examples (4, 26, 33) have been updated as well. These changes still need to be propagated to the full suite of language bindings. Modified Paths: -------------- trunk/examples/c/x04c.c trunk/examples/c/x26c.c trunk/examples/c/x33c.c trunk/include/plplot.h trunk/include/plplotP.h trunk/src/plbox.c trunk/src/pllegend.c trunk/src/plot3d.c trunk/src/plshade.c Modified: trunk/examples/c/x04c.c =================================================================== --- trunk/examples/c/x04c.c 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/examples/c/x04c.c 2013-05-01 01:11:41 UTC (rev 12312) @@ -52,7 +52,7 @@ PLINT text_colors[2]; PLINT line_colors[2]; PLINT line_styles[2]; - PLINT line_widths[2]; + PLFLT line_widths[2]; PLINT symbol_numbers[2], symbol_colors[2]; PLFLT symbol_scales[2]; PLFLT legend_width, legend_height; Modified: trunk/examples/c/x26c.c =================================================================== --- trunk/examples/c/x26c.c 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/examples/c/x26c.c 2013-05-01 01:11:41 UTC (rev 12312) @@ -155,7 +155,7 @@ PLINT text_colors[2]; PLINT line_colors[2]; PLINT line_styles[2]; - PLINT line_widths[2]; + PLFLT line_widths[2]; PLINT symbol_numbers[2], symbol_colors[2]; PLFLT symbol_scales[2]; const char *symbols[2]; Modified: trunk/examples/c/x33c.c =================================================================== --- trunk/examples/c/x33c.c 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/examples/c/x33c.c 2013-05-01 01:11:41 UTC (rev 12312) @@ -315,10 +315,10 @@ PLINT box_colors[MAX_NLEGEND]; PLINT box_patterns[MAX_NLEGEND]; PLFLT box_scales[MAX_NLEGEND]; - PLINT box_line_widths[MAX_NLEGEND]; + PLFLT box_line_widths[MAX_NLEGEND]; PLINT line_colors[MAX_NLEGEND]; PLINT line_styles[MAX_NLEGEND]; - PLINT line_widths[MAX_NLEGEND]; + PLFLT line_widths[MAX_NLEGEND]; PLINT symbol_numbers[MAX_NLEGEND], symbol_colors[MAX_NLEGEND]; PLFLT symbol_scales[MAX_NLEGEND]; char *text[MAX_NLEGEND]; Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/include/plplot.h 2013-05-01 01:11:41 UTC (rev 12312) @@ -1242,9 +1242,9 @@ PLFLT text_justification, const PLINT *text_colors, const char * const *text, const PLINT *box_colors, const PLINT *box_patterns, - const PLFLT *box_scales, const PLINT *box_line_widths, + const PLFLT *box_scales, const PLFLT *box_line_widths, const PLINT *line_colors, const PLINT *line_styles, - const PLINT *line_widths, + const PLFLT *line_widths, const PLINT *symbol_colors, const PLFLT *symbol_scales, const PLINT *symbol_numbers, const char * const *symbols ); @@ -1255,7 +1255,7 @@ PLFLT x_length, PLFLT y_length, PLINT bg_color, PLINT bb_color, PLINT bb_style, PLFLT low_cap_color, PLFLT high_cap_color, - PLINT cont_color, PLINT cont_width, + PLINT cont_color, PLFLT cont_width, PLINT n_labels, PLINT *label_opts, const char *label[], PLINT n_axes, const char *axis_opts[], PLFLT *ticks, PLINT *sub_ticks, @@ -1623,9 +1623,9 @@ c_plshade( const PLFLT * const *a, PLINT nx, PLINT ny, 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 * ), PLBOOL rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1634,9 +1634,9 @@ c_plshade1( const PLFLT *a, PLINT nx, PLINT ny, 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 )( const PLINT, const PLFLT *, const PLFLT * ), PLBOOL rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1644,8 +1644,8 @@ PLDLLIMPEXP void c_plshades( 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 * ), PLBOOL rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1654,8 +1654,8 @@ plfshades( PLF2OPS zops, PLPointer zp, 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 ); @@ -1668,9 +1668,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 * ), PLBOOL rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1680,9 +1680,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), 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, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/include/plplotP.h 2013-05-01 01:11:41 UTC (rev 12312) @@ -798,7 +798,7 @@ // Get background parameters (including line width) for 3d plot. void -plP_gzback( PLINT **zbf, PLINT **zbc, PLFLT **zbt, PLINT **zbw ); +plP_gzback( PLINT **zbf, PLINT **zbc, PLFLT **zbt, PLFLT **zbw ); // Move to physical coordinates (x,y). Modified: trunk/src/plbox.c =================================================================== --- trunk/src/plbox.c 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/src/plbox.c 2013-05-01 01:11:41 UTC (rev 12312) @@ -598,7 +598,8 @@ PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale; PLFLT cxx, cxy, cyx, cyy, cyz; PLINT ln; - PLINT *zbflg, *zbcol, *zbwidth; + PLINT *zbflg, *zbcol; + PLFLT *zbwidth; PLFLT *zbtck; PLINT xdigmax, xdigits; PLINT ydigmax, ydigits; Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/src/pllegend.c 2013-05-01 01:11:41 UTC (rev 12312) @@ -534,9 +534,9 @@ PLFLT text_justification, const PLINT *text_colors, const char * const *text, const PLINT *box_colors, const PLINT *box_patterns, - const PLFLT *box_scales, const PLINT *box_line_widths, + const PLFLT *box_scales, const PLFLT *box_line_widths, const PLINT *line_colors, const PLINT *line_styles, - const PLINT *line_widths, + const PLFLT *line_widths, const PLINT *symbol_colors, const PLFLT *symbol_scales, const PLINT *symbol_numbers, const char * const *symbols ) @@ -1465,7 +1465,7 @@ PLFLT x_length, PLFLT y_length, PLINT bg_color, PLINT bb_color, PLINT bb_style, PLFLT low_cap_color, PLFLT high_cap_color, - PLINT cont_color, PLINT cont_width, + PLINT cont_color, PLFLT cont_width, PLINT n_labels, PLINT *label_opts, const char *labels[], PLINT n_axes, const char *axis_opts[], PLFLT *ticks, PLINT *sub_ticks, Modified: trunk/src/plot3d.c =================================================================== --- trunk/src/plot3d.c 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/src/plot3d.c 2013-05-01 01:11:41 UTC (rev 12312) @@ -34,8 +34,8 @@ static PLINT pl3mode = 0; // 0 3d solid; 1 mesh plot static PLINT pl3upv = 1; // 1 update view; 0 no update -static PLINT zbflg = 0, zbcol, zbwidth; -static PLFLT zbtck; +static PLINT zbflg = 0, zbcol; +static PLFLT zbtck, zbwidth; static PLINT *oldhiview = NULL; static PLINT *oldloview = NULL; @@ -412,7 +412,8 @@ CONT_LEVEL *cont, *clev; CONT_LINE *cline; int ct, ix, iy, iftriangle; - PLINT color = plsc->icol0, width = plsc->width; + PLINT color = plsc->icol0; + PLFLT width = plsc->width; PLFLT ( *getz )( PLPointer, PLINT, PLINT ) = zops->get; if ( plsc->level < 3 ) @@ -972,7 +973,8 @@ PLINT PL_UNUSED( ixstart ), PLINT PL_UNUSED( ixn ), const PLINT * PL_UNUSED( indexymin ), const PLINT * PL_UNUSED( indexymax ) ) { PLFLT cxx, cxy, cyx, cyy, cyz; - PLINT init, ix, iy, color, width; + PLINT init, ix, iy, color; + PLFLT width; PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale; PLINT ixmin = 0, ixmax = nx - 1, iymin = 0, iymax = ny - 1; PLINT clipped = 0, base_cont = 0, side = 0; @@ -1546,7 +1548,7 @@ //-------------------------------------------------------------------------- void -plP_gzback( PLINT **zbf, PLINT **zbc, PLFLT **zbt, PLINT **zbw ) +plP_gzback( PLINT **zbf, PLINT **zbc, PLFLT **zbt, PLFLT **zbw ) { *zbf = &zbflg; *zbc = &zbcol; Modified: trunk/src/plshade.c =================================================================== --- trunk/src/plshade.c 2013-04-30 04:52:56 UTC (rev 12311) +++ trunk/src/plshade.c 2013-05-01 01:11:41 UTC (rev 12312) @@ -30,8 +30,8 @@ // void plshade(PLFLT *a, PLINT nx, PLINT ny, char *defined, // PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, // PLFLT shade_min, PLFLT shade_max, -// PLINT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, -// PLINT max_color, PLINT max_width, void (*fill)(), PLINT +// PLINT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, +// PLINT max_color, PLFLT max_width, void (*fill)(), PLINT // rectangular, ...) // // arguments: @@ -68,11 +68,11 @@ // Defines the interval to be shaded. If shade_max <= shade_min, plshade // does nothing. // -// PLINT sh_cmap, PLFLT sh_color, PLINT sh_width +// PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width // // Defines color map, color map index, and width used by the fill pattern. // -// PLINT min_color, min_width, max_color, max_width +// PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width // // Defines pen color, width used by the boundary of shaded region. The min // values are used for the shade_min boundary, and the max values are used @@ -138,7 +138,7 @@ static int min_points, max_points, n_point; static int min_pts[4], max_pts[4]; static PLINT pen_col_min, pen_col_max; -static PLINT pen_wd_min, pen_wd_max; +static PLFLT pen_wd_min, pen_wd_max; static PLFLT int_val; // Function prototypes @@ -182,9 +182,9 @@ PLINT nx, PLINT ny, 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, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -204,8 +204,8 @@ void c_plshades( 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 ) @@ -235,15 +235,15 @@ plfshades( PLF2OPS zops, PLPointer zp, 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 ) { PLFLT shade_min, shade_max, shade_color; - PLINT i, init_color, init_width; - PLFLT color_min, color_max, color_range; + PLINT i, init_color; + PLFLT init_width, color_min, color_max, color_range; // Color range to use color_min = plsc->cmap1_min; @@ -321,9 +321,9 @@ void c_plshade( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), 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, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -349,9 +349,9 @@ void c_plshade1( const PLFLT *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), 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, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -387,9 +387,9 @@ PLINT nx, PLINT ny, 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, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -418,9 +418,9 @@ PLINT ( *defined )( PLFLT, PLFLT ), 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, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) @@ -474,17 +474,17 @@ PLINT nx, PLINT ny, 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, void ( *fill )( PLINT, const PLFLT *, const PLFLT * ), PLINT rectangular, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) { - PLINT init_width, n, slope = 0, ix, iy; + PLINT n, slope = 0, ix, iy; int count, i, j, nxny; PLFLT *a, *a0, *a1, dx, dy; - PLFLT x[8], y[8], xp[2], tx, ty; + PLFLT x[8], y[8], xp[2], tx, ty, init_width; int *c, *c0, *c1; (void) c2eval; // Cast to void to silence compiler warning about unused parameter This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |