make region fade in/out curve shapes into PolyLines not Polygons so that they don't close the stroke path at the top/bottom
This commit is contained in:
parent
ea1ccb869a
commit
ba26316857
@ -159,14 +159,14 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
|
|||||||
|
|
||||||
create_waves ();
|
create_waves ();
|
||||||
|
|
||||||
fade_in_shape = new ArdourCanvas::Polygon (group);
|
fade_in_shape = new ArdourCanvas::PolyLine (group);
|
||||||
CANVAS_DEBUG_NAME (fade_in_shape, string_compose ("fade in shape for %1", region()->name()));
|
CANVAS_DEBUG_NAME (fade_in_shape, string_compose ("fade in shape for %1", region()->name()));
|
||||||
fade_in_shape->set_fill_color (fade_color);
|
fade_in_shape->set_outline_color (fade_color);
|
||||||
fade_in_shape->set_data ("regionview", this);
|
fade_in_shape->set_data ("regionview", this);
|
||||||
|
|
||||||
fade_out_shape = new ArdourCanvas::Polygon (group);
|
fade_out_shape = new ArdourCanvas::PolyLine (group);
|
||||||
CANVAS_DEBUG_NAME (fade_out_shape, string_compose ("fade out shape for %1", region()->name()));
|
CANVAS_DEBUG_NAME (fade_out_shape, string_compose ("fade out shape for %1", region()->name()));
|
||||||
fade_out_shape->set_fill_color (fade_color);
|
fade_out_shape->set_outline_color (fade_color);
|
||||||
fade_out_shape->set_data ("regionview", this);
|
fade_out_shape->set_data ("regionview", this);
|
||||||
|
|
||||||
if (!_recregion) {
|
if (!_recregion) {
|
||||||
@ -315,10 +315,10 @@ AudioRegionView::fade_in_active_changed ()
|
|||||||
{
|
{
|
||||||
if (audio_region()->fade_in_active()) {
|
if (audio_region()->fade_in_active()) {
|
||||||
/* XXX: make a themable colour */
|
/* XXX: make a themable colour */
|
||||||
fade_in_shape->set_fill_color (RGBA_TO_UINT (45, 45, 45, 90));
|
fade_in_shape->set_outline_color (RGBA_TO_UINT (45, 45, 45, 90));
|
||||||
} else {
|
} else {
|
||||||
/* XXX: make a themable colour */
|
/* XXX: make a themable colour */
|
||||||
fade_in_shape->set_fill_color (RGBA_TO_UINT (45, 45, 45, 20));
|
fade_in_shape->set_outline_color (RGBA_TO_UINT (45, 45, 45, 20));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,10 +327,10 @@ AudioRegionView::fade_out_active_changed ()
|
|||||||
{
|
{
|
||||||
if (audio_region()->fade_out_active()) {
|
if (audio_region()->fade_out_active()) {
|
||||||
/* XXX: make a themable colour */
|
/* XXX: make a themable colour */
|
||||||
fade_out_shape->set_fill_color (RGBA_TO_UINT (45, 45, 45, 90));
|
fade_out_shape->set_outline_color (RGBA_TO_UINT (45, 45, 45, 90));
|
||||||
} else {
|
} else {
|
||||||
/* XXX: make a themable colour */
|
/* XXX: make a themable colour */
|
||||||
fade_out_shape->set_fill_color (RGBA_TO_UINT (45, 45, 45, 20));
|
fade_out_shape->set_outline_color (RGBA_TO_UINT (45, 45, 45, 20));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,26 +584,6 @@ AudioRegionView::reset_fade_in_shape_width (boost::shared_ptr<AudioRegion> ar, f
|
|||||||
|
|
||||||
redraw_start_xfade_to (ar, width, points, effective_height);
|
redraw_start_xfade_to (ar, width, points, effective_height);
|
||||||
|
|
||||||
/* add 3 more points */
|
|
||||||
|
|
||||||
points.push_back (Duple());
|
|
||||||
points.push_back (Duple());
|
|
||||||
points.push_back (Duple());
|
|
||||||
|
|
||||||
/* fold back */
|
|
||||||
|
|
||||||
points[pi].x = pwidth;
|
|
||||||
points[pi].y = 2;
|
|
||||||
pi++;
|
|
||||||
|
|
||||||
points[pi].x = 1;
|
|
||||||
points[pi].y = 2;
|
|
||||||
pi++;
|
|
||||||
|
|
||||||
/* connect the dots ... */
|
|
||||||
|
|
||||||
points[pi] = points[0];
|
|
||||||
|
|
||||||
fade_in_shape->set (points);
|
fade_in_shape->set (points);
|
||||||
|
|
||||||
/* ensure trim handle stays on top */
|
/* ensure trim handle stays on top */
|
||||||
@ -682,28 +662,6 @@ AudioRegionView::reset_fade_out_shape_width (boost::shared_ptr<AudioRegion> ar,
|
|||||||
|
|
||||||
redraw_end_xfade_to (ar, width, points, effective_height);
|
redraw_end_xfade_to (ar, width, points, effective_height);
|
||||||
|
|
||||||
/* fill the polygon*/
|
|
||||||
|
|
||||||
/* add 3 more points */
|
|
||||||
|
|
||||||
points.push_back (Duple());
|
|
||||||
points.push_back (Duple());
|
|
||||||
points.push_back (Duple());
|
|
||||||
|
|
||||||
/* fold back */
|
|
||||||
|
|
||||||
points[pi].x = _pixel_width;
|
|
||||||
points[pi].y = effective_height;
|
|
||||||
pi++;
|
|
||||||
|
|
||||||
points[pi].x = _pixel_width;
|
|
||||||
points[pi].y = 2;
|
|
||||||
pi++;
|
|
||||||
|
|
||||||
/* connect the dots ... */
|
|
||||||
|
|
||||||
points[pi] = points[0];
|
|
||||||
|
|
||||||
fade_out_shape->set (points);
|
fade_out_shape->set (points);
|
||||||
|
|
||||||
/* ensure trim handle stays on top */
|
/* ensure trim handle stays on top */
|
||||||
|
@ -150,9 +150,9 @@ class AudioRegionView : public RegionView
|
|||||||
|
|
||||||
std::list<std::pair<framepos_t, ArdourCanvas::Line*> > feature_lines;
|
std::list<std::pair<framepos_t, ArdourCanvas::Line*> > feature_lines;
|
||||||
|
|
||||||
ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
|
ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
|
||||||
ArdourCanvas::Polygon* fade_in_shape;
|
ArdourCanvas::PolyLine* fade_in_shape;
|
||||||
ArdourCanvas::Polygon* fade_out_shape;
|
ArdourCanvas::PolyLine* fade_out_shape;
|
||||||
ArdourCanvas::Rectangle* fade_in_handle; ///< fade in handle, or 0
|
ArdourCanvas::Rectangle* fade_in_handle; ///< fade in handle, or 0
|
||||||
ArdourCanvas::Rectangle* fade_out_handle; ///< fade out handle, or 0
|
ArdourCanvas::Rectangle* fade_out_handle; ///< fade out handle, or 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user