a m a z i n g new effects API

This commit is contained in:
itsmattkc
2018-08-20 00:04:35 +10:00
parent 14648d2e51
commit 5fc4a42db2
15 changed files with 30 additions and 59 deletions
-6
View File
@@ -22,12 +22,6 @@ InvertEffect::InvertEffect(Clip* c) : Effect(c, EFFECT_TYPE_VIDEO, VIDEO_INVERT_
connect(amount_val, SIGNAL(changed()), this, SLOT(field_changed()));
}
Effect* InvertEffect::copy(Clip* c) {
InvertEffect* i = new InvertEffect(c);
copy_field_keyframes(i);
return i;
}
void InvertEffect::process_gl(long p, QOpenGLShaderProgram& shader_prog, int* anchor_x, int* anchor_y) {
double value = amount_val->get_double_value(p)*0.01;
+1 -2
View File
@@ -9,8 +9,7 @@ class InvertEffect : public Effect {
Q_OBJECT
public:
InvertEffect(Clip* c);
void process_gl(long p, QOpenGLShaderProgram& shader_prog, int *anchor_x, int *anchor_y);
Effect* copy(Clip *c);
void process_gl(long p, QOpenGLShaderProgram& shader_prog, int *anchor_x, int *anchor_y);
EffectField* amount_val;
private:
-6
View File
@@ -49,12 +49,6 @@ void ShakeEffect::refresh() {
}
}
Effect* ShakeEffect::copy(Clip* c) {
ShakeEffect* e = new ShakeEffect(c);
copy_field_keyframes(e);
return e;
}
void ShakeEffect::process_gl(long p, QOpenGLShaderProgram&, int*, int*) {
if (shake_progress > shake_limit) {
double ival = intensity_val->get_double_value(p);
+1 -2
View File
@@ -7,8 +7,7 @@ class ShakeEffect : public Effect {
Q_OBJECT
public:
ShakeEffect(Clip* c);
void process_gl(long p, QOpenGLShaderProgram& shader_prog, int* anchor_x, int* anchor_y);
Effect* copy(Clip *c);
void process_gl(long p, QOpenGLShaderProgram& shader_prog, int* anchor_x, int* anchor_y);
EffectField* intensity_val;
EffectField* rotation_val;
-6
View File
@@ -357,9 +357,3 @@ void TextEffect::process_image(long frame, QImage& img) {
p.setBrush(set_color_button->get_color_value(frame));
p.drawPath(path);
}
Effect* TextEffect::copy(Clip* c) {
TextEffect* e = new TextEffect(c);
copy_field_keyframes(e);
return e;
}
+1 -2
View File
@@ -9,8 +9,7 @@ class TextEffect : public Effect {
Q_OBJECT
public:
TextEffect(Clip* c);
void process_image(long frame, QImage& img);
Effect* copy(Clip* c);
void process_image(long frame, QImage& img);
EffectField* text_val;
EffectField* size_val;
-6
View File
@@ -78,12 +78,6 @@ TransformEffect::TransformEffect(Clip* c) : Effect(c, EFFECT_TYPE_VIDEO, VIDEO_T
connect(uniform_scale_field, SIGNAL(toggled(bool)), this, SLOT(toggle_uniform_scale(bool)));
}
Effect* TransformEffect::copy(Clip* c) {
TransformEffect* t = new TransformEffect(c);
copy_field_keyframes(t);
return t;
}
void TransformEffect::refresh() {
if (parent_clip->sequence != NULL) {
double default_pos_x = parent_clip->sequence->width/2;
+1 -2
View File
@@ -8,8 +8,7 @@ class TransformEffect : public Effect {
public:
TransformEffect(Clip* c);
void refresh();
void process_gl(long p, QOpenGLShaderProgram& shader_prog, int* anchor_x, int* anchor_y);
Effect* copy(Clip *c);
void process_gl(long p, QOpenGLShaderProgram& shader_prog, int* anchor_x, int* anchor_y);
EffectField* position_x;
EffectField* position_y;