home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / pixel_region.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-01  |  3.5 KB  |  93 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License as published by
  6.  * the Free Software Foundation; either version 2 of the License, or
  7.  * (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  */
  18. #ifndef __PIXEL_REGION_H__
  19. #define __PIXEL_REGION_H__
  20.  
  21. #include "tile_manager.h"
  22. #include "pixel_processor.h" /* this is temporary, */
  23.  
  24. typedef struct _PixelRegion PixelRegion;
  25.  
  26. struct _PixelRegion
  27. {
  28.   guchar      *data;           /*  pointer to region data        */
  29.   TileManager *tiles;          /*  pointer to tiles              */
  30.   Tile        *curtile;        /*  current tile                  */
  31.   gint         offx;           /*  tile offsets                  */
  32.   gint         offy;           /*  tile offsets                  */
  33.   gint         rowstride;      /*  bytes per pixel row           */
  34.   gint         x;              /*  origin                        */
  35.   gint         y;              /*  origin                        */
  36.   gint         w;              /*  width of region               */
  37.   gint         h;              /*  height of region              */
  38.   gint         bytes;          /*  bytes per pixel               */
  39.   gboolean     dirty;          /*  will this region be dirtied?  */
  40.   gint         process_count;  /*  used internally               */
  41. };
  42.  
  43.  
  44. /*  PixelRegion functions  */
  45.  
  46. void     pixel_region_init          (PixelRegion *PR, 
  47.                      TileManager *tiles, 
  48.                      gint         x, 
  49.                      gint         y, 
  50.                      gint         w, 
  51.                      gint         h, 
  52.                      gboolean     dirty);
  53. void     pixel_region_resize        (PixelRegion *PR, 
  54.                      gint         x, 
  55.                      gint         y, 
  56.                      gint         w, 
  57.                      gint         h);
  58. void     pixel_region_get_async     (PixelRegion *PR, 
  59.                      gint         ulx, 
  60.                      gint         uly, 
  61.                      gint         lrx, 
  62.                      gint         lry);
  63. void     pixel_region_get_row       (PixelRegion *PR, 
  64.                      gint         x, 
  65.                      gint         y, 
  66.                      gint         w, 
  67.                      guchar      *data, 
  68.                      gint         subsample);
  69. void     pixel_region_set_row       (PixelRegion *PR, 
  70.                      gint         x, 
  71.                      gint         y, 
  72.                      gint         w, 
  73.                      guchar      *data);
  74. void     pixel_region_get_col       (PixelRegion *PR, 
  75.                      gint         x, 
  76.                      gint         y, 
  77.                      gint         h, 
  78.                      guchar      *data, 
  79.                      gint         subsample);
  80. void     pixel_region_set_col       (PixelRegion *PR, 
  81.                      gint         x, 
  82.                      gint         y, 
  83.                      gint         h, 
  84.                      guchar      *data);
  85. gboolean pixel_region_has_alpha     (PixelRegion *PR);
  86. gpointer pixel_regions_register     (gint         num_regions, 
  87.                      ...);
  88. gpointer pixel_regions_process      (gpointer     PRI_ptr);
  89. void     pixel_regions_process_stop (gpointer     PRI_ptr);
  90.  
  91.  
  92. #endif /* __PIXEL_REGION_H__ */
  93.