gimppixelrgn.h 5.06 KB
Newer Older
1 2 3 4 5
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
 *
 * gimppixelrgn.h
 *
6
 * This library is free software: you can redistribute it and/or
7 8
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
9
 * version 3 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 13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 15 16
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with this library.  If not, see
18
 * <https://www.gnu.org/licenses/>.
19
 */
20

21 22 23 24
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
#error "Only <libgimp/gimp.h> can be included directly."
#endif

25 26 27
#ifndef __GIMP_PIXEL_RGN_H__
#define __GIMP_PIXEL_RGN_H__

28
G_BEGIN_DECLS
29 30 31 32 33 34 35 36

/* For information look into the C source or the html documentation */


struct _GimpPixelRgn
{
  guchar       *data;          /* pointer to region data */
  GimpDrawable *drawable;      /* pointer to drawable */
37 38 39 40
  gint          bpp;           /* bytes per pixel */
  gint          rowstride;     /* bytes per pixel row */
  gint          x, y;          /* origin */
  gint          w, h;          /* width and height of region */
Mukund Sivaraman's avatar
Mukund Sivaraman committed
41 42
  guint         dirty : 1;     /* will this region be dirtied? */
  guint         shadow : 1;    /* will this region use the shadow or normal tiles */
43
  gint          process_count; /* used internally */
44 45 46
};


47
GIMP_DEPRECATED_FOR(gimp_drawable_get_buffer)
48
void      gimp_pixel_rgn_init       (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
49 50 51 52 53 54 55
                                     GimpDrawable  *drawable,
                                     gint           x,
                                     gint           y,
                                     gint           width,
                                     gint           height,
                                     gint           dirty,
                                     gint           shadow);
56
GIMP_DEPRECATED_FOR(gegl_buffer_sample)
57
void      gimp_pixel_rgn_get_pixel  (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
58 59 60
                                     guchar        *buf,
                                     gint           x,
                                     gint           y);
61
GIMP_DEPRECATED_FOR(gegl_buffer_get)
62
void      gimp_pixel_rgn_get_row    (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
63 64 65 66
                                     guchar        *buf,
                                     gint           x,
                                     gint           y,
                                     gint           width);
67
GIMP_DEPRECATED_FOR(gegl_buffer_get)
68
void      gimp_pixel_rgn_get_col    (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
69 70 71 72
                                     guchar        *buf,
                                     gint           x,
                                     gint           y,
                                     gint           height);
73
GIMP_DEPRECATED_FOR(gegl_buffer_get)
74
void      gimp_pixel_rgn_get_rect   (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
75 76 77 78 79
                                     guchar        *buf,
                                     gint           x,
                                     gint           y,
                                     gint           width,
                                     gint           height);
80
GIMP_DEPRECATED_FOR(gegl_buffer_set)
81
void      gimp_pixel_rgn_set_pixel  (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
82 83 84
                                     const guchar  *buf,
                                     gint           x,
                                     gint           y);
85
GIMP_DEPRECATED_FOR(gegl_buffer_set)
86
void      gimp_pixel_rgn_set_row    (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
87 88 89 90
                                     const guchar  *buf,
                                     gint           x,
                                     gint           y,
                                     gint           width);
91
GIMP_DEPRECATED_FOR(gegl_buffer_set)
92
void      gimp_pixel_rgn_set_col    (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
93 94 95 96
                                     const guchar  *buf,
                                     gint           x,
                                     gint           y,
                                     gint           height);
97
GIMP_DEPRECATED_FOR(gegl_buffer_set)
98
void      gimp_pixel_rgn_set_rect   (GimpPixelRgn  *pr,
Sven Neumann's avatar
Sven Neumann committed
99 100 101 102 103
                                     const guchar  *buf,
                                     gint           x,
                                     gint           y,
                                     gint           width,
                                     gint           height);
104
GIMP_DEPRECATED_FOR(gegl_buffer_iterator_new)
105
gpointer  gimp_pixel_rgns_register  (gint           nrgns,
Sven Neumann's avatar
Sven Neumann committed
106
                                     ...);
107
GIMP_DEPRECATED_FOR(gegl_buffer_iterator_new)
108
gpointer  gimp_pixel_rgns_register2 (gint           nrgns,
Sven Neumann's avatar
Sven Neumann committed
109
                                     GimpPixelRgn **prs);
110
GIMP_DEPRECATED_FOR(gegl_buffer_iterator_next)
111 112 113
gpointer  gimp_pixel_rgns_process   (gpointer       pri_ptr);


114
G_END_DECLS
115 116

#endif /* __GIMP_PIXEL_RGN_H__ */