diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-24 18:55:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-24 18:55:33 +0000 |
commit | 5ad82b1e6d3a1b473137ab8b5f15ecf190eed51f (patch) | |
tree | 667407740e60ca0d5aed23660d726de56c868408 /gtk2_ardour/panner2d.cc | |
parent | 0c5c1aafd06f24442f31f87de1fd1f51d6ce9291 (diff) |
switch cartesian/spherical function names and make them use length. still a tweak needed here
git-svn-id: svn://localhost/ardour2/branches/3.0@8952 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/panner2d.cc')
-rw-r--r-- | gtk2_ardour/panner2d.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc index ca7335520f..51c42160ce 100644 --- a/gtk2_ardour/panner2d.cc +++ b/gtk2_ardour/panner2d.cc @@ -496,15 +496,15 @@ Panner2d::on_expose_event (GdkEventExpose *event) cairo_fill (cr); cairo_restore (cr); - /* move the text in just a bit */ - - AngularVector textpos (target->position.azi, 0.75); - textpos.cartesian (c); - cart_to_gtk (c); - if (!small) { + cairo_set_font_size (cr, 16); + + /* move the text in just a bit */ + + AngularVector textpos (target->position.azi, target->position.ele, 0.85); + textpos.cartesian (c); + cart_to_gtk (c); cairo_move_to (cr, c.x, c.y); - cairo_set_font_size (cr, 10); cairo_show_text (cr, buf); } @@ -723,9 +723,10 @@ Panner2d::clamp_to_circle (double& x, double& y) { double azi, ele; double z = 0.0; + double l; - PBD::cart_to_azi_ele (x, y, z, azi, ele); - PBD::azi_ele_to_cart (azi, ele, x, y, z); + PBD::cartesian_to_spherical (x, y, z, azi, ele, l); + PBD::spherical_to_cartesian (azi, ele, 1.0, x, y, z); } void |