home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / libgimp / gimppixelrgn.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-31  |  3.8 KB  |  111 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimppixelrgn.h
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  * 
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */         
  21.  
  22. #ifndef __GIMP_PIXEL_RGN_H__
  23. #define __GIMP_PIXEL_RGN_H__
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif /* __cplusplus */
  28.  
  29. /* For information look into the C source or the html documentation */
  30.  
  31.  
  32. struct _GimpPixelRgn
  33. {
  34.   guchar       *data;          /* pointer to region data */
  35.   GimpDrawable *drawable;      /* pointer to drawable */
  36.   guint         bpp;           /* bytes per pixel */
  37.   guint         rowstride;     /* bytes per pixel row */
  38.   guint         x, y;          /* origin */
  39.   guint         w, h;          /* width and height of region */
  40.   guint         dirty : 1;     /* will this region be dirtied? */
  41.   guint         shadow : 1;    /* will this region use the shadow or normal tiles */
  42.   guint         process_count; /* used internally */
  43. };
  44.  
  45.  
  46. void      gimp_pixel_rgn_init       (GimpPixelRgn  *pr,
  47.                      GimpDrawable  *drawable,
  48.                      gint           x,
  49.                      gint           y,
  50.                      gint           width,
  51.                      gint           height,
  52.                      gint           dirty,
  53.                      gint           shadow);
  54. void      gimp_pixel_rgn_resize     (GimpPixelRgn  *pr,
  55.                      gint           x,
  56.                      gint           y,
  57.                      gint           width,
  58.                      gint           height);
  59. void      gimp_pixel_rgn_get_pixel  (GimpPixelRgn  *pr,
  60.                      guchar        *buf,
  61.                      gint           x,
  62.                      gint           y);
  63. void      gimp_pixel_rgn_get_row    (GimpPixelRgn  *pr,
  64.                      guchar        *buf,
  65.                      gint           x,
  66.                      gint           y,
  67.                      gint           width);
  68. void      gimp_pixel_rgn_get_col    (GimpPixelRgn  *pr,
  69.                      guchar        *buf,
  70.                      gint           x,
  71.                      gint           y,
  72.                      gint           height);
  73. void      gimp_pixel_rgn_get_rect   (GimpPixelRgn  *pr,
  74.                      guchar        *buf,
  75.                      gint           x,
  76.                      gint           y,
  77.                      gint           width,
  78.                      gint           height);
  79. void      gimp_pixel_rgn_set_pixel  (GimpPixelRgn  *pr,
  80.                      guchar        *buf,
  81.                      gint           x,
  82.                      gint           y);
  83. void      gimp_pixel_rgn_set_row    (GimpPixelRgn  *pr,
  84.                      guchar        *buf,
  85.                      gint           x,
  86.                      gint           y,
  87.                      gint           width);
  88. void      gimp_pixel_rgn_set_col    (GimpPixelRgn  *pr,
  89.                      guchar        *buf,
  90.                      gint           x,
  91.                      gint           y,
  92.                      gint           height);
  93. void      gimp_pixel_rgn_set_rect   (GimpPixelRgn  *pr,
  94.                      guchar        *buf,
  95.                      gint           x,
  96.                      gint           y,
  97.                      gint           width,
  98.                      gint           height);
  99. gpointer  gimp_pixel_rgns_register  (gint           nrgns,
  100.                      ...);
  101. gpointer  gimp_pixel_rgns_register2 (gint           nrgns,
  102.                      GimpPixelRgn **prs);
  103. gpointer  gimp_pixel_rgns_process   (gpointer       pri_ptr);
  104.  
  105.  
  106. #ifdef __cplusplus
  107. }
  108. #endif /* __cplusplus */
  109.  
  110. #endif /* __GIMP_PIXEL_RGN_H__ */
  111.