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 "filexml.inc"
29 #include "floatauto.inc"
31 class FloatAutos : public Autos
36 // Value for default auto
41 void draw_joining_line(BC_SubWindow *canvas, int vertical, int center_pixel, int x1, int y1, int x2, int y2);
42 int get_testy(float slope, int cursor_x, int ax, int ay);
43 // Return 1 if the automation is constant.
44 // constant - set to the value if it is constant
45 int automation_is_constant(int64_t start,
49 double get_automation_constant(int64_t start, int64_t end);
50 // Get value at a specific point. This needs previous and next stores
51 // because it is used for every pixel in the timeline drawing function.
52 float get_value(int64_t position,
56 // Helper: just calc the bezier function without doing any lookup of nodes
57 static float calculate_bezier(FloatAuto *previous, FloatAuto *next, int64_t position);
58 static float calculate_bezier_derivation(FloatAuto *previous, FloatAuto *next, int64_t position);
59 void get_extents(float *min,
61 int *coords_undefined,
65 void set_automation_mode(int64_t start, int64_t end, int mode);
66 void set_proxy(int orig_scale, int new_scale);
67 double automation_integral(int64_t start, int64_t length, int direction);
68 int64_t speed_position(double pos);