]> git.donarmstrong.com Git - lilypond.git/commit
Issue 5086: Fix dashed line errors
authorDavid Nalesnik <david.nalesnik@gmail.com>
Sat, 4 Mar 2017 15:16:09 +0000 (09:16 -0600)
committerDavid Nalesnik <david.nalesnik@gmail.com>
Tue, 14 Mar 2017 22:29:19 +0000 (17:29 -0500)
commitee1c498891ef92ebcd7d043b46e07ea2d3a9d3ae
tree17a9c9f44e4bb0c13a0321efcf867a3c571a43db
parenteca3d05456383fc0b451468ce1b21ed08229821f
Issue 5086: Fix dashed line errors

There are two errors in lily/line-interface.cc which cause
dashed lines to be drawn inaccurately.

(1) Line-thickness is improperly subtracted from the "off"
value in Line_interface::make_dashed_line.  This was done,
presumably, to account for the line cap of each dash.  In fact,
PostScript discounts the line cap when constructing the pattern.

(2) Dashed lines are constructed so that they begin and end
with a dash.  Thus, a dashed line is built of dash + whitespace
units and a last lone dash.  Period is not adjusted in
Line_interface::line for this last dash, which can lead to a
noticeable difference in its length compared to other dashes.

Correcting these flaws ensures that dashed lines end with a
dash rather than whitespace, and that terminating dashes are
not clipped.  Also, the number of dashes drawn reflects the
number calculated.
lily/line-interface.cc