Search in sources :

Example 1 with MxlPrintStyle

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

the class FormattedTextReader method readStyle.

@NonNull
public FormattedTextStyle readStyle(MxlFormattedText mxlText) {
    MxlPrintStyle mxlPrintStyle = mxlText.getPrintStyle();
    FontInfo font = new FontInfoReader(mxlPrintStyle.getFont(), FontInfo.defaultValue).read();
    Color color = readColor(mxlPrintStyle);
    return new FormattedTextStyle(font, color, Superscript.Normal);
}
Also used : Color(com.xenoage.utils.color.Color) FormattedTextStyle(com.xenoage.zong.core.text.FormattedTextStyle) MxlPrintStyle(com.xenoage.zong.musicxml.types.attributes.MxlPrintStyle) FontInfo(com.xenoage.utils.font.FontInfo) NonNull(com.xenoage.utils.annotations.NonNull)

Example 2 with MxlPrintStyle

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

the class MxlAccidentalMark method read.

@NonNull
public static MxlAccidentalMark read(XmlReader reader) {
    MxlPrintStyle printStyle = MxlPrintStyle.read(reader);
    MxlPlacement placement = MxlPlacement.read(reader);
    MxlAccidentalText accidentalText = MxlAccidentalText.read(reader);
    return new MxlAccidentalMark(accidentalText, printStyle, placement);
}
Also used : MxlAccidentalText(com.xenoage.zong.musicxml.types.enums.MxlAccidentalText) MxlPlacement(com.xenoage.zong.musicxml.types.enums.MxlPlacement) MxlPrintStyle(com.xenoage.zong.musicxml.types.attributes.MxlPrintStyle) NonNull(com.xenoage.utils.annotations.NonNull)

Example 3 with MxlPrintStyle

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

the class MxlFermata method read.

/**
 * Reads the given element and returns it, or returns null if
 * the element is not supported.
 */
@MaybeNull
public static MxlFermata read(XmlReader reader) {
    MxlUprightInverted type = MxlUprightInverted.read(reader, "type");
    MxlPrintStyle printStyle = MxlPrintStyle.read(reader);
    return new MxlFermata(type, printStyle);
}
Also used : MxlUprightInverted(com.xenoage.zong.musicxml.types.enums.MxlUprightInverted) MxlPrintStyle(com.xenoage.zong.musicxml.types.attributes.MxlPrintStyle) MaybeNull(com.xenoage.utils.annotations.MaybeNull)

Example 4 with MxlPrintStyle

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

the class MxlFormattedText method read.

@NonNull
public static MxlFormattedText read(XmlReader reader) {
    MxlLeftCenterRight justify = MxlLeftCenterRight.read(reader, "justify");
    MxlLeftCenterRight hAlign = MxlLeftCenterRight.read(reader, "halign");
    MxlVAlign vAlign = MxlVAlign.read(reader);
    MxlPrintStyle printStyle = MxlPrintStyle.read(reader);
    String value = reader.getTextNotNull();
    return new MxlFormattedText(value, justify, hAlign, vAlign, printStyle);
}
Also used : MxlLeftCenterRight(com.xenoage.zong.musicxml.types.enums.MxlLeftCenterRight) MxlVAlign(com.xenoage.zong.musicxml.types.enums.MxlVAlign) MxlPrintStyle(com.xenoage.zong.musicxml.types.attributes.MxlPrintStyle) NonNull(com.xenoage.utils.annotations.NonNull)

Example 5 with MxlPrintStyle

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

the class MxlPedal method read.

@NonNull
public static MxlPedal read(XmlReader reader) {
    String type = reader.getAttributeNotNull("type");
    MxlPrintStyle printStyle = MxlPrintStyle.read(reader);
    return new MxlPedal(MxlStartStopChange.read(type), printStyle);
}
Also used : MxlPrintStyle(com.xenoage.zong.musicxml.types.attributes.MxlPrintStyle) NonNull(com.xenoage.utils.annotations.NonNull)

Aggregations

MxlPrintStyle (com.xenoage.zong.musicxml.types.attributes.MxlPrintStyle)8 MaybeNull (com.xenoage.utils.annotations.MaybeNull)4 NonNull (com.xenoage.utils.annotations.NonNull)4 MxlPlacement (com.xenoage.zong.musicxml.types.enums.MxlPlacement)2 Color (com.xenoage.utils.color.Color)1 FontInfo (com.xenoage.utils.font.FontInfo)1 DynamicValue (com.xenoage.zong.core.music.direction.DynamicValue)1 FormattedTextStyle (com.xenoage.zong.core.text.FormattedTextStyle)1 MxlFont (com.xenoage.zong.musicxml.types.attributes.MxlFont)1 MxlAccidentalText (com.xenoage.zong.musicxml.types.enums.MxlAccidentalText)1 MxlLeftCenterRight (com.xenoage.zong.musicxml.types.enums.MxlLeftCenterRight)1 MxlNoteTypeValue (com.xenoage.zong.musicxml.types.enums.MxlNoteTypeValue)1 MxlUprightInverted (com.xenoage.zong.musicxml.types.enums.MxlUprightInverted)1 MxlVAlign (com.xenoage.zong.musicxml.types.enums.MxlVAlign)1 MxlPrintStyleContent (com.xenoage.zong.musicxml.types.util.MxlPrintStyleContent)1