exercise subsurface rendering for x-fade curves

This commit is contained in:
Robin Gareus 2014-05-28 17:12:33 +02:00 committed by Paul Davis
parent da7cdb9b26
commit 17e94e02e8
3 changed files with 18 additions and 4 deletions

View file

@ -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 ();