rework histogram_bezier, init wm icon set_icon(gg), update de.po+msg/txt
[goodguy/history.git] / cinelerra-5.1 / plugins / histogram_bezier / bistogramconfig.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program 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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef HISTOGRAMCONFIG_H
23 #define HISTOGRAMCONFIG_H
24
25
26 #include "bistogram.inc"
27 #include "bistogramconfig.inc"
28 #include "linklist.h"
29 #include <stdint.h>
30
31 class HistogramPoint : public ListItem<HistogramPoint>
32 {
33 public:
34         HistogramPoint();
35         ~HistogramPoint();
36
37         int equivalent(HistogramPoint *src);
38         void copy_from(HistogramPoint *that);
39         float x, y;
40         float gradient;
41         float xoffset_left;
42         float xoffset_right;
43 };
44
45
46 class HistogramPoints : public List<HistogramPoint>
47 {
48 public:
49         HistogramPoints();
50         ~HistogramPoints();
51
52 // Insert new point
53         HistogramPoint* insert(float x, float y);
54         void clear();
55         int equivalent(HistogramPoints *src);
56         void boundaries();
57         void copy_from(HistogramPoints *src);
58         static int cmprx(HistogramPoint *ap, HistogramPoint *bp);
59         void interpolate(HistogramPoints *prev, HistogramPoints *next,
60                 double prev_scale, double next_scale);
61 };
62
63 class HistogramConfig
64 {
65 public:
66         HistogramConfig();
67
68         int equivalent(HistogramConfig &that);
69         void copy_from(HistogramConfig &that);
70         void interpolate(HistogramConfig &prev,
71                 HistogramConfig &next,
72                 int64_t prev_frame,
73                 int64_t next_frame,
74                 int64_t current_frame);
75 // Used by constructor and reset button
76         void reset(int do_mode);
77         void reset_points();
78         void boundaries();
79         void dump();
80
81 // Range 0 - 1.0
82 // Input points
83         HistogramPoints points[HISTOGRAM_MODES];
84 // Output points
85         float output_min[HISTOGRAM_MODES];
86         float output_max[HISTOGRAM_MODES];
87         int automatic;
88         float threshold;
89         int split;
90         int smoothMode;
91 };
92
93
94 #endif
95
96
97