]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lookup.cc
Editing.
[lilypond.git] / lily / lookup.cc
index df15d3d1ed729a5264fc562a222a82fb10ed41f9..567cb9dd6d8f4e9d3748bc063e3cb3437449dda8 100644 (file)
@@ -58,8 +58,8 @@ Stencil
 Lookup::beam (Real slope, Real width, Real thick, Real blot)
 {
   Real height = slope * width;
-  Real min_y = (0 <? height) - thick / 2;
-  Real max_y = (0 >? height) + thick / 2;
+  Real min_y = min (0., height) - thick / 2;
+  Real max_y = max (0., height) + thick / 2;
 
   Box b (Interval (0, width),
         Interval (min_y, max_y));
@@ -308,6 +308,7 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
   SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
                                ly_quote_scm (shrinked_points_scm),
                                scm_make_real (blotdiameter),
+                               SCM_BOOL_T,
                                SCM_UNDEFINED);
 
   Stencil polygon = Stencil (box, polygon_scm);
@@ -358,15 +359,15 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
 
   SCM scontrols[8];
 
-  for (int i =4; i--;)
+  for (int i = 4; i--;)
     scontrols[ i ] = ly_offset2scm (back.control_[i]);
-  for (int i =4; i--;)
+  for (int i = 4; i--;)
     scontrols[i + 4] = ly_offset2scm (curve.control_[i]);
 
   /*
     Need the weird order b.o. the way PS want its arguments
   */
-  int indices[]= {5, 6, 7, 4, 1, 2, 3, 0};
+  int indices[] = {5, 6, 7, 4, 1, 2, 3, 0};
   SCM list = SCM_EOL;
   for (int i = 8; i--;)
     {
@@ -681,7 +682,7 @@ Lookup::triangle (Interval iv, Real thick, Real protude)
 {
   Box b;
   b[X_AXIS] = Interval (0, iv.length ());
-  b[Y_AXIS] = Interval (0 <? protude, 0 >? protude);
+  b[Y_AXIS] = Interval (min (0., protude), max (0.0, protude));
 
   Offset z1 (iv[LEFT], 0);
   Offset z2 (iv[RIGHT], 0);