added cross dissolve transitions (but they're uneditable)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#include "transition.h"
|
||||
|
||||
#include <QOpenGLFunctions>
|
||||
|
||||
void CrossDissolveTransition::process_transition(float progress) {
|
||||
float color[4];
|
||||
glGetFloatv(GL_CURRENT_COLOR, color);
|
||||
glColor4f(1.0, 1.0, 1.0, color[3]*progress);
|
||||
}
|
||||
@@ -205,5 +205,7 @@ void TransformEffect::process_gl(int* anchor_x, int* anchor_y) {
|
||||
}
|
||||
|
||||
// opacity
|
||||
glColor4f(1.0, 1.0, 1.0, opacity->value()*0.01);
|
||||
float color[4];
|
||||
glGetFloatv(GL_CURRENT_COLOR, color);
|
||||
glColor4f(1.0, 1.0, 1.0, color[3]*(opacity->value()*0.01));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "transition.h"
|
||||
|
||||
Transition::Transition() {
|
||||
length = 30;
|
||||
}
|
||||
|
||||
void Transition::process_transition(float) {}
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef TRANSITION_H
|
||||
#define TRANSITION_H
|
||||
|
||||
class Transition
|
||||
{
|
||||
public:
|
||||
Transition();
|
||||
int length;
|
||||
virtual void process_transition(float);
|
||||
};
|
||||
|
||||
class CrossDissolveTransition : public Transition {
|
||||
public:
|
||||
void process_transition(float);
|
||||
};
|
||||
|
||||
#endif // TRANSITION_H
|
||||
Reference in New Issue
Block a user