home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / histogram_tool.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-22  |  2.0 KB  |  65 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. #ifndef __HISTOGRAM_TOOL_H__
  19. #define __HISTOGRAM_TOOL_H__
  20.  
  21. #include "histogramwidget.h"
  22. #include "image_map.h"
  23. #include "tools.h"
  24.  
  25. #define HISTOGRAM_WIDTH 256
  26. #define HISTOGRAM_HEIGHT 150
  27.  
  28. typedef struct _HistogramToolDialog HistogramToolDialog;
  29.  
  30. struct _HistogramToolDialog
  31. {
  32.   GtkWidget       *shell;
  33.  
  34.   GtkWidget       *info_labels[7];
  35.   GtkWidget       *channel_menu;
  36.   HistogramWidget *histogram;
  37.   GimpHistogram   *hist;
  38.   GtkWidget       *gradient;
  39.  
  40.   gdouble          mean;
  41.   gdouble          std_dev;
  42.   gdouble          median;
  43.   gdouble          pixels;
  44.   gdouble          count;
  45.   gdouble          percentile;
  46.  
  47.   GimpDrawable    *drawable;
  48.   ImageMap         image_map;
  49.   gint             channel;
  50.   gint             color;
  51. };
  52.  
  53. /*  histogram_tool functions  */
  54. Tool * tools_new_histogram_tool       (void);
  55. void   tools_free_histogram_tool      (Tool            *tool);
  56.  
  57. void   histogram_tool_initialize      (GDisplay        *gdisp);
  58. void   histogram_tool_free            (void);
  59. void   histogram_tool_histogram_range (HistogramWidget *hw,
  60.                        gint             start,
  61.                        gint             end,
  62.                        gpointer         data);
  63.  
  64. #endif /* __HISTOGRAM_TOOL_H__ */
  65.