[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ledger bug
From: |
Han-Wen Nienhuys |
Subject: |
Ledger bug |
Date: |
Mon, 19 Feb 2001 19:52:12 +0100 |
address@hidden writes:
> After reporting lots of small bug I have found a serious and very
> strange one:
> An extra Ledger line is created between the A and C ledger line, and the
> chord looks wrong (a and b overlaps, c moved to the right).
> Changing staff-space to 1.33 CORRECTS the bug.
> I am really puzzled.
Thanks for the report. It was a 6.9999999999999 being rounded to
6. Try the following patch
--- note-head.cc~ Wed Nov 22 22:15:35 2000
+++ note-head.cc Mon Feb 19 19:38:26 2001
@@ -5,6 +5,7 @@
(c) 1997--2000 Han-Wen Nienhuys <address@hidden>
*/
+#include <math.h>
#include "misc.hh"
#include "dots.hh"
@@ -60,7 +61,7 @@
Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
int sz = Staff_symbol_referencer::line_count (me)-1;
- int p = (int)Staff_symbol_referencer::position_f (me);
+ int p = (int) rint (Staff_symbol_referencer::position_f (me));
int streepjes_i = abs (p) < sz
? 0
: (abs(p) - sz) /2;
--- staff-symbol-referencer.cc~ Wed Nov 22 22:15:36 2000
+++ staff-symbol-referencer.cc Mon Feb 19 19:46:52 2001
@@ -29,7 +29,7 @@
bool
Staff_symbol_referencer::on_staffline (Grob*me)
{
- return on_staffline (me, (int) position_f (me));
+ return on_staffline (me, (int) rint (position_f (me)));
}
bool
--
Han-Wen Nienhuys | address@hidden | http://www.cs.uu.nl/~hanwen/
- Ledger bug, Rune Zedeler, 2001/02/18
- Ledger bug,
Han-Wen Nienhuys <=