瀏覽代碼

rasterlib: Rast_set_color_range -> Rast_set_c_color_range

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38112 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 16 年之前
父節點
當前提交
a5a91680f0
共有 5 個文件被更改,包括 7 次插入11 次删除
  1. 1 1
      include/raster.h
  2. 1 1
      lib/raster/color_rand.c
  3. 2 6
      lib/raster/color_range.c
  4. 2 2
      raster/r.le/r.le.patch/trace.c
  5. 1 1
      raster/r.resample/main.c

+ 1 - 1
include/raster.h

@@ -161,7 +161,7 @@ void Rast__organize_colors(struct Colors *);
 void Rast_make_random_colors(struct Colors *, CELL, CELL);
 void Rast_make_random_colors(struct Colors *, CELL, CELL);
 
 
 /* color_range.c */
 /* color_range.c */
-void Rast_set_color_range(CELL, CELL, struct Colors *);
+void Rast_set_c_color_range(CELL, CELL, struct Colors *);
 void Rast_set_d_color_range(DCELL, DCELL, struct Colors *);
 void Rast_set_d_color_range(DCELL, DCELL, struct Colors *);
 void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *);
 void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *);
 void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
 void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *);

+ 1 - 1
lib/raster/color_rand.c

@@ -45,5 +45,5 @@ void Rast_make_random_colors(struct Colors *colors, CELL min, CELL max)
 	blu = rand() & 0377;
 	blu = rand() & 0377;
 	Rast_add_modular_color_rule(n, red, grn, blu, n, red, grn, blu, colors);
 	Rast_add_modular_color_rule(n, red, grn, blu, n, red, grn, blu, colors);
     }
     }
-    Rast_set_color_range(min, max, colors);
+    Rast_set_c_color_range(min, max, colors);
 }
 }

+ 2 - 6
lib/raster/color_range.c

@@ -16,13 +16,11 @@
 
 
 /*!
 /*!
   \brief Set color range (CELL version)
   \brief Set color range (CELL version)
-
-  \todo Rename to G_set_c_color_range() ?
-
+  
   \param min,max minimum and maximum value
   \param min,max minimum and maximum value
   \param colors pointer to Colors structure which holds color info
   \param colors pointer to Colors structure which holds color info
 */
 */
-void Rast_set_color_range(CELL min, CELL max, struct Colors *colors)
+void Rast_set_c_color_range(CELL min, CELL max, struct Colors *colors)
 {
 {
     if (min < max) {
     if (min < max) {
 	colors->cmin = (DCELL) min;
 	colors->cmin = (DCELL) min;
@@ -55,8 +53,6 @@ void Rast_set_d_color_range(DCELL min, DCELL max, struct Colors *colors)
 /*!
 /*!
   \brief Get color range values (CELL)
   \brief Get color range values (CELL)
 
 
-  \todo Rename to G_get_c_color_range() ?
-  
   Returns min and max category in the range or huge numbers if the
   Returns min and max category in the range or huge numbers if the
   color table is defined on floating cell values and not on
   color table is defined on floating cell values and not on
   categories.
   categories.

+ 2 - 2
raster/r.le/r.le.patch/trace.c

@@ -398,7 +398,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value,
 		    cmin = min;
 		    cmin = min;
 		if (max < cmax)
 		if (max < cmax)
 		    cmax = max;
 		    cmax = max;
-		Rast_set_color_range(cmin, cmax, &colr);
+		Rast_set_c_color_range(cmin, cmax, &colr);
 	    }
 	    }
 	    else {
 	    else {
 		DCELL dmin, dmax;
 		DCELL dmin, dmax;
@@ -411,7 +411,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value,
 		    cmin = dmin;
 		    cmin = dmin;
 		if (dmax < cmax)
 		if (dmax < cmax)
 		    cmax = dmax;
 		    cmax = dmax;
-		Rast_set_color_range(cmin, cmax, &colr);
+		Rast_set_c_color_range(cmin, cmax, &colr);
 	    }
 	    }
 	    Rast_write_colors("interior", mapset, &colr);
 	    Rast_write_colors("interior", mapset, &colr);
 	}
 	}

+ 1 - 1
raster/r.resample/main.c

@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
 		cmin = min;
 		cmin = min;
 	    if (max < cmax)
 	    if (max < cmax)
 		cmax = max;
 		cmax = max;
-	    Rast_set_color_range(cmin, cmax, &colr);
+	    Rast_set_c_color_range(cmin, cmax, &colr);
 	}
 	}
 	Rast_write_colors(result, G_mapset(), &colr);
 	Rast_write_colors(result, G_mapset(), &colr);
     }
     }