summaryrefslogtreecommitdiff
path: root/ps
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2012-02-27 23:29:24 +0100
committerDavid Kastrup <dak@gnu.org>2012-03-07 22:03:08 +0100
commit4666869ad53760ead32eba6c5dc75e43c69f4c87 (patch)
tree065ca85531d48dcf784fabb6e040e93f2a7869f8 /ps
parent6e570a723243c4d530cee83dbde7b5d96f6a2b9e (diff)
Issue 2328: Ledger lines in PNG output have white interior
Don't stroke rectangles with height or width 0 in draw_round_box
Diffstat (limited to 'ps')
-rw-r--r--ps/music-drawing-routines.ps21
1 files changed, 13 insertions, 8 deletions
diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps
index d7450e452b..3e62f0366e 100644
--- a/ps/music-drawing-routines.ps
+++ b/ps/music-drawing-routines.ps
@@ -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