From f1f8f89fcb9312065a818233dff4a3f1871fa7fe Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 28 May 2014 17:12:33 +0200 Subject: exercise subsurface rendering for x-fade curves --- libs/canvas/curve.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs') diff --git a/libs/canvas/curve.cc b/libs/canvas/curve.cc index e5db740d66..4f8ac3c125 100644 --- a/libs/canvas/curve.cc +++ b/libs/canvas/curve.cc @@ -318,8 +318,10 @@ Curve::render (Rect const & area, Cairo::RefPtr 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 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 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 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 (); -- cgit v1.2.3