home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / curves.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-17  |  2.2 KB  |  79 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License as published by
  6.  * the Free Software Foundation; either version 2 of the License, or
  7.  * (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  */
  18.  
  19. #ifndef __CURVES_H__
  20. #define __CURVES_H__
  21.  
  22. #include "image_map.h"
  23. #include "lut_funcs.h"
  24. #include "tools.h"
  25.  
  26. #define SMOOTH 0
  27. #define GFREE  1
  28.  
  29.  
  30. typedef struct _CurvesDialog CurvesDialog;
  31.  
  32. struct _CurvesDialog
  33. {
  34.   GtkWidget    *shell;
  35.  
  36.   GtkWidget    *channel_menu;
  37.   GtkWidget    *xrange;
  38.   GtkWidget    *yrange;
  39.   GtkWidget    *graph;
  40.   GdkPixmap    *pixmap;
  41.   GtkWidget    *curve_type_menu;
  42.  
  43.   GimpDrawable *drawable;
  44.   ImageMap      image_map;
  45.  
  46.   gint          color;
  47.   gint          channel;
  48.   gboolean      preview;
  49.  
  50.   gint          grab_point;
  51.   gint          last;
  52.   gint          leftmost;
  53.   gint          rightmost;
  54.   gint          curve_type[5];
  55.   gint          points[5][17][2];
  56.   guchar        curve[5][256];
  57.   gint          col_value[5];
  58.   
  59.   gint          cursor_ind_height;
  60.   gint          cursor_ind_width;
  61.   gint          cursor_ind_ascent;
  62.  
  63.   GimpLut      *lut;
  64. };
  65.  
  66. Tool * tools_new_curves       (void);
  67. void   tools_free_curves      (Tool         *tool);
  68.  
  69. void   curves_dialog_hide     (void);
  70. void   curves_initialize      (GDisplay     *gdisp);
  71. void   curves_free            (void);
  72. float  curves_lut_func        (CurvesDialog *cd,
  73.                    gint          nchannels,
  74.                    gint          channel,
  75.                    gfloat        value);
  76. void   curves_calculate_curve (CurvesDialog *cd);
  77.  
  78. #endif  /*  __CURVES_H__  */
  79.