[SCM] calf/master: line-graph modes done
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:40:57 UTC 2013
The following commit has been merged in the master branch:
commit 90d0da02a4d04569501a663ce3a14241cae3a784
Author: Markus Schmidt <schmidt at boomshop.net>
Date: Tue Mar 6 05:08:46 2012 +0100
line-graph modes done
diff --git a/src/custom_ctl.cpp b/src/custom_ctl.cpp
index b76572b..03a4d66 100644
--- a/src/custom_ctl.cpp
+++ b/src/custom_ctl.cpp
@@ -116,7 +116,7 @@ calf_line_graph_draw_graph( cairo_t *c, float *data, int sx, int sy, int mode )
case 3:
// this one is drawing bars centered on the y axis
if (i and ((data[i] < INFINITY) or i == sx - 1)) {
- cairo_rectangle(c, ox + _last, oy + y, i - _last, 3);
+ cairo_rectangle(c, ox + _last, oy + sy / 2, i - _last, data[i] * (sx / 2));
_last = i;
} else {
continue;
diff --git a/src/modules.cpp b/src/modules.cpp
index c88c11c..6d29aa3 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -1193,7 +1193,10 @@ bool analyzer_audio_module::get_graph(int index, int subindex, float *data, int
// subtle hold line
context->set_source_rgba(0.35, 0.4, 0.2, 0.2);
}
- if(*params[param_analyzer_bars]) {
+ if (*params[param_analyzer_correction] == 3) {
+ // draw centered bars
+ *mode = 3;
+ } else if(*params[param_analyzer_bars]) {
if(subindex == 0) {
// draw bars
*mode = 1;
@@ -1201,9 +1204,6 @@ bool analyzer_audio_module::get_graph(int index, int subindex, float *data, int
// draw boxes
*mode = 2;
}
- } else if (*params[param_analyzer_correction] == 3) {
- // draw centered bars
- *mode = 3;
} else {
// draw lines
*mode = 0;
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list