From: <and...@us...> - 2013-05-10 19:01:19
|
Revision: 12336 http://sourceforge.net/p/plplot/code/12336 Author: andrewross Date: 2013-05-10 19:01:13 +0000 (Fri, 10 May 2013) Log Message: ----------- Update C++ bindings for changes to pllegend line width arguments from PLINT to PLFLT. Modified Paths: -------------- trunk/bindings/c++/plstream.cc trunk/bindings/c++/plstream.h trunk/cmake/modules/c++.cmake trunk/examples/c++/x04.cc trunk/examples/c++/x26.cc trunk/examples/c++/x33.cc Modified: trunk/bindings/c++/plstream.cc =================================================================== --- trunk/bindings/c++/plstream.cc 2013-05-04 17:18:54 UTC (rev 12335) +++ trunk/bindings/c++/plstream.cc 2013-05-10 19:01:13 UTC (rev 12336) @@ -995,11 +995,11 @@ PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, PLFLT text_justification, - const PLINT *text_colors, const char **text, + 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 **symbols ) { Modified: trunk/bindings/c++/plstream.h =================================================================== --- trunk/bindings/c++/plstream.h 2013-05-04 17:18:54 UTC (rev 12335) +++ trunk/bindings/c++/plstream.h 2013-05-10 19:01:13 UTC (rev 12336) @@ -434,11 +434,11 @@ PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, PLFLT text_justification, - const PLINT *text_colors, const char **text, + 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 **symbols ); Modified: trunk/cmake/modules/c++.cmake =================================================================== --- trunk/cmake/modules/c++.cmake 2013-05-04 17:18:54 UTC (rev 12335) +++ trunk/cmake/modules/c++.cmake 2013-05-10 19:01:13 UTC (rev 12336) @@ -25,7 +25,7 @@ if(DEFAULT_NO_BINDINGS) OPTION(ENABLE_cxx "Enable C++ bindings" OFF) else(DEFAULT_NO_BINDINGS) - OPTION(ENABLE_cxx "Enable C++ bindings" OFF) + OPTION(ENABLE_cxx "Enable C++ bindings" ON) endif(DEFAULT_NO_BINDINGS) if(NOT PLPLOT_CXX_COMPILER_WORKS) Modified: trunk/examples/c++/x04.cc =================================================================== --- trunk/examples/c++/x04.cc 2013-05-04 17:18:54 UTC (rev 12335) +++ trunk/examples/c++/x04.cc 2013-05-10 19:01:13 UTC (rev 12336) @@ -80,7 +80,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; @@ -152,7 +152,7 @@ text[0] = "Amplitude"; line_colors[0] = 2; line_styles[0] = 1; - line_widths[0] = 1; + line_widths[0] = 1.0; // note from the above opt_array the first symbol (and box) indices // do not have to be specified @@ -162,7 +162,7 @@ text[1] = "Phase shift"; line_colors[1] = 3; line_styles[1] = 1; - line_widths[1] = 1; + line_widths[1] = 1.0; symbol_colors[1] = 3; symbol_scales[1] = 1.; symbol_numbers[1] = 4; @@ -177,7 +177,7 @@ 1, 1, 0, 0, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); Modified: trunk/examples/c++/x26.cc =================================================================== --- trunk/examples/c++/x26.cc 2013-05-04 17:18:54 UTC (rev 12335) +++ trunk/examples/c++/x26.cc 2013-05-10 19:01:13 UTC (rev 12336) @@ -163,7 +163,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]; @@ -234,7 +234,7 @@ text_colors[0] = 2; line_colors[0] = 2; line_styles[0] = 1; - line_widths[0] = 1; + line_widths[0] = 1.0; // note from the above opt_array the first symbol (and box) indices // do not have to be specified @@ -243,7 +243,7 @@ text_colors[1] = 3; line_colors[1] = 3; line_styles[1] = 1; - line_widths[1] = 1; + line_widths[1] = 1.0; symbol_colors[1] = 3; symbol_scales[1] = 1.; symbol_numbers[1] = 4; @@ -258,7 +258,7 @@ 1, 1, 0, 0, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) legend_text, + 1., text_colors, (const char * const *) legend_text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, symbol_colors, symbol_scales, symbol_numbers, Modified: trunk/examples/c++/x33.cc =================================================================== --- trunk/examples/c++/x33.cc 2013-05-04 17:18:54 UTC (rev 12335) +++ trunk/examples/c++/x33.cc 2013-05-10 19:01:13 UTC (rev 12336) @@ -259,10 +259,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]; @@ -298,7 +298,7 @@ opt_base = PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX; opt_array[0] = PL_LEGEND_LINE | PL_LEGEND_SYMBOL; line_styles[0] = 1; - line_widths[0] = 1; + line_widths[0] = 1.0; symbol_scales[0] = 1.; symbol_numbers[0] = 4; symbols[0] = "*"; @@ -344,7 +344,7 @@ { opt_array[k] = PL_LEGEND_LINE | PL_LEGEND_SYMBOL; line_styles[k] = 1; - line_widths[k] = 1; + line_widths[k] = 1.0; symbol_scales[k] = 1.; symbol_numbers[k] = 2; symbols[k] = "*"; @@ -484,7 +484,7 @@ { opt_array[k] = PL_LEGEND_LINE | PL_LEGEND_SYMBOL; line_styles[k] = 1; - line_widths[k] = 1; + line_widths[k] = 1.0; symbol_scales[k] = 1.; symbol_numbers[k] = 2; symbols[k] = "*"; @@ -553,14 +553,14 @@ box_colors[1] = 2; box_patterns[1] = 0; box_scales[1] = 0.8; - box_line_widths[1] = 1; + box_line_widths[1] = 1.0; opt_array[2] = PL_LEGEND_LINE; sprintf( text[2], "%s", "Line" ); text_colors[2] = 3; line_colors[2] = 3; line_styles[2] = 1; - line_widths[2] = 1; + line_widths[2] = 1.0; opt_array[3] = PL_LEGEND_SYMBOL; sprintf( text[3], "%s", "Symbol" ); @@ -575,7 +575,7 @@ text_colors[4] = 5; line_colors[4] = 5; line_styles[4] = 1; - line_widths[4] = 1; + line_widths[4] = 1.0; symbol_colors[4] = 5; symbol_scales[4] = text_scale; symbol_numbers[4] = 4; @@ -652,7 +652,7 @@ box_colors[i] = i + 1; box_patterns[i] = 0; box_scales[i] = 0.8; - box_line_widths[i] = 1; + box_line_widths[i] = 1.0; } opt = opt_base; @@ -680,7 +680,7 @@ box_colors[i] = 2; box_patterns[i] = i; box_scales[i] = 0.8; - box_line_widths[i] = 1; + box_line_widths[i] = 1.0; } opt = opt_base; @@ -705,7 +705,7 @@ box_colors[i] = 2; box_patterns[i] = 3; box_scales[i] = 0.8; - box_line_widths[i] = i + 1; + box_line_widths[i] = i + 1.0; } opt = opt_base; @@ -729,7 +729,7 @@ text_colors[i] = i + 1; line_colors[i] = i + 1; line_styles[i] = 1; - line_widths[i] = 1; + line_widths[i] = 1.0; } opt = opt_base; @@ -756,7 +756,7 @@ text_colors[i] = 2; line_colors[i] = 2; line_styles[i] = i + 1; - line_widths[i] = 1; + line_widths[i] = 1.0; } opt = opt_base; @@ -780,7 +780,7 @@ text_colors[i] = 2; line_colors[i] = 2; line_styles[i] = 1; - line_widths[i] = i + 1; + line_widths[i] = i + 1.0; } opt = opt_base; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |