From: <ai...@us...> - 2013-05-02 22:44:54
|
Revision: 12329 http://sourceforge.net/p/plplot/code/12329 Author: airwin Date: 2013-05-02 22:44:50 +0000 (Thu, 02 May 2013) Log Message: ----------- Adjust java bindings and examples for backwards-incompatible C API change from PLINT to PLFLT type for line-width related arguments of plshade* and pllegend. Modified Paths: -------------- trunk/bindings/java/PLStream.java trunk/cmake/modules/java.cmake trunk/examples/java/x04.java trunk/examples/java/x15.java trunk/examples/java/x16.java trunk/examples/java/x21.java trunk/examples/java/x26.java trunk/examples/java/x33.java Modified: trunk/bindings/java/PLStream.java =================================================================== --- trunk/bindings/java/PLStream.java 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/bindings/java/PLStream.java 2013-05-02 22:44:50 UTC (rev 12329) @@ -536,9 +536,9 @@ double text_spacing, double text_justification, int[] text_colors, String[] text, int[] box_colors, int[] box_patterns, - double[] box_scales, int[] box_line_widths, + double[] box_scales, double[] box_line_widths, int[] line_colors, int[] line_styles, - int[] line_widths, + double[] line_widths, int[] symbol_colors, double[] symbol_scales, int[] symbol_numbers, String[] symbols ) { @@ -922,8 +922,8 @@ } public void shades( double[][] a, double xmin, double xmax, double ymin, - double ymax, double[] clevel, int fill_width, int cont_color, - int cont_width, boolean rectangular, + double ymax, double[] clevel, double fill_width, int cont_color, + double cont_width, boolean rectangular, double[][] pltr, double[][] OBJECT_DATA ) { if ( set_stream() == -1 ) return; @@ -933,8 +933,8 @@ public void shade( double[][] a, double left, double right, double bottom, double top, double shade_min, double shade_max, int sh_cmap, - double sh_color, int sh_width, int min_color, int min_width, - int max_color, int max_width, boolean rectangular, + double sh_color, double sh_width, int min_color, double min_width, + int max_color, double max_width, boolean rectangular, double[][] pltr, double[][] OBJECT_DATA ) { if ( set_stream() == -1 ) return; @@ -1259,8 +1259,8 @@ } public void shades( double[][] a, double xmin, double xmax, double ymin, - double ymax, double[] clevel, int fill_width, int cont_color, - int cont_width, int rectangular, + double ymax, double[] clevel, double fill_width, int cont_color, + double cont_width, int rectangular, double[][] pltr, double[][] OBJECT_DATA ) { if ( set_stream() == -1 ) return; @@ -1270,8 +1270,8 @@ public void shade( double[][] a, double left, double right, double bottom, double top, double shade_min, double shade_max, int sh_cmap, - double sh_color, int sh_width, int min_color, int min_width, - int max_color, int max_width, int rectangular, + double sh_color, double sh_width, int min_color, double min_width, + int max_color, double max_width, int rectangular, double[][] pltr, double[][] OBJECT_DATA ) { if ( set_stream() == -1 ) return; Modified: trunk/cmake/modules/java.cmake =================================================================== --- trunk/cmake/modules/java.cmake 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/cmake/modules/java.cmake 2013-05-02 22:44:50 UTC (rev 12329) @@ -25,7 +25,7 @@ if(DEFAULT_NO_BINDINGS) option(ENABLE_java "Enable Java bindings" OFF) else(DEFAULT_NO_BINDINGS) - option(ENABLE_java "Enable Java bindings" OFF) + option(ENABLE_java "Enable Java bindings" ON) endif(DEFAULT_NO_BINDINGS) if(ENABLE_java AND NOT BUILD_SHARED_LIBS) Modified: trunk/examples/java/x04.java =================================================================== --- trunk/examples/java/x04.java 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/examples/java/x04.java 2013-05-02 22:44:50 UTC (rev 12329) @@ -77,7 +77,7 @@ int[] text_colors; int[] line_colors; int[] line_styles; - int[] line_widths; + double[] line_widths; int[] symbol_numbers; int[] symbol_colors; double[] symbol_scales; @@ -150,7 +150,7 @@ text_colors = new int[nlegend]; line_colors = new int[nlegend]; line_styles = new int[nlegend]; - line_widths = new int[nlegend]; + line_widths = new double[nlegend]; symbol_numbers = new int[nlegend]; symbol_colors = new int[nlegend]; symbol_scales = new double[nlegend]; @@ -162,7 +162,7 @@ text[0] = "Amplitude"; line_colors[0] = 2; line_styles[0] = 1; - line_widths[0] = 1; + line_widths[0] = 1.; // note from the above opt_array the first symbol (and box) indices // do not have to be specified EXCEPT for symbols. // Although this is unused, it can't be undefined as the String @@ -177,7 +177,7 @@ text[1] = "Phase shift"; line_colors[1] = 3; line_styles[1] = 1; - line_widths[1] = 1; + line_widths[1] = 1.; symbol_colors[1] = 3; symbol_scales[1] = 1.; symbol_numbers[1] = 4; Modified: trunk/examples/java/x15.java =================================================================== --- trunk/examples/java/x15.java 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/examples/java/x15.java 2013-05-02 22:44:50 UTC (rev 12329) @@ -126,8 +126,9 @@ void plot1( double[][] xg0, double[][] yg0, double[][] z, double zmin, double zmax ) { double 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; + int min_color = 0, max_color = 0; + double sh_width, min_width = 0., max_width = 0.; pls.adv( 0 ); pls.vpor( 0.1, 0.9, 0.1, 0.9 ); @@ -138,11 +139,11 @@ shade_min = zmin + ( zmax - zmin ) * 0.4; shade_max = zmin + ( zmax - zmin ) * 0.6; sh_color = 7; - sh_width = 2; + sh_width = 2.; min_color = 9; max_color = 2; - min_width = 2; - max_width = 2; + min_width = 2.; + max_width = 2.; pls.psty( 8 ); @@ -164,8 +165,9 @@ void plot2( double[][] xg0, double[][] yg0, double[][] z, double zmin, double zmax ) { double 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; + int min_color = 0, max_color = 0; + double sh_width, min_width = 0., max_width = 0.; int i; int[][] inc = { { 450 }, { -450 }, { 0 }, { 900 }, { 300 }, {450, -450 }, { 0, 900 }, { 0, 450 }, @@ -173,7 +175,7 @@ int[][] del = { { 2000 }, { 2000 }, { 2000 }, { 2000 }, { 2000 }, {2000, 2000 }, { 2000, 2000 }, { 2000, 2000 }, {4000, 4000 }, { 4000, 2000 } }; - sh_width = 2; + sh_width = 2.; pls.adv( 0 ); pls.vpor( 0.1, 0.9, 0.1, 0.9 ); Modified: trunk/examples/java/x16.java =================================================================== --- trunk/examples/java/x16.java 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/examples/java/x16.java 2013-05-02 22:44:50 UTC (rev 12329) @@ -88,7 +88,8 @@ double[][] yg2 = new double[XPTS][YPTS]; double[] clevel = new double[NSHADES]; double[] shedge = new double[NSHADES + 1]; - final int fill_width = 2, cont_color = 0, cont_width = 0; + final int cont_color = 0; + final double fill_width = 2., cont_width = 0.; // Parse and process command line arguments. pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM ); @@ -242,7 +243,7 @@ pls.shades( z, -1., 1., -1., 1., shedge, fill_width, - 2, 3, + 2, 3., false, xg2, yg2 ); pls.col0( 1 ); Modified: trunk/examples/java/x21.java =================================================================== --- trunk/examples/java/x21.java 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/examples/java/x21.java 2013-05-02 22:44:50 UTC (rev 12329) @@ -305,7 +305,7 @@ pls.col0( 15 ); pls.lab( "X", "Y", title[alg - 1] ); pls.shades( zg, xm, xM, ym, yM, - clev, 1, 0, 1, true, xg0, yg0 ); + clev, 1., 0, 1., true, xg0, yg0 ); pls.col0( 2 ); } else Modified: trunk/examples/java/x26.java =================================================================== --- trunk/examples/java/x26.java 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/examples/java/x26.java 2013-05-02 22:44:50 UTC (rev 12329) @@ -154,7 +154,7 @@ int[] text_colors = new int[2]; int[] line_colors = new int[2]; int[] line_styles = new int[2]; - int[] line_widths = new int[2]; + double[] line_widths = new double[2]; int[] symbol_numbers = new int[2]; int[] symbol_colors = new int[2]; double[] symbol_scales = new double[2]; @@ -226,7 +226,7 @@ text_colors[0] = 2; line_colors[0] = 2; line_styles[0] = 1; - line_widths[0] = 1; + line_widths[0] = 1.; // note from the above opt_array the first symbol (and box) indices // do not have to be specified EXCEPT for symbols. // Although this is unused, it can't be undefined as the String @@ -238,7 +238,7 @@ text_colors[1] = 3; line_colors[1] = 3; line_styles[1] = 1; - line_widths[1] = 1; + line_widths[1] = 1.; symbol_colors[1] = 3; symbol_scales[1] = 1.; symbol_numbers[1] = 4; Modified: trunk/examples/java/x33.java =================================================================== --- trunk/examples/java/x33.java 2013-05-02 21:56:16 UTC (rev 12328) +++ trunk/examples/java/x33.java 2013-05-02 22:44:50 UTC (rev 12329) @@ -219,10 +219,10 @@ int[] box_colors; int[] box_patterns; double[] box_scales; - int[] box_line_widths; + double[] box_line_widths; int[] line_colors; int[] line_styles; - int[] line_widths; + double[] line_widths; int[] symbol_numbers; int[] symbol_colors; double[] symbol_scales; @@ -274,7 +274,7 @@ text_colors = new int[nlegend]; line_colors = new int[nlegend]; line_styles = new int[nlegend]; - line_widths = new int[nlegend]; + line_widths = new double[nlegend]; symbol_numbers = new int[nlegend]; symbol_colors = new int[nlegend]; symbol_scales = new double[nlegend]; @@ -285,7 +285,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.; symbol_scales[0] = 1.; symbol_numbers[0] = 4; symbols[0] = "*"; @@ -327,11 +327,11 @@ text_colors = new int[nlegend]; line_colors = new int[nlegend]; line_styles = new int[nlegend]; - line_widths = new int[nlegend]; + line_widths = new double[nlegend]; box_colors = new int[nlegend]; box_patterns = new int[nlegend]; box_scales = new double[nlegend]; - box_line_widths = new int[nlegend]; + box_line_widths = new double[nlegend]; symbol_numbers = new int[nlegend]; symbol_colors = new int[nlegend]; symbol_scales = new double[nlegend]; @@ -345,7 +345,7 @@ { opt_array[k] = PL_LEGEND_LINE | PL_LEGEND_SYMBOL; line_styles[k] = 1; - line_widths[k] = 1; + line_widths[k] = 1.; symbol_scales[k] = 1.; symbol_numbers[k] = 2; symbols[k] = "*"; @@ -483,11 +483,11 @@ text_colors = new int[nlegend]; line_colors = new int[nlegend]; line_styles = new int[nlegend]; - line_widths = new int[nlegend]; + line_widths = new double[nlegend]; box_colors = new int[nlegend]; box_patterns = new int[nlegend]; box_scales = new double[nlegend]; - box_line_widths = new int[nlegend]; + box_line_widths = new double[nlegend]; symbol_numbers = new int[nlegend]; symbol_colors = new int[nlegend]; symbol_scales = new double[nlegend]; @@ -500,7 +500,7 @@ { opt_array[k] = PL_LEGEND_LINE | PL_LEGEND_SYMBOL; line_styles[k] = 1; - line_widths[k] = 1; + line_widths[k] = 1.; symbol_scales[k] = 1.; symbol_numbers[k] = 2; symbols[k] = "*"; @@ -557,11 +557,11 @@ text_colors = new int[nlegend]; line_colors = new int[nlegend]; line_styles = new int[nlegend]; - line_widths = new int[nlegend]; + line_widths = new double[nlegend]; box_colors = new int[nlegend]; box_patterns = new int[nlegend]; box_scales = new double[nlegend]; - box_line_widths = new int[nlegend]; + box_line_widths = new double[nlegend]; symbol_numbers = new int[nlegend]; symbol_colors = new int[nlegend]; symbol_scales = new double[nlegend]; @@ -588,14 +588,14 @@ box_colors[1] = 2; box_patterns[1] = 0; box_scales[1] = 0.8; - box_line_widths[1] = 1; + box_line_widths[1] = 1.; opt_array[2] = PL_LEGEND_LINE; text[2] = "Line"; text_colors[2] = 3; line_colors[2] = 3; line_styles[2] = 1; - line_widths[2] = 1; + line_widths[2] = 1.; opt_array[3] = PL_LEGEND_SYMBOL; text[3] = "Symbol"; @@ -610,7 +610,7 @@ text_colors[4] = 5; line_colors[4] = 5; line_styles[4] = 1; - line_widths[4] = 1; + line_widths[4] = 1.; symbol_colors[4] = 5; symbol_scales[4] = text_scale; symbol_numbers[4] = 4; @@ -687,7 +687,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.; } opt = opt_base; @@ -715,7 +715,7 @@ box_colors[i] = 2; box_patterns[i] = i; box_scales[i] = 0.8; - box_line_widths[i] = 1; + box_line_widths[i] = 1.; } opt = opt_base; @@ -764,7 +764,7 @@ text_colors[i] = i + 1; line_colors[i] = i + 1; line_styles[i] = 1; - line_widths[i] = 1; + line_widths[i] = 1.; } opt = opt_base; @@ -791,7 +791,7 @@ text_colors[i] = 2; line_colors[i] = 2; line_styles[i] = i + 1; - line_widths[i] = 1; + line_widths[i] = 1.; } opt = opt_base; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |