projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a07c50a
)
add circle-ticks to the midi-metric area
author
Robin Gareus
<robin@gareus.org>
Wed, 3 Jul 2013 00:07:04 +0000
(
02:07
+0200)
committer
Robin Gareus
<robin@gareus.org>
Wed, 10 Jul 2013 13:27:05 +0000
(15:27 +0200)
gtk2_ardour/meter_strip.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/meter_strip.cc
b/gtk2_ardour/meter_strip.cc
index b9121e7418dead7a00d04b05c01aa1cb36b209ad..7c468ec698e6a6e7d96d6c173a1caa1bc8538cbc 100644
(file)
--- a/
gtk2_ardour/meter_strip.cc
+++ b/
gtk2_ardour/meter_strip.cc
@@
-453,6
+453,7
@@
MeterStrip::render_metrics (Gtk::Widget& w, vector<DataType> types)
}
char buf[32];
}
char buf[32];
+ gint pos;
for (vector<int>::const_iterator j = points.begin(); j != points.end(); ++j) {
for (vector<int>::const_iterator j = points.begin(); j != points.end(); ++j) {
@@
-465,10
+466,15
@@
MeterStrip::render_metrics (Gtk::Widget& w, vector<DataType> types)
case DataType::MIDI:
fraction = *j / 127.0;
snprintf (buf, sizeof (buf), "%3d", *j);
case DataType::MIDI:
fraction = *j / 127.0;
snprintf (buf, sizeof (buf), "%3d", *j);
+ pos = height - (gint) rintf (height * fraction);
+
+ cairo_arc(cr, 2, pos, 1.0, 0, 2 * M_PI);
+ cairo_fill(cr);
+ cairo_stroke (cr);
break;
}
break;
}
-
gint const
pos = height - (gint) rintf (height * fraction);
+ pos = height - (gint) rintf (height * fraction);
layout->set_text(buf);
/* we want logical extents, not ink extents here */
layout->set_text(buf);
/* we want logical extents, not ink extents here */