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 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 * 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, see 18 * <https://www.gnu.org/licenses/>. 19 */ 20 21 #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) 22 #error "Only <libgimp/gimp.h> can be included directly." 23 #endif 24 25 #ifndef __GIMP_PIXEL_RGN_H__ 26 #define __GIMP_PIXEL_RGN_H__ 27 28 G_BEGIN_DECLS 29 30 /* For information look into the C source or the html documentation */ 31 32 33 struct _GimpPixelRgn 34 { 35 guchar *data; /* pointer to region data */ 36 GimpDrawable *drawable; /* pointer to drawable */ 37 gint bpp; /* bytes per pixel */ 38 gint rowstride; /* bytes per pixel row */ 39 gint x, y; /* origin */ 40 gint w, h; /* width and height of region */ 41 guint dirty : 1; /* will this region be dirtied? */ 42 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, 49 GimpDrawable *drawable, 50 gint x, 51 gint y, 52 gint width, 53 gint height, 54 gint dirty, 55 gint shadow); 56 GIMP_DEPRECATED 57 void gimp_pixel_rgn_resize (GimpPixelRgn *pr, 58 gint x, 59 gint y, 60 gint width, 61 gint height); 62 GIMP_DEPRECATED_FOR(gegl_buffer_sample) 63 void gimp_pixel_rgn_get_pixel (GimpPixelRgn *pr, 64 guchar *buf, 65 gint x, 66 gint y); 67 GIMP_DEPRECATED_FOR(gegl_buffer_get) 68 void gimp_pixel_rgn_get_row (GimpPixelRgn *pr, 69 guchar *buf, 70 gint x, 71 gint y, 72 gint width); 73 GIMP_DEPRECATED_FOR(gegl_buffer_get) 74 void gimp_pixel_rgn_get_col (GimpPixelRgn *pr, 75 guchar *buf, 76 gint x, 77 gint y, 78 gint height); 79 GIMP_DEPRECATED_FOR(gegl_buffer_get) 80 void gimp_pixel_rgn_get_rect (GimpPixelRgn *pr, 81 guchar *buf, 82 gint x, 83 gint y, 84 gint width, 85 gint height); 86 GIMP_DEPRECATED_FOR(gegl_buffer_set) 87 void gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr, 88 const guchar *buf, 89 gint x, 90 gint y); 91 GIMP_DEPRECATED_FOR(gegl_buffer_set) 92 void gimp_pixel_rgn_set_row (GimpPixelRgn *pr, 93 const guchar *buf, 94 gint x, 95 gint y, 96 gint width); 97 GIMP_DEPRECATED_FOR(gegl_buffer_set) 98 void gimp_pixel_rgn_set_col (GimpPixelRgn *pr, 99 const guchar *buf, 100 gint x, 101 gint y, 102 gint height); 103 GIMP_DEPRECATED_FOR(gegl_buffer_set) 104 void gimp_pixel_rgn_set_rect (GimpPixelRgn *pr, 105 const guchar *buf, 106 gint x, 107 gint y, 108 gint width, 109 gint height); 110 GIMP_DEPRECATED_FOR(gegl_buffer_iterator_new) 111 gpointer gimp_pixel_rgns_register (gint nrgns, 112 ...); 113 GIMP_DEPRECATED_FOR(gegl_buffer_iterator_new) 114 gpointer gimp_pixel_rgns_register2 (gint nrgns, 115 GimpPixelRgn **prs); 116 GIMP_DEPRECATED_FOR(gegl_buffer_iterator_next) 117 gpointer gimp_pixel_rgns_process (gpointer pri_ptr); 118 119 120 G_END_DECLS 121 122 #endif /* __GIMP_PIXEL_RGN_H__ */ 123