- SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG1, __FUNCTION__, "number pair");
- SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair");
- SCM_ASSERT_TYPE (scm_is_number (blot), blot, SCM_ARG3, __FUNCTION__, "number");
+ Stencil *s = unsmob_stencil (stil);
+ LY_ASSERT_SMOB (Stencil, stil, 1);
+ LY_ASSERT_TYPE (scm_is_number, angle, 2);
+ LY_ASSERT_TYPE (scm_is_number, x, 3);
+ LY_ASSERT_TYPE (scm_is_number, y, 4);
+ Real a = scm_to_double (angle);
+ Real x_off = scm_to_double (x);
+ Real y_off = scm_to_double (y);
+
+ SCM new_s = s->smobbed_copy ();
+ Stencil *q = unsmob_stencil (new_s);
+ q->rotate_degrees_absolute (a, Offset (x_off, y_off));
+ return new_s;
+}
+
+LY_DEFINE (ly_round_filled_box, "ly:round-filled-box",
+ 3, 0, 0,
+ (SCM xext, SCM yext, SCM blot),
+ "Make a @code{Stencil} object that prints a black box of"
+ " dimensions @var{xext}, @var{yext} and roundness @var{blot}.")
+{
+ LY_ASSERT_TYPE (is_number_pair, xext, 1);
+ LY_ASSERT_TYPE (is_number_pair, yext, 2);
+ LY_ASSERT_TYPE (scm_is_number, blot, 3);