Editor::draw_metric_marks (const Metrics& metrics)
{
- const MeterSection *ms;
+ const MeterSection *ms;
const TempoSection *ts;
char buf[64];
if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
- metric_marks.push_back (new MeterMarker (*this, *meter_group, color_map[cMeterMarker], buf,
+ metric_marks.push_back (new MeterMarker (*this, *meter_group, Config->canvasvar_MeterMarker.get(), buf,
*(const_cast<MeterSection*>(ms))));
} else if ((ts = dynamic_cast<const TempoSection*>(*i)) != 0) {
snprintf (buf, sizeof (buf), "%.2f", ts->beats_per_minute());
- metric_marks.push_back (new TempoMarker (*this, *tempo_group, color_map[cTempoMarker], buf,
+ metric_marks.push_back (new TempoMarker (*this, *tempo_group, Config->canvasvar_TempoMarker.get(), buf,
*(const_cast<TempoSection*>(ts))));
}
ArdourCanvas::SimpleLine *
Editor::get_time_line ()
{
- ArdourCanvas::SimpleLine *line;
+ ArdourCanvas::SimpleLine *line;
if (free_measure_lines.empty()) {
- line = new ArdourCanvas::SimpleLine (*time_line_group);
+ line = new ArdourCanvas::SimpleLine (*time_line_group);
used_measure_lines.push_back (line);
} else {
line = free_measure_lines.front();
gdouble xpos;
double x1, x2, y1, y2, beat_density;
- uint32_t beats = 0;
- uint32_t bars = 0;
+ uint32_t beats = 0;
+ uint32_t bars = 0;
uint32_t color;
if (current_bbt_points == 0 || current_bbt_points->empty()) {
*/
return;
}
-
+
for (i = current_bbt_points->begin(); i != current_bbt_points->end(); ++i) {
switch ((*i).type) {
case TempoMap::Beat:
if ((*i).beat == 1) {
- color = color_map[cMeasureLineBar];
+ color = Config->canvasvar_MeasureLineBar.get();
} else {
- color = color_map[cMeasureLineBeat];
+ color = Config->canvasvar_MeasureLineBeat.get();
if (beat_density > 2.0) {
/* only draw beat lines if the gaps between beats are large.