mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 05:36:31 +01:00
exercise subsurface rendering for x-fade curves
This commit is contained in:
parent
da7cdb9b26
commit
17e94e02e8
3 changed files with 18 additions and 4 deletions
|
|
@ -318,8 +318,10 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
|||
window_space = item_to_window (Duple(_points.front().x, draw.height()));
|
||||
context->line_to (window_space.x, window_space.y);
|
||||
context->close_path();
|
||||
context->set_operator(Cairo::OPERATOR_SOURCE);
|
||||
setup_fill_context(context);
|
||||
context->fill ();
|
||||
context->set_operator(Cairo::OPERATOR_OVER);
|
||||
break;
|
||||
case Outside:
|
||||
context->stroke_preserve ();
|
||||
|
|
@ -328,8 +330,10 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
|||
window_space = item_to_window (Duple(_points.front().x, 0.0));
|
||||
context->line_to (window_space.x, window_space.y);
|
||||
context->close_path();
|
||||
context->set_operator(Cairo::OPERATOR_SOURCE);
|
||||
setup_fill_context(context);
|
||||
context->fill ();
|
||||
context->set_operator(Cairo::OPERATOR_OVER);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +407,9 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
|||
context->line_to (window_space.x, window_space.y);
|
||||
context->close_path();
|
||||
setup_fill_context(context);
|
||||
context->set_operator(Cairo::OPERATOR_SOURCE);
|
||||
context->fill ();
|
||||
context->set_operator(Cairo::OPERATOR_OVER);
|
||||
break;
|
||||
case Outside:
|
||||
context->stroke_preserve ();
|
||||
|
|
@ -412,8 +418,10 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
|||
window_space = item_to_window (Duple (samples[left].x, 0.0));
|
||||
context->line_to (window_space.x, window_space.y);
|
||||
context->close_path();
|
||||
context->set_operator(Cairo::OPERATOR_SOURCE);
|
||||
setup_fill_context(context);
|
||||
context->fill ();
|
||||
context->set_operator(Cairo::OPERATOR_OVER);
|
||||
break;
|
||||
}
|
||||
context->restore ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue