]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/stencil-scheme.cc
Merge branch 'master' of ssh+git://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / stencil-scheme.cc
index 90a82ec466eeedd6dfc12f3754879487c24fd459..a603f01b5f5c9b123cbd1638bfb462cd4a1b268e 100644 (file)
@@ -22,8 +22,8 @@ LY_DEFINE (ly_stencil_translate_axis, "ly:stencil-translate-axis",
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
-  LY_ASSERT_TYPE(scm_is_number,amount, 2);
-  LY_ASSERT_TYPE(is_axis,axis, 3);
+  LY_ASSERT_TYPE (scm_is_number, amount, 2);
+  LY_ASSERT_TYPE (is_axis, axis, 3);
 
   Real real_amount = scm_to_double (amount);
 
@@ -40,7 +40,7 @@ LY_DEFINE (ly_stencil_translate, "ly:stencil-translate",
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
-  LY_ASSERT_TYPE(is_number_pair, offset, 2);
+  LY_ASSERT_TYPE (is_number_pair, offset, 2);
   Offset o = ly_scm2offset (offset);
 
   SCM new_s = s->smobbed_copy ();
@@ -65,7 +65,7 @@ LY_DEFINE (ly_stencil_extent, "ly:stencil-extent",
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
-  LY_ASSERT_TYPE(is_axis, axis, 2);
+  LY_ASSERT_TYPE (is_axis, axis, 2);
 
   return ly_interval2scm (s->extent (Axis (scm_to_int (axis))));
 }
@@ -100,19 +100,19 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
                   first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()");
   SCM_ASSERT_TYPE (s2 || second == SCM_BOOL_F || second == SCM_EOL,
                   second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()");
-  LY_ASSERT_TYPE(is_axis, axis,  2);
-  LY_ASSERT_TYPE(is_direction, direction, 3);
+  LY_ASSERT_TYPE (is_axis, axis,  2);
+  LY_ASSERT_TYPE (is_direction, direction, 3);
 
   Real p = 0.0;
   if (padding != SCM_UNDEFINED)
     {
-      LY_ASSERT_TYPE(scm_is_number, padding, 5);
+      LY_ASSERT_TYPE (scm_is_number, padding, 5);
       p = scm_to_double (padding);
     }
   Real m = 0.0;
   if (minimum != SCM_UNDEFINED)
     {
-      LY_ASSERT_TYPE(scm_is_number, minimum, 6);
+      LY_ASSERT_TYPE (scm_is_number, minimum, 6);
       m = scm_to_double (minimum);
     }
 
@@ -156,15 +156,23 @@ LY_DEFINE (ly_stencil_add, "ly:stencil-add",
 
 LY_DEFINE (ly_make_stencil, "ly:make-stencil",
           1, 2, 0, (SCM expr, SCM xext, SCM yext),
-          " \n"
-          "Stencils are a device independent output expressions."
-          "They carry two pieces of information: \n\n"
-          "1: a specification of how to print this object. "
+          "Stencils are device independent output expressions.  "
+          "They carry two pieces of information:\n"
+
+          "@enumerate\n"
+
+          "@item\n"
+          "A specification of how to print this object.  "
           "This specification is processed by the output backends, "
-          " for example @file{scm/output-ps.scm}.\n\n"
-          "2: the vertical and horizontal extents of the object.\n\n"
-          "If the extents are unspecified, they are taken  to be empty."
-          )
+          "for example @file{scm/output-ps.scm}.\n"
+
+          "@item\n"
+          "The vertical and horizontal extents of the object, "
+          "given as pairs.  "
+          "If an extent is unspecified (or if you use "
+          "@code{(1000 . -1000)} as its value), it is taken to be empty.\n"
+
+          "@end enumerate\n")
 {
   SCM_ASSERT_TYPE (!scm_is_pair (expr)
                   || is_stencil_head (scm_car (expr)),
@@ -174,14 +182,14 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil",
   Interval x; 
   if (xext != SCM_UNDEFINED)
     {
-      LY_ASSERT_TYPE(is_number_pair, xext, 2);
+      LY_ASSERT_TYPE (is_number_pair, xext, 2);
       x = ly_scm2interval (xext);
     }
 
   Interval y; 
   if (yext != SCM_UNDEFINED)
     {
-      LY_ASSERT_TYPE(is_number_pair,yext, 3);
+      LY_ASSERT_TYPE (is_number_pair, yext, 3);
       y = ly_scm2interval (yext);
     }
 
@@ -197,8 +205,8 @@ LY_DEFINE (ly_stencil_aligned_to, "ly:stencil-aligned-to",
           "Other values are interpolated (so 0 means the center).")
 {
   LY_ASSERT_SMOB (Stencil, stil, 1);
-  LY_ASSERT_TYPE(is_axis,axis, 2);
-  LY_ASSERT_TYPE(scm_is_number, dir, 3);
+  LY_ASSERT_TYPE (is_axis, axis, 2);
+  LY_ASSERT_TYPE (scm_is_number, dir, 3);
 
   Stencil target = *unsmob_stencil (stil);
 
@@ -264,9 +272,9 @@ LY_DEFINE (ly_bracket, "ly:bracket",
           "may be negative. The thickness is given by @var{t}.")
 {
   LY_ASSERT_TYPE (is_axis, a, 1);
-  LY_ASSERT_TYPE(is_number_pair,iv, 2);
-  LY_ASSERT_TYPE(scm_is_number, t,3);
-  LY_ASSERT_TYPE(scm_is_number, p,4);
+  LY_ASSERT_TYPE (is_number_pair, iv, 2);
+  LY_ASSERT_TYPE (scm_is_number, t,3);
+  LY_ASSERT_TYPE (scm_is_number, p,4);
 
   return Lookup::bracket ((Axis)scm_to_int (a), ly_scm2interval (iv),
                          scm_to_double (t),
@@ -280,9 +288,9 @@ LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate",
 {
   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);
+  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);
@@ -301,8 +309,8 @@ LY_DEFINE (ly_round_filled_box, "ly:round-filled-box",
           "@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);
+  LY_ASSERT_TYPE (is_number_pair, yext, 2);
+  LY_ASSERT_TYPE (scm_is_number, blot, 3);
 
   return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)),
                                   scm_to_double (blot)).smobbed_copy ();