color, not the original stencil. Fixes combinations of
color/transparency/rotation
2006-08-19 Han-Wen Nienhuys <hanwen@lilypond.org>
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.
* scripts/lilypond-book.py (main): add --formats=eps for
texinfo/latex.
retval = Stencil (m->extent_box (), expr);
}
retval = Stencil (m->extent_box (), expr);
}
SCM rot = get_property ("rotation");
if (scm_is_pair (rot))
{
SCM rot = get_property ("rotation");
if (scm_is_pair (rot))
{
SCM color = get_property ("color");
if (color != SCM_EOL)
{
SCM color = get_property ("color");
if (color != SCM_EOL)
{
- m = unsmob_stencil (stil);
SCM expr = scm_list_3 (ly_symbol2scm ("color"),
color,
SCM expr = scm_list_3 (ly_symbol2scm ("color"),
color,
- retval = Stencil (m->extent_box (), expr);
+ retval = Stencil (retval.extent_box (), expr);
polygon
repeat-slash
resetcolor
polygon
repeat-slash
resetcolor
round-filled-box
setcolor
round-filled-box
setcolor
(format #f "~a draw_repeat_slash"
(numbers->string4 (list x-width width height)))))
(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))
(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)
;; 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))))
(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"
;; rotation around given point
(define (setrotation ang x y)
(format "gsave ~a translate ~a rotate ~a translate\n"