AudioRegionView::setup_fade_handle_positions()
{
/* position of fade handle offset from the top of the region view */
- double const handle_pos = 1.0;
+ double const handle_pos = 0.0;
if (fade_in_handle) {
fade_in_handle->set_y0 (handle_pos);
effective_height = _height;
}
+ effective_height -= 1.0;
+
Points points;
points.assign (npoints, Duple());
for (pi = 0, pc = 0; pc < npoints; ++pc) {
points[pi].x = 1.0 + (pc * xdelta);
- points[pi++].y = 1.0 + effective_height - (curve[pc] * effective_height);
+ points[pi++].y = 1.0 + effective_height - (curve[pc] * effective_height);
}
/* draw the line */
effective_height = _height;
}
+ effective_height -= 1.0;
+
/* points *MUST* be in anti-clockwise order */
Points points;
start_xfade_rect->set_data ("regionview", this);
}
- start_xfade_rect->set (ArdourCanvas::Rect (1.0, 1.0, rect_width, effective_height));
+ start_xfade_rect->set (ArdourCanvas::Rect (1.0, 0.0, rect_width, effective_height));
start_xfade_rect->show ();
start_xfade_in->set (points);
end_xfade_rect->set_data ("regionview", this);
}
- end_xfade_rect->set (ArdourCanvas::Rect (rect_edge, 1.0, rect_edge + rect_width + TimeAxisViewItem::RIGHT_EDGE_SHIFT, effective_height));
+ end_xfade_rect->set (ArdourCanvas::Rect (rect_edge, 0.0, rect_edge + rect_width + TimeAxisViewItem::RIGHT_EDGE_SHIFT, effective_height));
end_xfade_rect->show ();
end_xfade_in->set (points);
gain_line->set_line_color (audio_region()->envelope_active() ?
ARDOUR_UI::config()->get_canvasvar_GainLine() :
ARDOUR_UI::config()->get_canvasvar_GainLineInactive());
+ update_envelope_visibility ();
}
}
line->set (line_points);
- if (_visible && alist->interpolation() != AutomationList::Discrete) {
- line->show();
- }
+ /* despite the name, this may show or hide things */
+
+ show();
}
set_selected_points (trackview.editor().get_selection().points);
base_rect = new ArdourCanvas::Rectangle (group);
CANVAS_DEBUG_NAME (base_rect, "ghost region rect");
base_rect->set_x0 (0);
- base_rect->set_y0 (1.0);
- base_rect->set_y1 (trackview.current_height());
+ base_rect->set_y0 (0.0);
+ base_rect->set_y1 (trackview.current_height() - 1.0);
base_rect->set_outline_what (0);
if (!is_automation_ghost()) {
if (visibility & ShowFrame) {
frame = new ArdourCanvas::Rectangle (group,
- ArdourCanvas::Rect (0.0, 1.0,
+ ArdourCanvas::Rect (0.0, 0.0,
trackview.editor().sample_to_pixel(duration) + RIGHT_EDGE_SHIFT,
trackview.current_height() - 1.0));
frame->set_outline_color (ARDOUR_UI::config()->get_canvasvar_TimeAxisFrame());
}
- // frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::RIGHT|ArdourCanvas::Rectangle::LEFT));
+ frame->set_outline_what (ArdourCanvas::Rectangle::What (ArdourCanvas::Rectangle::RIGHT|ArdourCanvas::Rectangle::LEFT));
} else {
frame = 0;
}
-
+
if (visibility & ShowNameHighlight) {
double width;
ArdourCanvas::Rect (start,
trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE,
width - 2.0 + RIGHT_EDGE_SHIFT,
- trackview.current_height()));
+ trackview.current_height() - 1.0));
CANVAS_DEBUG_NAME (name_highlight, string_compose ("name highlight for %1", get_item_name()));
name_highlight->set_data ("timeaxisviewitem", this);
name_highlight->set_outline_what (ArdourCanvas::Rectangle::TOP);
name_highlight->show();
name_highlight->set_y0 ((double) _height - NAME_HIGHLIGHT_SIZE);
- name_highlight->set_y1 ((double) _height);
+ name_highlight->set_y1 ((double) _height - 1.0);
if (visibility & FullWidthNameHighlight) {
/* x0 is always 0.0 */
set_frame_color();
if (name_highlight) {
- name_highlight->set_fill_color (fill_color);
+ name_highlight->set_fill_color (fill_color);
}
if (name_text) {