From: Han-Wen Nienhuys Date: Sat, 19 Aug 2006 19:29:40 +0000 (+0000) Subject: (get_print_stencil): use retval.expr() as base for X-Git-Tag: cvs/HEAD~158 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c9780857b4aae882d354db4f5f363f22f5ebcb85;p=lilypond.git (get_print_stencil): use retval.expr() as base for color, not the original stencil. Fixes combinations of color/transparency/rotation --- diff --git a/ChangeLog b/ChangeLog index 3de1c5444d..0ced3569a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-08-19 Han-Wen Nienhuys + * 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. diff --git a/lily/grob.cc b/lily/grob.cc index 8628e8a590..a1963e5fe4 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -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); } } diff --git a/scm/output-ps.scm b/scm/output-ps.scm index 108771ee4b..f5dcc38a59 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -33,10 +33,10 @@ polygon repeat-slash resetcolor - resetrotatino + resetrotation round-filled-box setcolor - setrotation + setrotation text zigzag-line)) @@ -248,9 +248,6 @@ (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)) @@ -264,9 +261,12 @@ ;; 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"