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

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * General, non-jittered adaptive supersampling library
  5.  * Copyright (C) 1997 Federico Mena Quintero
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2 of the License, or
  10.  * (at your option) any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20.  *
  21.  */
  22.  
  23.  
  24. #ifndef __ASUPSAMPLE_H__
  25. #define __ASUPSAMPLE_H__
  26.  
  27. #include "gimpprogress.h"
  28.  
  29. /***** Types *****/
  30.  
  31. typedef struct {
  32.     double r, g, b, a; /* Range is [0, 1] */
  33. } color_t;
  34.  
  35. typedef void (*render_func_t) (double x, double y, color_t *color, void *render_data);
  36. typedef void (*put_pixel_func_t) (int x, int y, color_t color, void *put_pixel_data);
  37.  
  38.  
  39. /***** Functions *****/
  40.  
  41. unsigned long adaptive_supersample_area(int x1, int y1, int x2, int y2, int max_depth, double threshold,
  42.                     render_func_t render_func, void *render_data,
  43.                     put_pixel_func_t put_pixel_func, void *put_pixel_data,
  44.                     progress_func_t progress_func, void *progress_data);
  45.  
  46.  
  47. #endif
  48.