[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overlap of trill-like line spanners and arrowheads

From: Maximilian Albert
Subject: Overlap of trill-like line spanners and arrowheads
Date: Sun, 11 Feb 2007 19:54:59 +0100
User-agent: IceDove (X11/20061220)


in the example in the 2.11 NEWS file which illustrates the more flexible
line spanners, the trill-shaped glissando line protrudes to the left of
the arrowhead. This produces an ugly overlap. (Similar for arrows at the
right end of a line spanner.) Attached is a small patch to fix this. I'm
not entirely sure if the multiplication factors should be hardcoded but
I suppose that is okay as long as the dimensions of the arrows in
lily/line-interface.cc do not change.

Suggestion for further improvement: If I get it right, the trill-like
line is composed of small wave-shaped pieces aligned next to each other.
This means that the line always ends in a complete "wave". But the right
arrowhead (if present) is positioned on top of the line in such a way
that its tip coincides with the right endpoint. Thus, depending on the
length of the line the arrowhead covers different portions of the last
wave which sometimes looks a bit "inconsistent". One option could be to
insert a very short straight line section between the waved part and the
arrowhead to make up for the last portion which is too small to fit a
complete wave.

Do you think this would be a desirable feature? On second thought, it
would probably be an overkill because the last wave would need a
different shape to allow for a smooth transition into the straight
piece. Anyway, if you think it is worthwhile but doesn't have enough
priority to do it yourself I can try to work on it in a couple of weeks
(maybe only even later); the work on the arrow-style microtone
accidentals will have priority, though (if Orm's and my schedule do not
completely diverge).

>From d623f087b9bf8080446ebd4ff7cadbb429f78e23 Mon Sep 17 00:00:00 2001
From: Maximilian Albert <address@hidden>
Date: Sun, 11 Feb 2007 18:45:29 +0100
Subject: [PATCH] fix overlap of trill-like line spanners and arrowheads

 lily/line-spanner.cc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc
index d764a3b..a1fe664 100644
--- a/lily/line-spanner.cc
+++ b/lily/line-spanner.cc
@@ -275,9 +275,10 @@ Line_spanner::print (SCM smob)
   while (flip (&d) != LEFT);
+  Offset adjust = dz.direction() * Staff_symbol_referencer::staff_space (me);
   line.add_stencil (Line_interface::line (me, 
-                                         span_points[LEFT],
-                                         span_points[RIGHT]));
+                                         span_points[LEFT]  + (arrows[LEFT]  ? 
adjust*1.4  : Offset(0,0)),
+                                         span_points[RIGHT] - (arrows[RIGHT] ? 
adjust*0.55 : Offset(0,0))));
   line.add_stencil (Line_interface::arrows (me,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]