r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / bezierauto.h
blobe1cef48a32df6f36510d6d1fc8eca326c5c5c457
1 #ifndef BEZIERAUTO_H
2 #define BEZIERAUTO_H
4 // Automation point that takes floating point values
6 #include "auto.h"
7 #include "bezierautos.inc"
8 #include "filexml.inc"
10 class BezierAuto : public Auto
12 public:
13 BezierAuto() {};
14 BezierAuto(EDL *edl, BezierAutos *autos);
15 ~BezierAuto();
17 int operator==(Auto &that);
18 int operator==(BezierAuto &that);
19 void copy_from(Auto *that);
20 void copy_from(BezierAuto *that);
21 void load(FileXML *file);
22 void copy(int64_t start, int64_t end, FileXML *file, int default_only);
23 int draw(BC_SubWindow *canvas,
24 int x,
25 int center_pixel,
26 float scale,
27 int vertical,
28 int show_value);
30 // return a selection type if selected
31 // 0 - none
32 // 1 - frame number
33 // 2 - xy
34 // 3 - zoom
35 // 4 - control_in_xy
36 // 5 - control_out_xy
37 // 6 - control_in_zoom
38 // 7 - control_out_zoom
39 int select(BC_SubWindow *canvas,
40 int x,
41 int center_pixel,
42 float scale,
43 int cursor_x,
44 int cursor_y,
45 int shift_down,
46 int ctrl_down,
47 int mouse_button,
48 int vertical);
50 // Z is no longer used
51 float center_x, center_y, center_z;
52 // ***control points are relative to center points***
53 float control_in_x, control_in_y;
54 float control_out_x, control_out_y;
55 float control_in_z, control_out_z;
57 private:
58 int identical(BezierAuto *src);
59 int WIDTH, HEIGHT;
60 int value_to_str(char *string, float value) {};
61 int value_to_str(char *string);
62 int get_control_points(int x, int center_pixel, float scale, int *control_x, int *control_y, int vertical);
63 int test_control_point(int center_x, int center_y, int x, int y, int cursor_x, int cursor_y);
64 float get_distance(int x1, int y1, int x2, int y2);
69 #endif