finishLayout method

  1. @override
void finishLayout(
  1. ChantContext ctxt
)
override

Implementation

@override
void finishLayout(ChantContext ctxt) {
  ledgerLines = requiresLedgerLine(ctxt);

  // allow subclasses an opportunity to position their own markings...
  positionMarkings();

  // layout the markings of the notes
  for (var note in notes) {
    for (var episema in note.episemata) {
      episema.performLayout(ctxt);
      addVisualizer(episema);
    }

    for (var mora in note.morae) {
      mora.performLayout(ctxt);
      addVisualizer(mora);
    }

    // if the note has an ictus, then add it here
    if (note.ictus != null) {
      note.ictus!.performLayout(ctxt);
      addVisualizer(note.ictus!);
    }

    if (note.accent != null) {
      note.accent!.performLayout(ctxt);
      addVisualizer(note.accent!);
    }

    if (note.choralSign != null) {
      note.choralSign!.performLayout(ctxt);
      addVisualizer(note.choralSign!);
    }

    note.alText?.performLayout(ctxt);

    // braces are handled by the chant line, so we don't mess with them here
    // this is because brace size depends on chant line logic (neume spacing,
    // justification, etc.) so they are considered chant line level
    // markings rather than note level markings
  }

  origin = notes[0].origin.clone();

  super.finishLayout(ctxt);
}