From: <ai...@us...> - 2012-08-13 23:17:40
|
Revision: 12212 http://plplot.svn.sourceforge.net/plplot/?rev=12212&view=rev Author: airwin Date: 2012-08-13 23:17:31 +0000 (Mon, 13 Aug 2012) Log Message: ----------- rev ==> alt_hue_path changes for our core C library and bindings. This actually constitutes a minor API change to the Ada bindings so do the necessary change to the Ada examples as well. Modified Paths: -------------- trunk/bindings/ada/plplot.adb trunk/bindings/ada/plplot.ads trunk/bindings/ada/plplot_thin.ads trunk/bindings/ada/plplot_traditional.adb trunk/bindings/ada/plplot_traditional.ads trunk/bindings/c++/plstream.cc trunk/bindings/c++/plstream.h trunk/bindings/d/plplot.d trunk/bindings/f77/scstubs.c trunk/bindings/f95/scstubs.c trunk/bindings/f95/sfstubsf95.f90 trunk/bindings/gnome2/lib/plplotcanvas.c trunk/bindings/java/PLStream.java trunk/bindings/ocaml/plplot.ml trunk/bindings/ocaml/plplot.mli trunk/bindings/ocaml/plplot_h trunk/bindings/ocaml/plplot_h.inc trunk/bindings/ocaml/touchup.ml trunk/bindings/octave/plplot_octave.h.in trunk/bindings/python/plplot.py.Numeric trunk/bindings/python/plplot.py.numpy trunk/bindings/tcl/plapi.tpl trunk/examples/ada/x08a.adb trunk/examples/ada/x11a.adb trunk/examples/ada/x12a.adb trunk/examples/ada/x15a.adb trunk/examples/ada/x20a.adb trunk/examples/ada/x21a.adb trunk/examples/ada/x30a.adb trunk/examples/ada/xthick08a.adb trunk/examples/ada/xthick11a.adb trunk/examples/ada/xthick12a.adb trunk/examples/ada/xthick15a.adb trunk/examples/ada/xthick20a.adb trunk/examples/ada/xthick21a.adb trunk/examples/ada/xthick30a.adb trunk/include/plplot.h trunk/include/plplotcanvas.h trunk/src/plctrl.c trunk/sys/win-tk/tclgen.c Modified: trunk/bindings/ada/plplot.adb =================================================================== --- trunk/bindings/ada/plplot.adb 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ada/plplot.adb 2012-08-13 23:17:31 UTC (rev 12212) @@ -826,8 +826,8 @@ Red_4, Green_4, Blue_4 : Real_Vector (0..3); -- define 4 Hue_3, Lightness_3, Saturation_3 : Real_Vector (0..2); -- define 3 Hue_4, Lightness_4, Saturation_4 : Real_Vector (0..3); -- define 4 - Reverse_Hue_3 : Boolean_Array_1D (0..2); - Reverse_Hue_4 : Boolean_Array_1D (0..3); + Alt_Hue_Path_3 : Boolean_Array_1D (0..2); + Alt_Hue_Path_4 : Boolean_Array_1D (0..3); begin Set_Number_Of_Colors_In_Color_Map_1(256); @@ -899,10 +899,10 @@ Saturation_3(0) := 0.0; Saturation_3(1) := 0.0; Saturation_3(2) := 0.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; when Blue_Green_Red => -- This appears to be the PLplot default color theme. begin @@ -915,10 +915,10 @@ Red_3(0) := 0.0; Red_3(1) := 0.0; Red_3(2) := 1.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3); end; when Red_Green_Blue => begin @@ -931,10 +931,10 @@ Red_3(0) := 1.0; Red_3(1) := 0.0; Red_3(2) := 0.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + Set_Color_Map_1_Piecewise(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3); end; when Red_Cyan_Blue => begin @@ -947,10 +947,10 @@ Lightness_3(0) := 0.5; Lightness_3(1) := 0.5; Lightness_3(2) := 0.5; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; when Blue_Black_Red => begin @@ -966,11 +966,11 @@ Lightness_4(1) := 0.0; Lightness_4(2) := 0.0; Lightness_4(3) := 0.5; - Reverse_Hue_4(0) := False; - Reverse_Hue_4(1) := False; - Reverse_Hue_4(2) := False; - Reverse_Hue_4(3) := False; - Set_Color_Map_1_Piecewise(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Reverse_Hue_4); + Alt_Hue_Path_4(0) := False; + Alt_Hue_Path_4(1) := False; + Alt_Hue_Path_4(2) := False; + Alt_Hue_Path_4(3) := False; + Set_Color_Map_1_Piecewise(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Alt_Hue_Path_4); end; when Red_Blue_Green => begin @@ -983,10 +983,10 @@ Saturation_3(0) := 1.0; Saturation_3(1) := 1.0; Saturation_3(2) := 1.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; when Red_Yellow => begin @@ -999,10 +999,10 @@ Saturation_3(0) := 1.0; Saturation_3(1) := 1.0; Saturation_3(2) := 1.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + Set_Color_Map_1_Piecewise(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; end case; end Quick_Set_Color_Map_1; @@ -2378,15 +2378,14 @@ -- Note: Hue is 0.0 .. 360.0. L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D) is -- False means red<->green<->blue<->red, True reverses - + Alt_Hue_Path : Boolean_Array_1D) is -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. PL_Color_Model : PLBOOL; - PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); + PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range); begin -- Check for consistent array lengths. if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or - Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length then Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); end if; @@ -2397,23 +2396,23 @@ PL_Color_Model := PLfalse; end if; - for i in Reverse_Hue'range loop - if Reverse_Hue(i) then - PL_Reverse_Hue(i) := PLtrue; + for i in Alt_Hue_Path'range loop + if Alt_Hue_Path(i) then + PL_Alt_Hue_Path(i) := PLtrue; else - PL_Reverse_Hue(i) := PLfalse; + PL_Alt_Hue_Path(i) := PLfalse; end if; end loop; - plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Reverse_Hue); + plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Alt_Hue_Path); end Set_Color_Map_1_Piecewise; - -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (non-)reversal of - -- the traversed hue range. This is an Ada-like way of doing what is described + -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (alt_hue_path false) interpolation. + -- This is an Ada-like way of doing what is described -- in the PLplot documentation when a C user passes a null pointer as the - -- final argument instead of an array of booleans to indicate hue reversal. - -- plscmap1l + -- final argument instead of an array of booleans to indicate which + -- of the two hue interpolation paths to take. procedure Set_Color_Map_1_Piecewise (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -2421,20 +2420,20 @@ -- Note: Hue is 0.0 .. 360.0. L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type) is + Alt_Hue_Path : Alt_Hue_Path_Type) is - Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range); begin - if Reverse_Hue = Reverse_Hue_All then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := True; + if Alt_Hue_Path = Alt_Hue_Path_All then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := True; end loop; - elsif Reverse_Hue = Reverse_Hue_None then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := False; + elsif Alt_Hue_Path = Alt_Hue_Path_None then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := False; end loop; end if; - Set_Color_Map_1_Piecewise(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Reverse_Hue_Array); + Set_Color_Map_1_Piecewise(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alt_Hue_Path_Array); end Set_Color_Map_1_Piecewise; @@ -2449,15 +2448,14 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D) is -- False means red<->green<->blue<->red, True reverses - + Alt_Hue_Path : Boolean_Array_1D) is -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. PL_Color_Model : PLBOOL; - PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); + PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range); begin -- Check for consistent array lengths. if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or - Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length then Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); end if; @@ -2468,23 +2466,23 @@ PL_Color_Model := PLfalse; end if; - for i in Reverse_Hue'range loop - if Reverse_Hue(i) then - PL_Reverse_Hue(i) := PLtrue; + for i in Alt_Hue_Path'range loop + if Alt_Hue_Path(i) then + PL_Alt_Hue_Path(i) := PLtrue; else - PL_Reverse_Hue(i) := PLfalse; + PL_Alt_Hue_Path(i) := PLfalse; end if; end loop; - plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Reverse_Hue); + plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Alt_Hue_Path); end Set_Color_Map_1_Piecewise_And_Alpha; - -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (non-)reversal of - -- the traversed hue range. This is an Ada-like way of doing what is described + -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (alt_hue_path false) interpolation. + -- This is an Ada-like way of doing what is described -- in the PLplot documentation when a C user passes a null pointer as the - -- final argument instead of an array of booleans to indicate hue reversal. - -- plscmap1la + -- final argument instead of an array of booleans to indicate which + -- of the two hue interpolation paths to take. procedure Set_Color_Map_1_Piecewise_And_Alpha (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -2492,20 +2490,20 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type) is + Alt_Hue_Path : Alt_Hue_Path_Type) is - Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range); begin - if Reverse_Hue = Reverse_Hue_All then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := True; + if Alt_Hue_Path = Alt_Hue_Path_All then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := True; end loop; - elsif Reverse_Hue = Reverse_Hue_None then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := False; + elsif Alt_Hue_Path = Alt_Hue_Path_None then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := False; end loop; end if; - Set_Color_Map_1_Piecewise_And_Alpha(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Reverse_Hue_Array); + Set_Color_Map_1_Piecewise_And_Alpha(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Alt_Hue_Path_Array); end Set_Color_Map_1_Piecewise_And_Alpha; Modified: trunk/bindings/ada/plplot.ads =================================================================== --- trunk/bindings/ada/plplot.ads 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ada/plplot.ads 2012-08-13 23:17:31 UTC (rev 12212) @@ -728,7 +728,7 @@ type Color_Themes_For_Map_1_Type is (Gray, Blue_Green_Red, Red_Green_Blue, Red_Cyan_Blue, Blue_Black_Red, Red_Blue_Green, Red_Yellow); - type Reverse_Hue_Type is (Reverse_Hue_None, Reverse_Hue_All); + type Alt_Hue_Path_Type is (Alt_Hue_Path_None, Alt_Hue_Path_All); -- Quick application of pre-fabricated color schemes to color map 1. @@ -1574,13 +1574,13 @@ H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + Alt_Hue_Path : Boolean_Array_1D); -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. - - -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (non-)reversal of - -- the traversed hue range. This is an Ada-like way of doing what is described + -- Overloaded version of Set_Color_Map_1_Piecewise which allows simplified (alt_hue_path false) interpolation. + -- This is an Ada-like way of doing what is described -- in the PLplot documentation when a C user passes a null pointer as the - -- final argument instead of an array of booleans to indicate hue reversal. + -- final argument instead of an array of booleans to indicate which + -- of the two hue interpolation paths to take. procedure Set_Color_Map_1_Piecewise (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -1588,7 +1588,7 @@ -- Note: Hue is 0.0 .. 360.0. L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type); + Alt_Hue_Path : Alt_Hue_Path_Type); -- Set color map 1 colors using a piece-wise linear relationship between @@ -1602,13 +1602,14 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + Alt_Hue_Path : Boolean_Array_1D); -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. - -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (non-)reversal of - -- the traversed hue range. This is an Ada-like way of doing what is described + -- Overloaded version of Set_Color_Map_1_Piecewise_And_Alpha which allows simplified (alt_hue_path false) interpolation. + -- This is an Ada-like way of doing what is described -- in the PLplot documentation when a C user passes a null pointer as the - -- final argument instead of an array of booleans to indicate hue reversal. + -- final argument instead of an array of booleans to indicate which + -- of the two hue interpolation paths to take. procedure Set_Color_Map_1_Piecewise_And_Alpha (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -1616,7 +1617,7 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type); + Alt_Hue_Path : Alt_Hue_Path_Type); -- Set number of colors in cmap 1 Modified: trunk/bindings/ada/plplot_thin.ads =================================================================== --- trunk/bindings/ada/plplot_thin.ads 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ada/plplot_thin.ads 2012-08-13 23:17:31 UTC (rev 12212) @@ -28,7 +28,7 @@ -- I hope that this is wrong and that they are really PLINTs like the API says. -- I converted these as a : out PLINT. These are the only *-ed quantities that I set to "outs". --- I made the final arg in plscmap1l, rev, an array of PLBOOLs, not an in out +-- I made the final arg in plscmap1l, alt_hue_path, an array of PLBOOLs, not an in out -- parameter; impossible to tell from C syntax which is intended, but I think -- this is right. @@ -1373,7 +1373,7 @@ procedure plscmap1l(itype : PLINT; npts : PLINT; intensity : PL_Float_Array; coord1 : PL_Float_Array; coord2 : PL_Float_Array; coord3 : PL_Float_Array; - rev : PL_Bool_Array); + alt_hue_path : PL_Bool_Array); pragma Import(C, plscmap1l, "c_plscmap1l"); @@ -1384,7 +1384,7 @@ procedure plscmap1la(itype : PLINT; npts : PLINT; intensity, coord1, coord2, coord3, a : PL_Float_Array; - rev : PL_Bool_Array); + alt_hue_path : PL_Bool_Array); pragma Import(C, plscmap1la, "c_plscmap1la"); Modified: trunk/bindings/ada/plplot_traditional.adb =================================================================== --- trunk/bindings/ada/plplot_traditional.adb 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ada/plplot_traditional.adb 2012-08-13 23:17:31 UTC (rev 12212) @@ -827,8 +827,8 @@ Red_4, Green_4, Blue_4 : Real_Vector (0..3); -- define 4 Hue_3, Lightness_3, Saturation_3 : Real_Vector (0..2); -- define 3 Hue_4, Lightness_4, Saturation_4 : Real_Vector (0..3); -- define 4 - Reverse_Hue_3 : Boolean_Array_1D (0..2); - Reverse_Hue_4 : Boolean_Array_1D (0..3); + Alt_Hue_Path_3 : Boolean_Array_1D (0..2); + Alt_Hue_Path_4 : Boolean_Array_1D (0..3); begin plscmap1n(256); @@ -900,10 +900,10 @@ Saturation_3(0) := 0.0; Saturation_3(1) := 0.0; Saturation_3(2) := 0.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; when Blue_Green_Red => -- This appears to be the PLplot default color theme. begin @@ -916,10 +916,10 @@ Red_3(0) := 0.0; Red_3(1) := 0.0; Red_3(2) := 1.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3); end; when Red_Green_Blue => begin @@ -932,10 +932,10 @@ Red_3(0) := 1.0; Red_3(1) := 0.0; Red_3(2) := 0.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + plscmap1l(RGB, Controls_3, Red_3, Green_3, Blue_3, Alt_Hue_Path_3); end; when Red_Cyan_Blue => begin @@ -948,10 +948,10 @@ Lightness_3(0) := 0.5; Lightness_3(1) := 0.5; Lightness_3(2) := 0.5; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; when Blue_Black_Red => begin @@ -967,11 +967,11 @@ Lightness_4(1) := 0.0; Lightness_4(2) := 0.0; Lightness_4(3) := 0.5; - Reverse_Hue_4(0) := False; - Reverse_Hue_4(1) := False; - Reverse_Hue_4(2) := False; - Reverse_Hue_4(3) := False; - plscmap1l(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Reverse_Hue_4); + Alt_Hue_Path_4(0) := False; + Alt_Hue_Path_4(1) := False; + Alt_Hue_Path_4(2) := False; + Alt_Hue_Path_4(3) := False; + plscmap1l(HLS, Controls_4, Hue_4, Lightness_4, Saturation_4, Alt_Hue_Path_4); end; when Red_Blue_Green => begin @@ -984,10 +984,10 @@ Saturation_3(0) := 1.0; Saturation_3(1) := 1.0; Saturation_3(2) := 1.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; when Red_Yellow => begin @@ -1000,10 +1000,10 @@ Saturation_3(0) := 1.0; Saturation_3(1) := 1.0; Saturation_3(2) := 1.0; - Reverse_Hue_3(0) := False; - Reverse_Hue_3(1) := False; - Reverse_Hue_3(2) := False; - plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Reverse_Hue_3); + Alt_Hue_Path_3(0) := False; + Alt_Hue_Path_3(1) := False; + Alt_Hue_Path_3(2) := False; + plscmap1l(HLS, Controls_3, Hue_3, Lightness_3, Saturation_3, Alt_Hue_Path_3); end; end case; end Quick_Set_Color_Map_1; @@ -2273,15 +2273,15 @@ -- Note: Hue is 0.0 .. 360.0. L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D) is -- False means red<->green<->blue<->red, True reverses + Alt_Hue_Path : Boolean_Array_1D) is -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. PL_Color_Model : PLBOOL; - PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); + PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range); begin -- Check for consistent array lengths. if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or - Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length then Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); end if; @@ -2292,22 +2292,23 @@ PL_Color_Model := PLfalse; end if; - for i in Reverse_Hue'range loop - if Reverse_Hue(i) then - PL_Reverse_Hue(i) := PLtrue; + for i in Alt_Hue_Path'range loop + if Alt_Hue_Path(i) then + PL_Alt_Hue_Path(i) := PLtrue; else - PL_Reverse_Hue(i) := PLfalse; + PL_Alt_Hue_Path(i) := PLfalse; end if; end loop; - PLplot_Thin.plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Reverse_Hue); + PLplot_Thin.plscmap1l(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, PL_Alt_Hue_Path); end plscmap1l; - -- Overloaded version of plscmap1l which allows simplified (non-)reversal of - -- the traversed hue range. This is an Ada-like way of doing what is described + -- Overloaded version of plscmap1l which allows simplified (alt_hue_path false) interpolation. + -- This is an Ada-like way of doing what is described -- in the PLplot documentation when a C user passes a null pointer as the - -- final argument instead of an array of booleans to indicate hue reversal. + -- final argument instead of an array of booleans to indicate which + -- of the two hue interpolation paths to take. procedure plscmap1l (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -2315,20 +2316,20 @@ -- Note: Hue is 0.0 .. 360.0. L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type) is + Alt_Hue_Path : Alt_Hue_Path_Type) is - Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range); begin - if Reverse_Hue = Reverse_Hue_All then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := True; + if Alt_Hue_Path = Alt_Hue_Path_All then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := True; end loop; - elsif Reverse_Hue = Reverse_Hue_None then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := False; + elsif Alt_Hue_Path = Alt_Hue_Path_None then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := False; end loop; end if; - plscmap1l(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Reverse_Hue_Array); + plscmap1l(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alt_Hue_Path_Array); end plscmap1l; @@ -2342,15 +2343,15 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D) is -- False means red<->green<->blue<->red, True reverses + Alt_Hue_Path : Boolean_Array_1D) is -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. PL_Color_Model : PLBOOL; - PL_Reverse_Hue : PL_Bool_Array (Reverse_Hue'range); + PL_Alt_Hue_Path : PL_Bool_Array (Alt_Hue_Path'range); begin -- Check for consistent array lengths. if Control_Points'length /= H_Or_R'length or Control_Points'length /= L_or_G'length or - Control_Points'length /= S_Or_B'length or Control_Points'length /= Reverse_Hue'length + Control_Points'length /= S_Or_B'length or Control_Points'length /= Alt_Hue_Path'length then Put_Line("*** WARNING: Inconsistent array lengths when setting color map 1 ***"); end if; @@ -2361,22 +2362,23 @@ PL_Color_Model := PLfalse; end if; - for i in Reverse_Hue'range loop - if Reverse_Hue(i) then - PL_Reverse_Hue(i) := PLtrue; + for i in Alt_Hue_Path'range loop + if Alt_Hue_Path(i) then + PL_Alt_Hue_Path(i) := PLtrue; else - PL_Reverse_Hue(i) := PLfalse; + PL_Alt_Hue_Path(i) := PLfalse; end if; end loop; - PLplot_Thin.plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Reverse_Hue); + PLplot_Thin.plscmap1la(PL_Color_Model, Control_Points'Length, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, PL_Alt_Hue_Path); end plscmap1la; - -- Overloaded version of plscmap1la which allows simplified (non-)reversal of - -- the traversed hue range. This is an Ada-like way of doing what is described + -- Overloaded version of plscmap1la which allows simplified (alt_hue_path false) interpolation. + -- This is an Ada-like way of doing what is described -- in the PLplot documentation when a C user passes a null pointer as the - -- final argument instead of an array of booleans to indicate hue reversal. + -- final argument instead of an array of booleans to indicate which + -- of the two hue interpolation paths to take. procedure plscmap1la (Color_Model : Color_Model_Type; -- HLS or RGB Control_Points : Real_Vector; -- range 0.0 .. 1.0; not checked here @@ -2384,20 +2386,20 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type) is + Alt_Hue_Path : Alt_Hue_Path_Type) is - Reverse_Hue_Array : Boolean_Array_1D(Control_Points'range); + Alt_Hue_Path_Array : Boolean_Array_1D(Control_Points'range); begin - if Reverse_Hue = Reverse_Hue_All then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := True; + if Alt_Hue_Path = Alt_Hue_Path_All then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := True; end loop; - elsif Reverse_Hue = Reverse_Hue_None then - for i in Reverse_Hue_Array'range loop - Reverse_Hue_Array(i) := False; + elsif Alt_Hue_Path = Alt_Hue_Path_None then + for i in Alt_Hue_Path_Array'range loop + Alt_Hue_Path_Array(i) := False; end loop; end if; - plscmap1la(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Reverse_Hue_Array); + plscmap1la(Color_Model, Control_Points, H_Or_R, L_Or_G, S_Or_B, Alpha, Alt_Hue_Path_Array); end plscmap1la; Modified: trunk/bindings/ada/plplot_traditional.ads =================================================================== --- trunk/bindings/ada/plplot_traditional.ads 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ada/plplot_traditional.ads 2012-08-13 23:17:31 UTC (rev 12212) @@ -726,7 +726,7 @@ type Color_Themes_For_Map_1_Type is (Gray, Blue_Green_Red, Red_Green_Blue, Red_Cyan_Blue, Blue_Black_Red, Red_Blue_Green, Red_Yellow); - type Reverse_Hue_Type is (Reverse_Hue_None, Reverse_Hue_All); + type Alt_Hue_Path_Type is (Alt_Hue_Path_None, Alt_Hue_Path_All); -- Quick application of pre-fabricated color schemes to color map 1. @@ -1465,7 +1465,7 @@ H_Or_R : Real_Vector; -- range 0.0 .. 1.0; not checked here L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + Alt_Hue_Path : Boolean_Array_1D); -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. -- Overloaded version of plscmap1l which allows simplified (non-)reversal of @@ -1479,7 +1479,7 @@ -- Note: Hue is 0.0 .. 360.0. L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type); + Alt_Hue_Path : Alt_Hue_Path_Type); -- Set color map 1 colors using a piece-wise linear relationship between @@ -1492,7 +1492,7 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Boolean_Array_1D); -- False means red<->green<->blue<->red, True reverses + Alt_Hue_Path : Boolean_Array_1D); -- True means use alternative hue interpolation path which always includes the point hue = 0. False reverses. -- Overloaded version of plscmap1la which allows simplified (non-)reversal of @@ -1506,7 +1506,7 @@ L_Or_G : Real_Vector; -- range 0.0 .. 1.0; not checked here S_Or_B : Real_Vector; -- range 0.0 .. 1.0; not checked here Alpha : Real_Vector; -- range 0.0 .. 1.0; not checked here - Reverse_Hue : Reverse_Hue_Type); + Alt_Hue_Path : Alt_Hue_Path_Type); -- Set number of colors in cmap 1 Modified: trunk/bindings/c++/plstream.cc =================================================================== --- trunk/bindings/c++/plstream.cc 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/c++/plstream.cc 2012-08-13 23:17:31 UTC (rev 12212) @@ -1418,24 +1418,24 @@ void plstream::scmap1l( bool itype, PLINT npts, const PLFLT *intensity, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, - const bool *rev ) + const bool *alt_hue_path ) { - PLBOOL *loc_rev = NULL; - if ( rev != NULL ) + PLBOOL *loc_alt_hue_path = NULL; + if ( alt_hue_path != NULL ) { - loc_rev = new PLBOOL[npts - 1]; + loc_alt_hue_path = new PLBOOL[npts - 1]; for ( int i = 0; i < npts - 1; i++ ) { - loc_rev[i] = (PLBOOL) rev[i]; + loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i]; } } set_stream(); - plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_rev ); + plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_alt_hue_path ); - if ( loc_rev != NULL ) - delete [] loc_rev; + if ( loc_alt_hue_path != NULL ) + delete [] loc_alt_hue_path; } // Set color map 1 colors using a piece-wise linear relationship between @@ -1444,25 +1444,25 @@ void plstream::scmap1la( bool itype, PLINT npts, const PLFLT *intensity, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, - const PLFLT *a, const bool *rev ) + const PLFLT *a, const bool *alt_hue_path ) { - PLBOOL *loc_rev = NULL; - if ( rev != NULL ) + PLBOOL *loc_alt_hue_path = NULL; + if ( alt_hue_path != NULL ) { - loc_rev = new PLBOOL[npts - 1]; + loc_alt_hue_path = new PLBOOL[npts - 1]; for ( int i = 0; i < npts - 1; i++ ) { - loc_rev[i] = (PLBOOL) rev[i]; + loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i]; } } set_stream(); plscmap1la( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, - a, loc_rev ); + a, loc_alt_hue_path ); - if ( loc_rev != NULL ) - delete [] loc_rev; + if ( loc_alt_hue_path != NULL ) + delete [] loc_alt_hue_path; } // @@ -1478,24 +1478,24 @@ // Deprecated version using PLINT instead of bool void plstream::scmap1l( PLINT itype, PLINT npts, const PLFLT *intensity, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, - const PLINT *rev ) + const PLINT *alt_hue_path ) { - PLBOOL *loc_rev = NULL; - if ( rev != NULL ) + PLBOOL *loc_alt_hue_path = NULL; + if ( alt_hue_path != NULL ) { - loc_rev = new PLBOOL[npts - 1]; + loc_alt_hue_path = new PLBOOL[npts - 1]; for ( int i = 0; i < npts - 1; i++ ) { - loc_rev[i] = (PLBOOL) rev[i]; + loc_alt_hue_path[i] = (PLBOOL) alt_hue_path[i]; } } set_stream(); - plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_rev ); + plscmap1l( (PLBOOL) itype, npts, intensity, coord1, coord2, coord3, loc_alt_hue_path ); - if ( loc_rev != NULL ) - delete [] loc_rev; + if ( loc_alt_hue_path != NULL ) + delete [] loc_alt_hue_path; } // Set a given color from color map 0 by 8 bit RGB value Modified: trunk/bindings/c++/plstream.h =================================================================== --- trunk/bindings/c++/plstream.h 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/c++/plstream.h 2012-08-13 23:17:31 UTC (rev 12212) @@ -620,7 +620,7 @@ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. void scmap1l( bool itype, PLINT npts, const PLFLT *intensity, - const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const bool *rev = NULL ); + const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const bool *alt_hue_path = NULL ); // void scmap1l( bool itype, PLINT npts, PLFLT *intensity, // PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 ); @@ -631,7 +631,7 @@ void scmap1la( bool itype, PLINT npts, const PLFLT *intensity, const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLFLT *a, - const bool *rev = NULL ); + const bool *alt_hue_path = NULL ); // Set a given color from color map 0 by 8 bit RGB value @@ -1156,7 +1156,7 @@ PLINT nx, PLINT ny, PLINT opt, PLINT side ); void poly3( PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const PLINT *draw, PLINT ifcc ); void scmap1l( PLINT itype, PLINT npts, const PLFLT *intensity, - const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *rev ); + const PLFLT *coord1, const PLFLT *coord2, const PLFLT *coord3, const PLINT *alt_hue_path ); void shade( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), Modified: trunk/bindings/d/plplot.d =================================================================== --- trunk/bindings/d/plplot.d 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/d/plplot.d 2012-08-13 23:17:31 UTC (rev 12212) @@ -582,16 +582,16 @@ // Set color map 1 colors using a piece-wise linear relationship between // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. void plscmap1l( PLBOOL itype, PLFLT[] intensity, PLFLT[] coord1, - PLFLT[] coord2, PLFLT[] coord3, PLBOOL[] rev = null ) + PLFLT[] coord2, PLFLT[] coord3, PLBOOL[] alt_hue_path = null ) { PLINT npts = intensity.length; assert( npts == coord1.length, "plscmap1l(): Arrays must be of same length!" ); assert( npts == coord2.length, "plscmap1l(): Arrays must be of same length!" ); assert( npts == coord3.length, "plscmap1l(): Arrays must be of same length!" ); - if ( rev != null ) + if ( alt_hue_path != null ) { - assert( npts - 1 == rev.length, "plscmap1l(): Array rev must be of same length then other arrays minus 1!" ); - c_plscmap1l( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, rev.ptr ); + assert( npts - 1 == alt_hue_path.length, "plscmap1l(): Array alt_hue_path must be of same length then other arrays minus 1!" ); + c_plscmap1l( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, alt_hue_path.ptr ); } else c_plscmap1l( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, null ); @@ -602,17 +602,17 @@ // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. // Will also linear interpolate alpha values. void plscmap1la( PLBOOL itype, PLFLT[] intensity, PLFLT[] coord1, - PLFLT[] coord2, PLFLT[] coord3, PLFLT[] a, PLBOOL[] rev = null ) + PLFLT[] coord2, PLFLT[] coord3, PLFLT[] a, PLBOOL[] alt_hue_path = null ) { PLINT npts = intensity.length; assert( npts == coord1.length, "plscmap1la(): Arrays must be of same length!" ); assert( npts == coord2.length, "plscmap1la(): Arrays must be of same length!" ); assert( npts == coord3.length, "plscmap1la(): Arrays must be of same length!" ); assert( npts == a.length, "plscmap1la(): Arrays must be of same length!" ); - if ( rev != null ) + if ( alt_hue_path != null ) { - assert( npts - 1 == rev.length, "plscmap1la(): Array rev must be of same length then other arrays minus 1!" ); - c_plscmap1la( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, a.ptr, rev.ptr ); + assert( npts - 1 == alt_hue_path.length, "plscmap1la(): Array alt_hue_path must be of same length then other arrays minus 1!" ); + c_plscmap1la( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, a.ptr, alt_hue_path.ptr ); } else c_plscmap1la( itype, npts, intensity.ptr, coord1.ptr, coord2.ptr, coord3.ptr, a.ptr, null ); @@ -1948,12 +1948,12 @@ // Set color map 1 colors using a piece-wise linear relationship between // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. -void c_plscmap1l( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev ); +void c_plscmap1l( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path ); // Set color map 1 colors using a piece-wise linear relationship between // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. // Will also linear interpolate alpha values. -void c_plscmap1la( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev ); +void c_plscmap1la( PLBOOL itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path ); // Set number of colors in cmap 1 void c_plscmap1n( PLINT ncol1 ); Modified: trunk/bindings/f77/scstubs.c =================================================================== --- trunk/bindings/f77/scstubs.c 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/f77/scstubs.c 2012-08-13 23:17:31 UTC (rev 12212) @@ -802,16 +802,16 @@ void PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity, - PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev ) + PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path ) { - c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, rev ); + c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, alt_hue_path ); } void PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity, - PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev ) + PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path ) { - c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, rev ); + c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, alt_hue_path ); } void Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/f95/scstubs.c 2012-08-13 23:17:31 UTC (rev 12212) @@ -178,11 +178,11 @@ void PLSCMAP1( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol1 ); void PLSCMAP1A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol1 ); void PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity, - PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev ); + PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path ); void PLSCMAP1L2( PLBOOL *itype, PLINT *npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 ); void PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity, - PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev ); + PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path ); void PLSCMAP1LA2( PLBOOL *itype, PLINT *npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a ); void PLSCMAP1N( PLINT *n ); @@ -1057,9 +1057,9 @@ void PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity, - PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev ) + PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path ) { - c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, rev ); + c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, alt_hue_path ); } void @@ -1071,9 +1071,9 @@ void PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity, - PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev ) + PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path ) { - c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, rev ); + c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, alt_hue_path ); } void Modified: trunk/bindings/f95/sfstubsf95.f90 =================================================================== --- trunk/bindings/f95/sfstubsf95.f90 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/f95/sfstubsf95.f90 2012-08-13 23:17:31 UTC (rev 12212) @@ -1359,20 +1359,20 @@ call plscmap1af77( r, g, b, a, size(r) ) end subroutine plscmap1a - subroutine plscmap1l( rgbtype, intensity, coord1, coord2, coord3, rev) + subroutine plscmap1l( rgbtype, intensity, coord1, coord2, coord3, alt_hue_path) logical :: rgbtype real(kind=plflt), dimension(:) :: intensity, coord1, coord2, coord3 - logical, dimension(:) :: rev + logical, dimension(:) :: alt_hue_path - integer, dimension(size(rev)) :: irev + integer, dimension(size(alt_hue_path)) :: ialt_hue_path integer :: i integer :: type type = convert_to_int( rgbtype ) - do i = 1,size(rev) - irev(i) = convert_to_int( rev(i) ) + do i = 1,size(alt_hue_path) + ialt_hue_path(i) = convert_to_int( alt_hue_path(i) ) enddo - call plscmap1lf77( type, size(intensity), intensity, coord1, coord2, coord3, irev ) + call plscmap1lf77( type, size(intensity), intensity, coord1, coord2, coord3, ialt_hue_path ) end subroutine plscmap1l subroutine plscmap1l2( rgbtype, intensity, coord1, coord2, coord3) @@ -1385,20 +1385,20 @@ call plscmap1l2f77( type, size(intensity), intensity, coord1, coord2, coord3) end subroutine plscmap1l2 - subroutine plscmap1la( rgbtype, intensity, coord1, coord2, coord3, a, rev) + subroutine plscmap1la( rgbtype, intensity, coord1, coord2, coord3, a, alt_hue_path) logical :: rgbtype real(kind=plflt), dimension(:) :: intensity, coord1, coord2, coord3, a - logical, dimension(:) :: rev + logical, dimension(:) :: alt_hue_path - integer, dimension(size(rev)) :: irev + integer, dimension(size(alt_hue_path)) :: ialt_hue_path integer :: i integer :: type type = convert_to_int( rgbtype ) - do i = 1,size(rev) - irev(i) = convert_to_int( rev(i) ) + do i = 1,size(alt_hue_path) + ialt_hue_path(i) = convert_to_int( alt_hue_path(i) ) enddo - call plscmap1laf77( type, size(intensity), intensity, coord1, coord2, coord3, a, irev ) + call plscmap1laf77( type, size(intensity), intensity, coord1, coord2, coord3, a, ialt_hue_path ) end subroutine plscmap1la subroutine plscmap1la2( rgbtype, intensity, coord1, coord2, coord3, a) Modified: trunk/bindings/gnome2/lib/plplotcanvas.c =================================================================== --- trunk/bindings/gnome2/lib/plplotcanvas.c 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/gnome2/lib/plplotcanvas.c 2012-08-13 23:17:31 UTC (rev 12212) @@ -872,10 +872,10 @@ // Set color map 1 colors using a piece-wise linear relationship between // intensity [0,1] (cmap 1 index) and position in HLS or RGB color space. -void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *rev ) +void plplot_canvas_scmap1l( PlplotCanvas* self, PLINT itype, PLINT npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLINT *alt_hue_path ) { plsstrm( self->Nstream ); - plscmap1l( itype, npts, intensity, coord1, coord2, coord3, rev ); + plscmap1l( itype, npts, intensity, coord1, coord2, coord3, alt_hue_path ); } // Set number of colors in cmap 1 Modified: trunk/bindings/java/PLStream.java =================================================================== --- trunk/bindings/java/PLStream.java 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/java/PLStream.java 2012-08-13 23:17:31 UTC (rev 12212) @@ -773,10 +773,10 @@ } public void scmap1l( boolean itype, double[] intensity, double[] coord1, - double[] coord2, double[] coord3, boolean[] rev ) + double[] coord2, double[] coord3, boolean[] alt_hue_path ) { if ( set_stream() == -1 ) return; - plplotjavac.plscmap1l( itype, intensity, coord1, coord2, coord3, rev ); + plplotjavac.plscmap1l( itype, intensity, coord1, coord2, coord3, alt_hue_path ); } public void scmap1l( boolean itype, double[] intensity, double[] coord1, @@ -787,10 +787,10 @@ } public void scmap1la( boolean itype, double[] intensity, double[] coord1, - double[] coord2, double[] coord3, double[] a, boolean[] rev ) + double[] coord2, double[] coord3, double[] a, boolean[] alt_hue_path ) { if ( set_stream() == -1 ) return; - plplotjavac.plscmap1la( itype, intensity, coord1, coord2, coord3, a, rev ); + plplotjavac.plscmap1la( itype, intensity, coord1, coord2, coord3, a, alt_hue_path ); } public void scmap1la( boolean itype, double[] intensity, double[] coord1, @@ -1243,19 +1243,19 @@ } public void scmap1l( int itype, double[] intensity, double[] coord1, - double[] coord2, double[] coord3, int[] rev ) + double[] coord2, double[] coord3, int[] alt_hue_path ) { if ( set_stream() == -1 ) return; - boolean [] loc_rev = null; - if ( rev != null ) + boolean [] loc_alt_hue_path = null; + if ( alt_hue_path != null ) { - loc_rev = new boolean[rev.length]; - for ( int i = 0; i < rev.length; i++ ) + loc_alt_hue_path = new boolean[alt_hue_path.length]; + for ( int i = 0; i < alt_hue_path.length; i++ ) { - loc_rev[i] = ( rev[i] != 0 ); + loc_alt_hue_path[i] = ( alt_hue_path[i] != 0 ); } } - plplotjavac.plscmap1l( itype != 0, intensity, coord1, coord2, coord3, loc_rev ); + plplotjavac.plscmap1l( itype != 0, intensity, coord1, coord2, coord3, loc_alt_hue_path ); } public void shades( double[][] a, double xmin, double xmax, double ymin, Modified: trunk/bindings/ocaml/plplot.ml =================================================================== --- trunk/bindings/ocaml/plplot.ml 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ocaml/plplot.ml 2012-08-13 23:17:31 UTC (rev 12212) @@ -399,10 +399,11 @@ let set_color ?stream c = with_stream ?stream (fun () -> plcol0 (int_of_color c)) - (** [set_color_scale ?stream ?pos ?rev colors] sets the color scale 1 (images + (** [set_color_scale ?stream ?pos ?alt_hue_path colors] sets the color scale 1 (images and shade plots) using a linear interpolation between the given list of - colors. If [rev] is true then the scale goes in the reverse order. *) - let set_color_scale ?stream ?pos ?rev colors = + colors. If [alt_hue_path] is true then the interpolation of any segment + uses the alternative hue path which always includes the hue = 0 point. *) + let set_color_scale ?stream ?pos ?alt_hue_path colors = let cs = Array.map rgb_of_color colors in let r, g, b = Array.map (fun (r, _, _) -> float_of_int r /. 255.0) cs, @@ -410,7 +411,7 @@ Array.map (fun (_, _, b) -> float_of_int b /. 255.0) cs in let positions = pos |? Array_ext.range ~n:(Array.length cs) 0.0 1.0 in - with_stream ?stream (fun () -> plscmap1l true positions r g b rev); + with_stream ?stream (fun () -> plscmap1l true positions r g b alt_hue_path); () (** Start a new page *) Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ocaml/plplot.mli 2012-08-13 23:17:31 UTC (rev 12212) @@ -214,18 +214,19 @@ [color]. *) val set_color : ?stream:stream_t -> color_t -> unit - (** [set_color_scale ?stream ?pos ?rev colors] sets the continuous color map + (** [set_color_scale ?stream ?pos ?alt_hue_path colors] sets the continuous color map (color map 1) to a scale determined by interpolating between [colors]. [pos] can be used to specify where in the color scale ([0.0 - 1.0]) the a color interpolation point should fall. [pos] defaults to even spacing. - [rev] can be used to specify that a given segment should be - interpolated backwards. + [alt_hue_path] can be used to specify that a given segment should be + interpolated using the alternative hue path which always includes the + hue=0 point. {!Plplot.plscmap1l} is used internally to set the color scale. *) val set_color_scale : ?stream:stream_t -> ?pos:float array -> - ?rev:bool array -> + ?alt_hue_path:bool array -> color_t array -> unit (** PLplot has two color palettes - indexed (color map 0) and Modified: trunk/bindings/ocaml/plplot_h =================================================================== --- trunk/bindings/ocaml/plplot_h 2012-08-13 22:21:57 UTC (rev 12211) +++ trunk/bindings/ocaml/plplot_h 2012-08-13 23:17:31 UTC (rev 12212) @@ -411,11 +411,11 @@ void c_plscmap1l(PLBOOL itype, PLINT npts, PLFLT *intensity, - PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev); + PLFLT *... [truncated message content] |