X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffloatautos.h;h=94c62badd0af167859c8921c76c66736ce450c84;hb=bb04d41e2befcce16623c40c1916222d82174130;hp=0e7fa195f4ceb597d989b1af449faa2455f94c53;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/floatautos.h b/cinelerra-5.1/cinelerra/floatautos.h index 0e7fa195..94c62bad 100644 --- a/cinelerra-5.1/cinelerra/floatautos.h +++ b/cinelerra-5.1/cinelerra/floatautos.h @@ -2,6 +2,7 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams + * Copyright (C) 2003-2016 Cinelerra CV contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +28,7 @@ #include "guicast.h" #include "filexml.inc" #include "floatauto.inc" +#include "transportque.inc" class FloatAutos : public Autos { @@ -38,29 +40,25 @@ public: ~FloatAutos(); - void draw_joining_line(BC_SubWindow *canvas, int vertical, int center_pixel, int x1, int y1, int x2, int y2); + void draw_joining_line(BC_SubWindow *canvas, int vertical, int center_pixel, + int x1, int y1, int x2, int y2); int get_testy(float slope, int cursor_x, int ax, int ay); // Return 1 if the automation is constant. // constant - set to the value if it is constant - int automation_is_constant(int64_t start, - int64_t length, - int direction, - double &constant); + int automation_is_constant(int64_t start, int64_t length, int direction, + double &constant); double get_automation_constant(int64_t start, int64_t end); // Get value at a specific point. This needs previous and next stores // because it is used for every pixel in the timeline drawing function. - float get_value(int64_t position, - int direction, - FloatAuto* &previous, - FloatAuto* &next); + float get_value(int64_t position, int direction, + FloatAuto* &previous, FloatAuto* &next); // Helper: just calc the bezier function without doing any lookup of nodes - static float calculate_bezier(FloatAuto *previous, FloatAuto *next, int64_t position); - static float calculate_bezier_derivation(FloatAuto *previous, FloatAuto *next, int64_t position); - void get_extents(float *min, - float *max, - int *coords_undefined, - int64_t unit_start, - int64_t unit_end); + static float calculate_bezier(FloatAuto *previous, FloatAuto *next, + int64_t position, int direction=PLAY_FORWARD); + static float calculate_bezier_derivation(FloatAuto *previous, FloatAuto *next, + int64_t position); + void get_extents(float *min, float *max, int *coords_undefined, + int64_t unit_start, int64_t unit_end); void set_automation_mode(int64_t start, int64_t end, int mode); void set_proxy(int orig_scale, int new_scale); @@ -70,6 +68,10 @@ public: void dump(); Auto* new_auto(); float default_; + + float float_min, float_max; + void set_float_min(float mn) { float_min = mn; } + void set_float_max(float mx) { float_max = mx; } };