diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-25 20:41:24 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-25 20:41:24 -0400 |
commit | 57ff5e3198a9c6892629a9d56e65887aadf7cc84 (patch) | |
tree | a5f0045686bdd4e72619bd12df6698f7d4ce83a6 | |
parent | 2108525187a420c0090b5834c82c473a072436a9 (diff) |
fix gradient pattern origin translation for time axis view items
note: the solution is non-obvious, but the obvious one of applying a translational Cairo::Matrix to the gradient
caused an exception to be thrown because of a non-invertible matrix.
-rw-r--r-- | libs/canvas/fill.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/canvas/fill.cc b/libs/canvas/fill.cc index 9947415cf9..e33c5d2bc0 100644 --- a/libs/canvas/fill.cc +++ b/libs/canvas/fill.cc @@ -60,7 +60,14 @@ void Fill::setup_fill_context (Cairo::RefPtr<Cairo::Context> context) const { if (_gradient) { + Cairo::Matrix m; + + Duple origin = item_to_window (Duple (0, 0)); + + context->translate (origin.x, origin.y); context->set_source (_gradient); + context->translate (-origin.x, -origin.y); + } else { set_source_rgba (context, _fill_color); } |