ht = (((height - 2 * wcnt) - NAME_HIGHLIGHT_SIZE) / (double) wcnt);
}
- gdouble yoff = 1 + n * (ht + 1);
+ gdouble yoff = n * (ht + 1);
waves[n]->set_height (ht);
waves[n]->set_y_position (yoff + 2);
ht = ((trackview.current_height() - NAME_HIGHLIGHT_SIZE) / (double) nchans);
}
- gdouble yoff = 1 + which * ht;
+ gdouble yoff = which * ht;
WaveView *wave = new WaveView (group, audio_region ());
CANVAS_DEBUG_NAME (wave, string_compose ("wave view for chn %1 of %2", which, get_item_name()));
CANVAS_DEBUG_NAME (_base_rect, string_compose ("base rect for %1", _name));
_base_rect->set_x1 (ArdourCanvas::COORD_MAX);
_base_rect->set_outline_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackOutline());
- _base_rect->set_outline_what (ArdourCanvas::Rectangle::TOP);
+ _base_rect->set_outline_what (ArdourCanvas::Rectangle::BOTTOM);
_base_rect->set_fill_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackFill());
_base_rect->set_data ("trackview", this);
_base_rect->Event.connect (sigc::bind (sigc::mem_fun (_editor, &PublicEditor::canvas_automation_track_event), _base_rect, this));
if (_brushing) {
_editor->mouse_brush_insert_region (rv, pending_region_position);
} else {
- Duple track_origin (0, 1);
+ Duple track_origin;
/* Get the y coordinate of the top of the track that this region is now over */
track_origin = current_tv->canvas_display()->item_to_canvas (track_origin);
{
group = new ArdourCanvas::Container (parent);
CANVAS_DEBUG_NAME (group, "ghost region");
- group->set_position (ArdourCanvas::Duple (initial_pos, 1));
+ group->set_position (ArdourCanvas::Duple (initial_pos, 0));
base_rect = new ArdourCanvas::Rectangle (group);
CANVAS_DEBUG_NAME (base_rect, "ghost region rect");
sync_mark->set (points);
sync_mark->show ();
- sync_line->set (ArdourCanvas::Duple (offset, 0), ArdourCanvas::Duple (offset, trackview.current_height() - NAME_HIGHLIGHT_SIZE - 1));
+ sync_line->set (ArdourCanvas::Duple (offset, 0), ArdourCanvas::Duple (offset, trackview.current_height() - NAME_HIGHLIGHT_SIZE));
sync_line->show ();
}
}
sync_line->set (
ArdourCanvas::Duple (offset, 0),
- ArdourCanvas::Duple (offset, h - NAME_HIGHLIGHT_SIZE - 1)
+ ArdourCanvas::Duple (offset, h - NAME_HIGHLIGHT_SIZE)
);
}
for (list<ArdourCanvas::Rectangle*>::iterator i = _coverage_frames.begin(); i != _coverage_frames.end(); ++i) {
- (*i)->set_y0 (1);
- (*i)->set_y1 (h);
+ (*i)->set_y1 (h + 1);
}
for (list<ArdourCanvas::Rectangle*>::iterator i = _silent_frames.begin(); i != _silent_frames.end(); ++i) {
- (*i)->set_y0 (1);
- (*i)->set_y1 (h);
+ (*i)->set_y1 (h + 1);
}
}
_coverage_frames.push_back (cr);
cr->set_x0 (trackview.editor().sample_to_pixel (t - position));
cr->set_y0 (1);
- cr->set_y1 (_height);
+ cr->set_y1 (_height + 1);
cr->set_outline (false);
cr->set_ignore_events (true);
if (new_me) {
canvas_rect = new ArdourCanvas::Rectangle (_canvas_group);
CANVAS_DEBUG_NAME (canvas_rect, string_compose ("SV canvas rectangle %1", _trackview.name()));
canvas_rect->set (ArdourCanvas::Rect (0, 0, ArdourCanvas::COORD_MAX, tv.current_height ()));
- canvas_rect->set_outline_what (ArdourCanvas::Rectangle::TOP);
+ canvas_rect->set_outline_what (ArdourCanvas::Rectangle::BOTTOM);
canvas_rect->set_outline_color (RGBA_TO_UINT (0, 0, 0, 255));
canvas_rect->set_fill (true);
canvas_rect->Event.connect (sigc::bind (sigc::mem_fun (_trackview.editor(), &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
case Stacked:
case Expanded:
/* In stacked displays, the recregion is always at the top */
- i->rectangle->set_y0 (1);
+ i->rectangle->set_y0 (0);
i->rectangle->set_y1 (h);
break;
}
_order = nth;
if (_y_position != y) {
- _canvas_display->set_y_position (y);
+ // XXX +1 is a quick hack to align the track-header with the canvas
+ // with the separator line at the top.
+ _canvas_display->set_y_position (y + 1);
_y_position = y;
}
void
TimeAxisView::show_selection (TimeSelection& ts)
{
- double x0;
double x1;
- double y1;
+ double x2;
+ double y2;
SelectionRect *rect; time_axis_frame.show();
rect = get_selection_rect ((*i).id);
- x0 = _editor.sample_to_pixel (start);
- x1 = _editor.sample_to_pixel (start + cnt - 1);
- y1 = current_height();
+ x1 = _editor.sample_to_pixel (start);
+ x2 = _editor.sample_to_pixel (start + cnt - 1);
+ y2 = current_height() - 1;
- rect->rect->set (ArdourCanvas::Rect (x0, 1, x1, y1));
+ rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2));
// trim boxes are at the top for selections
- if (x1 > x0) {
- rect->start_trim->set (ArdourCanvas::Rect (x0, 1, x0 + trim_handle_size, y1));
- rect->end_trim->set (ArdourCanvas::Rect (x1 - trim_handle_size, 1, x1, y1));
+ if (x2 > x1) {
+ rect->start_trim->set (ArdourCanvas::Rect (x1, 1, x1 + trim_handle_size, y2));
+ rect->end_trim->set (ArdourCanvas::Rect (x2 - trim_handle_size, 1, x2, y2));
rect->start_trim->show();
rect->end_trim->show();
group = new ArdourCanvas::Container (parent);
CANVAS_DEBUG_NAME (group, string_compose ("TAVI group for %1", get_item_name()));
group->Event.connect (sigc::mem_fun (*this, &TimeAxisViewItem::canvas_group_event));
- group->set_y_position (1);
fill_color = base_color;
samples_per_pixel = fpp;
void
TimeAxisViewItem::set_y (double y)
{
- group->set_y_position (y + 1);
+ group->set_y_position (y);
}
void