X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-spacing.cc;h=0cf786d7512bc5bd9b89bfa1c1a11c0254e1ab41;hb=d088cb4d9526a4a93e92bdf3d0b6cbb012883b6f;hp=80a789e418c499f90fa0afb03b5424946cd01e3a;hpb=e8936ee66fdd3e7ebe30556590e8dc913908a533;p=lilypond.git diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 80a789e418..0cf786d751 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -92,7 +92,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, } } - if (extents[d].empty_b ()) + if (extents[d].is_empty ()) extents[d] = Interval (0,0); } while (flip (&d) != LEFT); @@ -108,7 +108,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, FIXED also includes the left part of the right object. */ *fixed = - (left_head_wid.empty_b () ? increment : + (left_head_wid.is_empty () ? increment : /* Size of the head: */ @@ -122,7 +122,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, /* What is sticking out of the right note: */ - + (extents[RIGHT].empty_b() ? 0.0 : - extents[RIGHT][LEFT] / 2); + + (extents[RIGHT].is_empty () ? 0.0 : - extents[RIGHT][LEFT] / 2); /* We don't do complicated stuff: (base_space - increment) is the @@ -269,7 +269,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, it = it->find_prebroken_piece (rcolumn->break_status_dir ()); } - Grob *last = Staff_spacing::extremal_break_aligned_grob (it, LEFT, &bar_xextent); + Grob *last = Separation_item::extremal_break_aligned_grob (it, LEFT, &bar_xextent); if (last) bar_yextent = Staff_spacing::bar_y_positions (last); @@ -327,7 +327,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, Real correction = 0.0; - if (!bar_yextent.empty_b()) + if (!bar_yextent.is_empty ()) { stem_dirs[RIGHT] = - stem_dirs[LEFT]; stem_posns[RIGHT] = bar_yextent; @@ -350,12 +350,12 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, { head_extent = head->extent (rcolumn, X_AXIS); - if (!head_extent.empty_b()) + if (!head_extent.is_empty ()) note_head_width = head_extent[RIGHT]; if (st) { - Real thick = gh_scm2double (st->get_grob_property ("thickness")) + Real thick = robust_scm2double (st->get_grob_property ("thickness"), 1) * st->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); note_head_width -= thick; @@ -363,14 +363,14 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, } correction = note_head_width* stem_dirs[LEFT]; - correction *= gh_scm2double (me->get_grob_property ("knee-spacing-correction")); + correction *= robust_scm2double (me->get_grob_property ("knee-spacing-correction"), 0); *fixed += correction; } else { intersect = stem_posns[LEFT]; intersect.intersect(stem_posns[RIGHT]); - correct_stem_dirs = correct_stem_dirs && !intersect.empty_b (); + correct_stem_dirs = correct_stem_dirs && !intersect.is_empty (); if (correct_stem_dirs) { @@ -383,10 +383,10 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, correction = (correction/7) get_grob_property ("stem-spacing-correction")); + robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0); } - if (!bar_yextent.empty_b()) + if (!bar_yextent.is_empty ()) { correction *= 0.5; } @@ -416,14 +416,14 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, Interval hp = head_posns[LEFT]; hp.intersect (head_posns[RIGHT]); - if (!hp.empty_b()) + if (!hp.is_empty ()) return ; Direction lowest = (head_posns[LEFT][DOWN] > head_posns[RIGHT][UP]) ? RIGHT : LEFT; Real delta = head_posns[-lowest][DOWN] - head_posns[lowest][UP] ; - Real corr = gh_scm2double (me->get_grob_property ("stem-spacing-correction")); + Real corr = robust_scm2double (me->get_grob_property ("stem-spacing-correction"), 0); corr = (delta <= 1) ? 0.0 : 0.25; correction= -lowest * corr ; @@ -431,11 +431,9 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, *space += correction; -#if 0 /* there used to be a correction for bar_xextent() here, but it's unclear what that was good for ? */ -#endif }