2000-05-31 14:15:06 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimppixelrgn.h
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
2000-05-31 14:15:06 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-18 06:28:01 +08:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2003-12-05 23:55:15 +08:00
|
|
|
*
|
2000-05-31 14:15:06 +08:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2003-12-05 23:55:15 +08:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-05-31 14:15:06 +08:00
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-18 06:28:01 +08:00
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
2003-12-05 23:55:15 +08:00
|
|
|
*/
|
2000-05-31 14:15:06 +08:00
|
|
|
|
|
|
|
#ifndef __GIMP_PIXEL_RGN_H__
|
|
|
|
#define __GIMP_PIXEL_RGN_H__
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_BEGIN_DECLS
|
2000-05-31 14:15:06 +08:00
|
|
|
|
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
|
|
|
|
|
|
|
struct _GimpPixelRgn
|
|
|
|
{
|
|
|
|
guchar *data; /* pointer to region data */
|
|
|
|
GimpDrawable *drawable; /* pointer to drawable */
|
|
|
|
guint bpp; /* bytes per pixel */
|
|
|
|
guint rowstride; /* bytes per pixel row */
|
|
|
|
guint x, y; /* origin */
|
|
|
|
guint w, h; /* width and height of region */
|
|
|
|
guint dirty : 1; /* will this region be dirtied? */
|
|
|
|
guint shadow : 1; /* will this region use the shadow or normal tiles */
|
|
|
|
guint process_count; /* used internally */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
void gimp_pixel_rgn_init (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
GimpDrawable *drawable,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height,
|
|
|
|
gint dirty,
|
|
|
|
gint shadow);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_resize (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_get_pixel (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_get_row (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_get_col (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint height);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_get_rect (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
const guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_set_row (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
const guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_set_col (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
const guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint height);
|
2000-05-31 14:15:06 +08:00
|
|
|
void gimp_pixel_rgn_set_rect (GimpPixelRgn *pr,
|
2006-04-12 18:53:28 +08:00
|
|
|
const guchar *buf,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2000-05-31 14:15:06 +08:00
|
|
|
gpointer gimp_pixel_rgns_register (gint nrgns,
|
2006-04-12 18:53:28 +08:00
|
|
|
...);
|
2000-05-31 14:15:06 +08:00
|
|
|
gpointer gimp_pixel_rgns_register2 (gint nrgns,
|
2006-04-12 18:53:28 +08:00
|
|
|
GimpPixelRgn **prs);
|
2000-05-31 14:15:06 +08:00
|
|
|
gpointer gimp_pixel_rgns_process (gpointer pri_ptr);
|
|
|
|
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_END_DECLS
|
2000-05-31 14:15:06 +08:00
|
|
|
|
|
|
|
#endif /* __GIMP_PIXEL_RGN_H__ */
|