X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstencil-interpret.cc;h=e4387345361da7ba061cac04386d361eebeef56a;hb=0dc1f8a5fe729cd646213d3fb621df96f1405460;hp=f88cdc4c7fd0593ddac254c842a35f9267fac99b;hpb=b7f91a698780966af5f1c3f2ea9aad4630fb480f;p=lilypond.git diff --git a/lily/stencil-interpret.cc b/lily/stencil-interpret.cc index f88cdc4c7f..e438734536 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--2006 Han-Wen Nienhuys */ #include "stencil.hh" @@ -55,14 +54,30 @@ 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 { (*func) (func_arg, scm_list_4 (ly_symbol2scm ("placebox"), - scm_make_real (o[X_AXIS]), - scm_make_real (o[Y_AXIS]), + scm_from_double (o[X_AXIS]), + scm_from_double (o[Y_AXIS]), expr)); return; }