diff options
author | Robin Gareus <robin@gareus.org> | 2014-05-28 17:12:33 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-05-28 17:38:42 +0200 |
commit | f1f8f89fcb9312065a818233dff4a3f1871fa7fe (patch) | |
tree | a9a3b594096ee298f753ccd9c5a4efaefe23592a /libs | |
parent | c57fcde78cc0fb393fb7420f1edbc71edf572bd0 (diff) |
exercise subsurface rendering for x-fade curves
Diffstat (limited to 'libs')
-rw-r--r-- | libs/canvas/curve.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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<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 (); |