]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2328: Ledger lines in PNG output have white interior
authorDavid Kastrup <dak@gnu.org>
Mon, 27 Feb 2012 22:29:24 +0000 (23:29 +0100)
committerDavid Kastrup <dak@gnu.org>
Tue, 28 Feb 2012 08:39:16 +0000 (09:39 +0100)
Don't stroke rectangles with height or width 0 in draw_round_box

ps/music-drawing-routines.ps

index d7450e452bee0c239f10fca06e70f4f40a5c40b4..3e62f0366e68e5281b8cb3ae6e19f3aa23b22a25 100644 (file)
@@ -98,15 +98,20 @@ bind def
         dup
        0.0 gt {
                setlinewidth % w h x y
-               0 setlinecap
-               1 setlinejoin
-
                rmoveto % w h
-               currentpoint % w h x1 y1
-               4 2 roll % x1 y1 w h
-               4 copy
-               rectfill
-               rectstroke
+               2 copy 0 ne exch 0 ne and
+               {
+                   0 setlinecap
+                   1 setlinejoin
+                   currentpoint % w h x1 y1
+                   4 2 roll % x1 y1 w h
+                   4 copy
+                   rectfill
+                   rectstroke
+               } {
+                   1 setlinecap
+                   rlineto stroke
+               } ifelse
        } {
                pop % w h x y
                rmoveto % w h