]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/stencil-interpret.cc
Run `make grand-replace'.
[lilypond.git] / lily / stencil-interpret.cc
index 3964054daf4d8e6e2a77e8ce985947683d3925fc..c1db5284234f485e33cddbe46c50c7bea13ebd06 100644 (file)
@@ -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 <hanwen@xs4all.nl>
-
+  (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #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