lilypond-auto
[Top][All Lists]
Advanced

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

[Lilypond-auto] Issue 3882 in lilypond: stencils with stroke-thickness s


From: lilypond
Subject: [Lilypond-auto] Issue 3882 in lilypond: stencils with stroke-thickness set to zero
Date: Tue, 11 Mar 2014 13:30:12 +0000

Status: Accepted
Owner: ----
Labels: Type-Ugly

New issue 3882 by address@hidden: stencils with stroke-thickness set to zero
http://code.google.com/p/lilypond/issues/detail?id=3882

lpietsch wrote :

There seems to be an inconsistency between the PS and the SVG backends in the
treatment of path stencils. In PS, it seems to be impossible to create a
filled shape with no visible contour line, whereas in SVG this is possible.
If you create a stencil with the thickness parameter set to zero (via
"make-path-stencil" or via "(ly:make-stencil ('path ..."), the SVG backend
will do just that: no visible contour stroke, just a filled shape. The PS
backend will add a visible hairline around the stencil, giving it at least
one pixel in extra width. This may result in quite a visible difference
between the two results, at least in screen display and with small or thin
shapes.

Test snippet:

#(define teststencil (make-path-stencil
    '(moveto 0  0 lineto 0 1 lineto 0.05 1 lineto 0.05 0 closepath)
     0 1 1 #t))
\markup { \stencil #teststencil }

This will result in a markedly thicker line on screen in the PS output than
in the SVG output.

To bring the PS behaviour in line with the SVG behaviour (which I find more
intuitive and more logical), change the path function in scm/output-ps.scm
so as to omit the "stroke" command if the "fill" parameter is #t and the
"thickness" parameter is zero. Change l.286-294 from:

     (ly:format
      "gsave currentpoint translate
~a setlinecap ~a setlinejoin ~a setlinewidth
~l gsave stroke grestore ~a grestore"
      cap-numeric
      join-numeric
      thickness
      (convert-path-exps exps)
      (if fill? "fill" ""))))

to:

     (ly:format
      "gsave currentpoint translate
~a setlinecap ~a setlinejoin ~a setlinewidth
~l ~a ~a grestore"
      cap-numeric
      join-numeric
      thickness
      (convert-path-exps exps)
      (if (or (not fill?)(> thickness 0)) "gsave stroke grestore" "")
      (if fill? "fill" ""))))


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

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