瀏覽代碼

displaylib: D_draw_cell() removed/replaced by D_draw_c_raster()
D_cell_draw_begin() renamed to D_raster_draw_begin()
D_cell_draw_end() rename do D_raster_draw_end()


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63558 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 年之前
父節點
當前提交
09c54c454c
共有 3 個文件被更改,包括 20 次插入40 次删除
  1. 2 3
      include/defs/display.h
  2. 11 29
      lib/display/raster.c
  3. 7 8
      lib/display/raster2.c

+ 2 - 3
include/defs/display.h

@@ -107,12 +107,11 @@ int D_draw_raster(int, const void *, struct Colors *, RASTER_MAP_TYPE);
 int D_draw_d_raster(int, const DCELL *, struct Colors *);
 int D_draw_f_raster(int, const FCELL *, struct Colors *);
 int D_draw_c_raster(int, const CELL *, struct Colors *);
-int D_draw_cell(int, const CELL *, struct Colors *);
-void D_cell_draw_begin(void);
+void D_raster_draw_begin(void);
 int D_draw_raster_RGB(int, const void *, const void *, const void *,
 		      struct Colors *, struct Colors *, struct Colors *,
 		      RASTER_MAP_TYPE, RASTER_MAP_TYPE, RASTER_MAP_TYPE);
-void D_cell_draw_end(void);
+void D_raster_draw_end(void);
 
 /* raster2.c */
 int D_set_overlay_mode(int);

+ 11 - 29
lib/display/raster.c

@@ -86,41 +86,23 @@ int D_draw_f_raster(int A_row, const FCELL * farray, struct Colors *colors)
 
 /*!
   \brief Draw raster row (CELL)
-  
-  \param A_row row number (starts at 0)
-  \param carray data buffer
-  \param colors pointer to Colors structure
-
-  \return row number needed for next pixel row
-  \return -1 nothing to draw (on error or end of raster)
-*/
-int D_draw_c_raster(int A_row, const CELL * carray, struct Colors *colors)
-{
-    return draw_cell(A_row, carray, colors, CELL_TYPE);
-}
-
 
-/*!
-  \brief Render a raster row
-
-  \todo Replace by D_draw_c_raster()
-  
-  The <b>row</b> gives the map array row. The <b>raster</b> array
+  The <b>row</b> gives the map array row. The <b>carray</b> array
   provides the categories for each raster value in that row.  This
   routine is called consecutively with the information necessary to
   draw a raster image from north to south. No rows can be skipped. All
   screen pixel rows which represent the current map array row are
   rendered. The routine returns the map array row which is needed to
   draw the next screen pixel row.
- 
-  \param A_row row number
-  \param carray
-  \param colors pointer to Colors structure
   
-  \return next row to draw
-  \return -1 nothing to draw
+  \param A_row row number (starts at 0)
+  \param carray data buffer
+  \param colors pointer to Colors structure
+
+  \return row number needed for next pixel row
+  \return -1 nothing to draw (on error or end of raster)
 */
-int D_draw_cell(int A_row, const CELL * carray, struct Colors *colors)
+int D_draw_c_raster(int A_row, const CELL * carray, struct Colors *colors)
 {
     return draw_cell(A_row, carray, colors, CELL_TYPE);
 }
@@ -167,7 +149,7 @@ static int draw_cell(int A_row,
   <b>right</b>, all of which are obtainable from D_get_dst() for the
   current frame.
 */
-void D_cell_draw_begin(void)
+void D_raster_draw_begin(void)
 {
     /* Set up the screen for drawing map */
     D_get_a(src);
@@ -244,9 +226,9 @@ int D_draw_raster_RGB(int A_row,
 }
 
 /*!
-  \brief Finish rendering
+  \brief Finish raster rendering
 */
-void D_cell_draw_end(void)
+void D_raster_draw_end(void)
 {
     COM_end_raster();
 }

+ 7 - 8
lib/display/raster2.c

@@ -37,17 +37,16 @@ int D__overlay_mode = 0;	/* external for now, but to be fixed later */
 
 
 /*!
- * \brief configure raster overlay mode
+ * \brief Configure raster overlay mode
  *
- * This routine determines if <i>D_draw_cell</i> draws in overlay mode
- * (locations with category 0 are left untouched) or not (colored with the color
- * for category 0). Set <b>flag</b> to 1 (TRUE) for overlay mode; 0 (FALSE)
- * otherwise.
+ * This routine determines if D_draw_raster() draws in overlay mode
+ * (locations with category 0 are left untouched) or not (colored with
+ * the color for category 0).
  *
- *  \param flag
- *  \return int
+ * \param n 1 (TRUE) for overlay mode; 0 (FALSE) otherwise
+ *
+ * \return 0
  */
-
 int D_set_overlay_mode(int n)
 {
     D__overlay_mode = (n != 0);