Search in sources :

Example 1 with MxlSystemLayout

use of com.xenoage.zong.musicxml.types.MxlSystemLayout in project Zong by Xenoage.

the class ScoreFormatReader method readSystemLayout.

private void readSystemLayout() {
    MxlSystemLayout mxlSystemLayout = mxlLayout.getSystemLayout();
    if (mxlSystemLayout == null)
        return;
    SystemLayoutReader systemLayoutReader = new SystemLayoutReader(mxlSystemLayout, tenthsMm);
    scoreFormat.setSystemLayout(systemLayoutReader.read());
    Float topSystemDistance = systemLayoutReader.getTopSystemDistance();
    if (topSystemDistance != null)
        scoreFormat.setTopSystemDistance(topSystemDistance);
}
Also used : MxlSystemLayout(com.xenoage.zong.musicxml.types.MxlSystemLayout)

Example 2 with MxlSystemLayout

use of com.xenoage.zong.musicxml.types.MxlSystemLayout in project Zong by Xenoage.

the class PrintReader method readSystemLayout.

private SystemLayout readSystemLayout(boolean isPageStarted, float tenthMm) {
    MxlLayout mxlLayout = mxlPrint.getLayout();
    if (mxlLayout != null) {
        MxlSystemLayout mxlSystemLayout = mxlLayout.getSystemLayout();
        if (mxlSystemLayout != null) {
            SystemLayoutReader systemLayoutReader = new SystemLayoutReader(mxlSystemLayout, tenthMm);
            SystemLayout systemLayout = systemLayoutReader.read();
            Float topSystemDistance = systemLayoutReader.getTopSystemDistance();
            // for first systems on a page, use top-system-distance
            if (isPageStarted && topSystemDistance != null)
                systemLayout.setDistance(topSystemDistance);
            return systemLayout;
        }
    }
    return null;
}
Also used : MxlSystemLayout(com.xenoage.zong.musicxml.types.MxlSystemLayout) SystemLayout(com.xenoage.zong.core.format.SystemLayout) MxlSystemLayout(com.xenoage.zong.musicxml.types.MxlSystemLayout) MxlLayout(com.xenoage.zong.musicxml.types.groups.MxlLayout)

Aggregations

MxlSystemLayout (com.xenoage.zong.musicxml.types.MxlSystemLayout)2 SystemLayout (com.xenoage.zong.core.format.SystemLayout)1 MxlLayout (com.xenoage.zong.musicxml.types.groups.MxlLayout)1