numerous keyframe improvements

This commit is contained in:
itsmattkc
2019-01-04 21:01:36 +11:00
parent b36f54c11d
commit a2eef2e829
13 changed files with 217 additions and 64 deletions
+8 -4
View File
@@ -4,10 +4,14 @@
#define KEYFRAME_POINT_COUNT 4
void draw_keyframe(QPainter &p, int type, int x, int y, bool darker) {
int color = (darker) ? 100 : 160;
void draw_keyframe(QPainter &p, int type, int x, int y, bool darker, int r, int g, int b) {
if (darker) {
r *= 0.625;
g *= 0.625;
b *= 0.625;
}
p.setPen(QColor(0, 0, 0));
p.setBrush(QColor(color, color, color));
p.setBrush(QColor(r, g, b));
switch (type) {
case KEYFRAME_TYPE_LINEAR:
@@ -24,5 +28,5 @@ void draw_keyframe(QPainter &p, int type, int x, int y, bool darker) {
break;
}
p.setBrush(Qt::NoBrush);
p.setBrush(Qt::NoBrush);
}