From: <arj...@us...> - 2013-05-02 10:25:46
|
Revision: 12322 http://sourceforge.net/p/plplot/code/12322 Author: arjenmarkus Date: 2013-05-02 10:25:42 +0000 (Thu, 02 May 2013) Log Message: ----------- Propagate the changes in the API to Tcl and Tcl-related bindings. Enabling these bindings by default. Modified Paths: -------------- trunk/bindings/tcl/plapi.tpl trunk/bindings/tcl/tclAPI.c trunk/cmake/modules/tcl-related.cmake trunk/examples/tcl/x04.tcl trunk/examples/tcl/x15.tcl trunk/examples/tcl/x16.tcl trunk/examples/tcl/x21.tcl trunk/examples/tcl/x26.tcl trunk/examples/tcl/x33.tcl Modified: trunk/bindings/tcl/plapi.tpl =================================================================== --- trunk/bindings/tcl/plapi.tpl 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/bindings/tcl/plapi.tpl 2013-05-02 10:25:42 UTC (rev 12322) @@ -1061,7 +1061,7 @@ # Set pen width. pltclcmd plwidth void -width PLINT +width PLFLT # Set up world coordinates of the viewport boundaries (2d plots). Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/bindings/tcl/tclAPI.c 2013-05-02 10:25:42 UTC (rev 12322) @@ -2595,8 +2595,10 @@ PLFLT **z, **zused, **zwrapped; PLFLT xmin, xmax, ymin, ymax, sh_min, sh_max, sh_col; - PLINT sh_cmap = 1, sh_wid = 2; - PLINT min_col = 1, min_wid = 0, max_col = 0, max_wid = 0; + PLINT sh_cmap = 1; + PLFLT sh_wid = 2.; + PLINT min_col = 1, max_col = 0; + PLFLT min_wid = 0., max_wid = 0.; PLINT rect = 1; const char *pltrname = "pltr0"; void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ); @@ -2647,11 +2649,11 @@ sh_max = atof( argv[7] ); sh_cmap = atoi( argv[8] ); sh_col = atof( argv[9] ); - sh_wid = atoi( argv[10] ); + sh_wid = atof( argv[10] ); min_col = atoi( argv[11] ); min_wid = atoi( argv[12] ); max_col = atoi( argv[13] ); - max_wid = atoi( argv[14] ); + max_wid = atof( argv[14] ); rect = atoi( argv[15] ); argc -= 16, argv += 16; @@ -2916,7 +2918,8 @@ tclMatrix *matclevel = NULL; PLFLT **z, **zused, **zwrapped; PLFLT xmin, xmax, ymin, ymax; - PLINT fill_width = 0, cont_color = 0, cont_width = 0; + PLINT cont_color = 0; + PLFLT fill_width = 0., cont_width = 0.; PLINT rect = 1; const char *pltrname = "pltr0"; void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ); @@ -2974,9 +2977,9 @@ return TCL_ERROR; } - fill_width = atoi( argv[7] ); + fill_width = atof( argv[7] ); cont_color = atoi( argv[8] ); - cont_width = atoi( argv[9] ); + cont_width = atof( argv[9] ); rect = atoi( argv[10] ); argc -= 11, argv += 11; @@ -4134,7 +4137,8 @@ PLINT *text_colors; PLINT *box_colors, *box_patterns; PLFLT *box_scales; - PLINT *box_line_widths, *line_colors, *line_styles, *line_widths; + PLINT *line_colors, *line_styles; + PLFLT *box_line_widths, *line_widths; PLINT *symbol_colors, *symbol_numbers; PLFLT *symbol_scales; char **text; @@ -4175,10 +4179,10 @@ box_colors = argv_to_ints( interp, argv[18], &dummy ); box_patterns = argv_to_ints( interp, argv[19], &dummy ); box_scales = argv_to_doubles( interp, argv[20], &dummy ); - box_line_widths = argv_to_ints( interp, argv[21], &dummy ); + box_line_widths = argv_to_doubles( interp, argv[21], &dummy ); line_colors = argv_to_ints( interp, argv[22], &dummy ); line_styles = argv_to_ints( interp, argv[23], &dummy ); - line_widths = argv_to_ints( interp, argv[24], &dummy ); + line_widths = argv_to_doubles( interp, argv[24], &dummy ); symbol_colors = argv_to_ints( interp, argv[25], &dummy ); symbol_scales = argv_to_doubles( interp, argv[26], &dummy ); symbol_numbers = argv_to_ints( interp, argv[27], &dummy ); Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/cmake/modules/tcl-related.cmake 2013-05-02 10:25:42 UTC (rev 12322) @@ -26,10 +26,10 @@ option(ENABLE_tk "Enable Tk interface code" OFF) option(ENABLE_itk "Enable incr TK interface code" OFF) else(DEFAULT_NO_BINDINGS) - option(ENABLE_tcl "Enable Tcl bindings" OFF) - option(ENABLE_itcl "Enable incr Tcl interface code" OFF) - option(ENABLE_tk "Enable Tk interface code" OFF) - option(ENABLE_itk "Enable incr TK interface code" OFF) + option(ENABLE_tcl "Enable Tcl bindings" ON) + option(ENABLE_itcl "Enable incr Tcl interface code" ON) + option(ENABLE_tk "Enable Tk interface code" ON) + option(ENABLE_itk "Enable incr TK interface code" ON) endif(DEFAULT_NO_BINDINGS) # Depending on these above options and system resources may also determine Modified: trunk/examples/tcl/x04.tcl =================================================================== --- trunk/examples/tcl/x04.tcl 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/examples/tcl/x04.tcl 2013-05-02 10:25:42 UTC (rev 12322) @@ -79,7 +79,7 @@ set text [list Amplitude] set line_colors [list 2] set line_styles [list 1] - set line_widths [list 1] + set line_widths [list 1.0] # note from the above opt_array the first symbol (and box) indices # will not be used, but they have to be specified anyway! Modified: trunk/examples/tcl/x15.tcl =================================================================== --- trunk/examples/tcl/x15.tcl 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/examples/tcl/x15.tcl 2013-05-02 10:25:42 UTC (rev 12322) @@ -73,8 +73,8 @@ set sh_width 2 set min_color 9 set max_color 2 - set min_width 2 - set max_width 2 + set min_width 2. + set max_width 2. # N.B. this flag set to use cmap0 set sh_cmap 0 @@ -101,8 +101,8 @@ set sh_width 2 set min_color 0 set max_color 0 - set min_width 0 - set max_width 0 + set min_width 0. + set max_width 0. # N.B. this flag set to use cmap0 set sh_cmap 0 Modified: trunk/examples/tcl/x16.tcl =================================================================== --- trunk/examples/tcl/x16.tcl 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/examples/tcl/x16.tcl 2013-05-02 10:25:42 UTC (rev 12322) @@ -10,7 +10,7 @@ set nx 35 set ny 46 - set fill_width 2; set cont_color 0; set cont_width 0 + set fill_width 2.; set cont_color 0; set cont_width 0. matrix clevel f $ns matrix shedge f [expr $ns+1] Modified: trunk/examples/tcl/x21.tcl =================================================================== --- trunk/examples/tcl/x21.tcl 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/examples/tcl/x21.tcl 2013-05-02 10:25:42 UTC (rev 12322) @@ -209,7 +209,7 @@ $w cmd plenv0 $xmin $xmax $ymin $ymax 2 0 $w cmd plcol0 15 $w cmd pllab "X" "Y" [lindex $title $alg] - $w cmd plshades zg $xmin $xmax $ymin $ymax clev 1 0 1 1 "NULL" + $w cmd plshades zg $xmin $xmax $ymin $ymax clev 1. 0 1. 1 "NULL" $w cmd plcol0 2 } else { Modified: trunk/examples/tcl/x26.tcl =================================================================== --- trunk/examples/tcl/x26.tcl 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/examples/tcl/x26.tcl 2013-05-02 10:25:42 UTC (rev 12322) @@ -192,7 +192,7 @@ set text_colors [list 2] set line_colors [list 2] set line_styles [list 1] - set line_widths [list 1] + set line_widths [list 1.] # note from the above opt_array the first symbol (and box) indices # will not be used, but they have to be specified anyway! # (make sure the values are reasonable) @@ -202,7 +202,7 @@ lappend text_colors 3 lappend line_colors 3 lappend line_styles 1 - lappend line_widths 1 + lappend line_widths 1. set symbol_colors [list 0 3] set symbol_scales [list 0.0 1.] set symbol_numbers [list 0 4] Modified: trunk/examples/tcl/x33.tcl =================================================================== --- trunk/examples/tcl/x33.tcl 2013-05-02 01:24:58 UTC (rev 12321) +++ trunk/examples/tcl/x33.tcl 2013-05-02 10:25:42 UTC (rev 12322) @@ -111,7 +111,7 @@ set opt_base [expr {$::PLPLOT::PL_LEGEND_BACKGROUND | $::PLPLOT::PL_LEGEND_BOUNDING_BOX}] set opt_array [list [expr {$::PLPLOT::PL_LEGEND_LINE | $::PLPLOT::PL_LEGEND_SYMBOL}]] set line_styles [list 1] - set line_widths [list 1] + set line_widths [list 1.] set symbol_scales [list 1.] set symbol_numbers [list 4] set symbols [list "*"] @@ -165,7 +165,7 @@ for {set k 0} {$k < $nlegend} {incr k} { lappend opt_array [expr {$::PLPLOT::PL_LEGEND_LINE | $::PLPLOT::PL_LEGEND_SYMBOL}] lappend line_styles 1 - lappend line_widths 1 + lappend line_widths 1. lappend symbol_scales 1. lappend symbol_numbers 2 lappend symbols "*" @@ -314,7 +314,7 @@ for {set k 0} {$k < $nlegend} {incr k} { lappend opt_array [expr {$::PLPLOT::PL_LEGEND_LINE | $::PLPLOT::PL_LEGEND_SYMBOL}] lappend line_styles 1 - lappend line_widths 1 + lappend line_widths 1. lappend symbol_scales 1. lappend symbol_numbers 2 lappend symbols "*" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |