[GRASS-SVN] r38116 - in grass/trunk: display/d.colors display/d.his imagery/i.class imagery/i.maxlik include lib/raster raster/r.external raster/r.his raster/r.in.gdal raster/r.patch raster/r.watershed/ram raster/r.watershed/seg

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 29 14:53:45 EDT 2009


Author: martinl
Date: 2009-06-29 14:53:44 -0400 (Mon, 29 Jun 2009)
New Revision: 38116

Modified:
   grass/trunk/display/d.colors/interact.c
   grass/trunk/display/d.his/his.c
   grass/trunk/imagery/i.class/signature.c
   grass/trunk/imagery/i.maxlik/main.c
   grass/trunk/include/raster.h
   grass/trunk/lib/raster/color_init.c
   grass/trunk/lib/raster/color_set.c
   grass/trunk/raster/r.external/main.c
   grass/trunk/raster/r.his/his.c
   grass/trunk/raster/r.in.gdal/main.c
   grass/trunk/raster/r.patch/support.c
   grass/trunk/raster/r.watershed/ram/close_maps2.c
   grass/trunk/raster/r.watershed/seg/close_maps2.c
Log:
rasterlib: fns from color_set.c renamed, see
http://trac.osgeo.org/grass/wiki/Grass7/RasterLib


Modified: grass/trunk/display/d.colors/interact.c
===================================================================
--- grass/trunk/display/d.colors/interact.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/display/d.colors/interact.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -123,7 +123,7 @@
 		cur_grn = grn_hi;
 		cur_blu = blu_hi;
 		if (hi_save_mode) {
-		    Rast_set_color(at_cat, cur_red, cur_grn, cur_blu, colors);
+		    Rast_set_c_color(at_cat, cur_red, cur_grn, cur_blu, colors);
 		    colors_changed = 1;
 		}
 	    }
@@ -166,7 +166,7 @@
 		cur_grn = grn_hi;
 		cur_blu = blu_hi;
 		if (hi_save_mode) {
-		    Rast_set_color(at_cat, cur_red, cur_grn, cur_blu, colors);
+		    Rast_set_c_color(at_cat, cur_red, cur_grn, cur_blu, colors);
 		    colors_changed = 1;
 		}
 	    }
@@ -192,7 +192,7 @@
 		    cur_blu = shift_color(cur_blu, shift_incr);
 		    break;
 		}
-		Rast_set_color(at_cat, cur_red, cur_grn, cur_blu, colors);
+		Rast_set_c_color(at_cat, cur_red, cur_grn, cur_blu, colors);
 		colors_changed = 1;
 	    }
 	    WRITE_STATUS;
@@ -212,7 +212,7 @@
 		cur_grn = grn_hi;
 		cur_blu = blu_hi;
 		if (hi_save_mode)
-		    Rast_set_color(at_cat, cur_red, cur_grn, cur_blu, colors);
+		    Rast_set_c_color(at_cat, cur_red, cur_grn, cur_blu, colors);
 	    }
 	    colors_changed = 1;
 	    WRITE_STATUS;
@@ -224,7 +224,7 @@
 		cur_grn = grn_hi;
 		cur_blu = blu_hi;
 		if (hi_save_mode)
-		    Rast_set_color(at_cat, cur_red, cur_grn, cur_blu, colors);
+		    Rast_set_c_color(at_cat, cur_red, cur_grn, cur_blu, colors);
 	    }
 	    colors_changed = 1;
 	    WRITE_STATUS;
@@ -244,7 +244,7 @@
 		cur_grn = grn_hi;
 		cur_blu = blu_hi;
 		if (hi_save_mode)
-		    Rast_set_color(at_cat, cur_red, cur_grn, cur_blu, colors);
+		    Rast_set_c_color(at_cat, cur_red, cur_grn, cur_blu, colors);
 	    }
 	    colors_changed = 1;
 	    break;
@@ -261,7 +261,7 @@
 		cur_blu = blu_hi;
 		hi_mode = 1;
 		if (cur_char == 'H') {
-		    Rast_set_color(at_cat, cur_red, cur_grn, cur_blu, colors);
+		    Rast_set_c_color(at_cat, cur_red, cur_grn, cur_blu, colors);
 		    hi_save_mode = 1;
 		    colors_changed = 1;
 		}

Modified: grass/trunk/display/d.his/his.c
===================================================================
--- grass/trunk/display/d.his/his.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/display/d.his/his.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -69,7 +69,7 @@
     Rast_init_colors(gray);
 
     for (i = 0; i < 256; i++)
-	Rast_set_color((CELL) i, i, i, i, gray);
+	Rast_set_c_color((CELL) i, i, i, i, gray);
 
     return 0;
 }

Modified: grass/trunk/imagery/i.class/signature.c
===================================================================
--- grass/trunk/imagery/i.class/signature.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/imagery/i.class/signature.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -300,7 +300,7 @@
 
     /* generate and write the color table for the mask */
     Rast_init_colors(&mask_colors);
-    Rast_set_color((CELL) 1, Color_table[Display_color].red,
+    Rast_set_c_color((CELL) 1, Color_table[Display_color].red,
 		Color_table[Display_color].grn,
 		Color_table[Display_color].blue, &mask_colors);
     Rast_write_colors(MASK, G_mapset(), &mask_colors);

Modified: grass/trunk/imagery/i.maxlik/main.c
===================================================================
--- grass/trunk/imagery/i.maxlik/main.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/imagery/i.maxlik/main.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -153,8 +153,8 @@
 
 	Rast_make_grey_scale_colors(&colr, (CELL) 1, (CELL) 16);
 
-	Rast_set_color((CELL) 0, 0, 255, 0, &colr);
-	Rast_set_color((CELL) 17, 255, 0, 0, &colr);
+	Rast_set_c_color((CELL) 0, 0, 255, 0, &colr);
+	Rast_set_c_color((CELL) 17, 255, 0, 0, &colr);
 	Rast_write_colors(reject_name, G_mapset(), &colr);
 	Rast_free_colors(&colr);
     }

Modified: grass/trunk/include/raster.h
===================================================================
--- grass/trunk/include/raster.h	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/include/raster.h	2009-06-29 18:53:44 UTC (rev 38116)
@@ -221,7 +221,7 @@
 void Rast_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
 
 /* color_set.c */
-void Rast_set_color(CELL, int, int, int, struct Colors *);
+void Rast_set_c_color(CELL, int, int, int, struct Colors *);
 void Rast_set_d_color(DCELL, int, int, int, struct Colors *);
 void Rast_set_null_value_color(int, int, int, struct Colors *);
 void Rast_set_default_color(int, int, int, struct Colors *);

Modified: grass/trunk/lib/raster/color_init.c
===================================================================
--- grass/trunk/lib/raster/color_init.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/lib/raster/color_init.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -17,7 +17,7 @@
  * \brief Initialize color structure
  *
  * The <i>colors</i> structure is initialized for subsequent calls
- * to Rast_add_c_color_rule() and Rast_set_color().
+ * to Rast_add_c_color_rule() and Rast_set_c_color().
  *
  * \param colors pointer to Colors structure
  */

Modified: grass/trunk/lib/raster/color_set.c
===================================================================
--- grass/trunk/lib/raster/color_set.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/lib/raster/color_set.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -38,7 +38,7 @@
  * \param b blue value
  * \param colors pointer to Colors structure which holds color info
  */
-void Rast_set_color(CELL cat, int r, int g, int b, struct Colors *colors)
+void Rast_set_c_color(CELL cat, int r, int g, int b, struct Colors *colors)
 {
     if (Rast_is_c_null_value(&cat))
 	Rast_set_null_value_color(r, g, b, colors);
@@ -49,7 +49,7 @@
 /*!
  * \brief Set a category color (DCELL)
  * 
- * See Rast_set_color() for detailed information.
+ * See Rast_set_c_color() for detailed information.
  *
  * \param cat raster cell value
  * \param r red value

Modified: grass/trunk/raster/r.external/main.c
===================================================================
--- grass/trunk/raster/r.external/main.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/raster/r.external/main.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -337,7 +337,7 @@
 	    if (sEntry.c4 == 0)
 		continue;
 
-	    Rast_set_color(i, sEntry.c1, sEntry.c2, sEntry.c3, &info->colors);
+	    Rast_set_c_color(i, sEntry.c1, sEntry.c2, sEntry.c3, &info->colors);
 	}
     }
     else {

Modified: grass/trunk/raster/r.his/his.c
===================================================================
--- grass/trunk/raster/r.his/his.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/raster/r.his/his.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -69,7 +69,7 @@
     Rast_init_colors(gray);
 
     for (i = 0; i < 256; i++)
-	Rast_set_color((CELL) i, i, i, i, gray);
+	Rast_set_c_color((CELL) i, i, i, i, gray);
 
     return 0;
 }

Modified: grass/trunk/raster/r.in.gdal/main.c
===================================================================
--- grass/trunk/raster/r.in.gdal/main.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/raster/r.in.gdal/main.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -907,7 +907,7 @@
 	    if (sEntry.c4 == 0)
 		continue;
 
-	    Rast_set_color(iColor, sEntry.c1, sEntry.c2, sEntry.c3, &colors);
+	    Rast_set_c_color(iColor, sEntry.c1, sEntry.c2, sEntry.c3, &colors);
 	}
 
 	Rast_write_colors((char *)output, G_mapset(), &colors);

Modified: grass/trunk/raster/r.patch/support.c
===================================================================
--- grass/trunk/raster/r.patch/support.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/raster/r.patch/support.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -54,7 +54,7 @@
 		    }
 		    if (do_colr) {
 			Rast_get_c_color(&n, &red, &grn, &blu, &pcolr);
-			Rast_set_color(n, red, grn, blu, colr);
+			Rast_set_c_color(n, red, grn, blu, colr);
 		    }
 		}
 	}

Modified: grass/trunk/raster/r.watershed/ram/close_maps2.c
===================================================================
--- grass/trunk/raster/r.watershed/ram/close_maps2.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/raster/r.watershed/ram/close_maps2.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -36,7 +36,7 @@
 	Rast_make_random_colors(&colors, 1, max);
 
 	if (max < 10000) {
-	    Rast_set_color((CELL) 0, 0, 0, 0, &colors);
+	    Rast_set_c_color((CELL) 0, 0, 0, 0, &colors);
 	    r = 1;
 	    incr = 0;
 	    while (incr >= 0) {
@@ -51,7 +51,7 @@
 				   rule to override it */
 				if ((blue * .11 + red * .30 + green * .59) <
 				    100) {
-				    Rast_set_color(r, rd, gr, bl, &colors);
+				    Rast_set_c_color(r, rd, gr, bl, &colors);
 				    flag = 0;
 				}
 				if (++r > max) {

Modified: grass/trunk/raster/r.watershed/seg/close_maps2.c
===================================================================
--- grass/trunk/raster/r.watershed/seg/close_maps2.c	2009-06-29 18:43:11 UTC (rev 38115)
+++ grass/trunk/raster/r.watershed/seg/close_maps2.c	2009-06-29 18:53:44 UTC (rev 38116)
@@ -29,7 +29,7 @@
 	Rast_make_random_colors(&colors, 1, max);
 
 	if (max < 10000) {
-	    Rast_set_color((CELL) 0, 0, 0, 0, &colors);
+	    Rast_set_c_color((CELL) 0, 0, 0, 0, &colors);
 	    r = 1;
 	    incr = 0;
 	    while (incr >= 0) {
@@ -44,7 +44,7 @@
 				   rule to override it */
 				if ((blue * .11 + red * .30 + green * .59) <
 				    100) {
-				    Rast_set_color(r, rd, gr, bl, &colors);
+				    Rast_set_c_color(r, rd, gr, bl, &colors);
 				    flag = 0;
 				}
 				if (++r > max) {



More information about the grass-commit mailing list