4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
28 #include "bcdisplayinfo.h"
34 #include "pluginvclient.h"
35 #include "rotateframe.h"
45 class RotateDrawPivot;
46 class RotateInterpolate;
47 class RotateAngleText;
48 class RotateAngleSlider;
49 class RotatePivotXText;
50 class RotatePivotXSlider;
51 class RotatePivotYText;
52 class RotatePivotYSlider;
57 #define RESET_DEFAULT_SETTINGS 10
60 #define RESET_PIVOT_X 2
61 #define RESET_PIVOT_Y 3
69 void reset(int clear);
70 int equivalent(RotateConfig &that);
71 void copy_from(RotateConfig &that);
72 void interpolate(RotateConfig &prev,
85 class RotateToggle : public BC_Radial
88 RotateToggle(RotateWindow *window,
102 class RotateDrawPivot : public BC_CheckBox
105 RotateDrawPivot(RotateWindow *window,
106 RotateEffect *plugin,
110 RotateEffect *plugin;
111 RotateWindow *window;
115 class RotateInterpolate : public BC_CheckBox
118 RotateInterpolate(RotateEffect *plugin, int x, int y);
120 RotateEffect *plugin;
123 class RotateAngleText : public BC_TumbleTextBox
126 RotateAngleText(RotateWindow *window,
127 RotateEffect *plugin,
132 RotateEffect *plugin;
133 RotateWindow *window;
136 class RotateAngleSlider : public BC_FSlider
139 RotateAngleSlider(RotateWindow *window,
140 RotateEffect *plugin,
141 int x, int y, int w);
144 RotateEffect *plugin;
145 RotateWindow *window;
149 class RotatePivotXText : public BC_TumbleTextBox
152 RotatePivotXText(RotateWindow *window,
153 RotateEffect *plugin,
158 RotateEffect *plugin;
159 RotateWindow *window;
162 class RotatePivotXSlider : public BC_FSlider
165 RotatePivotXSlider(RotateWindow *window,
166 RotateEffect *plugin,
167 int x, int y, int w);
170 RotateEffect *plugin;
171 RotateWindow *window;
175 class RotatePivotYText : public BC_TumbleTextBox
178 RotatePivotYText(RotateWindow *window,
179 RotateEffect *plugin,
184 RotateEffect *plugin;
185 RotateWindow *window;
188 class RotatePivotYSlider : public BC_FSlider
191 RotatePivotYSlider(RotateWindow *window,
192 RotateEffect *plugin,
193 int x, int y, int w);
196 RotateEffect *plugin;
197 RotateWindow *window;
203 class RotateClr : public BC_Button
206 RotateClr(RotateWindow *window, RotateEffect *plugin,
207 int x, int y, int clear);
210 RotateEffect *plugin;
211 RotateWindow *window;
216 class RotateReset : public BC_GenericButton
219 RotateReset(RotateEffect *plugin, RotateWindow *window,
223 RotateEffect *plugin;
224 RotateWindow *window;
228 class RotateWindow : public PluginClientWindow
231 RotateWindow(RotateEffect *plugin);
233 void create_objects();
236 int update_sliders();
238 int update_toggles();
240 RotateEffect *plugin;
241 RotateToggle *toggle180neg;
242 RotateToggle *toggle90neg;
243 RotateToggle *toggle0;
244 RotateToggle *toggle90;
245 RotateToggle *toggle180;
247 RotateAngleText *rotate_angle_text;
248 RotateAngleSlider *rotate_angle_slider;
249 RotateClr *rotate_angle_clr;
251 RotateDrawPivot *draw_pivot;
253 RotatePivotXText *rotate_pivot_x_text;
254 RotatePivotXSlider *rotate_pivot_x_slider;
255 RotateClr *rotate_pivot_x_clr;
257 RotatePivotYText *rotate_pivot_y_text;
258 RotatePivotYSlider *rotate_pivot_y_slider;
259 RotateClr *rotate_pivot_y_clr;
261 // RotateInterpolate *bilinear;
268 class RotateEffect : public PluginVClient
271 RotateEffect(PluginServer *server);
274 PLUGIN_CLASS_MEMBERS(RotateConfig)
275 int process_buffer(VFrame *frame,
276 int64_t start_position,
280 void save_data(KeyFrame *keyframe);
281 void read_data(KeyFrame *keyframe);
284 AffineEngine *engine;
285 int need_reconfigure;