5 #include "bcdisplayinfo.h"
10 #include "loadbalance.h"
11 #include "picon_png.h"
12 #include "pluginvclient.h"
15 class PerspectiveMain
;
16 class PerspectiveWindow
;
21 class PerspectiveConfig
26 int equivalent(PerspectiveConfig
&that
);
27 void copy_from(PerspectiveConfig
&that
);
28 void interpolate(PerspectiveConfig
&prev
,
29 PerspectiveConfig
&next
,
32 int64_t current_frame
);
34 float x1
, y1
, x2
, y2
, x3
, y3
, x4
, y4
;
36 int window_w
, window_h
;
43 class PerspectiveCanvas
: public BC_SubWindow
46 PerspectiveCanvas(PerspectiveMain
*plugin
,
51 int button_press_event();
52 int button_release_event();
53 int cursor_motion_event();
64 int start_cursor_x
, start_cursor_y
;
65 float start_x1
, start_y1
;
66 float start_x2
, start_y2
;
67 float start_x3
, start_y3
;
68 float start_x4
, start_y4
;
69 PerspectiveMain
*plugin
;
72 class PerspectiveCoord
: public BC_TumbleTextBox
75 PerspectiveCoord(PerspectiveWindow
*gui
,
76 PerspectiveMain
*plugin
,
82 PerspectiveMain
*plugin
;
86 class PerspectiveReset
: public BC_GenericButton
89 PerspectiveReset(PerspectiveMain
*plugin
,
93 PerspectiveMain
*plugin
;
96 class PerspectiveMode
: public BC_Radial
99 PerspectiveMode(PerspectiveMain
*plugin
,
105 PerspectiveMain
*plugin
;
109 class PerspectiveDirection
: public BC_Radial
112 PerspectiveDirection(PerspectiveMain
*plugin
,
118 PerspectiveMain
*plugin
;
122 class PerspectiveWindow
: public BC_Window
125 PerspectiveWindow(PerspectiveMain
*plugin
, int x
, int y
);
126 ~PerspectiveWindow();
128 int create_objects();
130 int resize_event(int x
, int y
);
131 void update_canvas();
134 void calculate_canvas_coords(int &x1
,
143 PerspectiveCanvas
*canvas
;
144 PerspectiveCoord
*x
, *y
;
145 PerspectiveReset
*reset
;
146 PerspectiveMode
*mode_perspective
, *mode_sheer
, *mode_stretch
;
147 PerspectiveMain
*plugin
;
148 PerspectiveDirection
*forward
, *reverse
;
153 PLUGIN_THREAD_HEADER(PerspectiveMain
, PerspectiveThread
, PerspectiveWindow
)
156 class PerspectiveMain
: public PluginVClient
159 PerspectiveMain(PluginServer
*server
);
162 int process_buffer(VFrame
*frame
,
163 int64_t start_position
,
168 void save_data(KeyFrame
*keyframe
);
169 void read_data(KeyFrame
*keyframe
);
173 PLUGIN_CLASS_MEMBERS(PerspectiveConfig
, PerspectiveThread
)
175 float get_current_x();
176 float get_current_y();
177 void set_current_x(float value
);
178 void set_current_y(float value
);
179 VFrame
*input
, *output
;
181 AffineEngine
*engine
;