]> git.donarmstrong.com Git - lilypond.git/commitdiff
(get_print_stencil): use retval.expr() as base for
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 19 Aug 2006 19:29:40 +0000 (19:29 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 19 Aug 2006 19:29:40 +0000 (19:29 +0000)
color, not the original stencil. Fixes combinations of
color/transparency/rotation

ChangeLog
lily/grob.cc
scm/output-ps.scm

index 3de1c5444db47af5d947d0096c3b833594a943ab..0ced3569a33133140c287d780c47abf0546e9714 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-08-19  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * lily/grob.cc (get_print_stencil): use retval.expr() as base for
+       color, not the original stencil. Fixes combinations of
+       color/transparency/rotation
+
        * scripts/lilypond-book.py (main): add --formats=eps for
        texinfo/latex.
 
index 8628e8a5909f1ba5d090d49e5eda8707a3bb3401..a1963e5fe47e3aed5a5f6cce389171d8a7031aba 100644 (file)
@@ -121,6 +121,7 @@ Grob::get_print_stencil () const
 
          retval = Stencil (m->extent_box (), expr);
        }
+
       SCM rot = get_property ("rotation");
       if (scm_is_pair (rot))
        {
@@ -135,12 +136,11 @@ Grob::get_print_stencil () const
       SCM color = get_property ("color");
       if (color != SCM_EOL)
        {
-         m = unsmob_stencil (stil);
          SCM expr = scm_list_3 (ly_symbol2scm ("color"),
                                 color,
-                                m->expr ());
+                                retval.expr ());
 
-         retval = Stencil (m->extent_box (), expr);
+         retval = Stencil (retval.extent_box (), expr);
        }
 
     }
index 108771ee4b9bb2c51da3c2e06a6f523c20615c00..f5dcc38a59becef440da81678c497bd47d1abca7 100644 (file)
            polygon
            repeat-slash
            resetcolor
-           resetrotatino
+           resetrotation
            round-filled-box
            setcolor
-               setrotation
+           setrotation
            text
            zigzag-line))
 
     (format #f "~a draw_repeat_slash"
            (numbers->string4 (list x-width width height)))))
 
-;; restore color from stack
-(define (resetcolor) "setrgbcolor\n")
-
 
 (define (round-filled-box left right bottom top blotdiam)
   (let* ((halfblot (/ blotdiam 2))
 
 ;; save current color on stack and set new color
 (define (setcolor r g b)
-  (format #f "currentrgbcolor ~a setrgbcolor\n"
+  (format #f "gsave ~a setrgbcolor\n"
          (numbers->string4 (list r g b))))
 
+;; restore color from stack
+(define (resetcolor) "grestore \n")
+
 ;; rotation around given point
 (define (setrotation ang x y)
   (format "gsave ~a translate ~a rotate ~a translate\n"