use of com.xenoage.zong.musiclayout.notation.Notation in project Zong by Xenoage.
the class MeasureStamper method stampLeading.
/**
* Stamps the {@link MeasureElement}s of the leading spacing.
* @param leadingXMm the horizontal position on the staff in mm, where
* the leading spacing of the measure starts.
*/
public List<Stamping> stampLeading(MeasureSpacing measure, float leadingXMm, StamperContext context) {
LeadingSpacing leading = measure.leading;
if (leading == null)
return emptyList;
List<Stamping> ret = alist(leading.elements.size());
for (ElementSpacing element : leading.elements) {
MusicElement me = element.getElement();
if (me != null) {
float xMm = leadingXMm + element.xIs * measure.interlineSpace;
Notation notation = context.getNotation(me);
if (notation == null)
throw new RuntimeException("No notation for element " + me + " at " + MP.getMP(me));
ret.add(stamp(notation, xMm, context));
}
}
return ret;
}
Aggregations