X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstencil-interpret.cc;h=c1db5284234f485e33cddbe46c50c7bea13ebd06;hb=a58143ffd322981ea22351c44a0d5929f18892e5;hp=3964054daf4d8e6e2a77e8ce985947683d3925fc;hpb=4b975f3177880e16e759f67be4517f67109c2633;p=lilypond.git diff --git a/lily/stencil-interpret.cc b/lily/stencil-interpret.cc index 3964054daf..c1db528423 100644 --- a/lily/stencil-interpret.cc +++ b/lily/stencil-interpret.cc @@ -1,10 +1,9 @@ /* - stencil-interpret.cc -- implement Stencil expression interpreting + stencil-interpret.cc -- implement Stencil expression interpreting source file of the GNU LilyPond music typesetter - (c) 2005 Han-Wen Nienhuys - + (c) 2005--2008 Han-Wen Nienhuys */ #include "stencil.hh" @@ -22,6 +21,11 @@ interpret_stencil_expression (SCM expr, SCM head = scm_car (expr); + if (head == ly_symbol2scm ("delay-stencil-evaluation")) + { + interpret_stencil_expression (scm_force (scm_cadr (expr)), func, func_arg, o); + return; + } if (head == ly_symbol2scm ("translate-stencil")) { o += ly_scm2offset (scm_cadr (expr)); @@ -55,6 +59,22 @@ interpret_stencil_expression (SCM expr, interpret_stencil_expression (scm_caddr (expr), func, func_arg, o); (*func) (func_arg, scm_list_1 (ly_symbol2scm ("resetcolor"))); + return; + } + else if (head == ly_symbol2scm ("rotate-stencil")) + { + SCM args = scm_cadr (expr); + SCM angle = scm_car (args); + Offset tmp = o + robust_scm2offset (scm_cadr (args), Offset (0.0, 0.0)); + + SCM offset = ly_offset2scm (tmp); + SCM x = scm_car (offset); + SCM y = scm_cdr (offset); + + (*func) (func_arg, scm_list_4 (ly_symbol2scm ("setrotation"), angle, x, y)); + interpret_stencil_expression (scm_caddr (expr), func, func_arg, o); + (*func) (func_arg, scm_list_4 (ly_symbol2scm ("resetrotation"), angle, x, y)); + return; } else