[GRASS-SVN] r68631 - in grass/branches/releasebranch_7_2: include lib/raster lib/raster3d

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 7 15:45:34 PDT 2016


Author: wenzeslaus
Date: 2016-06-07 15:45:34 -0700 (Tue, 07 Jun 2016)
New Revision: 68631

Modified:
   grass/branches/releasebranch_7_2/include/gis.h
   grass/branches/releasebranch_7_2/lib/raster/color_read.c
   grass/branches/releasebranch_7_2/lib/raster3d/color.c
Log:
introduce DEFAULT_COLOR_TABLE define (backport r68586)

Backports r68586 but keeps the rainbow
as the default. See also #3043.


Modified: grass/branches/releasebranch_7_2/include/gis.h
===================================================================
--- grass/branches/releasebranch_7_2/include/gis.h	2016-06-07 15:48:31 UTC (rev 68630)
+++ grass/branches/releasebranch_7_2/include/gis.h	2016-06-07 22:45:34 UTC (rev 68631)
@@ -340,6 +340,7 @@
 /* default colors */
 #define DEFAULT_FG_COLOR "black"
 #define DEFAULT_BG_COLOR "white"
+#define DEFAULT_COLOR_TABLE "rainbow"
 
 /* error codes */
 #define G_FATAL_EXIT    0

Modified: grass/branches/releasebranch_7_2/lib/raster/color_read.c
===================================================================
--- grass/branches/releasebranch_7_2/lib/raster/color_read.c	2016-06-07 15:48:31 UTC (rev 68630)
+++ grass/branches/releasebranch_7_2/lib/raster/color_read.c	2016-06-07 22:45:34 UTC (rev 68631)
@@ -87,7 +87,7 @@
 		Rast_get_range_min_max(&range, &min, &max);
 		if (!Rast_is_c_null_value(&min) &&
 		    !Rast_is_c_null_value(&max))
-		    Rast_make_rainbow_colors(colors, min, max);
+		    Rast_make_colors(colors, DEFAULT_COLOR_TABLE, min, max);
 		return 0;
 	    }
 	}
@@ -96,7 +96,7 @@
 		Rast_get_fp_range_min_max(&drange, &dmin, &dmax);
 		if (!Rast_is_d_null_value(&dmin) &&
 		    !Rast_is_d_null_value(&dmax))
-		    Rast_make_rainbow_fp_colors(colors, dmin, dmax);
+		    Rast_make_fp_colors(colors, DEFAULT_COLOR_TABLE, dmin, dmax);
 		return 0;
 	    }
 	}

Modified: grass/branches/releasebranch_7_2/lib/raster3d/color.c
===================================================================
--- grass/branches/releasebranch_7_2/lib/raster3d/color.c	2016-06-07 15:48:31 UTC (rev 68630)
+++ grass/branches/releasebranch_7_2/lib/raster3d/color.c	2016-06-07 22:45:34 UTC (rev 68631)
@@ -57,7 +57,7 @@
 	if (Rast3d_read_range(name, mapset, &drange) >= 0) {
 	    Rast_get_fp_range_min_max(&drange, &dmin, &dmax);
 	    if (!Rast_is_d_null_value(&dmin) && !Rast_is_d_null_value(&dmax))
-		Rast_make_rainbow_fp_colors(colors, dmin, dmax);
+		Rast_make_fp_colors(colors, DEFAULT_COLOR_TABLE, dmin, dmax);
 	    return 0;
 	}
 	err = "missing";



More information about the grass-commit mailing list