[SCM] calf/master: + Line graph: legend positioning fixes

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:38:33 UTC 2013


The following commit has been merged in the master branch:
commit 9aa4e8b92bab2250b7f52cc9355028946b0710dc
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Mon Nov 17 21:46:46 2008 +0000

    + Line graph: legend positioning fixes

diff --git a/src/custom_ctl.cpp b/src/custom_ctl.cpp
index d741ef3..b612442 100644
--- a/src/custom_ctl.cpp
+++ b/src/custom_ctl.cpp
@@ -85,7 +85,7 @@ calf_line_graph_expose (GtkWidget *widget, GdkEventExpose *event)
                 if (!legend.empty()) {
                     
                     cairo_set_source_rgba(c, 1.0, 1.0, 1.0, 0.75);
-                    cairo_move_to(c, x + 2, oy);
+                    cairo_move_to(c, x - (tx.x_bearing + tx.width / 2.0), oy + sy - 2);
                     cairo_show_text(c, legend.c_str());
                 }
             }
@@ -97,7 +97,7 @@ calf_line_graph_expose (GtkWidget *widget, GdkEventExpose *event)
                 cairo_stroke(c);
                 if (!legend.empty()) {
                     cairo_set_source_rgba(c, 1.0, 1.0, 1.0, 0.75);
-                    cairo_move_to(c, ox + 2, y + tx.height/2);
+                    cairo_move_to(c, ox + sx - 2 - tx.width, y + tx.height/2 - 1);
                     cairo_show_text(c, legend.c_str());
                 }
             }

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list