diff --git a/Verovio.xcodeproj/project.pbxproj b/Verovio.xcodeproj/project.pbxproj index 215d5ebe497..b33f69a4ac4 100644 --- a/Verovio.xcodeproj/project.pbxproj +++ b/Verovio.xcodeproj/project.pbxproj @@ -7,11 +7,13 @@ objects = { /* Begin PBXBuildFile section */ + 1579B3431B15033100B16F5C /* proport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1579B3421B15033100B16F5C /* proport.cpp */; }; 2D2A799A1A69812C000A441B /* chord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D2A79991A69812C000A441B /* chord.cpp */; }; 4D1D733C1A1D0390001E08F6 /* smufl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D1D733B1A1D0390001E08F6 /* smufl.h */; }; 4D1D733E1A1D08CD001E08F6 /* glyph.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D1D733D1A1D08CD001E08F6 /* glyph.h */; }; 4D1D73401A1D08DC001E08F6 /* glyph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D1D733F1A1D08DC001E08F6 /* glyph.cpp */; }; 4D1D73411A1D08DC001E08F6 /* glyph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D1D733F1A1D08DC001E08F6 /* glyph.cpp */; }; + 4D20B5EC1B873A1300EA9EC3 /* scoredefinterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D20B5EB1B873A1300EA9EC3 /* scoredefinterface.cpp */; }; 4D22C41918890E6100D0831F /* mrest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D22C41818890E6100D0831F /* mrest.cpp */; }; 4D22C41A18890E6100D0831F /* mrest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D22C41818890E6100D0831F /* mrest.cpp */; }; 4D22C41C18890E9900D0831F /* mrest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D22C41B18890E9900D0831F /* mrest.h */; }; @@ -27,10 +29,13 @@ 4D4221061998A8CE00963292 /* atts_mensural.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DEE29031940BCC100C76319 /* atts_mensural.cpp */; }; 4D4221071998A8CE00963292 /* atts_mensural.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DEE29031940BCC100C76319 /* atts_mensural.cpp */; }; 4D43C30C1A9BB22A00EA28F3 /* view_mensural.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D43C30B1A9BB22A00EA28F3 /* view_mensural.cpp */; }; + 4D543E221B80AACF004B823C /* view_floating.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D543E211B80AACF004B823C /* view_floating.cpp */; }; 4D763EC61987D04E003FCAB5 /* metersig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D763EC51987D04D003FCAB5 /* metersig.cpp */; }; 4D763EC71987D04E003FCAB5 /* metersig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D763EC51987D04D003FCAB5 /* metersig.cpp */; }; 4D763EC91987D067003FCAB5 /* metersig.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D763EC81987D067003FCAB5 /* metersig.h */; }; 4D763EEC198BF2D8003FCAB5 /* atts_shared.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DEE29091940BCC100C76319 /* atts_shared.cpp */; }; + 4D798CBD1B8AEDBA007281CA /* drawinginterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D798CBC1B8AEDBA007281CA /* drawinginterface.cpp */; }; + 4D798CBE1B8AEDBA007281CA /* drawinginterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D798CBC1B8AEDBA007281CA /* drawinginterface.cpp */; }; 4D8CD8A61B4E922A00F0756F /* atts_critapp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DEE28F31940BCC100C76319 /* atts_critapp.cpp */; }; 4D8CD8A71B4E927300F0756F /* atts_critapp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DEE28F31940BCC100C76319 /* atts_critapp.cpp */; }; 4D983005192E959E00320037 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D983004192E959E00320037 /* main.cpp */; }; @@ -46,9 +51,21 @@ 4D9C53141B52E4AE0003C6EC /* utf8.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D9C53101B52E4AE0003C6EC /* utf8.h */; }; 4DA3FCD319B61DB300CBDFE6 /* atts_cmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DEE28EF1940BCC100C76319 /* atts_cmn.cpp */; }; 4DA3FCD419B61DB400CBDFE6 /* atts_cmn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DEE28EF1940BCC100C76319 /* atts_cmn.cpp */; }; + 4DA60EE01B6307A8006E2DFC /* textdirective.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DA60EDE1B6307A8006E2DFC /* textdirective.h */; }; + 4DA60EE11B6307A8006E2DFC /* textdirinterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DA60EDF1B6307A8006E2DFC /* textdirinterface.h */; }; + 4DA60EE41B6307B9006E2DFC /* textdirective.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA60EE21B6307B9006E2DFC /* textdirective.cpp */; }; + 4DA60EE51B6307B9006E2DFC /* textdirective.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA60EE21B6307B9006E2DFC /* textdirective.cpp */; }; + 4DA60EE61B6307B9006E2DFC /* textdirinterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA60EE31B6307B9006E2DFC /* textdirinterface.cpp */; }; + 4DA60EE71B6307B9006E2DFC /* textdirinterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA60EE31B6307B9006E2DFC /* textdirinterface.cpp */; }; 4DA80D961A6ACF5D0089802D /* style.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA80D951A6ACF5D0089802D /* style.cpp */; }; 4DA80D971A6ACF5D0089802D /* style.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA80D951A6ACF5D0089802D /* style.cpp */; }; 4DB3072F1AC9ED2500EE0982 /* space.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DB3072E1AC9ED2500EE0982 /* space.cpp */; }; + 4DB726C01B8B9F480040231B /* rpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DB726BF1B8B9F480040231B /* rpt.cpp */; }; + 4DB726C11B8B9F480040231B /* rpt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DB726BF1B8B9F480040231B /* rpt.cpp */; }; + 4DB726C31B8B9F540040231B /* rpt.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DB726C21B8B9F540040231B /* rpt.h */; }; + 4DB726C51B8BB0E80040231B /* trem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DB726C41B8BB0E80040231B /* trem.cpp */; }; + 4DB726C61B8BB0E80040231B /* trem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DB726C41B8BB0E80040231B /* trem.cpp */; }; + 4DB726C81B8BB0F30040231B /* trem.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DB726C71B8BB0F30040231B /* trem.h */; }; 4DC34BA219BC4A71006175CD /* accid.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC34B9F19BC4A70006175CD /* accid.h */; }; 4DC34BA319BC4A71006175CD /* custos.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC34BA019BC4A70006175CD /* custos.h */; }; 4DC34BA419BC4A71006175CD /* dot.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC34BA119BC4A70006175CD /* dot.h */; }; @@ -65,12 +82,10 @@ 4DF289FD1A7545CC00BA9F7D /* timeinterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF289FC1A7545CC00BA9F7D /* timeinterface.h */; }; 4DF289FF1A7545E500BA9F7D /* timeinterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF289FE1A7545E500BA9F7D /* timeinterface.cpp */; }; 4DF28A001A7545E500BA9F7D /* timeinterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF289FE1A7545E500BA9F7D /* timeinterface.cpp */; }; - 4DF28A031A754DE400BA9F7D /* measureelement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF28A021A754DE400BA9F7D /* measureelement.h */; }; - 4DF28A051A754DF000BA9F7D /* measureelement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF28A041A754DF000BA9F7D /* measureelement.cpp */; }; - 4DF28A061A754DF000BA9F7D /* measureelement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF28A041A754DF000BA9F7D /* measureelement.cpp */; }; - 4DF2AF7E1A62F6A50016F869 /* drawinglistinterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF2AF7D1A62F6A50016F869 /* drawinglistinterface.h */; }; - 4DF2AF801A62FC4A0016F869 /* drawinglistinterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF2AF7F1A62FC4A0016F869 /* drawinglistinterface.cpp */; }; - 4DF2AF811A62FC4A0016F869 /* drawinglistinterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF2AF7F1A62FC4A0016F869 /* drawinglistinterface.cpp */; }; + 4DF28A031A754DE400BA9F7D /* floatingelement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF28A021A754DE400BA9F7D /* floatingelement.h */; }; + 4DF28A051A754DF000BA9F7D /* floatingelement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF28A041A754DF000BA9F7D /* floatingelement.cpp */; }; + 4DF28A061A754DF000BA9F7D /* floatingelement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DF28A041A754DF000BA9F7D /* floatingelement.cpp */; }; + 4DF2AF7E1A62F6A50016F869 /* drawinginterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF2AF7D1A62F6A50016F869 /* drawinginterface.h */; }; 8F086EE2188539540037FD8E /* aligner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8F086EB6188539540037FD8E /* aligner.cpp */; }; 8F086EE4188539540037FD8E /* barline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8F086EB8188539540037FD8E /* barline.cpp */; }; 8F086EE5188539540037FD8E /* bboxdevicecontext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8F086EB9188539540037FD8E /* bboxdevicecontext.cpp */; }; @@ -202,11 +217,15 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 1579B3411B15031D00B16F5C /* proport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = proport.h; path = include/vrv/proport.h; sourceTree = ""; }; + 1579B3421B15033100B16F5C /* proport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = proport.cpp; path = src/proport.cpp; sourceTree = ""; }; 2D2A79991A69812C000A441B /* chord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = chord.cpp; path = src/chord.cpp; sourceTree = ""; }; 2D2A799B1A698137000A441B /* chord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = chord.h; path = include/vrv/chord.h; sourceTree = ""; }; - 4D1D733B1A1D0390001E08F6 /* smufl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = smufl.h; path = include/vrv/smufl.h; sourceTree = ""; }; + 4D1D733B1A1D0390001E08F6 /* smufl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = smufl.h; path = include/vrv/smufl.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 4D1D733D1A1D08CD001E08F6 /* glyph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glyph.h; path = include/vrv/glyph.h; sourceTree = ""; }; 4D1D733F1A1D08DC001E08F6 /* glyph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = glyph.cpp; path = src/glyph.cpp; sourceTree = ""; }; + 4D20B5EB1B873A1300EA9EC3 /* scoredefinterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = scoredefinterface.cpp; path = src/scoredefinterface.cpp; sourceTree = ""; }; + 4D20B5ED1B873A2B00EA9EC3 /* scoredefinterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = scoredefinterface.h; path = include/vrv/scoredefinterface.h; sourceTree = ""; }; 4D22C41818890E6100D0831F /* mrest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mrest.cpp; path = src/mrest.cpp; sourceTree = ""; }; 4D22C41B18890E9900D0831F /* mrest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mrest.h; path = include/vrv/mrest.h; sourceTree = ""; }; 4D22C41F18891D6D00D0831F /* pugixml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pugixml.cpp; path = src/pugixml.cpp; sourceTree = ""; }; @@ -219,24 +238,35 @@ 4D422100199805E400963292 /* attdef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = attdef.h; path = include/vrv/attdef.h; sourceTree = ""; }; 4D422103199805F700963292 /* att.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = att.cpp; path = src/att.cpp; sourceTree = ""; }; 4D43C30B1A9BB22A00EA28F3 /* view_mensural.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = view_mensural.cpp; path = src/view_mensural.cpp; sourceTree = ""; }; + 4D543E211B80AACF004B823C /* view_floating.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = view_floating.cpp; path = src/view_floating.cpp; sourceTree = ""; }; + 4D5B522F1B7DE3FE00179688 /* att_classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = att_classes.h; path = libmei/att_classes.h; sourceTree = ""; }; 4D763EC51987D04D003FCAB5 /* metersig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = metersig.cpp; path = src/metersig.cpp; sourceTree = ""; }; 4D763EC81987D067003FCAB5 /* metersig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = metersig.h; path = include/vrv/metersig.h; sourceTree = ""; }; 4D797B041A67C55F007637BD /* devicecontextbase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = devicecontextbase.h; path = include/vrv/devicecontextbase.h; sourceTree = ""; }; + 4D798CBC1B8AEDBA007281CA /* drawinginterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = drawinginterface.cpp; path = src/drawinginterface.cpp; sourceTree = ""; }; 4D9234F11A586AE100763251 /* att_comparison.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = att_comparison.h; path = include/vrv/att_comparison.h; sourceTree = ""; }; 4D983004192E959E00320037 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = tools/main.cpp; sourceTree = SOURCE_ROOT; }; 4D9A9C16199F560200028D93 /* verse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = verse.h; path = include/vrv/verse.h; sourceTree = ""; }; 4D9A9C18199F561200028D93 /* verse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = verse.cpp; path = src/verse.cpp; sourceTree = ""; }; 4D9A9C1B199F576100028D93 /* syl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = syl.h; path = include/vrv/syl.h; sourceTree = ""; }; 4D9A9C1D19A1DE2000028D93 /* syl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = syl.cpp; path = src/syl.cpp; sourceTree = ""; }; - 4D9C5F3A1ADBBBEB005D3031 /* git_commit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = git_commit.h; path = include/vrv/git_commit.h; sourceTree = SOURCE_ROOT; }; 4D9C530D1B52E4AE0003C6EC /* checked.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checked.h; path = include/utf8/checked.h; sourceTree = ""; }; 4D9C530E1B52E4AE0003C6EC /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = core.h; path = include/utf8/core.h; sourceTree = ""; }; 4D9C530F1B52E4AE0003C6EC /* unchecked.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = unchecked.h; path = include/utf8/unchecked.h; sourceTree = ""; }; 4D9C53101B52E4AE0003C6EC /* utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utf8.h; path = include/utf8.h; sourceTree = ""; }; + 4D9C5F3A1ADBBBEB005D3031 /* git_commit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = git_commit.h; path = include/vrv/git_commit.h; sourceTree = SOURCE_ROOT; }; + 4DA60EDE1B6307A8006E2DFC /* textdirective.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = textdirective.h; path = include/vrv/textdirective.h; sourceTree = ""; }; + 4DA60EDF1B6307A8006E2DFC /* textdirinterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = textdirinterface.h; path = include/vrv/textdirinterface.h; sourceTree = ""; }; + 4DA60EE21B6307B9006E2DFC /* textdirective.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = textdirective.cpp; path = src/textdirective.cpp; sourceTree = ""; }; + 4DA60EE31B6307B9006E2DFC /* textdirinterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = textdirinterface.cpp; path = src/textdirinterface.cpp; sourceTree = ""; }; 4DA80D941A6940120089802D /* style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = style.h; path = include/vrv/style.h; sourceTree = ""; }; 4DA80D951A6ACF5D0089802D /* style.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = style.cpp; path = src/style.cpp; sourceTree = ""; }; 4DB3072D1AC9ED1800EE0982 /* space.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = space.h; path = include/vrv/space.h; sourceTree = ""; }; 4DB3072E1AC9ED2500EE0982 /* space.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = space.cpp; path = src/space.cpp; sourceTree = ""; }; + 4DB726BF1B8B9F480040231B /* rpt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rpt.cpp; path = src/rpt.cpp; sourceTree = ""; }; + 4DB726C21B8B9F540040231B /* rpt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rpt.h; path = include/vrv/rpt.h; sourceTree = ""; }; + 4DB726C41B8BB0E80040231B /* trem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = trem.cpp; path = src/trem.cpp; sourceTree = ""; }; + 4DB726C71B8BB0F30040231B /* trem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = trem.h; path = include/vrv/trem.h; sourceTree = ""; }; 4DC34B9F19BC4A70006175CD /* accid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = accid.h; path = include/vrv/accid.h; sourceTree = ""; }; 4DC34BA019BC4A70006175CD /* custos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = custos.h; path = include/vrv/custos.h; sourceTree = ""; }; 4DC34BA119BC4A70006175CD /* dot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dot.h; path = include/vrv/dot.h; sourceTree = ""; }; @@ -279,10 +309,9 @@ 4DEE290C1940BCC100C76319 /* atts_tablature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atts_tablature.h; path = libmei/atts_tablature.h; sourceTree = ""; }; 4DF289FC1A7545CC00BA9F7D /* timeinterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = timeinterface.h; path = include/vrv/timeinterface.h; sourceTree = ""; }; 4DF289FE1A7545E500BA9F7D /* timeinterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = timeinterface.cpp; path = src/timeinterface.cpp; sourceTree = ""; }; - 4DF28A021A754DE400BA9F7D /* measureelement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = measureelement.h; path = include/vrv/measureelement.h; sourceTree = ""; }; - 4DF28A041A754DF000BA9F7D /* measureelement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = measureelement.cpp; path = src/measureelement.cpp; sourceTree = ""; }; - 4DF2AF7D1A62F6A50016F869 /* drawinglistinterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = drawinglistinterface.h; path = include/vrv/drawinglistinterface.h; sourceTree = ""; }; - 4DF2AF7F1A62FC4A0016F869 /* drawinglistinterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = drawinglistinterface.cpp; path = src/drawinglistinterface.cpp; sourceTree = ""; }; + 4DF28A021A754DE400BA9F7D /* floatingelement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = floatingelement.h; path = include/vrv/floatingelement.h; sourceTree = ""; }; + 4DF28A041A754DF000BA9F7D /* floatingelement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = floatingelement.cpp; path = src/floatingelement.cpp; sourceTree = ""; }; + 4DF2AF7D1A62F6A50016F869 /* drawinginterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = drawinginterface.h; path = include/vrv/drawinginterface.h; sourceTree = ""; }; 8F086EA9188534680037FD8E /* Verovio */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Verovio; sourceTree = BUILT_PRODUCTS_DIR; }; 8F086EB6188539540037FD8E /* aligner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aligner.cpp; path = src/aligner.cpp; sourceTree = ""; }; 8F086EB8188539540037FD8E /* barline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = barline.cpp; path = src/barline.cpp; sourceTree = ""; }; @@ -416,14 +445,18 @@ 4DC34B9E19BC33A0006175CD /* interfaces */ = { isa = PBXGroup; children = ( - 4DF2AF7F1A62FC4A0016F869 /* drawinglistinterface.cpp */, - 4DF2AF7D1A62F6A50016F869 /* drawinglistinterface.h */, + 4D798CBC1B8AEDBA007281CA /* drawinginterface.cpp */, + 4DF2AF7D1A62F6A50016F869 /* drawinginterface.h */, 8F086EBE188539540037FD8E /* durationinterface.cpp */, 8F59291518854BF800FE51AD /* durationinterface.h */, 8F086ECF188539540037FD8E /* pitchinterface.cpp */, 8F59292618854BF800FE51AD /* pitchinterface.h */, 8F086ED0188539540037FD8E /* positioninterface.cpp */, 8F59292718854BF800FE51AD /* positioninterface.h */, + 4D20B5EB1B873A1300EA9EC3 /* scoredefinterface.cpp */, + 4D20B5ED1B873A2B00EA9EC3 /* scoredefinterface.h */, + 4DA60EE31B6307B9006E2DFC /* textdirinterface.cpp */, + 4DA60EDF1B6307A8006E2DFC /* textdirinterface.h */, 4DF289FE1A7545E500BA9F7D /* timeinterface.cpp */, 4DF289FC1A7545CC00BA9F7D /* timeinterface.h */, ); @@ -433,6 +466,7 @@ 4DEE28EC1940BCA100C76319 /* libmei */ = { isa = PBXGroup; children = ( + 4D5B522F1B7DE3FE00179688 /* att_classes.h */, 4DEE28ED1940BCC100C76319 /* atts_analysis.cpp */, 4DEE28EE1940BCC100C76319 /* atts_analysis.h */, 4DEE28EF1940BCC100C76319 /* atts_cmn.cpp */, @@ -471,17 +505,19 @@ name = libmei; sourceTree = ""; }; - 4DF28A011A754DAA00BA9F7D /* measureelements */ = { + 4DF28A011A754DAA00BA9F7D /* floatingelements */ = { isa = PBXGroup; children = ( - 4DF28A041A754DF000BA9F7D /* measureelement.cpp */, - 4DF28A021A754DE400BA9F7D /* measureelement.h */, + 4DF28A041A754DF000BA9F7D /* floatingelement.cpp */, + 4DF28A021A754DE400BA9F7D /* floatingelement.h */, 8F086ED3188539540037FD8E /* slur.cpp */, 8F59292A18854BF800FE51AD /* slur.h */, + 4DA60EE21B6307B9006E2DFC /* textdirective.cpp */, + 4DA60EDE1B6307A8006E2DFC /* textdirective.h */, 8F086ED8188539540037FD8E /* tie.cpp */, 8F59292F18854BF800FE51AD /* tie.h */, ); - name = measureelements; + name = floatingelements; sourceTree = ""; }; 8F086E9E188534680037FD8E = { @@ -512,7 +548,7 @@ 8F086F37188539C50037FD8E /* io */, 8F086F38188539F00037FD8E /* containers */, 8F086F3A18853A540037FD8E /* elements */, - 4DF28A011A754DAA00BA9F7D /* measureelements */, + 4DF28A011A754DAA00BA9F7D /* floatingelements */, 4DC34B9E19BC33A0006175CD /* interfaces */, 8F086F3918853A190037FD8E /* view */, 8F086EB6188539540037FD8E /* aligner.cpp */, @@ -598,6 +634,7 @@ 8F59293118854BF800FE51AD /* view.h */, 8F086EDA188539540037FD8E /* view_beam.cpp */, 8F086EDC188539540037FD8E /* view_element.cpp */, + 4D543E211B80AACF004B823C /* view_floating.cpp */, 8F086EDD188539540037FD8E /* view_graph.cpp */, 4D43C30B1A9BB22A00EA28F3 /* view_mensural.cpp */, 8F086EDE188539540037FD8E /* view_page.cpp */, @@ -637,12 +674,18 @@ 8F59292218854BF800FE51AD /* multirest.h */, 8F086ECC188539540037FD8E /* note.cpp */, 8F59292318854BF800FE51AD /* note.h */, + 1579B3421B15033100B16F5C /* proport.cpp */, + 1579B3411B15031D00B16F5C /* proport.h */, 8F086ED1188539540037FD8E /* rest.cpp */, 8F59292818854BF800FE51AD /* rest.h */, + 4DB726BF1B8B9F480040231B /* rpt.cpp */, + 4DB726C21B8B9F540040231B /* rpt.h */, 4DB3072E1AC9ED2500EE0982 /* space.cpp */, 4DB3072D1AC9ED1800EE0982 /* space.h */, 4D9A9C1D19A1DE2000028D93 /* syl.cpp */, 4D9A9C1B199F576100028D93 /* syl.h */, + 4DB726C41B8BB0E80040231B /* trem.cpp */, + 4DB726C71B8BB0F30040231B /* trem.h */, 8F086ED9188539540037FD8E /* tuplet.cpp */, 8F59293018854BF800FE51AD /* tuplet.h */, 4D9A9C18199F561200028D93 /* verse.cpp */, @@ -670,6 +713,7 @@ 8F59293C18854BF800FE51AD /* durationinterface.h in Headers */, 8F59293D18854BF800FE51AD /* toolkit.h in Headers */, 4D1D733C1A1D0390001E08F6 /* smufl.h in Headers */, + 4DB726C81B8BB0F30040231B /* trem.h in Headers */, 8F59293E18854BF800FE51AD /* io.h in Headers */, 8F59293F18854BF800FE51AD /* iodarms.h in Headers */, 8F59294018854BF800FE51AD /* iomei.h in Headers */, @@ -677,6 +721,7 @@ 8F59294118854BF800FE51AD /* iomusxml.h in Headers */, 8F59294218854BF800FE51AD /* iopae.h in Headers */, 8F59294318854BF800FE51AD /* keysig.h in Headers */, + 4DA60EE01B6307A8006E2DFC /* textdirective.h in Headers */, 8F59294418854BF800FE51AD /* layer.h in Headers */, 8F59294518854BF800FE51AD /* layerelement.h in Headers */, 8F59294718854BF800FE51AD /* measure.h in Headers */, @@ -686,12 +731,13 @@ 8F59294B18854BF800FE51AD /* object.h in Headers */, 8F59294C18854BF800FE51AD /* page.h in Headers */, 4D9C53131B52E4AE0003C6EC /* unchecked.h in Headers */, - 4DF28A031A754DE400BA9F7D /* measureelement.h in Headers */, + 4DF28A031A754DE400BA9F7D /* floatingelement.h in Headers */, 8F59294D18854BF800FE51AD /* pitchinterface.h in Headers */, 8F59294E18854BF800FE51AD /* positioninterface.h in Headers */, 8F59294F18854BF800FE51AD /* rest.h in Headers */, 4DF289FD1A7545CC00BA9F7D /* timeinterface.h in Headers */, 8F59295018854BF800FE51AD /* scoredef.h in Headers */, + 4DB726C31B8B9F540040231B /* rpt.h in Headers */, 8F59295118854BF800FE51AD /* slur.h in Headers */, 8F59295218854BF800FE51AD /* staff.h in Headers */, 8F59295318854BF800FE51AD /* svgdevicecontext.h in Headers */, @@ -704,6 +750,7 @@ 4D22C41C18890E9900D0831F /* mrest.h in Headers */, 4D22C42418891FC000D0831F /* pugixml.hpp in Headers */, 4D22C42518891FC300D0831F /* pugiconfig.hpp in Headers */, + 4DA60EE11B6307A8006E2DFC /* textdirinterface.h in Headers */, 4D9C53121B52E4AE0003C6EC /* core.h in Headers */, 4D763EC91987D067003FCAB5 /* metersig.h in Headers */, 4D422101199805E400963292 /* att.h in Headers */, @@ -714,7 +761,7 @@ 4DC34BA219BC4A71006175CD /* accid.h in Headers */, 4DC34BA319BC4A71006175CD /* custos.h in Headers */, 4DC34BA419BC4A71006175CD /* dot.h in Headers */, - 4DF2AF7E1A62F6A50016F869 /* drawinglistinterface.h in Headers */, + 4DF2AF7E1A62F6A50016F869 /* drawinginterface.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -806,9 +853,11 @@ 8F086EE2188539540037FD8E /* aligner.cpp in Sources */, 8F086EE4188539540037FD8E /* barline.cpp in Sources */, 8F086EE5188539540037FD8E /* bboxdevicecontext.cpp in Sources */, + 4DA60EE41B6307B9006E2DFC /* textdirective.cpp in Sources */, 8F086EE6188539540037FD8E /* beam.cpp in Sources */, 8F086EE7188539540037FD8E /* clef.cpp in Sources */, 8F086EE8188539540037FD8E /* devicecontext.cpp in Sources */, + 4D543E221B80AACF004B823C /* view_floating.cpp in Sources */, 8F086EE9188539540037FD8E /* doc.cpp in Sources */, 8F086EEA188539540037FD8E /* durationinterface.cpp in Sources */, 8F086EEB188539540037FD8E /* toolkit.cpp in Sources */, @@ -822,10 +871,12 @@ 8F086EF1188539540037FD8E /* keysig.cpp in Sources */, 4D43C30C1A9BB22A00EA28F3 /* view_mensural.cpp in Sources */, 8F086EF2188539540037FD8E /* layer.cpp in Sources */, - 4DF2AF801A62FC4A0016F869 /* drawinglistinterface.cpp in Sources */, + 1579B3431B15033100B16F5C /* proport.cpp in Sources */, 8F086EF3188539540037FD8E /* layerelement.cpp in Sources */, 8F086EF5188539540037FD8E /* measure.cpp in Sources */, 8F086EF6188539540037FD8E /* mensur.cpp in Sources */, + 4DB726C51B8BB0E80040231B /* trem.cpp in Sources */, + 4D798CBD1B8AEDBA007281CA /* drawinginterface.cpp in Sources */, 8F086EF7188539540037FD8E /* multirest.cpp in Sources */, 8F086EF8188539540037FD8E /* note.cpp in Sources */, 8F086EF9188539540037FD8E /* object.cpp in Sources */, @@ -839,6 +890,7 @@ 8F086F01188539540037FD8E /* svgdevicecontext.cpp in Sources */, 4DA80D961A6ACF5D0089802D /* style.cpp in Sources */, 8F086F03188539540037FD8E /* system.cpp in Sources */, + 4D20B5EC1B873A1300EA9EC3 /* scoredefinterface.cpp in Sources */, 4DCA95D81A515D0E008AD7E9 /* editorial.cpp in Sources */, 8F086F04188539540037FD8E /* tie.cpp in Sources */, 8F086F05188539540037FD8E /* tuplet.cpp in Sources */, @@ -847,11 +899,13 @@ 8F086F09188539540037FD8E /* view_graph.cpp in Sources */, 8F086F0A188539540037FD8E /* view_page.cpp in Sources */, 8F086F0B188539540037FD8E /* view_tuplet.cpp in Sources */, + 4DB726C01B8B9F480040231B /* rpt.cpp in Sources */, 2D2A799A1A69812C000A441B /* chord.cpp in Sources */, 8F086F0C188539540037FD8E /* view.cpp in Sources */, 8F086F0D188539540037FD8E /* vrv.cpp in Sources */, 4D22C41918890E6100D0831F /* mrest.cpp in Sources */, 4D22C42018891D6D00D0831F /* pugixml.cpp in Sources */, + 4DA60EE61B6307B9006E2DFC /* textdirinterface.cpp in Sources */, 4D983005192E959E00320037 /* main.cpp in Sources */, 4DEE291B1940BCC100C76319 /* atts_shared.cpp in Sources */, 4D763EC61987D04E003FCAB5 /* metersig.cpp in Sources */, @@ -862,7 +916,7 @@ 4D1D73401A1D08DC001E08F6 /* glyph.cpp in Sources */, 4D9A9C1E19A1DE2000028D93 /* syl.cpp in Sources */, 4DA3FCD319B61DB300CBDFE6 /* atts_cmn.cpp in Sources */, - 4DF28A051A754DF000BA9F7D /* measureelement.cpp in Sources */, + 4DF28A051A754DF000BA9F7D /* floatingelement.cpp in Sources */, 4D3FF8DB19BADD7A00B105B5 /* atts_pagebased.cpp in Sources */, 4DC34BA819BC4A83006175CD /* accid.cpp in Sources */, 4DC34BAA19BC4A83006175CD /* custos.cpp in Sources */, @@ -886,13 +940,16 @@ 4D1D73411A1D08DC001E08F6 /* glyph.cpp in Sources */, 8F3DD36418854B390051330C /* view_page.cpp in Sources */, 8F3DD36518854B390051330C /* view_tuplet.cpp in Sources */, + 4DB726C61B8BB0E80040231B /* trem.cpp in Sources */, 8F3DD33C18854B2E0051330C /* barline.cpp in Sources */, 8F3DD33E18854B2E0051330C /* beam.cpp in Sources */, 8F3DD34018854B2E0051330C /* clef.cpp in Sources */, 8F3DD34218854B2E0051330C /* durationinterface.cpp in Sources */, 8F3DD34418854B2E0051330C /* keysig.cpp in Sources */, 4DF28A001A7545E500BA9F7D /* timeinterface.cpp in Sources */, + 4DA60EE71B6307B9006E2DFC /* textdirinterface.cpp in Sources */, 8F3DD34618854B2E0051330C /* layerelement.cpp in Sources */, + 4D798CBE1B8AEDBA007281CA /* drawinginterface.cpp in Sources */, 8F3DD34818854B2E0051330C /* mensur.cpp in Sources */, 8F3DD34A18854B2E0051330C /* multirest.cpp in Sources */, 8F3DD34C18854B2E0051330C /* note.cpp in Sources */, @@ -910,8 +967,9 @@ 8F3DD33618854B250051330C /* staff.cpp in Sources */, 8F3DD33818854B250051330C /* system.cpp in Sources */, 8F3DD32418854B090051330C /* io.cpp in Sources */, + 4DB726C11B8B9F480040231B /* rpt.cpp in Sources */, 8F3DD32618854B090051330C /* iodarms.cpp in Sources */, - 4DF2AF811A62FC4A0016F869 /* drawinglistinterface.cpp in Sources */, + 4DA60EE51B6307B9006E2DFC /* textdirective.cpp in Sources */, 8F3DD32818854B090051330C /* iomei.cpp in Sources */, 8F3DD32A18854B090051330C /* iomusxml.cpp in Sources */, 8F3DD32C18854B090051330C /* iopae.cpp in Sources */, @@ -928,7 +986,7 @@ 4D4221071998A8CE00963292 /* atts_mensural.cpp in Sources */, 4D9A9C1A199F561200028D93 /* verse.cpp in Sources */, 4D9A9C1F19A1DE2000028D93 /* syl.cpp in Sources */, - 4DF28A061A754DF000BA9F7D /* measureelement.cpp in Sources */, + 4DF28A061A754DF000BA9F7D /* floatingelement.cpp in Sources */, 4DA3FCD419B61DB400CBDFE6 /* atts_cmn.cpp in Sources */, 4DC34BA919BC4A83006175CD /* accid.cpp in Sources */, 4DC34BAB19BC4A83006175CD /* custos.cpp in Sources */, @@ -943,6 +1001,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; @@ -984,6 +1044,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; diff --git a/data/Bravura.xml b/data/Bravura.xml index ff2028fcf79..023eb2ac331 100644 --- a/data/Bravura.xml +++ b/data/Bravura.xml @@ -1,7 +1,16 @@ + + + + + + + + + @@ -30,6 +39,12 @@ + + + + + + @@ -44,6 +59,12 @@ + + + + + + @@ -52,9 +73,25 @@ + + + + + + + + + + + + + + + + @@ -65,4 +102,9 @@ + + + + + diff --git a/data/Bravura/E003-bracketTop.xml b/data/Bravura/E003-bracketTop.xml index 002075f2ddd..7ea1d3c0bed 100644 --- a/data/Bravura/E003-bracketTop.xml +++ b/data/Bravura/E003-bracketTop.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E004-bracketBottom.xml b/data/Bravura/E004-bracketBottom.xml index 6708854b03d..09da46fb728 100644 --- a/data/Bravura/E004-bracketBottom.xml +++ b/data/Bravura/E004-bracketBottom.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E045-dalSegno.xml b/data/Bravura/E045-dalSegno.xml new file mode 100644 index 00000000000..518fd698076 --- /dev/null +++ b/data/Bravura/E045-dalSegno.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E046-daCapo.xml b/data/Bravura/E046-daCapo.xml new file mode 100644 index 00000000000..9d6542c9d2b --- /dev/null +++ b/data/Bravura/E046-daCapo.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E047-segno.xml b/data/Bravura/E047-segno.xml new file mode 100644 index 00000000000..d09e8509ba9 --- /dev/null +++ b/data/Bravura/E047-segno.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E048-coda.xml b/data/Bravura/E048-coda.xml new file mode 100644 index 00000000000..b0eda069f53 --- /dev/null +++ b/data/Bravura/E048-coda.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E04B-segnoSerpent2.xml b/data/Bravura/E04B-segnoSerpent2.xml new file mode 100644 index 00000000000..59f9c9862c7 --- /dev/null +++ b/data/Bravura/E04B-segnoSerpent2.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E050-gClef.xml b/data/Bravura/E050-gClef.xml index e1845b9eb0d..2dfad085d5c 100644 --- a/data/Bravura/E050-gClef.xml +++ b/data/Bravura/E050-gClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E051-gClef15mb.xml b/data/Bravura/E051-gClef15mb.xml index 43e387bd77c..573d52216dd 100644 --- a/data/Bravura/E051-gClef15mb.xml +++ b/data/Bravura/E051-gClef15mb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E052-gClef8vb.xml b/data/Bravura/E052-gClef8vb.xml index 106e67ccc5f..cbf59916c09 100644 --- a/data/Bravura/E052-gClef8vb.xml +++ b/data/Bravura/E052-gClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E053-gClef8va.xml b/data/Bravura/E053-gClef8va.xml index ae13e42d3d2..b27704a7473 100644 --- a/data/Bravura/E053-gClef8va.xml +++ b/data/Bravura/E053-gClef8va.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E054-gClef15ma.xml b/data/Bravura/E054-gClef15ma.xml index 99597f2ceac..17aa35561ba 100644 --- a/data/Bravura/E054-gClef15ma.xml +++ b/data/Bravura/E054-gClef15ma.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E05C-cClef.xml b/data/Bravura/E05C-cClef.xml index b30db19d19b..7881fb29372 100644 --- a/data/Bravura/E05C-cClef.xml +++ b/data/Bravura/E05C-cClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E05D-cClef8vb.xml b/data/Bravura/E05D-cClef8vb.xml index 523d050eead..843e57b0147 100644 --- a/data/Bravura/E05D-cClef8vb.xml +++ b/data/Bravura/E05D-cClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E062-fClef.xml b/data/Bravura/E062-fClef.xml index 5d0b69db16d..c861ff49d7c 100644 --- a/data/Bravura/E062-fClef.xml +++ b/data/Bravura/E062-fClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E063-fClef15mb.xml b/data/Bravura/E063-fClef15mb.xml index d82968852eb..a534cc7e4f9 100644 --- a/data/Bravura/E063-fClef15mb.xml +++ b/data/Bravura/E063-fClef15mb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E064-fClef8vb.xml b/data/Bravura/E064-fClef8vb.xml index c7091c3109c..fa7d55c09f3 100644 --- a/data/Bravura/E064-fClef8vb.xml +++ b/data/Bravura/E064-fClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E065-fClef8va.xml b/data/Bravura/E065-fClef8va.xml index d3b3d6400bb..d7cfc2825f8 100644 --- a/data/Bravura/E065-fClef8va.xml +++ b/data/Bravura/E065-fClef8va.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E066-fClef15ma.xml b/data/Bravura/E066-fClef15ma.xml index 3603f185c30..e1ae6cf518b 100644 --- a/data/Bravura/E066-fClef15ma.xml +++ b/data/Bravura/E066-fClef15ma.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E080-timeSig0.xml b/data/Bravura/E080-timeSig0.xml index 1b64c2d3a5b..e08e1bf72ff 100644 --- a/data/Bravura/E080-timeSig0.xml +++ b/data/Bravura/E080-timeSig0.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E081-timeSig1.xml b/data/Bravura/E081-timeSig1.xml index 479799f0c47..b85ff73db03 100644 --- a/data/Bravura/E081-timeSig1.xml +++ b/data/Bravura/E081-timeSig1.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E082-timeSig2.xml b/data/Bravura/E082-timeSig2.xml index 9621167b6e0..052572d11f4 100644 --- a/data/Bravura/E082-timeSig2.xml +++ b/data/Bravura/E082-timeSig2.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E083-timeSig3.xml b/data/Bravura/E083-timeSig3.xml index 8130d75053d..c94e887417a 100644 --- a/data/Bravura/E083-timeSig3.xml +++ b/data/Bravura/E083-timeSig3.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E084-timeSig4.xml b/data/Bravura/E084-timeSig4.xml index 3d77cdc1cbd..f5474acf995 100644 --- a/data/Bravura/E084-timeSig4.xml +++ b/data/Bravura/E084-timeSig4.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E085-timeSig5.xml b/data/Bravura/E085-timeSig5.xml index 2aea34acd3b..055263dbdf0 100644 --- a/data/Bravura/E085-timeSig5.xml +++ b/data/Bravura/E085-timeSig5.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E086-timeSig6.xml b/data/Bravura/E086-timeSig6.xml index c89bac340c3..b1735f5e15d 100644 --- a/data/Bravura/E086-timeSig6.xml +++ b/data/Bravura/E086-timeSig6.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E087-timeSig7.xml b/data/Bravura/E087-timeSig7.xml index 794d8a2bbe5..67068c8c6a4 100644 --- a/data/Bravura/E087-timeSig7.xml +++ b/data/Bravura/E087-timeSig7.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E088-timeSig8.xml b/data/Bravura/E088-timeSig8.xml index 7e9cfcda1e2..8f841c1faf6 100644 --- a/data/Bravura/E088-timeSig8.xml +++ b/data/Bravura/E088-timeSig8.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E089-timeSig9.xml b/data/Bravura/E089-timeSig9.xml index 68a984c6583..adfb6a93ae6 100644 --- a/data/Bravura/E089-timeSig9.xml +++ b/data/Bravura/E089-timeSig9.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E08A-timeSigCommon.xml b/data/Bravura/E08A-timeSigCommon.xml index f163063d239..51a17bff490 100644 --- a/data/Bravura/E08A-timeSigCommon.xml +++ b/data/Bravura/E08A-timeSigCommon.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E08B-timeSigCutCommon.xml b/data/Bravura/E08B-timeSigCutCommon.xml index 1f5f4dddb4e..af039a8334f 100644 --- a/data/Bravura/E08B-timeSigCutCommon.xml +++ b/data/Bravura/E08B-timeSigCutCommon.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E0A2-noteheadWhole.xml b/data/Bravura/E0A2-noteheadWhole.xml index df2c20a080e..bdc86ca237a 100644 --- a/data/Bravura/E0A2-noteheadWhole.xml +++ b/data/Bravura/E0A2-noteheadWhole.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E0A3-noteheadHalf.xml b/data/Bravura/E0A3-noteheadHalf.xml index 84360dd3d68..e1efbcb562e 100644 --- a/data/Bravura/E0A3-noteheadHalf.xml +++ b/data/Bravura/E0A3-noteheadHalf.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E0A4-noteheadBlack.xml b/data/Bravura/E0A4-noteheadBlack.xml index b392e8738ae..16b78ad1e9a 100644 --- a/data/Bravura/E0A4-noteheadBlack.xml +++ b/data/Bravura/E0A4-noteheadBlack.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E0FA-noteheadWholeFilled.xml b/data/Bravura/E0FA-noteheadWholeFilled.xml index 47a4eac7022..7b02fda0380 100644 --- a/data/Bravura/E0FA-noteheadWholeFilled.xml +++ b/data/Bravura/E0FA-noteheadWholeFilled.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E101-noteheadSlashHorizontalEnds.xml b/data/Bravura/E101-noteheadSlashHorizontalEnds.xml new file mode 100644 index 00000000000..f89fe9537e0 --- /dev/null +++ b/data/Bravura/E101-noteheadSlashHorizontalEnds.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E220-tremolo1.xml b/data/Bravura/E220-tremolo1.xml new file mode 100644 index 00000000000..44f0f86c020 --- /dev/null +++ b/data/Bravura/E220-tremolo1.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E221-tremolo2.xml b/data/Bravura/E221-tremolo2.xml new file mode 100644 index 00000000000..e14bbe897f9 --- /dev/null +++ b/data/Bravura/E221-tremolo2.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E222-tremolo3.xml b/data/Bravura/E222-tremolo3.xml new file mode 100644 index 00000000000..65f27e18d97 --- /dev/null +++ b/data/Bravura/E222-tremolo3.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E223-tremolo4.xml b/data/Bravura/E223-tremolo4.xml new file mode 100644 index 00000000000..f3419c77131 --- /dev/null +++ b/data/Bravura/E223-tremolo4.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E224-tremolo5.xml b/data/Bravura/E224-tremolo5.xml new file mode 100644 index 00000000000..86fb7835454 --- /dev/null +++ b/data/Bravura/E224-tremolo5.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E240-flag8thUp.xml b/data/Bravura/E240-flag8thUp.xml index 74b51dd2cf5..872980a64e3 100644 --- a/data/Bravura/E240-flag8thUp.xml +++ b/data/Bravura/E240-flag8thUp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E241-flag8thDown.xml b/data/Bravura/E241-flag8thDown.xml index 6338de4f4c6..7d5c4afbc05 100644 --- a/data/Bravura/E241-flag8thDown.xml +++ b/data/Bravura/E241-flag8thDown.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E260-accidentalFlat.xml b/data/Bravura/E260-accidentalFlat.xml index ea5a908a8b0..2b6608563b7 100644 --- a/data/Bravura/E260-accidentalFlat.xml +++ b/data/Bravura/E260-accidentalFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E261-accidentalNatural.xml b/data/Bravura/E261-accidentalNatural.xml index 02ce5429707..a0a0aeddac5 100644 --- a/data/Bravura/E261-accidentalNatural.xml +++ b/data/Bravura/E261-accidentalNatural.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E262-accidentalSharp.xml b/data/Bravura/E262-accidentalSharp.xml index 49558ebdd4e..61825b2847d 100644 --- a/data/Bravura/E262-accidentalSharp.xml +++ b/data/Bravura/E262-accidentalSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E263-accidentalDoubleSharp.xml b/data/Bravura/E263-accidentalDoubleSharp.xml index aff58073c29..302bc232c9c 100644 --- a/data/Bravura/E263-accidentalDoubleSharp.xml +++ b/data/Bravura/E263-accidentalDoubleSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E264-accidentalDoubleFlat.xml b/data/Bravura/E264-accidentalDoubleFlat.xml index f2f775be342..bc4edd42d98 100644 --- a/data/Bravura/E264-accidentalDoubleFlat.xml +++ b/data/Bravura/E264-accidentalDoubleFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E265-accidentalTripleSharp.xml b/data/Bravura/E265-accidentalTripleSharp.xml index d1fb5e3144c..d2c72ab348e 100644 --- a/data/Bravura/E265-accidentalTripleSharp.xml +++ b/data/Bravura/E265-accidentalTripleSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E266-accidentalTripleFlat.xml b/data/Bravura/E266-accidentalTripleFlat.xml index 4181f565f51..27b5505874a 100644 --- a/data/Bravura/E266-accidentalTripleFlat.xml +++ b/data/Bravura/E266-accidentalTripleFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E267-accidentalNaturalFlat.xml b/data/Bravura/E267-accidentalNaturalFlat.xml index b1d6fedbf4c..6020057edfa 100644 --- a/data/Bravura/E267-accidentalNaturalFlat.xml +++ b/data/Bravura/E267-accidentalNaturalFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E268-accidentalNaturalSharp.xml b/data/Bravura/E268-accidentalNaturalSharp.xml index 643ac79a6d7..c73488512d1 100644 --- a/data/Bravura/E268-accidentalNaturalSharp.xml +++ b/data/Bravura/E268-accidentalNaturalSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E269-accidentalSharpSharp.xml b/data/Bravura/E269-accidentalSharpSharp.xml index 80610b31c11..58d261b9f9a 100644 --- a/data/Bravura/E269-accidentalSharpSharp.xml +++ b/data/Bravura/E269-accidentalSharpSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E26A-accidentalParensLeft.xml b/data/Bravura/E26A-accidentalParensLeft.xml index 2561edf75c0..6aac22b3044 100644 --- a/data/Bravura/E26A-accidentalParensLeft.xml +++ b/data/Bravura/E26A-accidentalParensLeft.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E26B-accidentalParensRight.xml b/data/Bravura/E26B-accidentalParensRight.xml index 8e4068beb44..5b8d55a85e4 100644 --- a/data/Bravura/E26B-accidentalParensRight.xml +++ b/data/Bravura/E26B-accidentalParensRight.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4A0-articAccentAbove.xml b/data/Bravura/E4A0-articAccentAbove.xml new file mode 100644 index 00000000000..a554d95c399 --- /dev/null +++ b/data/Bravura/E4A0-articAccentAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E4A1-articAccentBelow.xml b/data/Bravura/E4A1-articAccentBelow.xml new file mode 100644 index 00000000000..e041305781d --- /dev/null +++ b/data/Bravura/E4A1-articAccentBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E4A8-articStaccatissimoWedgeAbove.xml b/data/Bravura/E4A8-articStaccatissimoWedgeAbove.xml new file mode 100644 index 00000000000..b1825b0f65d --- /dev/null +++ b/data/Bravura/E4A8-articStaccatissimoWedgeAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E4A9-articStaccatissimoWedgeBelow.xml b/data/Bravura/E4A9-articStaccatissimoWedgeBelow.xml new file mode 100644 index 00000000000..d6bc92147f1 --- /dev/null +++ b/data/Bravura/E4A9-articStaccatissimoWedgeBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E4AC-articMarcatoAbove.xml b/data/Bravura/E4AC-articMarcatoAbove.xml new file mode 100644 index 00000000000..00a16c4c90a --- /dev/null +++ b/data/Bravura/E4AC-articMarcatoAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E4AD-articMarcatoBelow.xml b/data/Bravura/E4AD-articMarcatoBelow.xml new file mode 100644 index 00000000000..cd9dce329b0 --- /dev/null +++ b/data/Bravura/E4AD-articMarcatoBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E4C0-fermataAbove.xml b/data/Bravura/E4C0-fermataAbove.xml index 226d51050a7..fedaf609343 100644 --- a/data/Bravura/E4C0-fermataAbove.xml +++ b/data/Bravura/E4C0-fermataAbove.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4C1-fermataBelow.xml b/data/Bravura/E4C1-fermataBelow.xml index 36b2c48e1c0..39bd9a72ec8 100644 --- a/data/Bravura/E4C1-fermataBelow.xml +++ b/data/Bravura/E4C1-fermataBelow.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4E5-restQuarter.xml b/data/Bravura/E4E5-restQuarter.xml index 655b9314bb4..998d81bb3ab 100644 --- a/data/Bravura/E4E5-restQuarter.xml +++ b/data/Bravura/E4E5-restQuarter.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4E6-rest8th.xml b/data/Bravura/E4E6-rest8th.xml index 59e6e80b787..a2db1d6025d 100644 --- a/data/Bravura/E4E6-rest8th.xml +++ b/data/Bravura/E4E6-rest8th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4E7-rest16th.xml b/data/Bravura/E4E7-rest16th.xml index 4e8e67cd0cc..ac3d490e512 100644 --- a/data/Bravura/E4E7-rest16th.xml +++ b/data/Bravura/E4E7-rest16th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4E8-rest32nd.xml b/data/Bravura/E4E8-rest32nd.xml index 2c5d163bbde..14b87eceb2c 100644 --- a/data/Bravura/E4E8-rest32nd.xml +++ b/data/Bravura/E4E8-rest32nd.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4E9-rest64th.xml b/data/Bravura/E4E9-rest64th.xml index 8d2953680f2..93c6b21ea79 100644 --- a/data/Bravura/E4E9-rest64th.xml +++ b/data/Bravura/E4E9-rest64th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E4EA-rest128th.xml b/data/Bravura/E4EA-rest128th.xml index f5c17905bbc..bf5b6c0080d 100644 --- a/data/Bravura/E4EA-rest128th.xml +++ b/data/Bravura/E4EA-rest128th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E500-repeat1Bar.xml b/data/Bravura/E500-repeat1Bar.xml new file mode 100644 index 00000000000..c517cd85487 --- /dev/null +++ b/data/Bravura/E500-repeat1Bar.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E501-repeat2Bars.xml b/data/Bravura/E501-repeat2Bars.xml new file mode 100644 index 00000000000..10ca88a9e8d --- /dev/null +++ b/data/Bravura/E501-repeat2Bars.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E502-repeat4Bars.xml b/data/Bravura/E502-repeat4Bars.xml new file mode 100644 index 00000000000..91f7f64d70e --- /dev/null +++ b/data/Bravura/E502-repeat4Bars.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E520-dynamicPiano.xml b/data/Bravura/E520-dynamicPiano.xml new file mode 100644 index 00000000000..7d1fac6efb6 --- /dev/null +++ b/data/Bravura/E520-dynamicPiano.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E521-dynamicMezzo.xml b/data/Bravura/E521-dynamicMezzo.xml new file mode 100644 index 00000000000..68537a70608 --- /dev/null +++ b/data/Bravura/E521-dynamicMezzo.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E522-dynamicForte.xml b/data/Bravura/E522-dynamicForte.xml new file mode 100644 index 00000000000..7671814309e --- /dev/null +++ b/data/Bravura/E522-dynamicForte.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E523-dynamicRinforzando.xml b/data/Bravura/E523-dynamicRinforzando.xml new file mode 100644 index 00000000000..679d9790b82 --- /dev/null +++ b/data/Bravura/E523-dynamicRinforzando.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E524-dynamicSforzando.xml b/data/Bravura/E524-dynamicSforzando.xml new file mode 100644 index 00000000000..541dd184c2a --- /dev/null +++ b/data/Bravura/E524-dynamicSforzando.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E525-dynamicZ.xml b/data/Bravura/E525-dynamicZ.xml new file mode 100644 index 00000000000..c3f4ee0c479 --- /dev/null +++ b/data/Bravura/E525-dynamicZ.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E52F-dynamicFF.xml b/data/Bravura/E52F-dynamicFF.xml new file mode 100644 index 00000000000..7d9702150ea --- /dev/null +++ b/data/Bravura/E52F-dynamicFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E530-dynamicFFF.xml b/data/Bravura/E530-dynamicFFF.xml new file mode 100644 index 00000000000..21f1a46baa9 --- /dev/null +++ b/data/Bravura/E530-dynamicFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E531-dynamicFFFF.xml b/data/Bravura/E531-dynamicFFFF.xml new file mode 100644 index 00000000000..311ccec70df --- /dev/null +++ b/data/Bravura/E531-dynamicFFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E532-dynamicFFFFF.xml b/data/Bravura/E532-dynamicFFFFF.xml new file mode 100644 index 00000000000..5c3e01eb7f4 --- /dev/null +++ b/data/Bravura/E532-dynamicFFFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E566-ornamentTrill.xml b/data/Bravura/E566-ornamentTrill.xml index 650f44720af..04567920270 100644 --- a/data/Bravura/E566-ornamentTrill.xml +++ b/data/Bravura/E566-ornamentTrill.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E567-ornamentTurn.xml b/data/Bravura/E567-ornamentTurn.xml new file mode 100644 index 00000000000..31a8ed108de --- /dev/null +++ b/data/Bravura/E567-ornamentTurn.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E568-ornamentTurnInverted.xml b/data/Bravura/E568-ornamentTurnInverted.xml new file mode 100644 index 00000000000..d223dc005ed --- /dev/null +++ b/data/Bravura/E568-ornamentTurnInverted.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E56A-ornamentTurnUp.xml b/data/Bravura/E56A-ornamentTurnUp.xml new file mode 100644 index 00000000000..9b3fc1ba922 --- /dev/null +++ b/data/Bravura/E56A-ornamentTurnUp.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E56B-ornamentTurnUpS.xml b/data/Bravura/E56B-ornamentTurnUpS.xml new file mode 100644 index 00000000000..f054749b2e9 --- /dev/null +++ b/data/Bravura/E56B-ornamentTurnUpS.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E56C-ornamentMordent.xml b/data/Bravura/E56C-ornamentMordent.xml index 2e1083abda9..f67d25b04af 100644 --- a/data/Bravura/E56C-ornamentMordent.xml +++ b/data/Bravura/E56C-ornamentMordent.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E56D-ornamentMordentInverted.xml b/data/Bravura/E56D-ornamentMordentInverted.xml index 7a72959b15b..456c01bbb1c 100644 --- a/data/Bravura/E56D-ornamentMordentInverted.xml +++ b/data/Bravura/E56D-ornamentMordentInverted.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E56E-ornamentTremblement.xml b/data/Bravura/E56E-ornamentTremblement.xml new file mode 100644 index 00000000000..312d82702bd --- /dev/null +++ b/data/Bravura/E56E-ornamentTremblement.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E650-keyboardPedalPed.xml b/data/Bravura/E650-keyboardPedalPed.xml new file mode 100644 index 00000000000..b94f5e733ff --- /dev/null +++ b/data/Bravura/E650-keyboardPedalPed.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E655-keyboardPedalUp.xml b/data/Bravura/E655-keyboardPedalUp.xml new file mode 100644 index 00000000000..3c43516e762 --- /dev/null +++ b/data/Bravura/E655-keyboardPedalUp.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E880-tuplet0.xml b/data/Bravura/E880-tuplet0.xml index b95c2aa37c8..6ffc825384a 100644 --- a/data/Bravura/E880-tuplet0.xml +++ b/data/Bravura/E880-tuplet0.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E881-tuplet1.xml b/data/Bravura/E881-tuplet1.xml index 1d9adf158c5..7cb75f748a2 100644 --- a/data/Bravura/E881-tuplet1.xml +++ b/data/Bravura/E881-tuplet1.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E882-tuplet2.xml b/data/Bravura/E882-tuplet2.xml index 3099a39fd87..3c1fded0c0c 100644 --- a/data/Bravura/E882-tuplet2.xml +++ b/data/Bravura/E882-tuplet2.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E883-tuplet3.xml b/data/Bravura/E883-tuplet3.xml index c9bbc8403c2..79550cd5a48 100644 --- a/data/Bravura/E883-tuplet3.xml +++ b/data/Bravura/E883-tuplet3.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E884-tuplet4.xml b/data/Bravura/E884-tuplet4.xml index 68ed9e0df48..558e59b10f4 100644 --- a/data/Bravura/E884-tuplet4.xml +++ b/data/Bravura/E884-tuplet4.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E885-tuplet5.xml b/data/Bravura/E885-tuplet5.xml index 00eaa0251fd..ed80e497f11 100644 --- a/data/Bravura/E885-tuplet5.xml +++ b/data/Bravura/E885-tuplet5.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E886-tuplet6.xml b/data/Bravura/E886-tuplet6.xml index 4cd7c411eca..6ce0b768399 100644 --- a/data/Bravura/E886-tuplet6.xml +++ b/data/Bravura/E886-tuplet6.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E887-tuplet7.xml b/data/Bravura/E887-tuplet7.xml index dd6d4edc6d2..18f471b1c25 100644 --- a/data/Bravura/E887-tuplet7.xml +++ b/data/Bravura/E887-tuplet7.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E888-tuplet8.xml b/data/Bravura/E888-tuplet8.xml index 399337ab5ae..061e8788f3c 100644 --- a/data/Bravura/E888-tuplet8.xml +++ b/data/Bravura/E888-tuplet8.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E889-tuplet9.xml b/data/Bravura/E889-tuplet9.xml index b869d699adb..e679a984f62 100644 --- a/data/Bravura/E889-tuplet9.xml +++ b/data/Bravura/E889-tuplet9.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Bravura/E88A-tupletColon.xml b/data/Bravura/E88A-tupletColon.xml new file mode 100644 index 00000000000..e0ba285f0d0 --- /dev/null +++ b/data/Bravura/E88A-tupletColon.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E938-mensuralNoteheadSemibrevisBlack.xml b/data/Bravura/E938-mensuralNoteheadSemibrevisBlack.xml new file mode 100644 index 00000000000..d3552e77cd7 --- /dev/null +++ b/data/Bravura/E938-mensuralNoteheadSemibrevisBlack.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E939-mensuralNoteheadSemibrevisVoid.xml b/data/Bravura/E939-mensuralNoteheadSemibrevisVoid.xml new file mode 100644 index 00000000000..c8114779b77 --- /dev/null +++ b/data/Bravura/E939-mensuralNoteheadSemibrevisVoid.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E93C-mensuralNoteheadMinimaWhite.xml b/data/Bravura/E93C-mensuralNoteheadMinimaWhite.xml new file mode 100644 index 00000000000..1477307fed7 --- /dev/null +++ b/data/Bravura/E93C-mensuralNoteheadMinimaWhite.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Bravura/E93D-mensuralNoteheadSemiminimaWhite.xml b/data/Bravura/E93D-mensuralNoteheadSemiminimaWhite.xml new file mode 100644 index 00000000000..58c746396c8 --- /dev/null +++ b/data/Bravura/E93D-mensuralNoteheadSemiminimaWhite.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville.xml b/data/Gootville.xml index fddb8a23083..0c8dde65e05 100644 --- a/data/Gootville.xml +++ b/data/Gootville.xml @@ -2,6 +2,11 @@ + + + + + @@ -30,6 +35,12 @@ + + + + + + @@ -44,6 +55,12 @@ + + + + + + @@ -52,9 +69,29 @@ + + + + + + + + + + + + + + + + + + + + @@ -65,4 +102,9 @@ + + + + + diff --git a/data/Gootville/E003-bracketTop.xml b/data/Gootville/E003-bracketTop.xml index 63813abf3e8..d15bea2f1da 100644 --- a/data/Gootville/E003-bracketTop.xml +++ b/data/Gootville/E003-bracketTop.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E004-bracketBottom.xml b/data/Gootville/E004-bracketBottom.xml index 861b48755f0..9cbf5d64bc4 100644 --- a/data/Gootville/E004-bracketBottom.xml +++ b/data/Gootville/E004-bracketBottom.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E045-dalSegno.xml b/data/Gootville/E045-dalSegno.xml new file mode 100644 index 00000000000..6a2b7297f52 --- /dev/null +++ b/data/Gootville/E045-dalSegno.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E046-daCapo.xml b/data/Gootville/E046-daCapo.xml new file mode 100644 index 00000000000..aa946d29f75 --- /dev/null +++ b/data/Gootville/E046-daCapo.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E047-segno.xml b/data/Gootville/E047-segno.xml new file mode 100644 index 00000000000..8f4a06df2f9 --- /dev/null +++ b/data/Gootville/E047-segno.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E048-coda.xml b/data/Gootville/E048-coda.xml new file mode 100644 index 00000000000..96533853486 --- /dev/null +++ b/data/Gootville/E048-coda.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E04B-segnoSerpent2.xml b/data/Gootville/E04B-segnoSerpent2.xml new file mode 100644 index 00000000000..f22cf9ede49 --- /dev/null +++ b/data/Gootville/E04B-segnoSerpent2.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E050-gClef.xml b/data/Gootville/E050-gClef.xml index 01371b4e3ad..b0358b52c63 100644 --- a/data/Gootville/E050-gClef.xml +++ b/data/Gootville/E050-gClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E051-gClef15mb.xml b/data/Gootville/E051-gClef15mb.xml index 27efeb57704..a3737e2a3ab 100644 --- a/data/Gootville/E051-gClef15mb.xml +++ b/data/Gootville/E051-gClef15mb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E052-gClef8vb.xml b/data/Gootville/E052-gClef8vb.xml index 5716578ad8d..fc878ac9b0f 100644 --- a/data/Gootville/E052-gClef8vb.xml +++ b/data/Gootville/E052-gClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E053-gClef8va.xml b/data/Gootville/E053-gClef8va.xml index 58223d20554..5013eaddf0e 100644 --- a/data/Gootville/E053-gClef8va.xml +++ b/data/Gootville/E053-gClef8va.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E054-gClef15ma.xml b/data/Gootville/E054-gClef15ma.xml index 67f58e4ce20..6a5ef204dbe 100644 --- a/data/Gootville/E054-gClef15ma.xml +++ b/data/Gootville/E054-gClef15ma.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E05C-cClef.xml b/data/Gootville/E05C-cClef.xml index 7a35e654b2b..b032b47268b 100644 --- a/data/Gootville/E05C-cClef.xml +++ b/data/Gootville/E05C-cClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E05D-cClef8vb.xml b/data/Gootville/E05D-cClef8vb.xml index feb9a6bfcc6..5081bf207b2 100644 --- a/data/Gootville/E05D-cClef8vb.xml +++ b/data/Gootville/E05D-cClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E062-fClef.xml b/data/Gootville/E062-fClef.xml index 6f12c6ed1a0..badb5ec5dd8 100644 --- a/data/Gootville/E062-fClef.xml +++ b/data/Gootville/E062-fClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E063-fClef15mb.xml b/data/Gootville/E063-fClef15mb.xml index 86c5c045190..87d0020b217 100644 --- a/data/Gootville/E063-fClef15mb.xml +++ b/data/Gootville/E063-fClef15mb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E064-fClef8vb.xml b/data/Gootville/E064-fClef8vb.xml index 21a94dfe105..967046bda10 100644 --- a/data/Gootville/E064-fClef8vb.xml +++ b/data/Gootville/E064-fClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E065-fClef8va.xml b/data/Gootville/E065-fClef8va.xml index f7f75cfee15..b1e40319fab 100644 --- a/data/Gootville/E065-fClef8va.xml +++ b/data/Gootville/E065-fClef8va.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E066-fClef15ma.xml b/data/Gootville/E066-fClef15ma.xml index 8fd1b013b00..df060ea232e 100644 --- a/data/Gootville/E066-fClef15ma.xml +++ b/data/Gootville/E066-fClef15ma.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E080-timeSig0.xml b/data/Gootville/E080-timeSig0.xml index e95d115f45b..d041ab69f93 100644 --- a/data/Gootville/E080-timeSig0.xml +++ b/data/Gootville/E080-timeSig0.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E081-timeSig1.xml b/data/Gootville/E081-timeSig1.xml index 5dd0deeada2..8965279be82 100644 --- a/data/Gootville/E081-timeSig1.xml +++ b/data/Gootville/E081-timeSig1.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E082-timeSig2.xml b/data/Gootville/E082-timeSig2.xml index 0ad2b00038c..123615af908 100644 --- a/data/Gootville/E082-timeSig2.xml +++ b/data/Gootville/E082-timeSig2.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E083-timeSig3.xml b/data/Gootville/E083-timeSig3.xml index f5e610821b5..78385e92c2e 100644 --- a/data/Gootville/E083-timeSig3.xml +++ b/data/Gootville/E083-timeSig3.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E084-timeSig4.xml b/data/Gootville/E084-timeSig4.xml index e2d8a26666b..e95952c3cb5 100644 --- a/data/Gootville/E084-timeSig4.xml +++ b/data/Gootville/E084-timeSig4.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E085-timeSig5.xml b/data/Gootville/E085-timeSig5.xml index 887fba57f3d..00776ddb9bc 100644 --- a/data/Gootville/E085-timeSig5.xml +++ b/data/Gootville/E085-timeSig5.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E086-timeSig6.xml b/data/Gootville/E086-timeSig6.xml index 2469f547679..f0a8ccd9680 100644 --- a/data/Gootville/E086-timeSig6.xml +++ b/data/Gootville/E086-timeSig6.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E087-timeSig7.xml b/data/Gootville/E087-timeSig7.xml index 55a5bd8100a..2cc9f2ffc30 100644 --- a/data/Gootville/E087-timeSig7.xml +++ b/data/Gootville/E087-timeSig7.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E088-timeSig8.xml b/data/Gootville/E088-timeSig8.xml index 9cbd466d8c3..a94a68921c3 100644 --- a/data/Gootville/E088-timeSig8.xml +++ b/data/Gootville/E088-timeSig8.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E089-timeSig9.xml b/data/Gootville/E089-timeSig9.xml index 17d9ed69585..19468e235ad 100644 --- a/data/Gootville/E089-timeSig9.xml +++ b/data/Gootville/E089-timeSig9.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E08A-timeSigCommon.xml b/data/Gootville/E08A-timeSigCommon.xml index 8236ec583c7..b17831fb5a9 100644 --- a/data/Gootville/E08A-timeSigCommon.xml +++ b/data/Gootville/E08A-timeSigCommon.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E08B-timeSigCutCommon.xml b/data/Gootville/E08B-timeSigCutCommon.xml index bdc074c668e..ee9c17422ce 100644 --- a/data/Gootville/E08B-timeSigCutCommon.xml +++ b/data/Gootville/E08B-timeSigCutCommon.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E0A2-noteheadWhole.xml b/data/Gootville/E0A2-noteheadWhole.xml index 087b6b5ef2c..91f0594dad6 100644 --- a/data/Gootville/E0A2-noteheadWhole.xml +++ b/data/Gootville/E0A2-noteheadWhole.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E0A3-noteheadHalf.xml b/data/Gootville/E0A3-noteheadHalf.xml index 6c7d5b0941a..41920dedcb3 100644 --- a/data/Gootville/E0A3-noteheadHalf.xml +++ b/data/Gootville/E0A3-noteheadHalf.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E0A4-noteheadBlack.xml b/data/Gootville/E0A4-noteheadBlack.xml index c7d5f1a7751..742700658ca 100644 --- a/data/Gootville/E0A4-noteheadBlack.xml +++ b/data/Gootville/E0A4-noteheadBlack.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E0FA-noteheadWholeFilled.xml b/data/Gootville/E0FA-noteheadWholeFilled.xml index 0e1e5bf1a2a..0c49d0f117a 100644 --- a/data/Gootville/E0FA-noteheadWholeFilled.xml +++ b/data/Gootville/E0FA-noteheadWholeFilled.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E101-noteheadSlashHorizontalEnds.xml b/data/Gootville/E101-noteheadSlashHorizontalEnds.xml new file mode 100644 index 00000000000..bc609737107 --- /dev/null +++ b/data/Gootville/E101-noteheadSlashHorizontalEnds.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E220-tremolo1.xml b/data/Gootville/E220-tremolo1.xml new file mode 100644 index 00000000000..3c4caff0b62 --- /dev/null +++ b/data/Gootville/E220-tremolo1.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E221-tremolo2.xml b/data/Gootville/E221-tremolo2.xml new file mode 100644 index 00000000000..0a782b07f0f --- /dev/null +++ b/data/Gootville/E221-tremolo2.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E222-tremolo3.xml b/data/Gootville/E222-tremolo3.xml new file mode 100644 index 00000000000..fab798d587a --- /dev/null +++ b/data/Gootville/E222-tremolo3.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E223-tremolo4.xml b/data/Gootville/E223-tremolo4.xml new file mode 100644 index 00000000000..2d64b671107 --- /dev/null +++ b/data/Gootville/E223-tremolo4.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E224-tremolo5.xml b/data/Gootville/E224-tremolo5.xml new file mode 100644 index 00000000000..7a5a8c033dc --- /dev/null +++ b/data/Gootville/E224-tremolo5.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E240-flag8thUp.xml b/data/Gootville/E240-flag8thUp.xml index 686cc8afa92..441a882a0ec 100644 --- a/data/Gootville/E240-flag8thUp.xml +++ b/data/Gootville/E240-flag8thUp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E241-flag8thDown.xml b/data/Gootville/E241-flag8thDown.xml index a2aafb5ff56..241ff441cbf 100644 --- a/data/Gootville/E241-flag8thDown.xml +++ b/data/Gootville/E241-flag8thDown.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E260-accidentalFlat.xml b/data/Gootville/E260-accidentalFlat.xml index 6ab261ecf9d..806c46c8e99 100644 --- a/data/Gootville/E260-accidentalFlat.xml +++ b/data/Gootville/E260-accidentalFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E261-accidentalNatural.xml b/data/Gootville/E261-accidentalNatural.xml index 3bb14727502..5e39dfc0b1a 100644 --- a/data/Gootville/E261-accidentalNatural.xml +++ b/data/Gootville/E261-accidentalNatural.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E262-accidentalSharp.xml b/data/Gootville/E262-accidentalSharp.xml index 4d79d08f501..5245cbc0239 100644 --- a/data/Gootville/E262-accidentalSharp.xml +++ b/data/Gootville/E262-accidentalSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E263-accidentalDoubleSharp.xml b/data/Gootville/E263-accidentalDoubleSharp.xml index 084a19cf6e7..d3c2f9d9191 100644 --- a/data/Gootville/E263-accidentalDoubleSharp.xml +++ b/data/Gootville/E263-accidentalDoubleSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E264-accidentalDoubleFlat.xml b/data/Gootville/E264-accidentalDoubleFlat.xml index a9d079639b5..963439f29a4 100644 --- a/data/Gootville/E264-accidentalDoubleFlat.xml +++ b/data/Gootville/E264-accidentalDoubleFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E265-accidentalTripleSharp.xml b/data/Gootville/E265-accidentalTripleSharp.xml index c7926eb2dbb..0101c2e0d99 100644 --- a/data/Gootville/E265-accidentalTripleSharp.xml +++ b/data/Gootville/E265-accidentalTripleSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E266-accidentalTripleFlat.xml b/data/Gootville/E266-accidentalTripleFlat.xml index 521407fbf54..fb3cd1ca448 100644 --- a/data/Gootville/E266-accidentalTripleFlat.xml +++ b/data/Gootville/E266-accidentalTripleFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E267-accidentalNaturalFlat.xml b/data/Gootville/E267-accidentalNaturalFlat.xml index bf683bfc173..98e32f5b454 100644 --- a/data/Gootville/E267-accidentalNaturalFlat.xml +++ b/data/Gootville/E267-accidentalNaturalFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E268-accidentalNaturalSharp.xml b/data/Gootville/E268-accidentalNaturalSharp.xml index 0c153dccaa0..84014834d5f 100644 --- a/data/Gootville/E268-accidentalNaturalSharp.xml +++ b/data/Gootville/E268-accidentalNaturalSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E269-accidentalSharpSharp.xml b/data/Gootville/E269-accidentalSharpSharp.xml index 1a5a48413b9..d310378e341 100644 --- a/data/Gootville/E269-accidentalSharpSharp.xml +++ b/data/Gootville/E269-accidentalSharpSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E26A-accidentalParensLeft.xml b/data/Gootville/E26A-accidentalParensLeft.xml index 1fce927122e..4cfe633d5b4 100644 --- a/data/Gootville/E26A-accidentalParensLeft.xml +++ b/data/Gootville/E26A-accidentalParensLeft.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E26B-accidentalParensRight.xml b/data/Gootville/E26B-accidentalParensRight.xml index 77f9a3cd705..f2fc22010a0 100644 --- a/data/Gootville/E26B-accidentalParensRight.xml +++ b/data/Gootville/E26B-accidentalParensRight.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4A0-articAccentAbove.xml b/data/Gootville/E4A0-articAccentAbove.xml new file mode 100644 index 00000000000..c96f3363fdd --- /dev/null +++ b/data/Gootville/E4A0-articAccentAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E4A1-articAccentBelow.xml b/data/Gootville/E4A1-articAccentBelow.xml new file mode 100644 index 00000000000..9a40f5fcbf5 --- /dev/null +++ b/data/Gootville/E4A1-articAccentBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E4A8-articStaccatissimoWedgeAbove.xml b/data/Gootville/E4A8-articStaccatissimoWedgeAbove.xml new file mode 100644 index 00000000000..5741f453510 --- /dev/null +++ b/data/Gootville/E4A8-articStaccatissimoWedgeAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E4A9-articStaccatissimoWedgeBelow.xml b/data/Gootville/E4A9-articStaccatissimoWedgeBelow.xml new file mode 100644 index 00000000000..229aca1e754 --- /dev/null +++ b/data/Gootville/E4A9-articStaccatissimoWedgeBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E4AC-articMarcatoAbove.xml b/data/Gootville/E4AC-articMarcatoAbove.xml new file mode 100644 index 00000000000..30fb0b57a72 --- /dev/null +++ b/data/Gootville/E4AC-articMarcatoAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E4AD-articMarcatoBelow.xml b/data/Gootville/E4AD-articMarcatoBelow.xml new file mode 100644 index 00000000000..2eaf0ea4090 --- /dev/null +++ b/data/Gootville/E4AD-articMarcatoBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E4C0-fermataAbove.xml b/data/Gootville/E4C0-fermataAbove.xml index e90bc7a87a5..371fae1576b 100644 --- a/data/Gootville/E4C0-fermataAbove.xml +++ b/data/Gootville/E4C0-fermataAbove.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4C1-fermataBelow.xml b/data/Gootville/E4C1-fermataBelow.xml index 278c4b897da..6756bd0d61b 100644 --- a/data/Gootville/E4C1-fermataBelow.xml +++ b/data/Gootville/E4C1-fermataBelow.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4E5-restQuarter.xml b/data/Gootville/E4E5-restQuarter.xml index e066b53f505..1d2f809d6c3 100644 --- a/data/Gootville/E4E5-restQuarter.xml +++ b/data/Gootville/E4E5-restQuarter.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4E6-rest8th.xml b/data/Gootville/E4E6-rest8th.xml index 049107e79b3..22aec6c44d1 100644 --- a/data/Gootville/E4E6-rest8th.xml +++ b/data/Gootville/E4E6-rest8th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4E7-rest16th.xml b/data/Gootville/E4E7-rest16th.xml index e09c6a01125..82aa9bb0b8b 100644 --- a/data/Gootville/E4E7-rest16th.xml +++ b/data/Gootville/E4E7-rest16th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4E8-rest32nd.xml b/data/Gootville/E4E8-rest32nd.xml index 61b2868940f..347216269fc 100644 --- a/data/Gootville/E4E8-rest32nd.xml +++ b/data/Gootville/E4E8-rest32nd.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4E9-rest64th.xml b/data/Gootville/E4E9-rest64th.xml index 37fbf03c07a..b236d1312cd 100644 --- a/data/Gootville/E4E9-rest64th.xml +++ b/data/Gootville/E4E9-rest64th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E4EA-rest128th.xml b/data/Gootville/E4EA-rest128th.xml index a8b5340faff..2aa267966b7 100644 --- a/data/Gootville/E4EA-rest128th.xml +++ b/data/Gootville/E4EA-rest128th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E500-repeat1Bar.xml b/data/Gootville/E500-repeat1Bar.xml new file mode 100644 index 00000000000..1c29daf656a --- /dev/null +++ b/data/Gootville/E500-repeat1Bar.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E501-repeat2Bars.xml b/data/Gootville/E501-repeat2Bars.xml new file mode 100644 index 00000000000..6516778e493 --- /dev/null +++ b/data/Gootville/E501-repeat2Bars.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E502-repeat4Bars.xml b/data/Gootville/E502-repeat4Bars.xml new file mode 100644 index 00000000000..52109bfca96 --- /dev/null +++ b/data/Gootville/E502-repeat4Bars.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E520-dynamicPiano.xml b/data/Gootville/E520-dynamicPiano.xml new file mode 100644 index 00000000000..5dc9ffc835f --- /dev/null +++ b/data/Gootville/E520-dynamicPiano.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E521-dynamicMezzo.xml b/data/Gootville/E521-dynamicMezzo.xml new file mode 100644 index 00000000000..78b9c5461d0 --- /dev/null +++ b/data/Gootville/E521-dynamicMezzo.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E522-dynamicForte.xml b/data/Gootville/E522-dynamicForte.xml new file mode 100644 index 00000000000..89b705929d6 --- /dev/null +++ b/data/Gootville/E522-dynamicForte.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E523-dynamicRinforzando.xml b/data/Gootville/E523-dynamicRinforzando.xml new file mode 100644 index 00000000000..efdfc17c9e2 --- /dev/null +++ b/data/Gootville/E523-dynamicRinforzando.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E524-dynamicSforzando.xml b/data/Gootville/E524-dynamicSforzando.xml new file mode 100644 index 00000000000..3e8ac2a27da --- /dev/null +++ b/data/Gootville/E524-dynamicSforzando.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E525-dynamicZ.xml b/data/Gootville/E525-dynamicZ.xml new file mode 100644 index 00000000000..97a1172bc61 --- /dev/null +++ b/data/Gootville/E525-dynamicZ.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E52F-dynamicFF.xml b/data/Gootville/E52F-dynamicFF.xml new file mode 100644 index 00000000000..c03df46eb2c --- /dev/null +++ b/data/Gootville/E52F-dynamicFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E530-dynamicFFF.xml b/data/Gootville/E530-dynamicFFF.xml new file mode 100644 index 00000000000..bd1971ec87d --- /dev/null +++ b/data/Gootville/E530-dynamicFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E531-dynamicFFFF.xml b/data/Gootville/E531-dynamicFFFF.xml new file mode 100644 index 00000000000..333ceadedb1 --- /dev/null +++ b/data/Gootville/E531-dynamicFFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E532-dynamicFFFFF.xml b/data/Gootville/E532-dynamicFFFFF.xml new file mode 100644 index 00000000000..931fbe9fa00 --- /dev/null +++ b/data/Gootville/E532-dynamicFFFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E566-ornamentTrill.xml b/data/Gootville/E566-ornamentTrill.xml index 2f8720f2bd9..1704a610df8 100644 --- a/data/Gootville/E566-ornamentTrill.xml +++ b/data/Gootville/E566-ornamentTrill.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E567-ornamentTurn.xml b/data/Gootville/E567-ornamentTurn.xml new file mode 100644 index 00000000000..fbc6426fb35 --- /dev/null +++ b/data/Gootville/E567-ornamentTurn.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E568-ornamentTurnInverted.xml b/data/Gootville/E568-ornamentTurnInverted.xml new file mode 100644 index 00000000000..20f1d35f997 --- /dev/null +++ b/data/Gootville/E568-ornamentTurnInverted.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E56A-ornamentTurnUp.xml b/data/Gootville/E56A-ornamentTurnUp.xml new file mode 100644 index 00000000000..30e5b76412a --- /dev/null +++ b/data/Gootville/E56A-ornamentTurnUp.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E56B-ornamentTurnUpS.xml b/data/Gootville/E56B-ornamentTurnUpS.xml new file mode 100644 index 00000000000..675b8298163 --- /dev/null +++ b/data/Gootville/E56B-ornamentTurnUpS.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E56C-ornamentMordent.xml b/data/Gootville/E56C-ornamentMordent.xml index f6586c256ce..5c801b799bf 100644 --- a/data/Gootville/E56C-ornamentMordent.xml +++ b/data/Gootville/E56C-ornamentMordent.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E56D-ornamentMordentInverted.xml b/data/Gootville/E56D-ornamentMordentInverted.xml index 9bdef935f38..ba4e2ffd69d 100644 --- a/data/Gootville/E56D-ornamentMordentInverted.xml +++ b/data/Gootville/E56D-ornamentMordentInverted.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E56E-ornamentTremblement.xml b/data/Gootville/E56E-ornamentTremblement.xml new file mode 100644 index 00000000000..b340c76dcd0 --- /dev/null +++ b/data/Gootville/E56E-ornamentTremblement.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E650-keyboardPedalPed.xml b/data/Gootville/E650-keyboardPedalPed.xml new file mode 100644 index 00000000000..caa87d7124b --- /dev/null +++ b/data/Gootville/E650-keyboardPedalPed.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E655-keyboardPedalUp.xml b/data/Gootville/E655-keyboardPedalUp.xml new file mode 100644 index 00000000000..71f174fd658 --- /dev/null +++ b/data/Gootville/E655-keyboardPedalUp.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E880-tuplet0.xml b/data/Gootville/E880-tuplet0.xml index d9ebae885b1..215a9daa15e 100644 --- a/data/Gootville/E880-tuplet0.xml +++ b/data/Gootville/E880-tuplet0.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E881-tuplet1.xml b/data/Gootville/E881-tuplet1.xml index a0f12a6adb5..93b7f0b64be 100644 --- a/data/Gootville/E881-tuplet1.xml +++ b/data/Gootville/E881-tuplet1.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E882-tuplet2.xml b/data/Gootville/E882-tuplet2.xml index 9fe2bee9383..92c9e67e4b8 100644 --- a/data/Gootville/E882-tuplet2.xml +++ b/data/Gootville/E882-tuplet2.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E883-tuplet3.xml b/data/Gootville/E883-tuplet3.xml index a1796702bee..0d1c4c76bef 100644 --- a/data/Gootville/E883-tuplet3.xml +++ b/data/Gootville/E883-tuplet3.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E884-tuplet4.xml b/data/Gootville/E884-tuplet4.xml index 9aca15e5e9c..db1cfb81a96 100644 --- a/data/Gootville/E884-tuplet4.xml +++ b/data/Gootville/E884-tuplet4.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E885-tuplet5.xml b/data/Gootville/E885-tuplet5.xml index 7c0ab97b712..0edc06fa58a 100644 --- a/data/Gootville/E885-tuplet5.xml +++ b/data/Gootville/E885-tuplet5.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E886-tuplet6.xml b/data/Gootville/E886-tuplet6.xml index 2e042694747..794bb8592c3 100644 --- a/data/Gootville/E886-tuplet6.xml +++ b/data/Gootville/E886-tuplet6.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E887-tuplet7.xml b/data/Gootville/E887-tuplet7.xml index 24b9c1dcb3c..66929f9a76b 100644 --- a/data/Gootville/E887-tuplet7.xml +++ b/data/Gootville/E887-tuplet7.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E888-tuplet8.xml b/data/Gootville/E888-tuplet8.xml index df2138e5420..d17229bc59b 100644 --- a/data/Gootville/E888-tuplet8.xml +++ b/data/Gootville/E888-tuplet8.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E889-tuplet9.xml b/data/Gootville/E889-tuplet9.xml index 82fa6ed288a..3eaf78b15d1 100644 --- a/data/Gootville/E889-tuplet9.xml +++ b/data/Gootville/E889-tuplet9.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Gootville/E88A-tupletColon.xml b/data/Gootville/E88A-tupletColon.xml new file mode 100644 index 00000000000..2feb1f444eb --- /dev/null +++ b/data/Gootville/E88A-tupletColon.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E938-mensuralNoteheadSemibrevisBlack.xml b/data/Gootville/E938-mensuralNoteheadSemibrevisBlack.xml new file mode 100644 index 00000000000..7354d1fb4d1 --- /dev/null +++ b/data/Gootville/E938-mensuralNoteheadSemibrevisBlack.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E939-mensuralNoteheadSemibrevisVoid.xml b/data/Gootville/E939-mensuralNoteheadSemibrevisVoid.xml new file mode 100644 index 00000000000..855f48773cf --- /dev/null +++ b/data/Gootville/E939-mensuralNoteheadSemibrevisVoid.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E93C-mensuralNoteheadMinimaWhite.xml b/data/Gootville/E93C-mensuralNoteheadMinimaWhite.xml new file mode 100644 index 00000000000..6a8a542cf24 --- /dev/null +++ b/data/Gootville/E93C-mensuralNoteheadMinimaWhite.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Gootville/E93D-mensuralNoteheadSemiminimaWhite.xml b/data/Gootville/E93D-mensuralNoteheadSemiminimaWhite.xml new file mode 100644 index 00000000000..639e5ae5bd2 --- /dev/null +++ b/data/Gootville/E93D-mensuralNoteheadSemiminimaWhite.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig.xml b/data/Leipzig.xml index ece8a6d7bcf..b4908963b42 100644 --- a/data/Leipzig.xml +++ b/data/Leipzig.xml @@ -65,4 +65,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/Leipzig/E003-bracketTop.xml b/data/Leipzig/E003-bracketTop.xml index 9f34f4b4d98..67997bc8d6b 100644 --- a/data/Leipzig/E003-bracketTop.xml +++ b/data/Leipzig/E003-bracketTop.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E004-bracketBottom.xml b/data/Leipzig/E004-bracketBottom.xml index 435196ca025..7d82b1db483 100644 --- a/data/Leipzig/E004-bracketBottom.xml +++ b/data/Leipzig/E004-bracketBottom.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E045-dalSegno.xml b/data/Leipzig/E045-dalSegno.xml new file mode 100644 index 00000000000..07c05844f1d --- /dev/null +++ b/data/Leipzig/E045-dalSegno.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E046-daCapo.xml b/data/Leipzig/E046-daCapo.xml new file mode 100644 index 00000000000..c6a149d0cb9 --- /dev/null +++ b/data/Leipzig/E046-daCapo.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E047-segno.xml b/data/Leipzig/E047-segno.xml new file mode 100644 index 00000000000..69b00c8ea7b --- /dev/null +++ b/data/Leipzig/E047-segno.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E048-coda.xml b/data/Leipzig/E048-coda.xml new file mode 100644 index 00000000000..de93a51450a --- /dev/null +++ b/data/Leipzig/E048-coda.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E04B-segnoSerpent2.xml b/data/Leipzig/E04B-segnoSerpent2.xml new file mode 100644 index 00000000000..d369695540c --- /dev/null +++ b/data/Leipzig/E04B-segnoSerpent2.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E050-gClef.xml b/data/Leipzig/E050-gClef.xml index 810573a1771..ea8febc7c95 100644 --- a/data/Leipzig/E050-gClef.xml +++ b/data/Leipzig/E050-gClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E051-gClef15mb.xml b/data/Leipzig/E051-gClef15mb.xml index af182031dcc..6b27cb30ca0 100644 --- a/data/Leipzig/E051-gClef15mb.xml +++ b/data/Leipzig/E051-gClef15mb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E052-gClef8vb.xml b/data/Leipzig/E052-gClef8vb.xml index ddd34820d67..d42611c0bd2 100644 --- a/data/Leipzig/E052-gClef8vb.xml +++ b/data/Leipzig/E052-gClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E053-gClef8va.xml b/data/Leipzig/E053-gClef8va.xml index 679328dd04a..da0e6f4dce3 100644 --- a/data/Leipzig/E053-gClef8va.xml +++ b/data/Leipzig/E053-gClef8va.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E054-gClef15ma.xml b/data/Leipzig/E054-gClef15ma.xml index eff0876c1ec..5da73c78c96 100644 --- a/data/Leipzig/E054-gClef15ma.xml +++ b/data/Leipzig/E054-gClef15ma.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E05C-cClef.xml b/data/Leipzig/E05C-cClef.xml index c1038539322..d5f3a2063e7 100644 --- a/data/Leipzig/E05C-cClef.xml +++ b/data/Leipzig/E05C-cClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E05D-cClef8vb.xml b/data/Leipzig/E05D-cClef8vb.xml index 2159c16b94f..3f5fda1d484 100644 --- a/data/Leipzig/E05D-cClef8vb.xml +++ b/data/Leipzig/E05D-cClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E062-fClef.xml b/data/Leipzig/E062-fClef.xml index 3e329086175..806d4828d39 100644 --- a/data/Leipzig/E062-fClef.xml +++ b/data/Leipzig/E062-fClef.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E063-fClef15mb.xml b/data/Leipzig/E063-fClef15mb.xml index 4e50deb28c0..5d633bcbae1 100644 --- a/data/Leipzig/E063-fClef15mb.xml +++ b/data/Leipzig/E063-fClef15mb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E064-fClef8vb.xml b/data/Leipzig/E064-fClef8vb.xml index 3302a70ef4e..9ae80b7ab67 100644 --- a/data/Leipzig/E064-fClef8vb.xml +++ b/data/Leipzig/E064-fClef8vb.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E065-fClef8va.xml b/data/Leipzig/E065-fClef8va.xml index 16168896ae7..685587596c5 100644 --- a/data/Leipzig/E065-fClef8va.xml +++ b/data/Leipzig/E065-fClef8va.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E066-fClef15ma.xml b/data/Leipzig/E066-fClef15ma.xml index feb45133911..6500b5c6f4e 100644 --- a/data/Leipzig/E066-fClef15ma.xml +++ b/data/Leipzig/E066-fClef15ma.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E080-timeSig0.xml b/data/Leipzig/E080-timeSig0.xml index 9415b725f92..963b563adcf 100644 --- a/data/Leipzig/E080-timeSig0.xml +++ b/data/Leipzig/E080-timeSig0.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E081-timeSig1.xml b/data/Leipzig/E081-timeSig1.xml index baedd61541a..baa471a8a01 100644 --- a/data/Leipzig/E081-timeSig1.xml +++ b/data/Leipzig/E081-timeSig1.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E082-timeSig2.xml b/data/Leipzig/E082-timeSig2.xml index 3a27b7d79ec..2b3c542d078 100644 --- a/data/Leipzig/E082-timeSig2.xml +++ b/data/Leipzig/E082-timeSig2.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E083-timeSig3.xml b/data/Leipzig/E083-timeSig3.xml index 14251d9e569..ac72900a682 100644 --- a/data/Leipzig/E083-timeSig3.xml +++ b/data/Leipzig/E083-timeSig3.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E084-timeSig4.xml b/data/Leipzig/E084-timeSig4.xml index f725a91571c..e353f8a33a1 100644 --- a/data/Leipzig/E084-timeSig4.xml +++ b/data/Leipzig/E084-timeSig4.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E085-timeSig5.xml b/data/Leipzig/E085-timeSig5.xml index bff5ff6058b..20432349dd6 100644 --- a/data/Leipzig/E085-timeSig5.xml +++ b/data/Leipzig/E085-timeSig5.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E086-timeSig6.xml b/data/Leipzig/E086-timeSig6.xml index bd2b5fc1846..42faf6a86ea 100644 --- a/data/Leipzig/E086-timeSig6.xml +++ b/data/Leipzig/E086-timeSig6.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E087-timeSig7.xml b/data/Leipzig/E087-timeSig7.xml index e3e7703b512..e11dd29af43 100644 --- a/data/Leipzig/E087-timeSig7.xml +++ b/data/Leipzig/E087-timeSig7.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E088-timeSig8.xml b/data/Leipzig/E088-timeSig8.xml index 797818e25dc..48d33ee32b3 100644 --- a/data/Leipzig/E088-timeSig8.xml +++ b/data/Leipzig/E088-timeSig8.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E089-timeSig9.xml b/data/Leipzig/E089-timeSig9.xml index 51a04969081..020e8480185 100644 --- a/data/Leipzig/E089-timeSig9.xml +++ b/data/Leipzig/E089-timeSig9.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E08A-timeSigCommon.xml b/data/Leipzig/E08A-timeSigCommon.xml index b32da3615cd..58340d6aa45 100644 --- a/data/Leipzig/E08A-timeSigCommon.xml +++ b/data/Leipzig/E08A-timeSigCommon.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E08B-timeSigCutCommon.xml b/data/Leipzig/E08B-timeSigCutCommon.xml index c51ab96db89..b926fad945b 100644 --- a/data/Leipzig/E08B-timeSigCutCommon.xml +++ b/data/Leipzig/E08B-timeSigCutCommon.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E0A2-noteheadWhole.xml b/data/Leipzig/E0A2-noteheadWhole.xml index 4cf8f91fa24..ccc65c1d51c 100644 --- a/data/Leipzig/E0A2-noteheadWhole.xml +++ b/data/Leipzig/E0A2-noteheadWhole.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E0A3-noteheadHalf.xml b/data/Leipzig/E0A3-noteheadHalf.xml index 409c13f7015..22f50355d76 100644 --- a/data/Leipzig/E0A3-noteheadHalf.xml +++ b/data/Leipzig/E0A3-noteheadHalf.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E0A4-noteheadBlack.xml b/data/Leipzig/E0A4-noteheadBlack.xml index 46ff86ebc63..7999be3f430 100644 --- a/data/Leipzig/E0A4-noteheadBlack.xml +++ b/data/Leipzig/E0A4-noteheadBlack.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E0FA-noteheadWholeFilled.xml b/data/Leipzig/E0FA-noteheadWholeFilled.xml index ce3ca04abeb..6c3245d07b1 100644 --- a/data/Leipzig/E0FA-noteheadWholeFilled.xml +++ b/data/Leipzig/E0FA-noteheadWholeFilled.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E101-noteheadSlashHorizontalEnds.xml b/data/Leipzig/E101-noteheadSlashHorizontalEnds.xml new file mode 100644 index 00000000000..4f3764bb968 --- /dev/null +++ b/data/Leipzig/E101-noteheadSlashHorizontalEnds.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E220-tremolo1.xml b/data/Leipzig/E220-tremolo1.xml new file mode 100644 index 00000000000..a7600a2fa94 --- /dev/null +++ b/data/Leipzig/E220-tremolo1.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E221-tremolo2.xml b/data/Leipzig/E221-tremolo2.xml new file mode 100644 index 00000000000..1f01df30291 --- /dev/null +++ b/data/Leipzig/E221-tremolo2.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E222-tremolo3.xml b/data/Leipzig/E222-tremolo3.xml new file mode 100644 index 00000000000..b7451404f63 --- /dev/null +++ b/data/Leipzig/E222-tremolo3.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E223-tremolo4.xml b/data/Leipzig/E223-tremolo4.xml new file mode 100644 index 00000000000..34bb7d04fbe --- /dev/null +++ b/data/Leipzig/E223-tremolo4.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E224-tremolo5.xml b/data/Leipzig/E224-tremolo5.xml new file mode 100644 index 00000000000..ea6f31a5cc6 --- /dev/null +++ b/data/Leipzig/E224-tremolo5.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E240-flag8thUp.xml b/data/Leipzig/E240-flag8thUp.xml index 009613dff66..c5c62678227 100644 --- a/data/Leipzig/E240-flag8thUp.xml +++ b/data/Leipzig/E240-flag8thUp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E241-flag8thDown.xml b/data/Leipzig/E241-flag8thDown.xml index d21b42eeda8..5a4a25204d5 100644 --- a/data/Leipzig/E241-flag8thDown.xml +++ b/data/Leipzig/E241-flag8thDown.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E260-accidentalFlat.xml b/data/Leipzig/E260-accidentalFlat.xml index c706f77689b..b9f85d40676 100644 --- a/data/Leipzig/E260-accidentalFlat.xml +++ b/data/Leipzig/E260-accidentalFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E261-accidentalNatural.xml b/data/Leipzig/E261-accidentalNatural.xml index c5657963ba4..8c23f943d57 100644 --- a/data/Leipzig/E261-accidentalNatural.xml +++ b/data/Leipzig/E261-accidentalNatural.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E262-accidentalSharp.xml b/data/Leipzig/E262-accidentalSharp.xml index a76acd346fa..dc625b8a4e7 100644 --- a/data/Leipzig/E262-accidentalSharp.xml +++ b/data/Leipzig/E262-accidentalSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E263-accidentalDoubleSharp.xml b/data/Leipzig/E263-accidentalDoubleSharp.xml index b7ca92cfcb0..cde941e2e39 100644 --- a/data/Leipzig/E263-accidentalDoubleSharp.xml +++ b/data/Leipzig/E263-accidentalDoubleSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E264-accidentalDoubleFlat.xml b/data/Leipzig/E264-accidentalDoubleFlat.xml index bb3b4be0102..6988f3fcfdc 100644 --- a/data/Leipzig/E264-accidentalDoubleFlat.xml +++ b/data/Leipzig/E264-accidentalDoubleFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E265-accidentalTripleSharp.xml b/data/Leipzig/E265-accidentalTripleSharp.xml index b8267c480f1..8ca799e6777 100644 --- a/data/Leipzig/E265-accidentalTripleSharp.xml +++ b/data/Leipzig/E265-accidentalTripleSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E266-accidentalTripleFlat.xml b/data/Leipzig/E266-accidentalTripleFlat.xml index 5c2fbc78a95..8a732945944 100644 --- a/data/Leipzig/E266-accidentalTripleFlat.xml +++ b/data/Leipzig/E266-accidentalTripleFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E267-accidentalNaturalFlat.xml b/data/Leipzig/E267-accidentalNaturalFlat.xml index 60614ab64f3..7ab6dd15492 100644 --- a/data/Leipzig/E267-accidentalNaturalFlat.xml +++ b/data/Leipzig/E267-accidentalNaturalFlat.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E268-accidentalNaturalSharp.xml b/data/Leipzig/E268-accidentalNaturalSharp.xml index 55a89b4ddec..2058bc01087 100644 --- a/data/Leipzig/E268-accidentalNaturalSharp.xml +++ b/data/Leipzig/E268-accidentalNaturalSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E269-accidentalSharpSharp.xml b/data/Leipzig/E269-accidentalSharpSharp.xml index eefba05d9e8..756a8ddb0b9 100644 --- a/data/Leipzig/E269-accidentalSharpSharp.xml +++ b/data/Leipzig/E269-accidentalSharpSharp.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E26A-accidentalParensLeft.xml b/data/Leipzig/E26A-accidentalParensLeft.xml index 99793683fd7..4ef7800c677 100644 --- a/data/Leipzig/E26A-accidentalParensLeft.xml +++ b/data/Leipzig/E26A-accidentalParensLeft.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E26B-accidentalParensRight.xml b/data/Leipzig/E26B-accidentalParensRight.xml index 79bc1f15347..41677af3e26 100644 --- a/data/Leipzig/E26B-accidentalParensRight.xml +++ b/data/Leipzig/E26B-accidentalParensRight.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4A0-articAccentAbove.xml b/data/Leipzig/E4A0-articAccentAbove.xml new file mode 100644 index 00000000000..79ce8b9f39f --- /dev/null +++ b/data/Leipzig/E4A0-articAccentAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E4A1-articAccentBelow.xml b/data/Leipzig/E4A1-articAccentBelow.xml new file mode 100644 index 00000000000..e345585342f --- /dev/null +++ b/data/Leipzig/E4A1-articAccentBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E4A8-articStaccatissimoWedgeAbove.xml b/data/Leipzig/E4A8-articStaccatissimoWedgeAbove.xml new file mode 100644 index 00000000000..67247e91415 --- /dev/null +++ b/data/Leipzig/E4A8-articStaccatissimoWedgeAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E4A9-articStaccatissimoWedgeBelow.xml b/data/Leipzig/E4A9-articStaccatissimoWedgeBelow.xml new file mode 100644 index 00000000000..939e754fa81 --- /dev/null +++ b/data/Leipzig/E4A9-articStaccatissimoWedgeBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E4AC-articMarcatoAbove.xml b/data/Leipzig/E4AC-articMarcatoAbove.xml new file mode 100644 index 00000000000..4439b63c403 --- /dev/null +++ b/data/Leipzig/E4AC-articMarcatoAbove.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E4AD-articMarcatoBelow.xml b/data/Leipzig/E4AD-articMarcatoBelow.xml new file mode 100644 index 00000000000..790b5698836 --- /dev/null +++ b/data/Leipzig/E4AD-articMarcatoBelow.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E4C0-fermataAbove.xml b/data/Leipzig/E4C0-fermataAbove.xml index 90a7b58b6be..e19685e132c 100644 --- a/data/Leipzig/E4C0-fermataAbove.xml +++ b/data/Leipzig/E4C0-fermataAbove.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4C1-fermataBelow.xml b/data/Leipzig/E4C1-fermataBelow.xml index 531278d21f2..a932736790b 100644 --- a/data/Leipzig/E4C1-fermataBelow.xml +++ b/data/Leipzig/E4C1-fermataBelow.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4E5-restQuarter.xml b/data/Leipzig/E4E5-restQuarter.xml index 6a0a375e75a..7d1fd473e93 100644 --- a/data/Leipzig/E4E5-restQuarter.xml +++ b/data/Leipzig/E4E5-restQuarter.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4E6-rest8th.xml b/data/Leipzig/E4E6-rest8th.xml index 2f4bc3abeb8..e4e67ecb340 100644 --- a/data/Leipzig/E4E6-rest8th.xml +++ b/data/Leipzig/E4E6-rest8th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4E7-rest16th.xml b/data/Leipzig/E4E7-rest16th.xml index 92999c9a059..6125fc05ff7 100644 --- a/data/Leipzig/E4E7-rest16th.xml +++ b/data/Leipzig/E4E7-rest16th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4E8-rest32nd.xml b/data/Leipzig/E4E8-rest32nd.xml index 1d3f8c7a771..ff60125964e 100644 --- a/data/Leipzig/E4E8-rest32nd.xml +++ b/data/Leipzig/E4E8-rest32nd.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4E9-rest64th.xml b/data/Leipzig/E4E9-rest64th.xml index d428e37e8e6..31bf30ae88d 100644 --- a/data/Leipzig/E4E9-rest64th.xml +++ b/data/Leipzig/E4E9-rest64th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E4EA-rest128th.xml b/data/Leipzig/E4EA-rest128th.xml index 9dd3d27bdab..9187fadb1bb 100644 --- a/data/Leipzig/E4EA-rest128th.xml +++ b/data/Leipzig/E4EA-rest128th.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E500-repeat1Bar.xml b/data/Leipzig/E500-repeat1Bar.xml new file mode 100644 index 00000000000..537d9e14db0 --- /dev/null +++ b/data/Leipzig/E500-repeat1Bar.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E501-repeat2Bars.xml b/data/Leipzig/E501-repeat2Bars.xml new file mode 100644 index 00000000000..04ea5ab7981 --- /dev/null +++ b/data/Leipzig/E501-repeat2Bars.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E502-repeat4Bars.xml b/data/Leipzig/E502-repeat4Bars.xml new file mode 100644 index 00000000000..8245027e5df --- /dev/null +++ b/data/Leipzig/E502-repeat4Bars.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E520-dynamicPiano.xml b/data/Leipzig/E520-dynamicPiano.xml new file mode 100644 index 00000000000..080b8f9dfc4 --- /dev/null +++ b/data/Leipzig/E520-dynamicPiano.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E521-dynamicMezzo.xml b/data/Leipzig/E521-dynamicMezzo.xml new file mode 100644 index 00000000000..00ae427e3d4 --- /dev/null +++ b/data/Leipzig/E521-dynamicMezzo.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E522-dynamicForte.xml b/data/Leipzig/E522-dynamicForte.xml new file mode 100644 index 00000000000..a285762bd96 --- /dev/null +++ b/data/Leipzig/E522-dynamicForte.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E523-dynamicRinforzando.xml b/data/Leipzig/E523-dynamicRinforzando.xml new file mode 100644 index 00000000000..f20bb9e7cf3 --- /dev/null +++ b/data/Leipzig/E523-dynamicRinforzando.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E524-dynamicSforzando.xml b/data/Leipzig/E524-dynamicSforzando.xml new file mode 100644 index 00000000000..95b541ce4b6 --- /dev/null +++ b/data/Leipzig/E524-dynamicSforzando.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E525-dynamicZ.xml b/data/Leipzig/E525-dynamicZ.xml new file mode 100644 index 00000000000..6a35b1885a2 --- /dev/null +++ b/data/Leipzig/E525-dynamicZ.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E52F-dynamicFF.xml b/data/Leipzig/E52F-dynamicFF.xml new file mode 100644 index 00000000000..606acdbe7c0 --- /dev/null +++ b/data/Leipzig/E52F-dynamicFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E530-dynamicFFF.xml b/data/Leipzig/E530-dynamicFFF.xml new file mode 100644 index 00000000000..2b973c87e9a --- /dev/null +++ b/data/Leipzig/E530-dynamicFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E531-dynamicFFFF.xml b/data/Leipzig/E531-dynamicFFFF.xml new file mode 100644 index 00000000000..b769b0d2966 --- /dev/null +++ b/data/Leipzig/E531-dynamicFFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E532-dynamicFFFFF.xml b/data/Leipzig/E532-dynamicFFFFF.xml new file mode 100644 index 00000000000..cce0a5e65ff --- /dev/null +++ b/data/Leipzig/E532-dynamicFFFFF.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E566-ornamentTrill.xml b/data/Leipzig/E566-ornamentTrill.xml index ffe883c103d..3bcca4a92a7 100644 --- a/data/Leipzig/E566-ornamentTrill.xml +++ b/data/Leipzig/E566-ornamentTrill.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E567-ornamentTurn.xml b/data/Leipzig/E567-ornamentTurn.xml new file mode 100644 index 00000000000..409fcfa968c --- /dev/null +++ b/data/Leipzig/E567-ornamentTurn.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E568-ornamentTurnInverted.xml b/data/Leipzig/E568-ornamentTurnInverted.xml new file mode 100644 index 00000000000..6f6550210fb --- /dev/null +++ b/data/Leipzig/E568-ornamentTurnInverted.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E56A-ornamentTurnUp.xml b/data/Leipzig/E56A-ornamentTurnUp.xml new file mode 100644 index 00000000000..5080ed5688a --- /dev/null +++ b/data/Leipzig/E56A-ornamentTurnUp.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E56B-ornamentTurnUpS.xml b/data/Leipzig/E56B-ornamentTurnUpS.xml new file mode 100644 index 00000000000..2e7912f4e19 --- /dev/null +++ b/data/Leipzig/E56B-ornamentTurnUpS.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E56C-ornamentMordent.xml b/data/Leipzig/E56C-ornamentMordent.xml index b23fb1e11f0..d521694e7d1 100644 --- a/data/Leipzig/E56C-ornamentMordent.xml +++ b/data/Leipzig/E56C-ornamentMordent.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E56D-ornamentMordentInverted.xml b/data/Leipzig/E56D-ornamentMordentInverted.xml index e013e28690a..e5e59c37824 100644 --- a/data/Leipzig/E56D-ornamentMordentInverted.xml +++ b/data/Leipzig/E56D-ornamentMordentInverted.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E56E-ornamentTremblement.xml b/data/Leipzig/E56E-ornamentTremblement.xml new file mode 100644 index 00000000000..3665869dfe4 --- /dev/null +++ b/data/Leipzig/E56E-ornamentTremblement.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E650-keyboardPedalPed.xml b/data/Leipzig/E650-keyboardPedalPed.xml new file mode 100644 index 00000000000..e45f4c5732c --- /dev/null +++ b/data/Leipzig/E650-keyboardPedalPed.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E655-keyboardPedalUp.xml b/data/Leipzig/E655-keyboardPedalUp.xml new file mode 100644 index 00000000000..56999a42205 --- /dev/null +++ b/data/Leipzig/E655-keyboardPedalUp.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E880-tuplet0.xml b/data/Leipzig/E880-tuplet0.xml index 272ef2d4f98..16fd301eae6 100644 --- a/data/Leipzig/E880-tuplet0.xml +++ b/data/Leipzig/E880-tuplet0.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E881-tuplet1.xml b/data/Leipzig/E881-tuplet1.xml index 93c97b1b147..ec71b0ba91c 100644 --- a/data/Leipzig/E881-tuplet1.xml +++ b/data/Leipzig/E881-tuplet1.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E882-tuplet2.xml b/data/Leipzig/E882-tuplet2.xml index 7b8417901e6..854cf7723ad 100644 --- a/data/Leipzig/E882-tuplet2.xml +++ b/data/Leipzig/E882-tuplet2.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E883-tuplet3.xml b/data/Leipzig/E883-tuplet3.xml index 9c9137755c5..1bb7ef8321f 100644 --- a/data/Leipzig/E883-tuplet3.xml +++ b/data/Leipzig/E883-tuplet3.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E884-tuplet4.xml b/data/Leipzig/E884-tuplet4.xml index 6985a519376..bb01f8fa88e 100644 --- a/data/Leipzig/E884-tuplet4.xml +++ b/data/Leipzig/E884-tuplet4.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E885-tuplet5.xml b/data/Leipzig/E885-tuplet5.xml index e35f563a8e3..41884b4dcc8 100644 --- a/data/Leipzig/E885-tuplet5.xml +++ b/data/Leipzig/E885-tuplet5.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E886-tuplet6.xml b/data/Leipzig/E886-tuplet6.xml index 5e8217958de..427c9a67dbe 100644 --- a/data/Leipzig/E886-tuplet6.xml +++ b/data/Leipzig/E886-tuplet6.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E887-tuplet7.xml b/data/Leipzig/E887-tuplet7.xml index ece9b06c6f9..f110c9cb474 100644 --- a/data/Leipzig/E887-tuplet7.xml +++ b/data/Leipzig/E887-tuplet7.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E888-tuplet8.xml b/data/Leipzig/E888-tuplet8.xml index dc264f5548f..eb55f79ebf6 100644 --- a/data/Leipzig/E888-tuplet8.xml +++ b/data/Leipzig/E888-tuplet8.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E889-tuplet9.xml b/data/Leipzig/E889-tuplet9.xml index 0f047991cd8..36733420af5 100644 --- a/data/Leipzig/E889-tuplet9.xml +++ b/data/Leipzig/E889-tuplet9.xml @@ -1,4 +1,7 @@ - + diff --git a/data/Leipzig/E88A-tupletColon.xml b/data/Leipzig/E88A-tupletColon.xml new file mode 100644 index 00000000000..4c9fd5dde73 --- /dev/null +++ b/data/Leipzig/E88A-tupletColon.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E938-mensuralNoteheadSemibrevisBlack.xml b/data/Leipzig/E938-mensuralNoteheadSemibrevisBlack.xml new file mode 100644 index 00000000000..b66f2b7498c --- /dev/null +++ b/data/Leipzig/E938-mensuralNoteheadSemibrevisBlack.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E939-mensuralNoteheadSemibrevisVoid.xml b/data/Leipzig/E939-mensuralNoteheadSemibrevisVoid.xml new file mode 100644 index 00000000000..72033628b88 --- /dev/null +++ b/data/Leipzig/E939-mensuralNoteheadSemibrevisVoid.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E93C-mensuralNoteheadMinimaWhite.xml b/data/Leipzig/E93C-mensuralNoteheadMinimaWhite.xml new file mode 100644 index 00000000000..24e1c002b36 --- /dev/null +++ b/data/Leipzig/E93C-mensuralNoteheadMinimaWhite.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/data/Leipzig/E93D-mensuralNoteheadSemiminimaWhite.xml b/data/Leipzig/E93D-mensuralNoteheadSemiminimaWhite.xml new file mode 100644 index 00000000000..7fa4024f987 --- /dev/null +++ b/data/Leipzig/E93D-mensuralNoteheadSemiminimaWhite.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/emscripten/build.sh b/emscripten/build.sh index 337c5de2361..1a8422376d6 100755 --- a/emscripten/build.sh +++ b/emscripten/build.sh @@ -28,8 +28,9 @@ if [ ! -d data ]; then mkdir data; fi # Empirically, the memory amount required is approx. 5 times the file size (as an indication). # We can disable this for a light version that uses the default memory settings ASM="\ - -O2 --memory-init-file 0 \ + -O3 --memory-init-file 0 \ -s ASM_JS=1 \ + -s OUTLINING_LIMIT=10000 \ -s TOTAL_MEMORY=128*1024*1024 \ -s TOTAL_STACK=64*1024*1024" ASM_NAME="" @@ -49,7 +50,7 @@ while getopts "lwv:h:c" opt; do l) echo "light version (-l)" ASM="\ - -O2 --memory-init-file 0 \ + -O3 --memory-init-file 0 \ -s ASM_JS=1 " ASM_NAME="-light" ;; @@ -93,7 +94,6 @@ python $EMCC $CHATTY \ -DUSE_EMSCRIPTEN \ $ASM \ ./emscripten_main.cpp \ - $VEROVIO_ROOT/src/vrv.cpp \ $VEROVIO_ROOT/src/accid.cpp \ $VEROVIO_ROOT/src/aligner.cpp \ $VEROVIO_ROOT/src/att.cpp \ @@ -106,9 +106,10 @@ python $EMCC $CHATTY \ $VEROVIO_ROOT/src/devicecontext.cpp \ $VEROVIO_ROOT/src/doc.cpp \ $VEROVIO_ROOT/src/dot.cpp \ - $VEROVIO_ROOT/src/drawinglistinterface.cpp \ + $VEROVIO_ROOT/src/drawinginterface.cpp \ $VEROVIO_ROOT/src/durationinterface.cpp \ $VEROVIO_ROOT/src/editorial.cpp \ + $VEROVIO_ROOT/src/floatingelement.cpp \ $VEROVIO_ROOT/src/glyph.cpp \ $VEROVIO_ROOT/src/io.cpp \ $VEROVIO_ROOT/src/iodarms.cpp \ @@ -119,7 +120,6 @@ python $EMCC $CHATTY \ $VEROVIO_ROOT/src/layer.cpp \ $VEROVIO_ROOT/src/layerelement.cpp \ $VEROVIO_ROOT/src/measure.cpp \ - $VEROVIO_ROOT/src/measureelement.cpp \ $VEROVIO_ROOT/src/mensur.cpp \ $VEROVIO_ROOT/src/metersig.cpp \ $VEROVIO_ROOT/src/mrest.cpp \ @@ -129,27 +129,35 @@ python $EMCC $CHATTY \ $VEROVIO_ROOT/src/page.cpp \ $VEROVIO_ROOT/src/pitchinterface.cpp \ $VEROVIO_ROOT/src/positioninterface.cpp \ - $VEROVIO_ROOT/src/view.cpp \ - $VEROVIO_ROOT/src/view_beam.cpp \ - $VEROVIO_ROOT/src/view_element.cpp \ - $VEROVIO_ROOT/src/view_graph.cpp \ - $VEROVIO_ROOT/src/view_mensural.cpp \ - $VEROVIO_ROOT/src/view_page.cpp \ - $VEROVIO_ROOT/src/view_tuplet.cpp \ + $VEROVIO_ROOT/src/proport.cpp \ $VEROVIO_ROOT/src/rest.cpp \ + $VEROVIO_ROOT/src/rpt.cpp \ $VEROVIO_ROOT/src/scoredef.cpp \ + $VEROVIO_ROOT/src/scoredefinterface.cpp \ $VEROVIO_ROOT/src/slur.cpp \ $VEROVIO_ROOT/src/space.cpp \ $VEROVIO_ROOT/src/staff.cpp \ $VEROVIO_ROOT/src/style.cpp \ $VEROVIO_ROOT/src/svgdevicecontext.cpp \ $VEROVIO_ROOT/src/syl.cpp \ - $VEROVIO_ROOT/src/system.cpp \ + $VEROVIO_ROOT/src/system.cpp \ + $VEROVIO_ROOT/src/textdirective.cpp \ + $VEROVIO_ROOT/src/textdirinterface.cpp \ $VEROVIO_ROOT/src/tie.cpp \ $VEROVIO_ROOT/src/timeinterface.cpp \ + $VEROVIO_ROOT/src/trem.cpp \ $VEROVIO_ROOT/src/toolkit.cpp \ $VEROVIO_ROOT/src/tuplet.cpp \ $VEROVIO_ROOT/src/verse.cpp \ + $VEROVIO_ROOT/src/view.cpp \ + $VEROVIO_ROOT/src/view_beam.cpp \ + $VEROVIO_ROOT/src/view_element.cpp \ + $VEROVIO_ROOT/src/view_floating.cpp \ + $VEROVIO_ROOT/src/view_graph.cpp \ + $VEROVIO_ROOT/src/view_mensural.cpp \ + $VEROVIO_ROOT/src/view_page.cpp \ + $VEROVIO_ROOT/src/view_tuplet.cpp \ + $VEROVIO_ROOT/src/vrv.cpp \ $VEROVIO_ROOT/src/pugixml.cpp \ $VEROVIO_ROOT/libmei/atts_cmn.cpp \ $VEROVIO_ROOT/libmei/atts_critapp.cpp \ @@ -181,7 +189,7 @@ if [ $? -eq 0 ]; then if [ "$WEBWORKER" = true ]; then cat build/verovio.js verovio-proxy.js > "build/$FILENAME" else - cat verovio-wrapper-start.js build/verovio.js verovio-wrapper-end.js verovio-proxy.js verovio-unload-listener.js > "build/$FILENAME" + cat build/verovio.js verovio-proxy.js verovio-unload-listener.js > "build/$FILENAME" fi # all good echo "build/$FILENAME written" diff --git a/emscripten/verovio-wrapper-end.js b/emscripten/verovio-wrapper-end.js deleted file mode 100644 index 2d9c82a92f7..00000000000 --- a/emscripten/verovio-wrapper-end.js +++ /dev/null @@ -1 +0,0 @@ -})() \ No newline at end of file diff --git a/emscripten/verovio-wrapper-start.js b/emscripten/verovio-wrapper-start.js deleted file mode 100644 index 7410c620771..00000000000 --- a/emscripten/verovio-wrapper-start.js +++ /dev/null @@ -1 +0,0 @@ -(function() { \ No newline at end of file diff --git a/fonts/Leipzig-5.0.sfd b/fonts/Leipzig-5.1.sfd similarity index 98% rename from fonts/Leipzig-5.0.sfd rename to fonts/Leipzig-5.1.sfd index ff4c7fb70b2..a1cfa3ac674 100644 --- a/fonts/Leipzig-5.0.sfd +++ b/fonts/Leipzig-5.1.sfd @@ -20,7 +20,7 @@ OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 1 CreationTime: 1395388130 -ModificationTime: 1420559201 +ModificationTime: 1435652447 PfmFamily: 17 TTFWeight: 500 TTFWidth: 5 @@ -49,11 +49,11 @@ NameList: Adobe Glyph List DisplaySize: -72 AntiAlias: 1 FitToEm: 1 -WinInfo: 57450 15 7 +WinInfo: 59700 15 7 BeginPrivate: 0 EndPrivate TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144 -BeginChars: 1114115 65 +BeginChars: 1114115 69 StartChar: uniE0A3 Encoding: 57507 57507 0 @@ -430,15 +430,15 @@ StartChar: uniE0A2 Encoding: 57506 57506 11 Width: 405 VWidth: 2048 -Flags: HW +Flags: HWO LayerCount: 2 Fore SplineSet -198 133 m 4 +198 133 m 0 300 133 405 88 405 0 c 0 - 405 -92 307 -133 198 -133 c 0 + 405 -92 307 -133 198 -133 c 4 97 -133 0 -87 0 0 c 256 - 0 88 93 133 198 133 c 4 + 0 88 93 133 198 133 c 0 293 -21 m 0 293 -7 290 8 285 23 c 0 278 43 267 61 252 77 c 0 @@ -3349,5 +3349,79 @@ SplineSet -0 74 0 37 0 -0 c 5 EndSplineSet EndChar + +StartChar: uniE938 +Encoding: 59704 59704 65 +Width: 312 +VWidth: 2048 +Flags: HWO +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +EndSplineSet +EndChar + +StartChar: uniE939 +Encoding: 59705 59705 66 +Width: 312 +VWidth: 2048 +Flags: HWO +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +125 111 m 5 + 68 38 l 5 + 190 -111 l 5 + 246 -40 l 5 + 125 111 l 5 +EndSplineSet +EndChar + +StartChar: uniE93D +Encoding: 59709 59709 67 +Width: 312 +VWidth: 2048 +Flags: HWO +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +EndSplineSet +EndChar + +StartChar: uniE93C +Encoding: 59708 59708 68 +Width: 312 +VWidth: 2048 +Flags: HWO +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +125 111 m 5 + 68 38 l 5 + 190 -111 l 5 + 246 -40 l 5 + 125 111 l 5 +EndSplineSet +EndChar EndChars EndSplineFont diff --git a/fonts/Leipzig-5.2.sfd b/fonts/Leipzig-5.2.sfd new file mode 100644 index 00000000000..cb0a093145f --- /dev/null +++ b/fonts/Leipzig-5.2.sfd @@ -0,0 +1,5607 @@ +SplineFontDB: 3.0 +FontName: Leipzig +FullName: Leipzig +FamilyName: Leipzig +Weight: Regular +Copyright: Created by Etienne Darbellay, Jean-Francois Marti and Laurent Pugin. \nThis font is licensed under the SIL Open Font License \\(http://scripts.sil.org/OFL\\).\nVersion 5.2.1 +UComments: "2014-03-21: Created.+AAoA-Version 5.2.0 - adding glyphs (dynamics, ornaments, mensural note heads, etc)+AAoA-Version 5.2.1 - adding repeats+AAoA-Version 5.2.2 - fixing size of some glpyhs+AAoA" +Version: 5.2.1 +ItalicAngle: 0 +UnderlinePosition: -50 +UnderlineWidth: 50 +Ascent: 800 +Descent: 200 +LayerCount: 2 +Layer: 0 0 "Back" 1 +Layer: 1 0 "Fore" 0 +XUID: [1021 638 1292611596 15783845] +FSType: 8 +OS2Version: 0 +OS2_WeightWidthSlopeOnly: 0 +OS2_UseTypoMetrics: 1 +CreationTime: 1395388130 +ModificationTime: 1441821822 +PfmFamily: 17 +TTFWeight: 500 +TTFWidth: 5 +LineGap: 90 +VLineGap: 0 +OS2TypoAscent: 0 +OS2TypoAOffset: 1 +OS2TypoDescent: 0 +OS2TypoDOffset: 1 +OS2TypoLinegap: 90 +OS2WinAscent: 0 +OS2WinAOffset: 1 +OS2WinDescent: 0 +OS2WinDOffset: 1 +HheadAscent: 0 +HheadAOffset: 1 +HheadDescent: 0 +HheadDOffset: 1 +OS2Vendor: 'PfEd' +MarkAttachClasses: 1 +DEI: 91125 +LangName: 1033 +Encoding: UnicodeFull +UnicodeInterp: none +NameList: Adobe Glyph List +DisplaySize: -72 +AntiAlias: 1 +FitToEm: 1 +WinInfo: 59490 18 9 +BeginPrivate: 0 +EndPrivate +TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144 +BeginChars: 1114115 114 + +StartChar: uniE0A3 +Encoding: 57507 57507 0 +Width: 320 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +96 -132 m 0,0,0 +200 138 m 1,0,0 + 241 133 l 2,0,0 + 239 133 200 138 200 138 c 1,0,0 +278 64 m 0,8,9 + 278 86 261 103 235 103 c 0,11,12 + 223 103 209 100 194 93 c 0,13,14 + 109 50 29 -1 29 -63 c 1,0,1 + 34 -88 44 -95 78 -95 c 1,3,4 + 145 -84 278 0 278 64 c 0,8,9 +0 -36 m 0,28,29 + 0 32 73 138 200 138 c 0,17,18 + 266 138 314 99 314 41 c 0,22,23 + 314 -43 208 -132 96 -132 c 0,26,27 + 32 -132 0 -100 0 -36 c 0,28,29 +EndSplineSet +Validated: 5 +EndChar + +StartChar: uniE080 +Encoding: 57472 57472 1 +Width: 427 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +209 251 m 0,0,0 +210 -250 m 4,12,13 + 111 -250 0 -156 0 1 c 0,0,1 + 0 153 93 251 209 251 c 0,4,5 + 325 251 414 132 414 1 c 256,8,9 + 414 -138 311 -250 210 -250 c 4,12,13 +119 1 m 0,28,29 + 119 -78 132 -214 207 -214 c 0,19,20 + 275 -214 291 -102 291 1 c 0,22,23 + 291 77 276 217 207 217 c 0,25,26 + 139 217 119 81 119 1 c 0,28,29 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE081 +Encoding: 57473 57473 2 +Width: 296 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +48 -250 m 1 + 48 -214 l 1 + 71 -214 88 -208 97 -196 c 1 + 105 -182 109 -163 109 -139 c 2 + 109 111 l 1 + 27 -18 l 1 + 0 -5 l 1 + 107 250 l 1 + 235 250 l 1 + 235 -144 l 2 + 235 -168 240 -186 249 -197 c 128 + 258 -208 274 -214 296 -214 c 1 + 296 -250 l 1 + 48 -250 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE082 +Encoding: 57474 57474 3 +Width: 402 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +104 -185 m 1 + 86 -185 49 -199 39 -250 c 1 + 3 -250 l 1 + 0 -221 l 1 + 0 -196 6 -175 18 -157 c 1 + 29 -138 40 -127 57 -114 c 1 + 178 -32 l 1 + 215 -3 l 2 + 230 8 242 26 253 51 c 1 + 265 75 271 98 271 121 c 0 + 271 161 252 209 177 209 c 0 + 152 209 145 209 127 201 c 1 + 113 196 104 189 101 179 c 1 + 104 170 108 164 111 161 c 2 + 135 144 l 1 + 147 137 152 133 162 123 c 1 + 167 116 169 107 169 96 c 0 + 169 84 169 39 90 22 c 1 + 60 22 14 48 14 116 c 0 + 14 182 94 251 210 251 c 0 + 282 251 392 219 392 101 c 0 + 392 48 360 6 279 -32 c 1 + 188 -73 l 2 + 162 -84 143 -96 131 -110 c 1 + 180 -103 l 1 + 264 -103 295 -144 328 -144 c 0 + 348 -144 361 -124 367 -83 c 1 + 402 -83 l 1 + 402 -235 334 -251 288 -251 c 0 + 271 -251 233 -251 219 -244 c 2 + 219 -244 l 1 + 191 -227 l 1 + 142 -190 122 -187 104 -185 c 1 +EndSplineSet +Validated: 5 +EndChar + +StartChar: uniE083 +Encoding: 57475 57475 4 +Width: 383 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +188 250 m 0 + 285 250 365 198 365 134 c 0 + 365 65 325 23 247 9 c 1 + 303 4 372 -35 372 -107 c 0 + 372 -138 362 -164 341 -185 c 1 + 322 -206 296 -223 263 -234 c 1 + 213 -245 l 2 + 198 -248 177 -252 158 -252 c 0 + 108 -252 72 -236 45 -214 c 1 + 29 -204 22 -196 11 -180 c 1 + 4 -167 0 -155 0 -142 c 0 + 0 -99 27 -59 68 -59 c 1 + 71 -61 l 1 + 132 -61 146 -103 146 -131 c 0 + 146 -150 122 -173 120 -188 c 1 + 127 -205 140 -213 157 -213 c 0 + 201 -213 251 -184 251 -135 c 0 + 251 -60 217 -10 113 -10 c 1 + 113 26 l 1 + 197 26 244 48 244 124 c 0 + 244 178 207 212 157 212 c 256 + 131 212 114 205 106 190 c 1 + 121 168 150 174 150 120 c 0 + 150 83 113 58 79 58 c 0 + 57 58 10 73 10 134 c 0 + 10 213 111 250 188 250 c 0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE084 +Encoding: 57476 57476 5 +Width: 387 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -78 m 1 + 84 19 114 102 134 251 c 1 + 304 251 l 1 + 291 219 222 119 205 100 c 2 + 121 3 l 1 + 88 -33 62 -60 41 -78 c 1 + 203 -78 l 1 + 203 24 l 1 + 330 147 l 1 + 330 -78 l 1 + 387 -78 l 1 + 387 -117 l 1 + 330 -117 l 1 + 330 -151 l 2 + 330 -194 349 -216 387 -216 c 1 + 387 -250 l 1 + 143 -250 l 1 + 143 -214 l 1 + 191 -214 203 -188 203 -144 c 2 + 203 -117 l 1 + 0 -117 l 1 + 0 -78 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE085 +Encoding: 57477 57477 6 +Width: 354 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +141 38 m 0 + 127 38 85 33 49 -13 c 1 + 17 -13 l 1 + 22 250 l 1 + 77 239 130 232 180 232 c 0 + 220 232 265 238 314 249 c 1 + 306 197 275 135 155 135 c 1 + 105 137 l 2 + 86 139 74 141 56 147 c 1 + 51 36 l 1 + 89 62 132 75 180 75 c 0 + 274 75 357 11 357 -84 c 0 + 357 -184 259 -250 146 -250 c 0 + 58 -250 0 -197 0 -135 c 0 + 0 -82 39 -52 75 -52 c 0 + 112 -52 144 -84 144 -124 c 0 + 144 -128 143 -134 140 -142 c 1 + 113 -179 l 2 + 111 -182 110 -187 110 -193 c 0 + 110 -208 122 -216 146 -216 c 0 + 220 -216 238 -139 238 -84 c 0 + 238 -29 203 38 141 38 c 0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE086 +Encoding: 57478 57478 7 +Width: 394 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +264 -91 m 0 + 264 -54 236 1 197 1 c 0 + 162 1 132 -53 132 -110 c 0 + 132 -162 154 -214 200 -214 c 0 + 247 -214 264 -146 264 -91 c 0 +210 214 m 0 + 174 214 120 181 120 30 c 1 + 122 -6 l 1 + 162 18 203 30 242 30 c 0 + 322 30 382 -18 382 -91 c 0 + 382 -190 283 -250 200 -250 c 4 + 40 -250 0 -77 0 -6 c 256 + 0 15 2 37 7 65 c 1 + 17 100 l 129 + 43 185 90 215 115 226 c 0 + 156 245 189 250 218 250 c 0 + 311 250 360 187 360 145 c 0 + 360 87 308 73 287 73 c 0 + 254 73 228 97 222 108 c 128 + 219 113 216 122 215 133 c 1 + 226 163 l 2 + 232 178 235 190 235 198 c 0 + 235 209 226 214 210 214 c 0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE087 +Encoding: 57479 57479 8 +Width: 404 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +330 125 m 1 + 319 116 277 79 235 79 c 1 + 217 81 202 87 191 96 c 1 + 174 115 158 130 143 141 c 1 + 130 152 116 158 101 158 c 0 + 78 158 56 136 37 92 c 1 + 0 92 l 1 + 0 247 l 1 + 37 247 l 1 + 41 229 48 219 58 217 c 1 + 66 218 73 220 80 225 c 1 + 90 230 l 1 + 104 240 l 2 + 107 242 118 246 125 247 c 130 + 136 249 l 130 + 144 250 169 250 178 250 c 0 + 217 250 235 243 268 207 c 1 + 279 192 294 184 312 181 c 1 + 339 184 357 210 366 251 c 1 + 404 250 l 1 + 403 241 393 162 375 126 c 1 + 370 113 363 98 354 80 c 2 + 321 20 l 1 + 266 -72 252 -142 252 -250 c 1 + 78 -250 l 5 + 78 -205 89 -164 111 -128 c 1 + 134 -93 170 -54 217 -11 c 1 + 316 73 330 85 330 125 c 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE088 +Encoding: 57480 57480 9 +Width: 386 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +185 -214 m 0 + 261 -214 273 -156 275 -146 c 1 + 275 -112 240 -86 218 -73 c 2 + 166 -44 l 1 + 145 -34 134 -27 132 -24 c 1 + 93 -57 74 -78 70 -116 c 1 + 75 -139 93 -214 185 -214 c 0 +291 135 m 0 + 291 196 219 211 178 211 c 0 + 138 211 101 194 101 160 c 1 + 104 139 116 122 127 110 c 1 + 144 95 160 84 175 76 c 1 + 240 48 l 1 + 274 75 291 104 291 135 c 0 +166 -250 m 4 + 109 -250 0 -224 -0 -118 c 0 + 0 -71 30 -32 89 -2 c 1 + 56 13 10 58 10 117 c 0 + 10 196 95 249 188 249 c 2 + 206 249 l 130 + 211 249 227 250 234 248 c 1 + 259 248 360 218 360 138 c 0 + 360 101 337 62 291 22 c 1 + 334 -3 374 -49 374 -97 c 0 + 374 -198 256 -250 166 -250 c 4 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE089 +Encoding: 57481 57481 10 +Width: 397 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +119 107 m 0 + 119 56 141 3 185 3 c 0 + 223 3 249 51 249 113 c 0 + 249 163 218 213 185 213 c 0 + 145 213 119 157 119 107 c 0 +94 -74 m 0 + 134 -74 166 -101 166 -139 c 0 + 166 -147 163 -158 157 -173 c 2 + 150 -189 l 1 + 145 -204 l 1 + 147 -212 157 -216 176 -216 c 0 + 232 -216 260 -143 260 3 c 1 + 228 -21 189 -33 141 -33 c 0 + 112 -33 85 -27 62 -13 c 1 + 11 13 5 65 -0 95 c 1 + 0 159 56 250 188 250 c 0 + 346 250 385 99 385 13 c 0 + 385 -132 293 -250 178 -250 c 4 + 69 -250 23 -182 23 -149 c 0 + 23 -103 56 -74 94 -74 c 0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE0A2 +Encoding: 57506 57506 11 +Width: 405 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +198 133 m 4 + 300 133 405 88 405 0 c 0 + 405 -92 307 -133 198 -133 c 0 + 97 -133 0 -87 0 0 c 256 + 0 88 93 133 198 133 c 4 +293 -21 m 0 + 293 -7 290 8 285 23 c 0 + 278 43 267 61 252 77 c 0 + 232 98 209 108 184 108 c 1 + 164 106 l 1 + 149 101 137 92 128 78 c 1 + 124 69 122 61 120 54 c 128 + 118 47 117 38 117 27 c 0 + 117 12 120 -7 126 -30 c 128 + 132 -53 144 -71 160 -85 c 1 + 175 -100 196 -108 222 -108 c 0 + 226 -108 232 -107 240 -106 c 0 + 259 -101 272 -91 280 -76 c 128 + 288 -61 293 -42 293 -21 c 0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE0A4 +Encoding: 57508 57508 12 +Width: 320 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -39 m 0 + 0 29 73 133 200 133 c 0 + 266 133 314 96 314 38 c 0 + 314 -46 208 -133 96 -133 c 4 + 32 -133 0 -103 0 -39 c 0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE05C +Encoding: 57436 57436 13 +Width: 656 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 502 m 5 + 118 502 l 5 + 118 0 l 5 + 79 0 39 0 0 0 c 5 + 0 502 l 5 +175 0 m 5 + 175 -502 l 5 + 218 -502 l 5 + 218 -46 l 5 + 231 -53 243 -64 255 -75 c 5 + 265 -87 275 -99 282 -113 c 5 + 288 -127 292 -144 296 -162 c 4 + 299 -182 301 -203 301 -224 c 5 + 308 -189 333 -170 374 -164 c 5 + 452 -183 473 -232 474 -329 c 4 + 474 -373 465 -406 443 -429 c 5 + 425 -452 402 -464 374 -464 c 4 + 331 -464 309 -427 308 -380 c 5 + 315 -395 327 -398 347 -404 c 5 + 353 -404 357 -402 363 -400 c 6 + 380 -390 l 5 + 390 -376 l 5 + 397 -358 l 5 + 393 -326 374 -310 341 -310 c 4 + 285 -310 264 -349 264 -408 c 5 + 274 -444 286 -473 317 -486 c 5 + 320 -489 339 -495 344 -497 c 5 + 378 -500 l 5 + 413 -502 l 5 + 533 -502 603 -441 603 -324 c 5 + 606 -291 l 5 + 606 -239 586 -194 546 -157 c 5 + 526 -140 501 -128 472 -118 c 5 + 441 -109 408 -105 371 -105 c 5 + 278 -17 l 5 + 278 17 l 5 + 278 17 l 5 + 371 105 l 5 + 408 105 441 109 472 118 c 5 + 501 128 526 140 546 157 c 5 + 586 194 606 239 606 291 c 5 + 603 324 l 5 + 603 441 533 502 413 502 c 5 + 378 500 l 5 + 344 497 l 5 + 339 495 320 489 317 486 c 5 + 308 482 301 476 294 469 c 4 + 277 452 272 436 264 408 c 5 + 264 349 285 310 341 310 c 4 + 374 310 393 326 397 358 c 5 + 390 376 l 5 + 380 390 l 5 + 363 400 l 6 + 357 402 353 404 347 404 c 5 + 327 398 315 395 308 380 c 5 + 309 427 331 464 374 464 c 4 + 402 464 425 452 443 429 c 5 + 465 406 474 373 474 329 c 4 + 473 232 452 183 374 164 c 5 + 333 170 308 189 301 224 c 5 + 301 203 299 182 296 162 c 4 + 292 144 288 127 282 113 c 5 + 275 99 265 87 255 75 c 5 + 243 64 231 53 218 46 c 5 + 218 502 l 5 + 175 502 l 5 + 175 0 l 5 +0 -502 m 5 + 0 0 l 5 + 118 0 l 5 + 118 -502 l 5 + 0 -502 l 5 +EndSplineSet +Validated: 5 +EndChar + +StartChar: uniE05D +Encoding: 57437 57437 14 +Width: 616 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +380 -545 m 0 + 380 -518 359 -505 331 -505 c 0 + 316 -505 300 -513 300 -530 c 0 + 300 -544 310 -555 318 -564 c 0 + 326 -572 334 -582 344 -589 c 1 + 349 -591 354 -593 357 -593 c 0 + 374 -593 380 -563 380 -545 c 0 +266 -626 m 1 + 263 -628 260 -631 259 -634 c 1 + 253 -642 249 -653 249 -664 c 0 + 249 -666 249 -668 250 -671 c 0 + 257 -703 284 -723 303 -723 c 0 + 323 -723 340 -703 340 -687 c 0 + 340 -682 338 -678 336 -673 c 0 + 329 -654 311 -636 294 -625 c 0 + 290 -623 285 -619 280 -619 c 0 + 274 -619 269 -622 266 -626 c 1 +0 502 m 1 + 118 502 l 1 + 118 167 118 -167 118 -502 c 1 + 0 -502 l 1 + 0 -167 0 167 0 502 c 1 +321 -488 m 2 + 328 -488 l 2 + 336 -488 360 -491 381 -501 c 1 + 413 -502 l 1 + 533 -502 603 -441 603 -324 c 1 + 606 -291 l 1 + 606 -239 587 -193 546 -157 c 0 + 506 -122 445 -105 371 -105 c 1 + 278 -17 l 1 + 278 17 l 1 + 371 105 l 1 + 445 105 506 122 546 157 c 0 + 587 193 606 239 606 291 c 1 + 603 324 l 1 + 603 441 533 502 413 502 c 1 + 378 500 l 1 + 344 497 l 2 + 339 495 320 489 317 486 c 1 + 286 473 274 444 264 408 c 1 + 264 349 285 310 341 310 c 0 + 374 310 393 326 397 358 c 1 + 390 376 l 1 + 380 390 l 1 + 363 400 l 2 + 357 402 353 404 347 404 c 1 + 327 398 315 395 308 380 c 1 + 309 427 331 464 374 464 c 0 + 402 464 424 451 443 429 c 0 + 464 405 474 373 474 329 c 0 + 473 232 452 183 374 164 c 1 + 333 170 308 189 301 224 c 1 + 301 135 275 78 218 46 c 1 + 218 502 l 1 + 175 502 l 1 + 175 167 175 -167 175 -502 c 1 + 218 -502 l 1 + 218 -46 l 1 + 275 -78 301 -135 301 -224 c 1 + 308 -189 333 -170 374 -164 c 1 + 452 -183 473 -232 474 -329 c 0 + 474 -373 464 -405 443 -429 c 0 + 424 -451 402 -464 374 -464 c 0 + 331 -464 309 -427 308 -380 c 1 + 315 -395 327 -398 347 -404 c 1 + 353 -404 357 -402 363 -400 c 2 + 380 -390 l 1 + 390 -376 l 1 + 397 -358 l 1 + 393 -326 374 -310 341 -310 c 0 + 285 -310 264 -349 264 -408 c 1 + 274 -444 286 -473 317 -486 c 0 + 318 -487 319 -487 321 -488 c 2 +303 -735 m 0 + 267 -735 211 -711 211 -665 c 0 + 211 -637 236 -608 262 -599 c 0 + 266 -598 268 -597 268 -594 c 0 + 268 -592 267 -591 266 -591 c 0 + 255 -578 250 -564 250 -550 c 0 + 250 -516 279 -489 321 -488 c 1 + 327 -491 340 -496 344 -497 c 2 + 378 -500 l 1 + 381 -501 l 1 + 400 -510 416 -524 416 -548 c 0 + 416 -583 394 -591 385 -598 c 0 + 379 -603 377 -608 377 -614 c 0 + 377 -620 378 -625 381 -630 c 0 + 388 -641 390 -652 390 -664 c 0 + 390 -691 372 -717 344 -729 c 0 + 333 -733 317 -735 303 -735 c 0 +EndSplineSet +Validated: 5 +EndChar + +StartChar: uniE051 +Encoding: 57425 57425 15 +Width: 650 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +220 -890 m 0 + 189 -886 100 -899 100 -881 c 1 + 108 -863 129 -888 147 -851 c 0 + 155 -835 187 -754 186 -754 c 2 + 186 -754 188 -749 188 -745 c 0 + 188 -741 187 -738 181 -738 c 0 + 171 -738 167 -757 147 -757 c 0 + 141 -757 136 -754 136 -749 c 0 + 136 -747 136 -746 138 -743 c 0 + 144 -736 218 -650 225 -644 c 0 + 226 -643 228 -642 229 -641 c 1 + 219 -638 210 -633 200 -628 c 0 + 150 -604 123 -569 120 -523 c 0 + 115 -451 155 -396 219 -392 c 0 + 270 -389 318 -432 322 -479 c 0 + 326 -535 292 -573 217 -594 c 1 + 234 -618 268 -630 319 -630 c 0 + 381 -630 435 -587 459 -545 c 0 + 468 -529 472 -504 472 -471 c 0 + 472 -451 470 -429 467 -404 c 0 + 458 -351 449 -298 441 -245 c 1 + 418 -249 393 -251 365 -251 c 0 + 306 -251 263 -244 235 -231 c 0 + 147 -189 85 -138 48 -77 c 0 + 22 -33 5 26 0 99 c 0 + -10 231 78 365 154 436 c 0 + 199 478 250 521 307 563 c 1 + 304 579 299 609 294 655 c 0 + 290 698 289 728 289 744 c 0 + 289 861 305 916 358 1001 c 0 + 392 1055 422 1082 447 1083 c 0 + 468 1083 490 1053 516 991 c 0 + 542 929 555 876 557 832 c 0 + 559 712 538 659 490 576 c 0 + 477 556 427 486 392 458 c 0 + 379 449 367 439 355 429 c 1 + 386 248 l 1 + 394 249 404 250 414 250 c 0 + 472 250 516 238 547 215 c 0 + 606 172 639 111 645 31 c 0 + 656 -104 565 -198 465 -239 c 1 + 473 -296 482 -349 490 -401 c 0 + 494 -432 496 -459 496 -481 c 0 + 496 -511 491 -534 482 -551 c 0 + 458 -596 424 -626 383 -642 c 1 + 392 -642 l 2 + 426 -642 459 -641 459 -646 c 0 + 459 -668 425 -680 404 -684 c 2 + 375 -690 l 2 + 364 -692 353 -694 341 -697 c 2 + 327 -700 l 1 + 322 -704 320 -719 320 -726 c 0 + 320 -727 321 -729 324 -729 c 0 + 332 -729 346 -726 355 -726 c 0 + 379 -726 386 -738 398 -738 c 1 + 401 -741 l 1 + 416 -752 424 -774 424 -796 c 0 + 424 -856 366 -893 312 -893 c 0 + 281 -893 250 -873 250 -835 c 0 + 250 -822 255 -812 266 -806 c 1 + 273 -804 l 1 + 277 -804 l 2 + 291 -804 301 -816 301 -830 c 0 + 301 -845 287 -848 284 -866 c 1 + 284 -877 301 -880 313 -880 c 0 + 328 -879 353 -870 373 -813 c 0 + 378 -799 380 -789 380 -781 c 0 + 380 -753 358 -749 347 -749 c 0 + 320 -749 300 -776 290 -776 c 0 + 279 -776 279 -772 279 -767 c 0 + 279 -754 302 -684 317 -655 c 1 + 309 -655 300 -655 292 -654 c 1 + 282 -680 206 -851 205 -859 c 0 + 205 -880 232 -870 232 -881 c 0 + 232 -886 227 -890 220 -890 c 0 +461 939 m 0 + 366 939 326 764 326 653 c 0 + 326 629 328 605 331 582 c 1 + 381 621 423 664 458 710 c 0 + 501 767 521 816 518 858 c 0 + 514 912 495 940 461 939 c 0 +406 119 m 1 + 460 -207 l 1 + 540 -180 576 -119 569 -23 c 0 + 561 76 507 123 406 119 c 1 +382 117 m 1 + 308 115 250 67 254 -10 c 0 + 256 -56 297 -109 329 -125 c 1 + 326 -127 322 -130 319 -135 c 1 + 249 -102 203 -47 196 37 c 0 + 191 110 238 172 284 207 c 0 + 307 224 333 236 362 243 c 1 + 333 413 l 1 + 312 400 281 376 241 340 c 0 + 191 296 155 256 132 221 c 0 + 83 146 60 81 65 26 c 0 + 70 -42 100 -101 158 -150 c 0 + 216 -199 283 -223 361 -223 c 0 + 386 -223 411 -220 436 -214 c 1 + 417 -103 400 7 382 117 c 1 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE050 +Encoding: 57424 57424 16 +Width: 646 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +441 -245 m 5 + 418 -249 393 -251 365 -251 c 4 + 306 -251 263 -244 235 -231 c 4 + 147 -189 85 -138 48 -77 c 4 + 22 -33 5 26 0 99 c 4 + -4 159 11 222 44 288 c 4 + 73 345 109 394 154 436 c 132 + 199 478 250 521 307 563 c 5 + 304 579 299 609 294 655 c 4 + 290 698 289 728 289 744 c 4 + 289 861 305 916 358 1001 c 4 + 392 1055 422 1083 447 1083 c 4 + 468 1083 490 1053 516 991 c 132 + 542 929 555 876 557 832 c 4 + 559 712 538 659 490 576 c 4 + 477 556 427 486 392 458 c 4 + 379 449 367 439 355 429 c 5 + 386 248 l 5 + 394 249 404 250 414 250 c 4 + 472 250 516 238 547 215 c 4 + 606 172 639 111 645 31 c 4 + 656 -104 565 -198 465 -239 c 5 + 473 -296 482 -349 490 -401 c 4 + 495 -432 496 -459 496 -481 c 4 + 496 -511 491 -534 482 -551 c 4 + 447 -615 394 -650 324 -654 c 4 + 282 -657 241 -648 200 -628 c 4 + 150 -604 123 -569 120 -523 c 4 + 118 -489 125 -460 140 -436 c 4 + 158 -408 185 -394 219 -392 c 4 + 270 -388 318 -432 322 -479 c 4 + 326 -535 292 -573 217 -594 c 5 + 234 -618 268 -630 319 -630 c 4 + 381 -630 435 -587 459 -545 c 4 + 468 -529 472 -504 472 -471 c 4 + 472 -451 471 -429 467 -404 c 4 + 459 -351 449 -298 441 -245 c 5 +461 939 m 4 + 366 939 326 764 326 653 c 4 + 326 629 328 605 331 582 c 5 + 381 621 423 664 458 710 c 4 + 501 767 521 816 518 858 c 4 + 514 912 495 940 461 939 c 4 +406 119 m 5 + 460 -207 l 5 + 540 -180 576 -119 569 -23 c 4 + 562 76 507 123 406 119 c 5 +382 117 m 5 + 308 115 250 67 254 -10 c 4 + 256 -56 297 -109 329 -125 c 5 + 326 -127 322 -130 319 -135 c 5 + 249 -102 203 -47 196 37 c 4 + 191 110 238 172 284 207 c 4 + 307 224 333 236 362 243 c 5 + 333 413 l 5 + 312 400 281 376 241 340 c 4 + 191 296 155 256 132 221 c 4 + 83 146 61 81 65 26 c 4 + 70 -42 100 -101 158 -150 c 132 + 216 -199 283 -223 361 -223 c 4 + 386 -223 411 -220 436 -214 c 5 + 417 -103 400 7 382 117 c 5 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE052 +Encoding: 57426 57426 17 +Width: 646 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +382 117 m 1 + 308 115 250 67 254 -10 c 0 + 256 -56 297 -109 329 -125 c 1 + 326 -127 322 -130 319 -135 c 1 + 249 -102 203 -47 196 37 c 0 + 191 110 238 172 284 207 c 0 + 307 224 333 236 362 243 c 1 + 333 413 l 1 + 312 400 281 376 241 340 c 0 + 191 296 155 256 132 221 c 0 + 83 146 61 81 65 26 c 0 + 70 -42 100 -101 158 -150 c 0 + 216 -199 283 -223 361 -223 c 0 + 386 -223 411 -220 436 -214 c 1 + 417 -103 400 7 382 117 c 1 +406 119 m 1 + 460 -207 l 1 + 540 -180 576 -119 569 -23 c 0 + 562 76 507 123 406 119 c 1 +461 939 m 0 + 366 939 326 764 326 653 c 0 + 326 629 328 605 331 582 c 1 + 381 621 423 664 458 710 c 0 + 501 767 521 816 518 858 c 0 + 514 912 495 940 461 939 c 0 +441 -245 m 1 + 418 -249 393 -251 365 -251 c 0 + 306 -251 263 -244 235 -231 c 0 + 147 -189 85 -138 48 -77 c 0 + 22 -33 5 26 0 99 c 0 + -4 159 11 222 44 288 c 0 + 73 345 109 394 154 436 c 0 + 199 478 250 521 307 563 c 1 + 304 579 299 609 294 655 c 0 + 290 698 289 728 289 744 c 0 + 289 861 305 916 358 1001 c 0 + 392 1055 422 1083 447 1083 c 0 + 468 1083 490 1053 516 991 c 0 + 542 929 555 876 557 832 c 0 + 559 712 538 659 490 576 c 0 + 477 556 427 486 392 458 c 0 + 379 449 367 439 355 429 c 1 + 386 248 l 1 + 394 249 404 250 414 250 c 0 + 472 250 516 238 547 215 c 0 + 606 172 639 111 645 31 c 0 + 656 -104 565 -198 465 -239 c 1 + 473 -296 482 -349 490 -401 c 0 + 495 -432 496 -459 496 -481 c 0 + 496 -511 491 -534 482 -551 c 0 + 457 -597 423 -628 380 -643 c 1 + 401 -644 465 -656 465 -703 c 0 + 465 -738 443 -746 434 -753 c 0 + 428 -758 426 -763 426 -769 c 0 + 426 -775 426 -780 430 -785 c 1 + 436 -796 439 -807 439 -819 c 0 + 439 -846 421 -872 393 -884 c 0 + 382 -888 366 -890 352 -890 c 0 + 318 -890 270 -869 262 -832 c 0 + 261 -827 260 -824 260 -820 c 0 + 260 -792 285 -763 311 -754 c 0 + 315 -753 317 -752 317 -749 c 0 + 317 -747 316 -746 315 -746 c 0 + 304 -733 299 -719 299 -705 c 0 + 299 -684 310 -665 329 -654 c 1 + 328 -654 326 -654 324 -654 c 0 + 282 -657 241 -648 200 -628 c 0 + 150 -604 123 -569 120 -523 c 0 + 118 -489 125 -460 140 -436 c 0 + 158 -408 185 -394 219 -392 c 0 + 270 -388 318 -432 322 -479 c 0 + 326 -535 292 -573 217 -594 c 1 + 234 -618 268 -630 319 -630 c 0 + 381 -630 435 -587 459 -545 c 0 + 468 -529 472 -504 472 -471 c 0 + 472 -451 471 -429 467 -404 c 0 + 459 -351 449 -298 441 -245 c 1 +315 -781 m 1 + 312 -783 309 -786 308 -789 c 1 + 302 -797 298 -808 298 -819 c 0 + 298 -821 298 -823 299 -826 c 0 + 306 -858 333 -878 352 -878 c 0 + 372 -878 389 -858 389 -842 c 0 + 389 -837 387 -833 385 -828 c 0 + 380 -815 371 -804 360 -794 c 0 + 354 -789 349 -784 343 -780 c 0 + 339 -778 334 -774 329 -774 c 0 + 323 -774 318 -777 315 -781 c 1 +349 -685 m 1 + 349 -699 359 -710 367 -719 c 0 + 375 -727 383 -737 393 -744 c 1 + 398 -746 403 -748 406 -748 c 0 + 423 -748 428 -718 429 -700 c 0 + 429 -691 426 -680 420 -674 c 0 + 412 -665 397 -660 380 -660 c 1 + 365 -661 351 -668 349 -685 c 1 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE053 +Encoding: 57427 57427 18 +Width: 646 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +382 117 m 5 + 308 115 250 67 254 -10 c 4 + 256 -56 297 -109 329 -125 c 5 + 326 -127 322 -130 319 -135 c 5 + 249 -102 203 -47 196 37 c 4 + 191 110 238 172 284 207 c 4 + 307 224 333 236 362 243 c 5 + 333 413 l 5 + 312 400 281 376 241 340 c 4 + 191 296 155 256 132 221 c 4 + 83 146 61 81 65 26 c 4 + 70 -42 100 -101 158 -150 c 4 + 216 -199 283 -223 361 -223 c 4 + 386 -223 411 -220 436 -214 c 5 + 417 -103 400 7 382 117 c 5 +406 119 m 5 + 460 -207 l 5 + 540 -180 576 -119 569 -23 c 4 + 562 76 507 123 406 119 c 5 +461 939 m 4 + 366 939 326 764 326 653 c 4 + 326 629 328 605 331 582 c 5 + 381 621 423 664 458 710 c 4 + 501 767 521 816 518 858 c 4 + 514 912 495 940 461 939 c 4 +441 -245 m 5 + 418 -249 393 -251 365 -251 c 4 + 306 -251 263 -244 235 -231 c 4 + 147 -189 85 -138 48 -77 c 4 + 22 -33 5 26 0 99 c 4 + -4 159 11 222 44 288 c 4 + 73 345 109 394 154 436 c 4 + 199 478 250 521 307 563 c 5 + 304 579 299 609 294 655 c 4 + 290 698 289 728 289 744 c 4 + 289 861 305 916 358 1001 c 4 + 380 1036 401 1060 419 1073 c 5 + 390 1080 358 1099 352 1128 c 4 + 351 1133 350 1136 350 1140 c 4 + 350 1168 375 1197 401 1206 c 4 + 405 1207 407 1208 407 1211 c 4 + 407 1213 406 1214 405 1214 c 4 + 394 1227 389 1241 389 1255 c 4 + 389 1279 403 1301 429 1311 c 5 + 439 1316 451 1317 463 1317 c 6 + 467 1317 l 6 + 483 1317 555 1307 555 1257 c 4 + 555 1222 533 1214 524 1207 c 4 + 518 1202 516 1197 516 1191 c 4 + 516 1185 516 1180 520 1175 c 5 + 526 1164 529 1153 529 1141 c 4 + 529 1114 511 1088 483 1076 c 4 + 479 1075 474 1073 469 1072 c 5 + 484 1058 499 1032 516 991 c 4 + 542 929 555 876 557 832 c 4 + 559 712 538 659 490 576 c 4 + 477 556 427 486 392 458 c 4 + 379 449 367 439 355 429 c 5 + 386 248 l 5 + 394 249 404 250 414 250 c 4 + 472 250 516 238 547 215 c 4 + 606 172 639 111 645 31 c 4 + 656 -104 565 -198 465 -239 c 5 + 473 -296 482 -349 490 -401 c 4 + 495 -432 496 -459 496 -481 c 4 + 496 -511 491 -534 482 -551 c 4 + 447 -615 394 -650 324 -654 c 4 + 282 -657 241 -648 200 -628 c 4 + 150 -604 123 -569 120 -523 c 4 + 118 -489 125 -460 140 -436 c 4 + 158 -408 185 -394 219 -392 c 4 + 270 -388 318 -432 322 -479 c 4 + 326 -535 292 -573 217 -594 c 5 + 234 -618 268 -630 319 -630 c 4 + 381 -630 435 -587 459 -545 c 4 + 468 -529 472 -504 472 -471 c 4 + 472 -451 471 -429 467 -404 c 4 + 459 -351 449 -298 441 -245 c 5 +405 1179 m 5 + 402 1177 399 1174 398 1171 c 5 + 392 1163 388 1152 388 1141 c 4 + 388 1139 388 1137 389 1134 c 4 + 396 1104 420 1084 439 1082 c 5 + 442 1083 444 1083 447 1083 c 4 + 448 1083 449 1083 450 1083 c 4 + 466 1087 479 1104 479 1118 c 4 + 479 1123 477 1127 475 1132 c 4 + 470 1145 461 1156 450 1166 c 4 + 444 1171 439 1176 433 1180 c 4 + 429 1182 424 1186 419 1186 c 4 + 413 1186 408 1183 405 1179 c 5 +439 1275 m 5 + 439 1261 449 1250 457 1241 c 4 + 465 1233 473 1223 483 1216 c 5 + 488 1214 493 1212 496 1212 c 4 + 513 1212 518 1242 519 1260 c 4 + 519 1269 516 1280 510 1286 c 4 + 502 1295 487 1300 470 1300 c 5 + 455 1299 441 1292 439 1275 c 5 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE054 +Encoding: 57428 57428 19 +Width: 646 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +382 117 m 1 + 308 115 250 67 254 -10 c 0 + 256 -56 297 -109 329 -125 c 1 + 326 -127 322 -130 319 -135 c 1 + 249 -102 203 -47 196 37 c 1 + 191 110 238 172 284 207 c 0 + 307 224 333 236 362 243 c 1 + 333 413 l 1 + 312 400 281 376 241 340 c 0 + 191 296 155 256 132 221 c 0 + 83 146 61 81 65 26 c 0 + 70 -42 100 -101 158 -150 c 0 + 216 -199 283 -223 361 -223 c 0 + 386 -223 411 -220 436 -214 c 1 + 417 -103 400 7 382 117 c 1 +406 119 m 1 + 460 -207 l 1 + 540 -180 576 -119 569 -23 c 0 + 562 76 507 123 406 119 c 1 +461 939 m 1 + 366 939 326 764 326 653 c 0 + 326 629 328 605 331 582 c 1 + 381 621 423 664 458 710 c 0 + 501 767 521 816 518 858 c 0 + 514 912 495 940 461 939 c 1 +441 1113 m 0 + 441 1129 449 1140 464 1144 c 1 + 468 1144 l 2 + 482 1144 492 1132 492 1118 c 0 + 492 1103 478 1100 475 1082 c 1 + 475 1071 492 1068 504 1068 c 0 + 519 1069 544 1078 564 1135 c 0 + 569 1149 571 1159 571 1167 c 0 + 571 1195 549 1199 538 1199 c 0 + 511 1199 491 1172 481 1172 c 0 + 470 1172 470 1176 470 1181 c 0 + 470 1197 506 1304 518 1306 c 1 + 583 1306 l 2 + 617 1306 650 1307 650 1302 c 0 + 650 1280 616 1268 595 1264 c 2 + 566 1258 l 2 + 555 1256 544 1254 532 1251 c 2 + 518 1248 l 1 + 513 1244 511 1229 511 1222 c 0 + 511 1221 512 1219 515 1219 c 0 + 523 1219 537 1222 546 1222 c 0 + 570 1222 577 1210 589 1210 c 1 + 592 1207 l 1 + 607 1196 615 1174 615 1152 c 0 + 615 1092 557 1055 503 1055 c 0 + 496 1055 488 1056 481 1058 c 1 + 492 1043 504 1020 516 991 c 0 + 542 929 555 876 557 832 c 1 + 559 712 538 659 490 576 c 1 + 477 556 427 486 392 458 c 1 + 379 449 367 439 355 429 c 1 + 386 248 l 1 + 394 249 404 250 414 250 c 0 + 472 250 516 238 547 215 c 0 + 606 172 639 111 645 31 c 0 + 656 -104 565 -198 465 -239 c 1 + 473 -296 482 -349 490 -401 c 0 + 495 -432 496 -459 496 -481 c 0 + 496 -511 491 -534 482 -551 c 0 + 447 -615 394 -650 324 -654 c 0 + 282 -657 241 -648 200 -628 c 0 + 150 -604 123 -569 120 -523 c 0 + 116 -450 154 -396 219 -392 c 0 + 270 -388 318 -432 322 -479 c 0 + 326 -535 292 -573 217 -594 c 1 + 234 -618 268 -630 319 -630 c 0 + 381 -630 435 -587 459 -545 c 0 + 468 -529 472 -504 472 -471 c 0 + 472 -451 471 -429 467 -404 c 0 + 459 -351 449 -298 441 -245 c 1 + 418 -249 393 -251 365 -251 c 0 + 306 -251 263 -244 235 -231 c 0 + 147 -189 85 -138 48 -77 c 0 + 22 -33 5 26 0 99 c 0 + -9 231 79 366 154 436 c 0 + 199 478 250 521 307 563 c 1 + 304 579 299 609 294 655 c 0 + 290 698 289 728 289 744 c 0 + 289 861 305 916 358 1001 c 0 + 373 1026 388 1044 402 1058 c 1 + 366 1059 291 1050 291 1067 c 1 + 299 1085 320 1060 338 1097 c 0 + 346 1113 378 1194 377 1194 c 2 + 377 1194 379 1199 379 1203 c 0 + 379 1207 378 1210 372 1210 c 0 + 362 1210 358 1191 338 1191 c 0 + 332 1191 327 1194 327 1199 c 0 + 327 1201 327 1202 329 1205 c 0 + 335 1212 409 1298 416 1304 c 0 + 423 1310 427 1313 432 1313 c 0 + 442 1313 449 1302 465 1302 c 0 + 471 1302 476 1306 479 1306 c 0 + 483 1306 484 1305 484 1301 c 2 + 484 1297 l 1 + 483 1290 397 1097 396 1089 c 1 + 396 1074 410 1075 418 1072 c 1 + 428 1079 438 1083 447 1083 c 0 + 448 1083 l 1 + 443 1091 441 1101 441 1113 c 0 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE062 +Encoding: 57442 57442 20 +Width: 698 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +158 96 m 4 + 209 96 231 82 246 47 c 6 + 262 8 l 5 + 262 -9 260 -22 255 -32 c 5 + 252 -43 245 -53 236 -63 c 4 + 219 -81 187 -106 152 -106 c 4 + 97 -106 75 -93 40 -62 c 4 + 16 -41 5 -7 5 38 c 4 + 5 84 19 119 37 150 c 4 + 67 202 108 229 174 243 c 5 + 210 249 l 5 + 236 251 l 5 + 390 251 471 183 510 69 c 4 + 521 37 528 1 528 -38 c 4 + 528 -141 502 -220 460 -288 c 4 + 371 -433 226 -518 48 -576 c 5 + 18 -581 l 5 + 9 -581 4 -578 4 -573 c 5 + 7 -563 9 -562 14 -557 c 5 + 49 -542 84 -527 110 -513 c 6 + 188 -470 l 5 + 284 -413 350 -334 385 -212 c 132 + 394 -179 402 -152 407 -112 c 132 + 410 -90 412 -77 413 -73 c 5 + 406 -4 397 42 390 67 c 4 + 383 92 386 89 374 107 c 4 + 366 119 355 130 343 141 c 4 + 319 162 281 185 225 185 c 4 + 177 185 141 177 112 157 c 4 + 84 138 70 113 70 84 c 4 + 70 76 70 76 70 68 c 5 + 72 63 73 59 74 57 c 5 + 98 79 126 96 158 96 c 4 +585 -118 m 132 + 585 -86 608 -60 642 -60 c 4 + 660 -60 675 -66 682 -78 c 132 + 691 -93 698 -96 698 -118 c 4 + 698 -127 696 -134 693 -139 c 5 + 687 -158 666 -176 642 -176 c 4 + 608 -176 585 -150 585 -118 c 132 +642 177 m 4 + 673 177 698 150 698 119 c 4 + 698 89 673 61 642 61 c 5 + 619 64 l 5 + 600 71 585 96 585 119 c 5 + 588 142 l 5 + 597 162 616 177 642 177 c 4 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE063 +Encoding: 57443 57443 21 +Width: 698 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +158 96 m 4 + 209 96 231 82 246 47 c 6 + 262 8 l 5 + 262 -9 260 -22 255 -32 c 5 + 252 -43 245 -53 236 -63 c 4 + 219 -81 187 -106 152 -106 c 4 + 97 -106 75 -93 40 -62 c 4 + 16 -41 5 -7 5 38 c 4 + 5 84 19 119 37 150 c 4 + 67 202 108 229 174 243 c 5 + 210 249 l 5 + 236 251 l 5 + 390 251 471 183 510 69 c 4 + 521 37 528 1 528 -38 c 4 + 528 -141 502 -220 460 -288 c 4 + 371 -433 226 -518 48 -576 c 5 + 18 -581 l 5 + 9 -581 4 -578 4 -573 c 5 + 7 -563 9 -562 14 -557 c 5 + 49 -542 84 -527 110 -513 c 6 + 188 -470 l 5 + 284 -413 350 -334 385 -212 c 132 + 394 -179 402 -152 407 -112 c 132 + 410 -90 412 -77 413 -73 c 5 + 406 -4 397 42 390 67 c 4 + 383 92 386 89 374 107 c 4 + 366 119 355 130 343 141 c 4 + 319 162 281 185 225 185 c 4 + 177 185 141 177 112 157 c 4 + 84 138 70 113 70 84 c 4 + 70 76 70 76 70 68 c 5 + 72 63 73 59 74 57 c 5 + 98 79 126 96 158 96 c 4 +585 -118 m 132 + 585 -86 608 -60 642 -60 c 4 + 660 -60 675 -66 682 -78 c 132 + 691 -93 698 -96 698 -118 c 4 + 698 -127 696 -134 693 -139 c 5 + 687 -158 666 -176 642 -176 c 4 + 608 -176 585 -150 585 -118 c 132 +642 177 m 4 + 673 177 698 150 698 119 c 4 + 698 89 673 61 642 61 c 5 + 619 64 l 5 + 600 71 585 96 585 119 c 5 + 588 142 l 5 + 597 162 616 177 642 177 c 4 +254 -752 m 2 + 254 -752 154 -752 150 -752 c 0 + 145 -752 139 -749 139 -743 c 1 + 141 -738 142 -735 150 -735 c 0 + 158 -735 168 -732 168 -732 c 1 + 168 -732 177 -730 185 -714 c 0 + 193 -698 221 -621 221 -621 c 1 + 221 -621 223 -616 223 -612 c 0 + 223 -609 222 -606 217 -606 c 0 + 213 -606 209 -609 205 -614 c 0 + 201 -619 194 -624 185 -624 c 0 + 178 -624 173 -621 173 -616 c 0 + 173 -614 173 -613 175 -611 c 0 + 181 -604 253 -521 258 -516 c 0 + 265 -509 270 -506 274 -506 c 0 + 278 -506 285 -510 290 -514 c 0 + 295 -517 299 -518 306 -518 c 0 + 311 -518 316 -514 319 -514 c 0 + 323 -514 324 -515 324 -518 c 0 + 324 -519 324 -521 324 -522 c 0 + 322 -528 241 -714 240 -722 c 0 + 240 -728 244 -736 253 -736 c 0 + 259 -736 265 -738 265 -743 c 0 + 265 -748 261 -752 254 -752 c 2 +305 -669 m 0xabcc + 307 -669 308 -669 309 -669 c 0 + 322 -669 332 -680 332 -694 c 0 + 332 -699 330 -705 327 -709 c 0 + 322 -715 317 -718 315 -726 c 1 + 315 -728 l 2 + 315 -739 332 -742 341 -742 c 2 + 343 -742 l 2xabc4 + 358 -742 381 -732 401 -677 c 0 + 405 -664 407 -655 407 -646 c 0 + 407 -620 387 -616 375 -616 c 0 + 357 -616 337 -635 329 -640 c 0 + 327 -642 324 -642 321 -642 c 0 + 317 -642 314 -641 314 -641 c 2 + 312 -640 311 -637 311 -634 c 0 + 311 -630 312 -626 312 -624 c 0 + 312 -623 313 -623 313 -622 c 0 + 317 -604 326 -586 332 -568 c 0xabac + 335 -559 344 -541 344 -534 c 1 + 346 -527 350 -515 357 -514 c 1 + 365 -514 392 -514 419 -514 c 0 + 446 -514 474 -514 482 -515 c 0 + 483 -515 483 -516 483 -517 c 0 + 483 -521 478 -529 477 -530 c 0 + 475 -534 471 -537 468 -539 c 0 + 464 -542 460 -545 455 -547 c 0 + 447 -550 439 -552 430 -554 c 0 + 421 -555 412 -557 403 -559 c 0 + 392 -562 381 -562 370 -566 c 0 + 366 -567 361 -568 357 -570 c 0x7ba4 + 352 -573 351 -581 351 -587 c 1 + 350 -589 350 -591 350 -593 c 0 + 350 -595 350 -596 352 -597 c 2 + 353 -598 l 1 + 355 -598 358 -596 361 -596 c 1 + 363 -595 365 -595 367 -595 c 0 + 373 -594 379 -594 384 -594 c 0 + 406 -594 414 -599 425 -606 c 1 + 427 -608 l 1x6bac + 438 -616 443 -627 447 -640 c 0 + 449 -646 450 -654 450 -662 c 0 + 450 -670 449 -678 448 -684 c 0 + 443 -708 423 -726 402 -738 c 0 + 385 -747 363 -755 343 -755 c 0 + 328 -755 313 -751 302 -742 c 0 + 291 -733 283 -715 283 -699 c 0 + 283 -687 288 -676 299 -671 c 0 + 301 -670 303 -670 305 -669 c 0xabcc +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE064 +Encoding: 57444 57444 22 +Width: 698 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +158 96 m 4 + 209 96 231 82 246 47 c 6 + 262 8 l 5 + 262 -9 260 -22 255 -32 c 5 + 252 -43 245 -53 236 -63 c 4 + 219 -81 187 -106 152 -106 c 4 + 97 -106 75 -93 40 -62 c 4 + 16 -41 5 -7 5 38 c 4 + 5 84 19 119 37 150 c 4 + 67 202 108 229 174 243 c 5 + 210 249 l 5 + 236 251 l 5 + 390 251 471 183 510 69 c 4 + 521 37 528 1 528 -38 c 4 + 528 -141 502 -220 460 -288 c 4 + 371 -433 226 -518 48 -576 c 5 + 18 -581 l 5 + 9 -581 4 -578 4 -573 c 5 + 7 -563 9 -562 14 -557 c 5 + 49 -542 84 -527 110 -513 c 6 + 188 -470 l 5 + 284 -413 350 -334 385 -212 c 132 + 394 -179 402 -152 407 -112 c 132 + 410 -90 412 -77 413 -73 c 5 + 406 -4 397 42 390 67 c 4 + 383 92 386 89 374 107 c 4 + 366 119 355 130 343 141 c 4 + 319 162 281 185 225 185 c 4 + 177 185 141 177 112 157 c 4 + 84 138 70 113 70 84 c 4 + 70 76 70 76 70 68 c 5 + 72 63 73 59 74 57 c 5 + 98 79 126 96 158 96 c 4 +585 -118 m 132 + 585 -86 608 -60 642 -60 c 4 + 660 -60 675 -66 682 -78 c 132 + 691 -93 698 -96 698 -118 c 4 + 698 -127 696 -134 693 -139 c 5 + 687 -158 666 -176 642 -176 c 4 + 608 -176 585 -150 585 -118 c 132 +642 177 m 4 + 673 177 698 150 698 119 c 4 + 698 89 673 61 642 61 c 5 + 619 64 l 5 + 600 71 585 96 585 119 c 5 + 588 142 l 5 + 597 162 616 177 642 177 c 4 +232 -572 m 0 + 232 -539 261 -513 303 -513 c 2 + 308 -513 l 2 + 323 -513 392 -523 392 -570 c 0 + 392 -604 371 -611 362 -619 c 0 + 356 -624 354 -629 354 -634 c 0 + 354 -639 355 -644 358 -649 c 0 + 364 -659 366 -670 366 -681 c 0 + 366 -708 350 -733 323 -744 c 0 + 311 -748 296 -750 284 -750 c 0 + 249 -750 195 -727 195 -683 c 0 + 195 -656 219 -628 244 -620 c 0 + 249 -618 250 -617 250 -615 c 0 + 250 -613 249 -612 248 -611 c 0 + 237 -600 232 -586 232 -572 c 0 +358 -567 m 2 + 358 -542 336 -529 312 -529 c 2 + 310 -529 l 1 + 295 -530 282 -537 280 -553 c 1x0520 + 280 -555 l 2 + 280 -567 290 -578 297 -586 c 0 + 306 -595 320 -614 335 -614 c 0 + 352 -614 357 -585 358 -570 c 1 + 358 -567 l 2 +261 -638 m 0x2808 + 243 -638 232 -663 232 -681 c 2 + 232 -688 l 1 + 239 -720 265 -738 283 -738 c 0 + 303 -738 318 -720 318 -704 c 0 + 318 -699 317 -695 315 -691 c 0 + 310 -678 302 -667 291 -658 c 0 + 286 -653 280 -649 275 -644 c 1 + 271 -642 266 -638 261 -638 c 0x2808 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE065 +Encoding: 57445 57445 23 +Width: 698 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +642 177 m 0 + 673 177 698 150 698 119 c 0 + 698 89 673 61 642 61 c 1 + 619 64 l 1 + 600 71 585 96 585 119 c 1 + 588 142 l 1 + 597 162 616 177 642 177 c 0 +585 -118 m 128 + 585 -86 608 -60 642 -60 c 0 + 660 -60 675 -66 682 -78 c 128 + 691 -93 698 -96 698 -118 c 0 + 698 -127 696 -134 693 -139 c 1 + 687 -158 666 -176 642 -176 c 0 + 608 -176 585 -150 585 -118 c 128 +158 96 m 0 + 209 96 231 82 246 47 c 2 + 262 8 l 1 + 262 -9 260 -22 255 -32 c 1 + 252 -43 245 -53 236 -63 c 0 + 219 -81 187 -106 152 -106 c 0 + 97 -106 75 -93 40 -62 c 0 + 16 -41 5 -7 5 38 c 0 + 5 84 19 119 37 150 c 0 + 67 202 108 229 174 243 c 1 + 210 249 l 1 + 236 251 l 1 + 270 251 301 247 328 241 c 1 + 315 250 305 263 302 278 c 0 + 301 283 300 286 300 290 c 0 + 300 318 325 347 351 356 c 0 + 355 357 357 358 357 361 c 0 + 357 363 356 364 355 364 c 0 + 344 377 339 391 339 405 c 0 + 339 429 353 451 379 461 c 1 + 389 466 401 467 413 467 c 2 + 417 467 l 2 + 433 467 505 457 505 407 c 0 + 505 372 483 364 474 357 c 0 + 468 352 466 347 466 341 c 0 + 466 335 466 330 470 325 c 1 + 476 314 479 303 479 291 c 0 + 479 264 461 238 433 226 c 0 + 422 222 406 220 392 220 c 0 + 390 220 389 220 387 220 c 1 + 448 190 486 138 510 69 c 0 + 521 37 528 1 528 -38 c 0 + 528 -141 502 -220 460 -288 c 0 + 371 -433 226 -518 48 -576 c 1 + 18 -581 l 1 + 9 -581 4 -578 4 -573 c 1 + 7 -563 9 -562 14 -557 c 1 + 49 -542 84 -527 110 -513 c 2 + 188 -470 l 1 + 284 -413 350 -334 385 -212 c 0 + 394 -179 402 -152 407 -112 c 0 + 410 -90 412 -77 413 -73 c 1 + 406 -4 397 42 390 67 c 0 + 383 92 386 89 374 107 c 0 + 366 119 355 130 343 141 c 0 + 319 162 281 185 225 185 c 0 + 177 185 141 177 112 157 c 0 + 84 138 70 113 70 84 c 0 + 70 76 70 76 70 68 c 1 + 72 63 73 59 74 57 c 1 + 98 79 126 96 158 96 c 0 +355 329 m 1 + 352 327 349 324 348 321 c 1 + 342 313 338 302 338 291 c 0 + 338 289 338 287 339 284 c 0 + 346 252 373 232 392 232 c 0 + 412 232 429 252 429 268 c 0 + 429 273 427 277 425 282 c 0 + 420 295 411 306 400 316 c 0 + 394 321 389 326 383 330 c 0 + 379 332 374 336 369 336 c 0 + 363 336 358 333 355 329 c 1 +389 425 m 1 + 389 411 399 400 407 391 c 0 + 415 383 423 373 433 366 c 1 + 438 364 443 362 446 362 c 0 + 463 362 468 392 469 410 c 0 + 469 419 466 430 460 436 c 0 + 452 445 437 450 420 450 c 1 + 405 449 391 442 389 425 c 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE066 +Encoding: 57446 57446 24 +Width: 698 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +642 177 m 0 + 673 177 698 150 698 119 c 0 + 698 89 673 61 642 61 c 1 + 619 64 l 1 + 600 71 585 96 585 119 c 1 + 588 142 l 1 + 597 162 616 177 642 177 c 0 +585 -118 m 128 + 585 -86 608 -60 642 -60 c 0 + 660 -60 675 -66 682 -78 c 128 + 691 -93 698 -96 698 -118 c 0 + 698 -127 696 -134 693 -139 c 1 + 687 -158 666 -176 642 -176 c 0 + 608 -176 585 -150 585 -118 c 128 +158 96 m 0 + 209 96 231 82 246 47 c 2 + 262 8 l 1 + 262 -9 260 -22 255 -32 c 1 + 252 -43 245 -53 236 -63 c 0 + 219 -81 187 -106 152 -106 c 4 + 97 -106 75 -93 40 -62 c 0 + 16 -41 5 -7 5 38 c 0 + 5 84 19 119 37 150 c 0 + 65 199 131 231 189 246 c 1 + 197 263 189 232 207 269 c 0 + 215 285 247 366 246 366 c 2 + 246 366 248 371 248 375 c 0 + 248 379 247 382 241 382 c 0 + 231 382 227 363 207 363 c 0 + 201 363 196 366 196 371 c 0 + 196 373 196 374 198 377 c 0 + 204 384 278 470 285 476 c 0 + 292 482 296 485 301 485 c 0 + 311 485 318 474 334 474 c 0 + 340 474 345 478 348 478 c 0 + 352 478 353 477 353 473 c 2 + 353 469 l 1 + 352 462 266 269 265 261 c 0 + 265 255 267 252 270 250 c 1 + 292 248 312 246 331 241 c 1 + 319 251 310 265 310 285 c 0 + 310 298 315 308 326 314 c 1 + 333 316 l 1 + 337 316 l 2 + 351 316 361 304 361 290 c 0 + 361 275 347 272 344 254 c 1 + 344 243 361 240 373 240 c 0 + 388 241 413 250 433 307 c 0 + 438 321 440 331 440 339 c 0 + 440 367 418 371 407 371 c 0 + 380 371 360 344 350 344 c 0 + 339 344 339 348 339 353 c 0 + 339 369 375 476 387 478 c 1 + 452 478 l 2 + 486 478 519 479 519 474 c 0 + 519 452 485 440 464 436 c 2 + 435 430 l 2 + 424 428 413 426 401 423 c 2 + 387 420 l 1 + 382 416 380 401 380 394 c 0 + 380 393 381 391 384 391 c 0 + 392 391 406 394 415 394 c 0 + 439 394 446 382 458 382 c 1 + 461 379 l 1 + 476 368 484 346 484 324 c 0 + 484 264 426 227 372 227 c 1 + 441 198 485 143 510 69 c 0 + 521 37 528 1 528 -38 c 0 + 528 -141 502 -220 460 -288 c 0 + 371 -433 226 -518 48 -576 c 1 + 18 -581 l 1 + 9 -581 4 -578 4 -573 c 1 + 7 -563 9 -562 14 -557 c 1 + 49 -542 84 -527 110 -513 c 2 + 188 -470 l 1 + 284 -413 350 -334 385 -212 c 0 + 394 -179 402 -152 407 -112 c 0 + 410 -90 412 -77 413 -73 c 1 + 406 -4 397 42 390 67 c 0 + 383 92 386 89 374 107 c 0 + 366 119 355 130 343 141 c 0 + 319 162 281 185 225 185 c 0 + 177 185 141 177 112 157 c 0 + 84 138 70 113 70 84 c 0 + 70 76 70 76 70 68 c 1 + 72 63 73 59 74 57 c 1 + 98 79 126 96 158 96 c 0 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE262 +Encoding: 57954 57954 25 +Width: 280 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +136 186 m 5 + 136 355 l 5 + 153 355 l 5 + 153 191 l 5 + 197 205 l 5 + 197 114 l 5 + 153 100 l 5 + 153 -65 l 5 + 197 -53 l 5 + 197 -144 l 5 + 153 -157 l 5 + 153 -312 l 5 + 136 -312 l 5 + 136 -162 l 5 + 60 -184 l 5 + 60 -339 l 5 + 43 -339 l 5 + 43 -190 l 5 + 0 -203 l 5 + 0 -113 l 5 + 43 -99 l 5 + 43 68 l 5 + 0 54 l 5 + 0 146 l 5 + 43 159 l 5 + 43 328 l 5 + 60 328 l 5 + 60 165 l 5 + 136 186 l 5 +60 73 m 5 + 60 -94 l 5 + 136 -72 l 5 + 136 96 l 5 + 60 73 l 5 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE261 +Encoding: 57953 57953 26 +Width: 157 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -188 m 5 + 0 351 l 5 + 18 351 l 5 + 18 160 l 5 + 157 182 l 5 + 157 4 157 -173 157 -351 c 5 + 140 -351 l 5 + 140 -165 l 5 + 0 -188 l 5 +18 -100 m 5 + 140 -83 l 5 + 140 93 l 5 + 18 74 l 5 + 18 -100 l 5 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE260 +Encoding: 57952 57952 27 +Width: 200 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +20 110 m 5 + 52 126 74 137 113 137 c 4 + 139 137 148 134 167 124 c 4 + 180 117 191 104 194 86 c 6 + 198 61 l 5 + 198 33 182 4 153 -28 c 4 + 130 -53 114 -72 88 -96 c 6 + 0 -175 l 5 + 0 469 l 5 + 20 469 l 5 + 20 110 l 5 +90 106 m 5 + 58 106 42 96 20 77 c 5 + 20 -117 l 5 + 51 -86 74 -58 91 -33 c 4 + 112 -1 123 26 123 51 c 4 + 123 60 124 67 124 71 c 4 + 124 85 121 92 113 101 c 5 + 105 104 l 5 + 90 106 l 5 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE264 +Encoding: 57956 57956 28 +Width: 388 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +280 106 m 1 + 248 106 232 96 210 77 c 1 + 210 -117 l 1 + 241 -86 264 -58 281 -33 c 0 + 302 -1 313 26 313 51 c 0 + 314 60 314 67 314 71 c 0 + 314 85 311 92 303 101 c 1 + 295 104 l 1 + 280 106 l 1 +113 137 m 0 + 151 137 178 124 190 96 c 1 + 190 469 l 1 + 210 469 l 1 + 210 110 l 1 + 242 126 264 137 303 137 c 0 + 329 137 338 134 357 124 c 0 + 370 117 381 104 384 86 c 2 + 388 61 l 1 + 388 33 372 4 343 -28 c 0 + 320 -53 304 -72 278 -96 c 2 + 190 -175 l 1 + 190 24 l 1 + 178 -4 144 -39 123 -63 c 0 + 114 -74 102 -85 88 -96 c 2 + 0 -175 l 1 + 0 469 l 1 + 20 469 l 1 + 20 110 l 1 + 52 126 74 137 113 137 c 0 +90 106 m 1 + 58 106 42 96 20 77 c 1 + 20 -117 l 1 + 51 -86 74 -58 91 -33 c 0 + 112 -1 123 26 123 51 c 0 + 124 60 124 67 124 71 c 0 + 124 85 121 92 113 101 c 1 + 105 104 l 1 + 90 106 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE266 +Encoding: 57958 57958 29 +Width: 578 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +280 106 m 1 + 248 106 232 96 210 77 c 1 + 210 -117 l 1 + 241 -86 264 -58 281 -33 c 0 + 302 -1 313 26 313 51 c 0 + 314 60 314 67 314 71 c 0 + 314 85 311 92 303 101 c 1 + 295 104 l 1 + 280 106 l 1 +303 137 m 0 + 341 137 368 124 380 96 c 1 + 380 469 l 1 + 400 469 l 1 + 400 110 l 1 + 432 126 454 137 493 137 c 0 + 519 137 528 134 547 124 c 0 + 560 117 571 104 574 86 c 2 + 578 61 l 1 + 578 33 562 4 533 -28 c 0 + 510 -53 494 -72 468 -96 c 2 + 380 -175 l 1 + 380 24 l 1 + 368 -4 334 -39 313 -63 c 0 + 304 -74 292 -85 278 -96 c 2 + 190 -175 l 1 + 190 24 l 1 + 178 -4 144 -39 123 -63 c 0 + 114 -74 102 -85 88 -96 c 2 + 0 -175 l 1 + 0 469 l 1 + 20 469 l 1 + 20 110 l 1 + 52 126 74 137 113 137 c 0 + 151 137 178 124 190 96 c 1 + 190 469 l 1 + 210 469 l 1 + 210 110 l 1 + 242 126 264 137 303 137 c 0 +470 106 m 1 + 438 106 422 96 400 77 c 1 + 400 -117 l 1 + 431 -86 454 -58 471 -33 c 0 + 492 -1 503 26 503 51 c 0 + 504 60 504 67 504 71 c 0 + 504 85 501 92 493 101 c 1 + 485 104 l 1 + 470 106 l 1 +90 106 m 1 + 58 106 42 96 20 77 c 1 + 20 -117 l 1 + 51 -86 74 -58 91 -33 c 0 + 112 -1 123 26 123 51 c 0 + 124 60 124 67 124 71 c 0 + 124 85 121 92 113 101 c 1 + 105 104 l 1 + 90 106 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE267 +Encoding: 57959 57959 30 +Width: 368 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -188 m 1 + 0 351 l 1 + 18 351 l 1 + 18 160 l 1 + 157 182 l 1 + 157 4 157 -173 157 -351 c 1 + 140 -351 l 1 + 140 -165 l 1 + 0 -188 l 1 +18 -100 m 1 + 140 -83 l 1 + 140 93 l 1 + 18 74 l 1 + 18 -100 l 1 +200 110 m 1 + 232 126 254 137 293 137 c 0 + 319 137 328 134 347 124 c 0 + 360 117 371 104 374 86 c 2 + 378 61 l 1 + 378 33 362 4 333 -28 c 0 + 310 -53 294 -72 268 -96 c 2 + 180 -175 l 1 + 180 469 l 1 + 200 469 l 1 + 200 110 l 1 +270 106 m 1 + 238 106 222 96 200 77 c 1 + 200 -117 l 1 + 231 -86 254 -58 271 -33 c 0 + 292 -1 303 26 303 51 c 0 + 303 60 304 67 304 71 c 0 + 304 85 301 92 293 101 c 1 + 285 104 l 1 + 270 106 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE263 +Encoding: 57955 57955 31 +Width: 258 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 120 m 5 + 74 120 l 5 + 74 66 l 5 + 89 49 l 5 + 168 49 l 5 + 183 65 l 5 + 183 120 l 5 + 257 120 l 5 + 257 48 l 5 + 198 48 l 5 + 173 20 l 5 + 173 -18 l 5 + 198 -50 l 5 + 257 -50 l 5 + 257 -120 l 5 + 182 -120 l 5 + 182 -65 l 5 + 168 -50 l 5 + 88 -50 l 5 + 74 -65 l 5 + 74 -120 l 5 + 0 -120 l 5 + 0 -48 l 5 + 60 -48 l 5 + 86 -18 l 5 + 86 20 l 5 + 58 49 l 5 + 0 49 l 5 + 0 120 l 5 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE265 +Encoding: 57957 57957 32 +Width: 258 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +414 186 m 1 + 414 355 l 1 + 431 355 l 1 + 431 191 l 1 + 475 205 l 1 + 475 114 l 1 + 431 100 l 1 + 431 -65 l 1 + 475 -53 l 1 + 475 -144 l 1 + 431 -157 l 1 + 431 -312 l 1 + 414 -312 l 1 + 414 -162 l 1 + 338 -184 l 1 + 338 -339 l 1 + 321 -339 l 1 + 321 -190 l 1 + 278 -203 l 1 + 278 -113 l 1 + 321 -99 l 1 + 321 68 l 1 + 278 54 l 1 + 278 146 l 1 + 321 159 l 1 + 321 328 l 1 + 338 328 l 1 + 338 165 l 1 + 414 186 l 1 +338 73 m 1 + 338 -94 l 1 + 414 -72 l 1 + 414 96 l 1 + 338 73 l 1 +0 120 m 1 + 74 120 l 1 + 74 66 l 1 + 89 49 l 1 + 168 49 l 1 + 183 65 l 1 + 183 120 l 1 + 257 120 l 1 + 257 48 l 1 + 198 48 l 1 + 173 20 l 1 + 173 -18 l 1 + 198 -50 l 1 + 257 -50 l 1 + 257 -120 l 1 + 182 -120 l 1 + 182 -65 l 1 + 168 -50 l 1 + 88 -50 l 1 + 74 -65 l 1 + 74 -120 l 1 + 0 -120 l 1 + 0 -48 l 1 + 60 -48 l 1 + 86 -18 l 1 + 86 20 l 1 + 58 49 l 1 + 0 49 l 1 + 0 120 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE268 +Encoding: 57960 57960 33 +Width: 368 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -188 m 1 + 0 351 l 1 + 18 351 l 1 + 18 160 l 1 + 157 182 l 1 + 157 4 157 -173 157 -351 c 1 + 140 -351 l 1 + 140 -165 l 1 + 0 -188 l 1 +18 -100 m 1 + 140 -83 l 1 + 140 93 l 1 + 18 74 l 1 + 18 -100 l 1 +316 186 m 1 + 316 355 l 1 + 333 355 l 1 + 333 191 l 1 + 377 205 l 1 + 377 114 l 1 + 333 100 l 1 + 333 -65 l 1 + 377 -53 l 1 + 377 -144 l 1 + 333 -157 l 1 + 333 -312 l 1 + 316 -312 l 1 + 316 -162 l 1 + 240 -184 l 1 + 240 -339 l 1 + 223 -339 l 1 + 223 -190 l 1 + 180 -203 l 1 + 180 -113 l 1 + 223 -99 l 1 + 223 68 l 1 + 180 54 l 1 + 180 146 l 1 + 223 159 l 1 + 223 328 l 1 + 240 328 l 1 + 240 165 l 1 + 316 186 l 1 +240 73 m 1 + 240 -94 l 1 + 316 -72 l 1 + 316 96 l 1 + 240 73 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE269 +Encoding: 57961 57961 34 +Width: 414 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +136 186 m 1 + 136 355 l 1 + 153 355 l 1 + 153 191 l 1 + 197 205 l 1 + 197 114 l 1 + 153 100 l 1 + 153 -65 l 1 + 197 -53 l 1 + 197 -144 l 1 + 153 -157 l 1 + 153 -312 l 1 + 136 -312 l 1 + 136 -162 l 1 + 60 -184 l 1 + 60 -339 l 1 + 43 -339 l 1 + 43 -190 l 1 + 0 -203 l 1 + 0 -113 l 1 + 43 -99 l 1 + 43 68 l 1 + 0 54 l 1 + 0 146 l 1 + 43 159 l 1 + 43 328 l 1 + 60 328 l 1 + 60 165 l 1 + 136 186 l 1 +60 73 m 1 + 60 -94 l 1 + 136 -72 l 1 + 136 96 l 1 + 60 73 l 1 +351 186 m 1 + 351 355 l 1 + 368 355 l 1 + 368 191 l 1 + 412 205 l 1 + 412 114 l 1 + 368 100 l 1 + 368 -65 l 1 + 412 -53 l 1 + 412 -144 l 1 + 368 -157 l 1 + 368 -312 l 1 + 351 -312 l 1 + 351 -162 l 1 + 275 -184 l 1 + 275 -339 l 1 + 258 -339 l 1 + 258 -190 l 1 + 215 -203 l 1 + 215 -113 l 1 + 258 -99 l 1 + 258 68 l 1 + 215 54 l 1 + 215 146 l 1 + 258 159 l 1 + 258 328 l 1 + 275 328 l 1 + 275 165 l 1 + 351 186 l 1 +275 73 m 1 + 275 -94 l 1 + 351 -72 l 1 + 351 96 l 1 + 275 73 l 1 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE26A +Encoding: 57962 57962 35 +Width: 163 +Flags: HW +LayerCount: 2 +Fore +SplineSet +163 -234 m 6xa0 + 163 -247 l 6 + 163 -248 162 -251 162 -251 c 5 + 160 -251 159 -251 159 -250 c 4 + 48 -189 0 -101 0 0 c 4 + 0 102 50 189 159 249 c 5 + 159 250 l 5 + 162 250 163 248 163 246 c 4 + 163 235 l 5 + 163 235 163 230 160 227 c 4x60 + 93 178 59 111 59 0 c 4 + 59 -111 96 -177 159 -228 c 5 + 162 -229 163 -231 163 -234 c 6xa0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE26B +Encoding: 57963 57963 36 +Width: 163 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -247 m 6xa0 + 0 -234 l 6 + 0 -231 1 -229 4 -228 c 5 + 67 -177 104 -111 104 0 c 4 + 104 111 70 178 3 227 c 4 + 0 230 0 235 0 235 c 5 + 0 235 0 242 0 246 c 4 + 0 248 1 250 4 250 c 5 + 4 249 l 5x60 + 113 189 163 102 163 0 c 4 + 163 -101 115 -189 4 -250 c 4 + 4 -251 3 -251 1 -251 c 5 + 1 -251 0 -248 0 -247 c 6xa0 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE4C0 +Encoding: 58560 58560 37 +Width: 605 +Flags: HW +LayerCount: 2 +Fore +SplineSet +605 21 m 28,0,0 +0 0 m 21,0,0 + 0 3 3 17 4 21 c 4,0,0 + 65 327 272 320 304 320 c 4,0,0 + 333 320 542 327 604 21 c 4,0,0 + 605 17 605 3 605 0 c 5,0,0 + 573 0 l 5,0,0 + 572 1 569 22 568 25 c 4,0,0 + 558 63 516 227 303 227 c 4,0,0 + 95 227 51 68 39 27 c 4,0,0 + 38 23 33 1 33 0 c 5,0,0 + 0 0 l 21,0,0 +358 52 m 4,0,0 + 358 22 333 -3 303 -3 c 4,0,0 + 274 -3 249 22 249 52 c 4,0,0 + 249 81 274 106 303 106 c 4,0,0 + 333 106 358 81 358 52 c 4,0,0 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE4C1 +Encoding: 58561 58561 38 +Width: 605 +Flags: HW +LayerCount: 2 +Fore +SplineSet +605 -21 m 28,0,0 +0 0 m 21,0,0 + 0 -3 3 -17 4 -21 c 4,0,0 + 65 -327 272 -320 304 -320 c 4,0,0 + 333 -320 542 -327 604 -21 c 4,0,0 + 605 -17 605 -3 605 0 c 5,0,0 + 573 0 l 5,0,0 + 572 -1 569 -22 568 -25 c 4,0,0 + 558 -63 516 -227 303 -227 c 4,0,0 + 95 -227 51 -68 39 -27 c 4,0,0 + 38 -23 33 -1 33 0 c 5,0,0 + 0 0 l 21,0,0 +358 -52 m 4,0,0 + 358 -22 333 3 303 3 c 4,0,0 + 274 3 249 -22 249 -52 c 4,0,0 + 249 -81 274 -106 303 -106 c 4,0,0 + 333 -106 358 -81 358 -52 c 4,0,0 +EndSplineSet +Validated: 41 +EndChar + +StartChar: uniE0FA +Encoding: 57594 57594 39 +Width: 405 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +198 -133 m 0 + 146.667 -133 102.333 -122.333 65 -101 c 0 + 21.6667 -77 0 -43.3333 0 0 c 128 + -3.8147e-06 43.3333 21.3333 77.3333 64 102 c 1 + 101.333 122.667 146 133 198 133 c 4 + 250.667 133 296.667 122.333 336 101 c 1 + 382 77 405 43.3333 405 0 c 0 + 405 -46 382 -80.6667 336 -104 c 0 + 299.333 -123.333 253.333 -133 198 -133 c 0 +EndSplineSet +Validated: 33 +EndChar + +StartChar: uniE240 +Encoding: 57920 57920 40 +Width: 274 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +206 -548 m 4 + 230 -514 255 -454 255 -396 c 4 + 255 -291 175 -223 87 -196 c 4 + 69 -191 40 -185 0 -178 c 5 + 0 -2 l 5 + 16 -15 34 -30 53 -47 c 4 + 57 -50 91 -82 154 -141 c 4 + 216 -199 276 -278 276 -382 c 4 + 276 -419 268 -456 253 -493 c 4 + 239 -528 231 -546 209 -572 c 5 + 203 -577 199 -579 196 -579 c 4 + 193 -579 191 -577 191 -574 c 5 + 195 -564 l 134 + 196 -561 200 -555 206 -548 c 4 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE241 +Encoding: 57921 57921 41 +Width: 274 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +253 493 m 4 + 269 456 276 419 276 382 c 4 + 276 337 264 293 241 250 c 4 + 221 213 192 176 154 141 c 4 + 106 95 50 41 0 2 c 5 + 0 178 l 5 + 40 185 69 191 87 196 c 4 + 175 223 255 291 255 396 c 4 + 255 454 231 514 206 548 c 4 + 201 555 194 564 191 574 c 5 + 191 577 193 579 196 579 c 4 + 199 579 203 577 209 572 c 5 + 228 549 237 529 253 493 c 4 +EndSplineSet +Validated: 1 +EndChar + +StartChar: uniE08B +Encoding: 57483 57483 42 +Width: 2048 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +188 200 m 5 + 146 178 125 131 125 59 c 6 + 125 -60 l 6 + 125 -99 132 -130 144 -154 c 4 + 156 -178 170 -194 188 -202 c 5 + 188 200 l 5 +0 -0 m 4 + 0 127 80 220 186 246 c 5 + 186 318 l 5 + 218 318 l 5 + 212 246 l 5 + 245 246 283 246 313 235 c 132 + 367 215 415 170 415 100 c 4 + 415 84 411 70 402 57 c 4 + 393 44 382 33 370 28 c 6 + 350 20 l 5 + 327 17 l 5 + 305 19 286 25 272 38 c 4 + 258 51 251 69 246 89 c 5 + 246 127 291 169 325 169 c 4 + 337 169 344 172 344 179 c 4 + 344 185 338 191 329 197 c 4 + 310 210 282 221 250 221 c 4 + 240 221 230 220 218 216 c 5 + 218 -215 l 5 + 233 -218 230 -219 248 -219 c 4 + 305 -219 348 -168 369 -126 c 5 + 386 -87 l 5 + 389 -74 391 -62 391 -52 c 5 + 417 -52 l 5 + 411 -122 389 -173 351 -204 c 132 + 313 -235 269 -251 218 -251 c 5 + 218 -319 l 5 + 188 -319 l 5 + 188 -247 l 5 + 131 -237 66 -193 35 -138 c 132 + 28 -126 22 -112 16 -96 c 4 + 5 -67 0 -35 0 -0 c 4 +EndSplineSet +EndChar + +StartChar: uniE08A +Encoding: 57482 57482 43 +Width: 422 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +340 179 m 5 + 331 203 284 220 251 220 c 4 + 205 220 170 192 151 162 c 4 + 134 134 126 84 126 12 c 4 + 126 -53 128 -99 134 -123 c 4 + 142 -154 152 -172 174 -190 c 4 + 194 -207 217 -215 244 -215 c 4 + 298 -215 336 -179 359 -140 c 132 + 373 -115 382 -86 387 -52 c 5 + 414 -52 l 5 + 414 -115 390 -157 356 -193 c 4 + 321 -231 274 -249 216 -249 c 4 + 171 -249 133 -236 101 -210 c 4 + 44 -165 0 -80 0 16 c 4 + 0 75 33 143 68 179 c 132 + 104 216 165 251 228 251 c 4 + 264 251 321 230 349 211 c 132 + 360 203 372 194 382 181 c 4 + 401 158 409 133 409 105 c 4 + 409 54 374 17 323 17 c 4 + 280 17 247 44 247 85 c 4 + 247 111 254 120 268 136 c 4 + 283 153 300 163 326 168 c 4 + 333 170 340 175 340 179 c 5 +EndSplineSet +EndChar + +StartChar: uniE4E5 +Encoding: 58597 58597 44 +Width: 324 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +107 292 m 4 + 94 316 77 341 55 363 c 132 + 54 364 55 365 55 366 c 6 + 53 368 l 5 + 56 371 57 372 59 372 c 4 + 71 372 85 365 99 352 c 132 + 113 339 143 312 188 271 c 4 + 214 247 216 242 234 224 c 132 + 238 220 242 215 244 210 c 5 + 250 202 252 194 252 183 c 4 + 252 164 240 143 216 122 c 4 + 188 99 167 84 155 49 c 132 + 151 38 148 22 145 -1 c 5 + 158 -44 179 -84 204 -122 c 4 + 235 -169 263 -201 305 -251 c 5 + 297 -251 279 -244 251 -231 c 6 + 189 -202 l 5 + 168 -196 l 5 + 145 -195 l 5 + 120 -195 100 -205 85 -225 c 5 + 81 -239 l 5 + 80 -251 l 5 + 80 -284 100 -307 119 -329 c 132 + 127 -338 136 -347 145 -355 c 4 + 162 -370 172 -379 173 -385 c 5 + 170 -388 l 5 + 159 -383 151 -378 145 -373 c 5 + 136 -370 108 -352 100 -347 c 4 + 76 -333 55 -315 37 -296 c 4 + 18 -275 0 -252 -0 -225 c 4 + 0 -162 27 -130 80 -130 c 4 + 121 -130 166 -148 216 -182 c 5 + 197 -156 179 -134 161 -116 c 4 + 138 -93 113 -72 88 -51 c 4 + 60 -28 41 -11 30 2 c 132 + 19 15 13 28 12 41 c 5 + 87 105 125 166 125 224 c 4 + 125 251 118 272 107 292 c 4 +EndSplineSet +EndChar + +StartChar: uniE4E6 +Encoding: 58598 58598 45 +Width: 290 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 123 m 5 + 7 157 33 179 69 183 c 5 + 98 180 112 174 122 154 c 132 + 126 146 129 139 132 132 c 5 + 132 111 131 107 121 97 c 5 + 116 89 103 83 81 77 c 5 + 93 74 l 5 + 108 73 l 5 + 152 73 205 99 230 129 c 132 + 240 140 248 155 254 171 c 5 + 261 172 269 173 276 174 c 5 + 136 -250 l 5 + 100 -250 l 5 + 211 80 l 5 + 201 74 184 68 158 64 c 6 + 106 56 l 5 + 96 56 l 5 + 76 57 l 6 + 75 57 68 60 55 63 c 4 + 18 72 0 91 0 123 c 5 +EndSplineSet +EndChar + +StartChar: uniE4E7 +Encoding: 58599 58599 46 +Width: 376 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +133 -111 m 5 + 117 -73 112 -68 69 -60 c 5 + 32 -64 9 -85 1 -120 c 5 + 1 -152 19 -172 56 -178 c 5 + 64 -184 78 -188 99 -188 c 4 + 130 -188 161 -181 181 -168 c 5 + 73 -492 l 5 + 110 -492 l 5 + 182 -272 253 -53 325 167 c 5 + 321 167 l 5 + 311 165 l 5 + 304 164 l 5 + 289 129 277 112 245 93 c 132 + 219 78 189 66 157 64 c 4 + 146 64 137 66 131 70 c 5 + 160 73 187 95 182 126 c 5 + 167 161 163 168 118 174 c 5 + 80 170 58 151 50 116 c 5 + 50 84 68 64 105 57 c 5 + 112 52 127 49 150 49 c 4 + 198 49 226 56 262 74 c 5 + 196 -123 l 5 + 175 -146 146 -170 106 -170 c 4 + 99 -170 91 -169 81 -166 c 5 + 112 -161 133 -144 133 -111 c 5 +EndSplineSet +EndChar + +StartChar: uniE4E8 +Encoding: 58600 58600 47 +Width: 466 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +148 179 m 4 + 111 179 88 155 80 121 c 5 + 80 89 98 69 134 60 c 5 + 146 54 162 51 180 51 c 4 + 213 51 239 60 261 72 c 5 + 200 -115 l 6 + 197 -121 188 -129 170 -141 c 4 + 148 -156 127 -163 109 -163 c 4 + 99 -163 90 -162 84 -159 c 5 + 108 -153 124 -144 131 -133 c 4 + 134 -128 135 -118 135 -104 c 5 + 128 -84 120 -70 110 -64 c 4 + 105 -61 92 -58 72 -54 c 5 + 35 -58 12 -77 4 -112 c 5 + 4 -150 24 -165 59 -173 c 5 + 71 -179 89 -182 111 -182 c 4 + 141 -182 165 -176 182 -165 c 5 + 200 -115 l 5 + 77 -485 l 5 + 114 -485 l 5 + 402 404 l 5 + 398 405 l 5 + 380 403 l 5 + 368 354 326 326 279 311 c 132 + 263 306 248 303 234 303 c 4 + 223 303 215 305 210 309 c 5 + 244 317 261 327 261 364 c 5 + 253 392 233 413 200 413 c 4 + 161 413 137 387 128 354 c 5 + 128 321 147 302 184 295 c 5 + 190 292 197 290 207 289 c 134 + 235 287 l 5 + 250 287 l 134 + 256 287 267 291 285 295 c 4 + 307 300 328 301 340 312 c 5 + 274 114 l 5 + 257 94 221 69 186 69 c 4 + 178 69 170 71 162 74 c 5 + 185 80 197 87 201 92 c 4 + 207 101 211 111 211 122 c 4 + 211 155 182 179 148 179 c 4 +EndSplineSet +EndChar + +StartChar: uniE4E9 +Encoding: 58601 58601 48 +Width: 553 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +191 -247 m 5 + 252 -63 l 5 + 191 -247 l 5 +273 652 m 4 + 240 652 207 627 207 594 c 4 + 207 562 225 542 261 534 c 5 + 272 527 288 526 306 526 c 4 + 337 526 399 540 418 550 c 5 + 356 359 l 5 + 332 334 306 309 265 309 c 4 + 257 309 250 310 242 312 c 5 + 275 323 290 330 290 367 c 5 + 277 405 271 412 226 417 c 5 + 190 413 167 394 157 359 c 5 + 157 325 176 305 213 298 c 5 + 222 294 236 291 254 291 c 4 + 282 291 310 297 338 309 c 5 + 277 122 l 5 + 253 98 227 78 188 76 c 4 + 179 76 171 76 163 79 c 5 + 186 87 202 95 208 104 c 4 + 212 109 213 119 213 134 c 5 + 201 171 191 177 150 185 c 5 + 111 180 82 160 82 125 c 4 + 82 94 101 76 135 67 c 4 + 150 63 163 58 184 58 c 4 + 219 58 236 63 262 77 c 5 + 199 -112 l 5 + 169 -143 139 -158 109 -158 c 4 + 102 -158 94 -156 86 -153 c 5 + 121 -142 137 -136 137 -97 c 5 + 124 -61 114 -56 73 -48 c 5 + 34 -52 5 -72 5 -109 c 4 + 5 -143 30 -161 60 -167 c 5 + 69 -172 83 -174 103 -174 c 4 + 140 -174 160 -169 187 -155 c 5 + 149 -261 115 -371 79 -479 c 5 + 113 -479 l 5 + 160 -340 206 -202 252 -63 c 4 + 329 173 405 410 483 645 c 5 + 476 646 l 5 + 469 642 l 5 + 463 642 l 5 + 449 610 428 585 400 569 c 132 + 372 553 343 544 315 543 c 5 + 301 544 l 5 + 299 545 297 546 295 546 c 132 + 293 546 291 547 288 548 c 5 + 325 556 337 566 338 605 c 5 + 329 637 313 652 273 652 c 4 +EndSplineSet +EndChar + +StartChar: uniE4EA +Encoding: 58602 58602 49 +Width: 663 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +379 567 m 5 + 408 572 431 589 431 621 c 4 + 431 657 400 674 365 677 c 5 + 326 671 302 650 294 614 c 5 + 294 582 313 562 350 553 c 5 + 364 546 372 546 394 546 c 4 + 431 546 487 559 513 570 c 5 + 448 372 l 5 + 424 345 397 320 356 320 c 4 + 347 320 338 321 327 325 c 5 + 365 333 381 342 381 382 c 5 + 368 418 355 427 315 435 c 5 + 276 428 252 407 244 373 c 5 + 244 341 263 320 301 311 c 5 + 319 304 l 6 + 324 303 336 303 352 303 c 4 + 391 303 409 307 431 323 c 5 + 367 129 l 5 + 350 107 310 80 273 79 c 4 + 265 79 256 81 248 84 c 5 + 284 91 301 104 301 142 c 5 + 288 180 279 185 236 193 c 5 + 194 188 176 168 165 132 c 5 + 165 100 184 79 222 70 c 5 + 231 66 258 63 271 62 c 4 + 308 62 327 67 350 83 c 5 + 288 -114 l 5 + 261 -140 235 -160 195 -162 c 4 + 186 -162 176 -158 169 -156 c 5 + 204 -147 222 -138 222 -99 c 5 + 207 -61 202 -52 156 -47 c 5 + 118 -52 96 -75 88 -110 c 5 + 88 -142 106 -162 142 -170 c 5 + 155 -177 171 -179 194 -179 c 4 + 226 -179 251 -171 272 -157 c 5 + 207 -353 l 5 + 183 -379 156 -399 116 -401 c 4 + 106 -401 98 -401 91 -398 c 5 + 127 -386 142 -380 144 -341 c 5 + 134 -303 118 -294 77 -288 c 5 + 38 -294 15 -315 7 -350 c 5 + 7 -383 26 -404 65 -412 c 5 + 82 -418 l 6 + 84 -419 90 -418 100 -418 c 4 + 134 -418 171 -412 193 -399 c 5 + 156 -510 120 -622 84 -734 c 5 + 119 -734 l 5 + 245 -350 372 34 497 419 c 5 + 579 666 l 5 + 573 666 l 5 + 564 664 l 5 + 556 664 l 5 + 547 630 523 606 495 590 c 4 + 463 572 434 562 406 562 c 4 + 394 562 392 564 379 567 c 5 +EndSplineSet +EndChar + +StartChar: uniE880 +Encoding: 59520 59520 50 +Width: 243 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +166 326 m 4 + 213 326 243 283 243 236 c 4 + 243 124 175 0 79 0 c 4 + 29 0 0 43 0 93 c 4 + 0 145 14 195 43 242 c 4 + 71 288 104 326 166 326 c 4 +191 268 m 4 + 191 289 181 302 166 307 c 5 + 133 307 105 271 81 200 c 4 + 62 143 52 96 52 57 c 5 + 54 43 l 5 + 57 38 57 35 61 31 c 4 + 66 24 72 19 81 19 c 4 + 111 19 143 53 163 126 c 6 + 184 204 l 5 + 189 225 191 247 191 268 c 4 +EndSplineSet +EndChar + +StartChar: uniE881 +Encoding: 59521 59521 51 +Width: 207 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +207 311 m 5 + 122 36 l 5 + 118 30 129 25 135 23 c 5 + 153 21 l 5 + 164 21 l 5 + 158 0 l 5 + 0 0 l 5 + 6 21 l 5 + 21 21 l 6 + 28 21 35 23 42 26 c 5 + 51 27 58 34 62 46 c 6 + 117 222 l 5 + 46 166 l 5 + 36 176 l 5 + 145 311 l 5 + 207 311 l 5 +EndSplineSet +EndChar + +StartChar: uniE882 +Encoding: 59522 59522 52 +Width: 260 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +166 311 m 4 + 226 311 260 290 260 231 c 4 + 260 204 248 180 220 167 c 6 + 150 135 l 5 + 113 125 81 105 54 75 c 5 + 75 75 l 5 + 101 73 l 5 + 113 67 l 5 + 127 61 141 56 155 50 c 4 + 161 47 168 46 176 46 c 5 + 191 50 l 5 + 202 58 l 5 + 207 63 213 71 221 84 c 5 + 238 75 l 5 + 222 47 l 6 + 220 43 206 19 202 16 c 5 + 183 -5 164 -15 145 -15 c 6 + 135 -15 l 5 + 122 -9 110 -3 99 5 c 6 + 84 16 l 5 + 72 23 61 26 52 26 c 5 + 42 23 33 18 28 9 c 6 + 23 0 l 5 + 0 0 l 5 + 0 27 6 51 20 72 c 4 + 27 82 34 88 39 93 c 6 + 67 118 l 5 + 87 129 107 140 126 151 c 5 + 145 160 l 6 + 161 167 174 178 184 190 c 4 + 196 205 203 220 203 235 c 5 + 204 247 l 5 + 204 260 200 271 192 278 c 5 + 186 287 177 292 164 292 c 4 + 135 292 118 277 112 248 c 5 + 115 236 l 5 + 117 220 l 5 + 117 200 109 191 92 191 c 4 + 78 191 66 204 66 219 c 4 + 66 267 118 311 166 311 c 4 +EndSplineSet +EndChar + +StartChar: uniE883 +Encoding: 59523 59523 53 +Width: 255 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +161 326 m 4 + 213 326 255 309 255 258 c 4 + 255 208 215 182 173 164 c 5 + 199 143 212 122 212 100 c 4 + 212 48 156 0 94 0 c 6 + 82 0 l 6 + 42 0 0 23 0 56 c 4 + 0 86 12 105 37 105 c 4 + 54 105 68 89 71 74 c 5 + 71 69 67 62 60 53 c 5 + 53 48 47 43 47 32 c 5 + 58 23 l 5 + 75 19 l 5 + 96 19 115 31 131 56 c 4 + 144 77 150 101 150 126 c 5 + 141 156 122 161 84 161 c 5 + 90 184 l 5 + 124 184 150 188 167 197 c 4 + 187 208 197 232 197 267 c 4 + 197 295 185 305 158 307 c 5 + 138 304 l 5 + 130 301 126 295 126 288 c 5 + 128 281 130 277 131 274 c 6 + 135 263 l 5 + 138 253 l 5 + 135 241 l 5 + 130 235 124 230 115 228 c 4 + 97 224 79 238 79 255 c 4 + 79 294 122 326 161 326 c 4 +EndSplineSet +EndChar + +StartChar: uniE884 +Encoding: 59524 59524 54 +Width: 259 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +259 110 m 5 + 253 89 l 5 + 194 89 l 5 + 178 37 l 6 + 175 31 178 26 187 23 c 5 + 221 21 l 5 + 215 0 l 5 + 60 0 l 5 + 66 21 l 5 + 84 22 l 5 + 99 26 l 6 + 108 29 115 37 119 49 c 6 + 132 89 l 5 + 0 89 l 5 + 5 110 l 5 + 17 120 31 132 44 149 c 6 + 77 192 l 6 + 90 210 104 233 117 260 c 4 + 124 277 131 294 138 311 c 5 + 235 311 l 5 + 199 262 l 6 + 186 246 166 228 150 213 c 4 + 114 178 74 146 35 113 c 5 + 143 110 l 5 + 163 182 l 5 + 243 259 l 5 + 248 259 l 5 + 204 110 l 5 + 259 110 l 5 +EndSplineSet +EndChar + +StartChar: uniE885 +Encoding: 59525 59525 55 +Width: 240 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +84 0 m 4 + 35 0 0 18 0 66 c 5 + 1 80 l 5 + 3 85 5 89 8 94 c 5 + 15 101 24 105 35 108 c 5 + 42 108 48 105 54 99 c 5 + 58 90 l 5 + 60 79 l 5 + 56 66 l 5 + 53 61 53 60 48 55 c 5 + 41 39 l 5 + 41 31 44 26 51 23 c 6 + 64 19 l 5 + 79 19 l 6 + 101 19 121 34 138 64 c 4 + 153 91 161 116 161 139 c 5 + 158 152 l 6 + 156 160 145 169 137 172 c 6 + 122 176 l 5 + 105 175 l 5 + 89 172 l 5 + 72 162 l 5 + 49 144 l 5 + 28 144 l 5 + 90 326 l 5 + 99 323 115 320 125 317 c 5 + 158 314 l 5 + 168 314 l 5 + 191 317 l 5 + 240 326 l 5 + 221 299 187 268 151 268 c 6 + 141 268 l 5 + 119 270 l 5 + 110 273 102 277 93 281 c 5 + 57 173 l 5 + 75 185 l 5 + 95 194 l 5 + 117 199 l 5 + 143 202 l 6 + 152 202 162 201 173 197 c 4 + 187 192 187 191 197 180 c 4 + 211 165 219 147 219 122 c 4 + 219 90 206 60 178 35 c 4 + 150 11 118 0 84 0 c 4 +EndSplineSet +EndChar + +StartChar: uniE886 +Encoding: 59526 59526 56 +Width: 214 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +154 326 m 4 + 189 326 211 310 214 277 c 4 + 214 270 213 264 212 261 c 6 + 204 247 l 6 + 200 240 191 235 176 232 c 5 + 163 233 l 5 + 151 240 l 5 + 147 244 144 251 145 260 c 6 + 146 271 l 5 + 154 281 l 5 + 171 297 l 5 + 169 304 162 307 151 307 c 4 + 121 307 98 282 82 233 c 5 + 73 202 l 5 + 67 166 l 5 + 92 187 109 200 150 200 c 4 + 178 200 206 171 206 139 c 4 + 206 74 161 0 88 0 c 4 + 19 0 0 38 0 108 c 6 + 0 126 l 134 + 0 132 1 139 3 146 c 5 + 3 167 5 166 12 185 c 4 + 29 235 57 280 95 305 c 4 + 115 318 134 326 154 326 c 4 +58 58 m 4 + 58 34 63 19 85 19 c 4 + 103 19 120 34 133 66 c 4 + 143 91 149 108 149 138 c 5 + 146 148 l 5 + 140 160 l 5 + 134 167 126 172 114 172 c 4 + 103 172 90 161 77 139 c 5 + 63 99 l 5 + 60 84 58 71 58 58 c 4 +EndSplineSet +EndChar + +StartChar: uniE887 +Encoding: 59527 59527 57 +Width: 243 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +243 311 m 5 + 240 286 233 264 225 244 c 4 + 216 221 197 186 168 139 c 5 + 151 104 l 5 + 138 69 l 5 + 133 50 128 24 128 0 c 5 + 28 0 l 5 + 30 15 38 33 52 54 c 4 + 71 84 109 130 138 159 c 4 + 168 190 191 221 208 263 c 5 + 206 265 l 5 + 190 249 175 239 163 233 c 4 + 156 230 151 228 140 228 c 6 + 132 228 l 5 + 105 244 l 6 + 96 249 86 252 75 252 c 4 + 70 252 63 251 58 246 c 6 + 42 232 l 5 + 35 221 28 207 21 190 c 5 + 0 190 l 5 + 38 311 l 5 + 58 311 l 5 + 53 302 50 295 50 290 c 4 + 50 286 51 283 52 282 c 6 + 61 276 l 5 + 85 296 l 6 + 95 304 109 311 125 311 c 4 + 136 311 154 299 158 290 c 5 + 169 281 180 275 191 276 c 6 + 204 277 l 5 + 213 284 l 6 + 217 288 221 303 224 311 c 5 + 243 311 l 5 +EndSplineSet +EndChar + +StartChar: uniE888 +Encoding: 59528 59528 58 +Width: 274 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +61 247 m 5 + 61 298 118 326 169 326 c 4 + 202 326 221 314 241 299 c 4 + 252 290 260 279 265 268 c 4 + 270 256 274 244 274 231 c 4 + 274 220 270 210 261 199 c 132 + 252 188 234 176 205 162 c 5 + 219 142 l 5 + 229 126 l 6 + 233 118 235 112 236 108 c 6 + 239 89 l 5 + 239 27 181 0 115 0 c 4 + 57 0 0 33 0 87 c 4 + 0 135 48 159 89 175 c 5 + 79 189 74 193 68 210 c 6 + 62 228 l 5 + 61 247 l 5 +192 174 m 5 + 219 190 232 213 236 247 c 4 + 236 254 234 260 232 266 c 4 + 229 273 225 279 220 285 c 4 + 208 299 194 307 176 307 c 4 + 149 307 126 294 126 270 c 4 + 126 249 137 226 160 204 c 6 + 192 174 l 5 +175 62 m 5 + 175 79 166 88 156 104 c 4 + 155 105 153 108 149 112 c 132 + 133 128 117 145 101 162 c 5 + 76 145 l 5 + 58 129 l 5 + 46 108 l 5 + 43 101 42 91 42 80 c 4 + 42 63 50 48 65 35 c 5 + 89 23 l 6 + 96 20 105 19 115 19 c 4 + 136 19 150 24 161 31 c 4 + 170 37 176 45 176 56 c 5 + 175 62 l 5 +EndSplineSet +EndChar + +StartChar: uniE889 +Encoding: 59529 59529 59 +Width: 225 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +131 326 m 4 + 192 326 225 281 225 215 c 4 + 225 190 221 168 214 146 c 4 + 207 124 196 102 182 80 c 4 + 150 32 112 -1 62 -1 c 4 + 30 -1 2 24 0 59 c 5 + 0 67 l 5 + 4 80 13 89 27 89 c 4 + 34 89 40 86 45 81 c 5 + 48 80 51 73 53 62 c 5 + 50 47 39 19 61 19 c 4 + 81 19 101 37 122 73 c 5 + 136 108 l 5 + 141 117 148 142 151 152 c 5 + 127 139 l 5 + 114 131 l 5 + 101 126 93 123 77 123 c 4 + 34 123 8 152 8 195 c 4 + 8 228 19 258 40 285 c 132 + 61 312 92 326 131 326 c 4 +167 264 m 4 + 167 286 158 302 140 307 c 5 + 119 307 102 295 88 271 c 132 + 74 247 67 223 66 200 c 4 + 66 171 72 157 97 152 c 4 + 123 147 151 190 161 224 c 132 + 164 236 166 249 167 264 c 4 +EndSplineSet +EndChar + +StartChar: uniE566 +Encoding: 58726 58726 60 +Width: 240 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +18 208 m 4 + 18 181 35 161 63 161 c 5 + 66 159 l 5 + 79 163 l 5 + 102 172 l 5 + 116 227 l 5 + 99 242 81 249 61 249 c 4 + 35 249 18 232 18 208 c 4 +432 225 m 4 + 432 204 421 189 401 188 c 4 + 386 188 381 198 378 213 c 5 + 381 227 l 5 + 383 238 l 5 + 384 247 l 5 + 380 251 l 5 + 379 250 378 250 377 250 c 4 + 354 237 341 226 330 202 c 6 + 318 175 l 5 + 300 125 287 70 271 18 c 5 + 211 18 l 5 + 269 232 l 5 + 269 239 266 237 264 241 c 5 + 257 241 239 233 213 213 c 6 + 170 180 l 5 + 175 186 l 5 + 196 151 207 118 207 88 c 4 + 207 76 206 67 203 60 c 134 + 197 45 l 134 + 196 42 192 35 185 26 c 4 + 171 8 155 0 136 0 c 4 + 106 0 69 18 69 52 c 4 + 70 53 70 58 72 67 c 6 + 92 151 l 5 + 83 146 71 143 56 143 c 4 + 35 143 27 150 16 162 c 4 + 6 174 0 189 0 209 c 4 + 0 232 6 242 17 254 c 4 + 28 266 42 272 63 272 c 4 + 82 272 102 264 123 247 c 5 + 157 364 l 5 + 220 364 l 5 + 174 206 l 5 + 212 237 l 5 + 244 257 l 5 + 265 267 279 270 306 272 c 4 + 322 272 330 265 330 251 c 5 + 329 241 l 5 + 327 233 325 225 323 217 c 5 + 344 254 367 272 393 272 c 4 + 416 272 432 249 432 225 c 4 +162 167 m 5 + 126 52 l 5 + 125 42 l 6 + 125 32 130 26 141 23 c 5 + 173 41 189 66 189 98 c 4 + 189 118 180 141 162 167 c 5 +EndSplineSet +EndChar + +StartChar: uniE56C +Encoding: 58732 58732 61 +Width: 605 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 21 m 1 + 0 80 l 1 + 129 230 l 1 + 146 240 l 1 + 153 240 157 238 158 234 c 1 + 264 141 l 1 + 281 131 l 1 + 293 137 l 1 + 373 230 l 1 + 391 240 l 1 + 396 240 400 238 403 234 c 1 + 508 141 l 1 + 517 134 l 1 + 525 129 l 1 + 530 130 534 133 537 137 c 2 + 605 217 l 1 + 605 158 l 1 + 477 8 l 1 + 468 1 461 -2 457 -2 c 0 + 454 -2 450 0 447 4 c 1 + 342 98 l 2 + 336 103 329 105 322 105 c 0 + 318 105 315 104 313 102 c 2 + 232 8 l 1 + 225 1 218 -2 213 -2 c 0 + 210 -2 206 0 203 4 c 1 + 98 98 l 2 + 92 104 85 107 78 107 c 0 + 75 107 71 105 68 102 c 2 + 0 21 l 1 +EndSplineSet +EndChar + +StartChar: uniE56D +Encoding: 58733 58733 62 +Width: 587 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 21 m 1 + 0 80 l 1 + 121 223 l 2 + 125 227 129 230 132 232 c 128 + 135 234 139 235 143 236 c 1 + 148 236 156 230 168 219 c 2 + 275 125 l 1 + 275 309 l 1 + 305 309 l 1 + 305 150 l 1 + 363 219 l 2 + 374 232 382 239 386 239 c 1 + 410 223 l 1 + 494 148 l 1 + 525 123 l 1 + 528 124 532 128 538 135 c 2 + 552 150 l 1 + 586 194 l 1 + 586 139 l 1 + 480 14 l 1 + 472 3 464 -2 457 -2 c 1 + 454 -1 452 1 450 2 c 0 + 444 6 438 11 432 16 c 2 + 354 86 l 1 + 340 100 329 107 320 107 c 1 + 315 105 l 1 + 310 100 l 1 + 305 94 l 1 + 305 -90 l 1 + 275 -90 l 1 + 275 59 l 1 + 239 14 l 1 + 229 3 221 -2 215 -2 c 1 + 208 0 l 1 + 198 8 l 1 + 188 16 l 1 + 100 96 l 2 + 93 103 86 107 80 109 c 1 + 77 109 71 105 63 96 c 2 + 0 21 l 1 +EndSplineSet +EndChar + +StartChar: uniE004 +Encoding: 57348 57348 63 +Width: 399 +VWidth: 0 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 0 m 5 + 49 0 97.5 2.26367 135.5 -4.73633 c 5 + 341.5 -99.7363 394 -269 399 -276 c 5 + 399 -277 385 -283 384 -282 c 5 + 296 -128 133 -115 63 -112 c 5 + 62 -112 0 -111 0 -111 c 5 + 0 -74 0 -37 0 0 c 5 +EndSplineSet +EndChar + +StartChar: uniE003 +Encoding: 57347 57347 64 +Width: 399 +VWidth: 0 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -0 m 5 + 49 -0 97.5 -2.26367 135.5 4.73633 c 5 + 341.5 99.7363 394 269 399 276 c 5 + 399 277 385 283 384 282 c 5 + 296 128 133 115 63 112 c 5 + 62 112 0 111 0 111 c 5 + -0 74 0 37 0 -0 c 5 +EndSplineSet +EndChar + +StartChar: uniE88A +Encoding: 59530 59530 65 +Width: 144 +VWidth: 2048 +Flags: HMW +LayerCount: 2 +Fore +SplineSet +17 87 m 0 + 17 98 20 106 27 113 c 0 + 34 120 43 123 54 123 c 0 + 65 123 73 120 80 113 c 0 + 87 106 91 97 91 87 c 0 + 91 77 87 68 80 60 c 1 + 73 53 63 50 53 50 c 0 + 43 50 34 53 27 60 c 0 + 20 67 17 76 17 87 c 0 +53 207 m 4 + 53 218 57 227 64 234 c 0 + 71 241 81 244 91 244 c 0 + 101 244 110 240 117 233 c 0 + 124 226 127 217 127 207 c 0 + 127 197 123 188 116 181 c 0 + 109 174 100 171 90 171 c 0 + 80 171 71 174 64 181 c 0 + 57 188 53 196 53 207 c 4 +EndSplineSet +EndChar + +StartChar: uniE522 +Encoding: 58658 58658 66 +Width: 232 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +-90 -179 m 5 + -92 -181.667 -92.667 -184 -92 -186 c 132 + -91.333 -188 -87.667 -189.333 -81 -190 c 5 + -62.333 -190 -46.667 -176.333 -34 -149 c 4 + -27.333 -135 -20.667 -119 -14 -101 c 132 + -7.33301 -83 -2.33301 -65.667 1 -49 c 6 + 15 12 l 5 + 59 220 l 5 + 1 220 l 5 + 1 258 l 5 + 71 258 l 5 + 78.333 278.667 84.333 294.333 89 305 c 4 + 96.333 323 103.667 337.667 111 349 c 4 + 131.666 379 153.333 402 176 418 c 132 + 198.667 434 223.667 442 251 442 c 4 + 260.333 442 268 441 274 439 c 132 + 280 437 286.333 431.667 293 423 c 4 + 297.667 416.333 300.667 410 302 404 c 6 + 306 388 l 5 + 306 373.333 305.333 362.666 304 356 c 132 + 302.667 349.333 299 340 293 328 c 4 + 290.333 322 284.333 315 275 307 c 4 + 271 303.667 266.667 301.667 262 301 c 132 + 257.333 300.333 251.667 300.333 245 301 c 5 + 239 302.333 234.667 306 232 312 c 132 + 229.333 318 227.333 324.667 226 332 c 5 + 226 344 228.333 354.667 233 364 c 132 + 237.667 373.333 245 381.333 255 388 c 4 + 262 393 262 393 269 398 c 5 + 269 406.667 263 412 251 414 c 5 + 237.667 415.33 226.333 412.663 217 406 c 132 + 207.667 399.333 198 385 188 363 c 5 + 183.333 351 177.667 333.333 171 310 c 132 + 164.333 286.667 159.667 270 157 260 c 5 + 234 260 l 5 + 234 220 l 5 + 149 220 l 5 + 137 151.333 120 82.667 98 14 c 4 + 80 -41.333 62.667 -85 46 -117 c 4 + 32.667 -143 19 -164 5 -180 c 4 + -19.667 -208.667 -45 -223 -71 -223 c 4 + -95.666 -223 -114.333 -213.333 -127 -194 c 4 + -137 -178.667 -142 -160.667 -142 -140 c 4 + -142 -123.333 -138 -107.333 -130 -92 c 5 + -125.333 -84.667 -119.667 -79 -113 -75 c 132 + -106.333 -71 -99.667 -69 -93 -69 c 4 + -84.333 -69 -77.333 -73 -72 -81 c 132 + -66.667 -89 -63 -96.333 -61 -103 c 132 + -59 -109.667 -58 -115.333 -58 -120 c 4 + -58 -129.333 -60.333 -137.333 -65 -144 c 132 + -69.6641 -150.667 -74.3301 -157.667 -79 -165 c 132 + -83.6641 -172.333 -87.3301 -177 -90 -179 c 5 +EndSplineSet +EndChar + +StartChar: uniE521 +Encoding: 58657 58657 67 +Width: 405 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +337 262 m 0 + 358 262 380 248 380 227 c 2 + 380 220 l 1 + 317 37 l 1 + 317 24 321 17 329 16 c 1 + 337 16 346 21 355 31 c 128 + 364 41 370 47 371 48 c 0 + 375 55 389.633 79.6631 391 83 c 2 + 405 124 l 1 + 428 124 l 1 + 404 61 l 2 + 395.696 39.2031 373 16 360 3 c 128 + 347 -10 331 -17 314 -18 c 0 + 296 -18 280 -13 265 -4 c 1 + 249 11 l 1 + 246 18 244 23 244 28 c 1 + 264 91 288 152 309 214 c 1 + 309 221 304 226 294 227 c 1 + 278 227 263 212 250 182 c 1 + 186 0 l 1 + 115 0 l 1 + 192 214 l 1 + 192 223 186 227 175 227 c 0 + 166 227 158 223 153 216 c 128 + 148 209 141 197 133 182 c 1 + 69 0 l 1 + 0 0 l 1 + 77 210 l 1 + 77 214 l 2 + 77 224 72 226 65 230 c 1 + 40 230 13 183 -1 157 c 0 + -6 148 -13 134 -22 115 c 1 + -44 115 l 1 + -25 154 -4 191 20 222 c 0 + 41 249 67 262 99 262 c 0 + 120 262 130 243 133 221 c 1 + 152 238 167 248 178 253 c 1 + 189 259 202 262 217 262 c 0 + 238 262 249 243 252 221 c 1 + 274 238 301 262 337 262 c 0 +EndSplineSet +EndChar + +StartChar: uniE520 +Encoding: 58656 58656 68 +Width: 306 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +23 124 m 5 + 0 124 l 1 + 22 166.667 42.667 200.333 62 225 c 128 + 81.333 249.667 106.667 262.333 138 263 c 0 + 144 263 150 258.667 156 250 c 1 + 162.667 243.333 166 234.333 166 223 c 1 + 190 237 l 1 + 215 250 l 1 + 227 254.667 239.333 257 252 257 c 0 + 276 257 295.333 247.667 310 229 c 128 + 324.667 210.333 332.333 184.667 333 152 c 0 + 333 138 332 125.333 330 114 c 128 + 328 102.667 324.667 93 320 85 c 128 + 315.333 77 309 68 301 58 c 0 + 287 40 271.333 26 254 16 c 128 + 236.667 6 218.667 1 200 1 c 0 + 191.333 1 180.333 4.33301 167 11 c 0 + 161.667 14.333 156.667 17.667 152 21 c 128 + 147.333 24.333 143 29 139 35 c 1 + 83 -123 l 1 + 80 -127 l 1 + 82.667 -133.667 86.667 -137.333 92 -138 c 1 + 124 -138 l 1 + 124 -167 l 1 + -49 -167 l 1 + -49 -138 l 1 + -28 -138 l 2 + -24 -138 -19.333 -136.333 -14 -133 c 1 + -10 -129 -7 -124.333 -5 -119 c 2 + 114 212 l 1 + 114 218 l 1 + 111 228 l 1 + 105 231 l 1 + 96.333 231 88 227 80 219 c 128 + 72 211 64.333 200.667 57 188 c 1 + 46 171 l 1 + 36 151 l 1 + 23 124 l 5 +197 201 m 0 + 185 180.333 175.333 156.333 168 129 c 1 + 161.333 99 158 78.333 158 67 c 0 + 158 43 165.333 31 180 31 c 0 + 192.667 31 203 33.333 211 38 c 128 + 219 42.667 226 49.333 232 58 c 1 + 242 74.667 247.333 84 248 86 c 0 + 252.667 97.333 256 112 258 130 c 128 + 260 148 261.333 161 262 169 c 0 + 262 176.333 261.333 182.333 260 187 c 128 + 258.667 191.667 256.667 196.334 254 201 c 0 + 248.667 210.333 239.333 215 226 215 c 0 + 212 215 202.333 210.333 197 201 c 0 +EndSplineSet +EndChar + +StartChar: uniE523 +Encoding: 58659 58659 69 +Width: 225 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +194 174 m 0 + 180 174 171 186 171 203 c 1 + 172 214 l 1 + 175 226 l 1 + 175 231 172 233 167 233 c 0 + 154 233 141 223 129 202 c 1 + 113 170 l 1 + 92 116 78 57 60 0 c 1 + 0 0 l 1 + 57 194 l 1 + 57 199 l 2 + 57 210 54 215 49 215 c 0 + 34 215 29 206 19 194 c 0 + 10 183 2 171 -6 158 c 1 + -20 166 l 1 + -14 181 -4 191 8 204 c 0 + 27 223 58 252 91 252 c 0 + 106 252 113 243 113 224 c 0 + 112 217 112 210 111 203 c 1 + 127 227 150 259 185 259 c 0 + 206 259 225 240 225 219 c 0 + 225 189 215 174 194 174 c 0 +EndSplineSet +EndChar + +StartChar: uniE524 +Encoding: 58660 58660 70 +Width: 194 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +81 33 m 2 + 102 33 119 48 121 67 c 0 + 121 74 118 82 113 89 c 0 + 110 94 104 100 94 107 c 0 + 72 120 56 133 47 145 c 128 + 38 157 33 171 32 188 c 0 + 32 238 72 270 119 270 c 1 + 147 267 l 1 + 156 264 164 260 171 254 c 1 + 186 245 194 230 194 211 c 1 + 193 201 l 1 + 187 191 l 2 + 184 186 179 182 170 181 c 1 + 153 181 144 189 141 205 c 1 + 145 224 l 1 + 145 234 131 240 121 242 c 0 + 102 245 89 226 86 206 c 1 + 86 199 90 191 97 184 c 1 + 106 177 115 170 123 163 c 0 + 151 140 166 126 167 123 c 1 + 175 113 179 100 179 84 c 2 + 179 74 l 2 + 179 53 169 35 150 20 c 1 + 134 10 112 2 89 0 c 1 + 42 0 0 26 0 67 c 1 + 1 82 l 1 + 6 95 l 1 + 16 104 l 1 + 29 108 l 1 + 45 108 53 98 53 77 c 0 + 53 64 48 61 45 49 c 1 + 45 41 56 33 68 33 c 130 + 81 33 l 2 +EndSplineSet +EndChar + +StartChar: uniE525 +Encoding: 58661 58661 71 +Width: 260 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +173 115 m 0 + 194 115 207 92 207 67 c 0 + 207 44 199 25 183 9 c 1 + 168 -8 144 -16 110 -16 c 0 + 98 -16 89 -15 83 -12 c 2 + 71 -6 l 1 + 54 4 l 1 + 39 11 30 14 25 14 c 0 + 16 14 6 9 -5 0 c 1 + -36 0 l 1 + -36 16 l 1 + 173 193 l 1 + 109 192 l 1 + 86 189 77 177 65 162 c 1 + 41 162 l 1 + 71 249 l 1 + 260 249 l 1 + 260 217 l 1 + 49 54 l 1 + 62 60 75 63 88 63 c 0 + 102 63 141 45 151 43 c 1 + 160 44 165 51 165 62 c 1 + 152 62 145 70 143 85 c 1 + 143 102 156 115 173 115 c 0 +EndSplineSet +EndChar + +StartChar: uniE650 +Encoding: 58960 58960 72 +Width: 695 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +657 134 m 0 + 657 99.333 644.667 68.333 620 41 c 128 + 595.333 13.667 566.333 0 533 0 c 2 + 519 0 l 1 + 513 8 508.333 13.667 505 17 c 0 + 493.667 29 484 35 476 35 c 0 + 461.333 35 448.667 31.667 438 25 c 1 + 424.667 14.333 414 6 406 0 c 1 + 340 0 l 1 + 300 47 l 1 + 267 0 l 1 + 190 0 l 1 + 184.667 19.333 180.333 33.333 177 42 c 0 + 171 58 162 65.333 150 64 c 0 + 133.333 62 117 52 101 34 c 0 + 91.667 22.667 82 11.333 72 0 c 1 + 38 0 l 1 + 38 29.333 72.333 67 141 113 c 0 + 173.667 135 190 159 190 185 c 0 + 190.002 202.333 179.335 226 158 256 c 128 + 136.667 286 125.667 321.333 125 362 c 0 + 125 376.667 126 392.333 128 409 c 128 + 130 425.667 133.667 446 139 470 c 1 + 137.684 474 135.351 477 132 479 c 128 + 128.667 481 122.667 482 114 482 c 1 + 95.333 476.667 81.333 470.667 72 464 c 0 + 44 442.667 30 410.333 30 367 c 0 + 30 355.667 31.667 346.667 35 340 c 128 + 38.333 333.333 42.667 328.333 48 325 c 1 + 64 320.333 78 334 90 366 c 1 + 93.333 368.667 96.333 371.333 99 374 c 1 + 99.667 372 100 368.333 100 363 c 0 + 100 348.333 96 335 88 323 c 0 + 76.667 307 60 296.667 38 292 c 1 + 29.333 292 21.333 297 14 307 c 0 + 4.66699 320.334 0 338.667 0 362 c 0 + 0 407.333 15 444 45 472 c 128 + 75 500 112.667 514 158 514 c 0 + 210 514 249.667 504 277 484 c 128 + 304.333 464 318.333 436.333 319 401 c 0 + 319 387 316.667 373 312 359 c 1 + 300 338.333 285.333 328 268 328 c 0 + 250 328 232.333 337.333 215 356 c 128 + 197.667 374.667 189 390.333 189 403 c 0 + 189 409 191.333 412.333 196 413 c 1 + 200 401.667 204 393.333 208 388 c 0 + 220 370.667 235.333 362 254 362 c 0 + 268.667 362 278.667 366 284 374 c 128 + 289.333 382 292 392.667 292 406 c 0 + 292 426.667 284.333 442.333 269 453 c 128 + 253.667 463.667 233.667 471.667 209 477 c 0 + 199 479 192.333 480 189 480 c 0 + 185 480 176.333 479 163 477 c 1 + 157.667 461.667 154 446.333 152 431 c 128 + 150 415.667 149 396.667 149 374 c 0 + 149 353.333 156 330.666 170 306 c 1 + 197 261 197 261 224 216 c 1 + 226.667 203.333 228 191 228 179 c 0 + 228 157 219.667 136.667 203 118 c 0 + 194.333 108.667 190 101.333 190 96 c 1 + 199.333 87.333 205.333 76.333 208 63 c 128 + 210.667 49.667 222.667 40.333 244 35 c 1 + 261.333 39.667 273.333 44.667 280 50 c 128 + 286.667 55.333 290 62.333 290 71 c 0 + 290 77.667 286 90.333 278 109 c 0 + 272.667 121.667 269 131.667 267 139 c 1 + 266.333 145 266 149.667 266 153 c 0 + 266 181 274 206.333 290 229 c 128 + 306 251.667 328.333 263 357 263 c 0 + 378.333 263 393 259 401 251 c 128 + 409 243 414.667 227.667 418 205 c 0 + 420.667 183 413.667 163.667 397 147 c 1 + 374.334 126.333 351.667 106 329 86 c 1 + 335 75.333 342 65 350 55 c 0 + 366.667 34.333 383.333 24 400 24 c 0 + 412 24 425 29 439 39 c 0 + 443 42.333 448.667 47.333 456 54 c 1 + 454.667 66 454 76.333 454 85 c 0 + 454 121.667 460.667 153.333 474 180 c 0 + 492.667 218 525 247 571 267 c 1 + 550.333 313.667 518.333 355 475 391 c 1 + 434.333 419.667 393.333 448.333 352 477 c 1 + 381.333 474.332 418.333 459.666 463 433 c 0 + 517.667 401 561.333 362.667 594 318 c 0 + 636 261.333 657 200 657 134 c 0 +379 227 m 1 + 369 227 358.667 226.333 348 225 c 128 + 337.333 223.667 330 218.667 326 210 c 128 + 322 201.333 319.333 193 318 185 c 128 + 316.667 177 316 168.333 316 159 c 2 + 316 139 l 1 + 344 139 362.333 148.333 371 167 c 0 + 376.333 178.333 379 198.333 379 227 c 1 +513 54 m 1 + 519 41.333 529 35 543 35 c 0 + 559 35 573.333 43 586 59 c 128 + 598.667 75 605.333 98.333 606 129 c 0 + 606 154.333 602.667 181 596 209 c 128 + 589.333 237 581 251.333 571 252 c 1 + 549.667 243.333 533 226 521 200 c 128 + 509 174 503 145 503 113 c 0 + 503 89.667 506.333 70 513 54 c 1 +671 50 m 0 + 677.667 50 683.333 47.333 688 42 c 128 + 692.667 36.667 695 30.667 695 24 c 128 + 695 17.333 692.333 11.667 687 7 c 128 + 681.667 2.33301 675.333 -0 668 0 c 0 + 661.333 -0 655.667 2.66699 651 8 c 128 + 646.333 13.333 644 19.667 644 27 c 0 + 644 42.333 653 50 671 50 c 0 +EndSplineSet +EndChar + +StartChar: uniE655 +Encoding: 58965 58965 73 +Width: 507 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +255 288 m 1 + 229 288 210 270 210 245 c 0 + 210 224 234 204 255 203 c 1 + 279 203 296 225 296 247 c 0 + 296 272 279 287 255 288 c 1 +52 374 m 1 + 56 404 81 434 113 434 c 0 + 132 434 145 429 150 420 c 1 + 163 404 166 355 176 331 c 1 + 183 322 193 316 206 314 c 1 + 225 320 l 1 + 236 326 241 332 242 349 c 0 + 242 357 240 364 237 369 c 2 + 223 390 l 1 + 204 411 l 1 + 193 437 l 1 + 193 470 222 492 255 492 c 0 + 288 492 314 465 314 437 c 0 + 314 413 306 407 290 390 c 1 + 272 367 l 1 + 267 359 265 352 264 346 c 1 + 265 341 269 333 269 329 c 1 + 282 317 l 1 + 299 308 l 1 + 323 310 335 334 338 363 c 1 + 338 409 357 432 395 432 c 0 + 425 432 450 407 450 377 c 0 + 450 343 422 322 386 322 c 0 + 351 322 332 309 329 282 c 1 + 335 268 l 2 + 336 265 339 262 343 259 c 0 + 344 257 350 255 360 253 c 1 + 372 255 380 260 387 267 c 1 + 396 271 394 272 406 281 c 2 + 431 299 l 2 + 436 303 444 305 455 305 c 0 + 482 305 506 274 507 247 c 1 + 507 223 489 199 472 189 c 0 + 469 188 461 186 450 185 c 1 + 442 186 430 193 414 206 c 1 + 384 228 l 2 + 379 231 371 233 360 233 c 0 + 351 233 344 231 340 228 c 1 + 329 206 l 1 + 331 191 337 182 346 178 c 2 + 359 173 l 1 + 390 167 l 1 + 409 167 423 162 434 153 c 1 + 445 146 450 133 450 113 c 0 + 450 98 444 84 433 73 c 1 + 422 64 407 58 390 54 c 1 + 377 56 364 64 351 77 c 1 + 342 90 338 109 338 132 c 0 + 338 145 332 156 329 163 c 0 + 323 173 313 178 299 178 c 0 + 277 178 265 160 261 141 c 1 + 264 133 270 125 274 117 c 0 + 279 108 284 100 290 92 c 1 + 299 82 l 1 + 305 70 l 1 + 309 64 310 56 311 46 c 1 + 311 16 280 0 250 0 c 0 + 221 0 196 18 193 46 c 1 + 194 53 199 67 201 71 c 0 + 214 88 227 105 240 121 c 1 + 242 126 244 133 245 144 c 1 + 245 164 235 175 216 178 c 1 + 179 178 169 155 169 118 c 0 + 169 81 150 60 113 54 c 1 + 74 62 63 77 54 115 c 1 + 58 151 84 169 132 169 c 0 + 154 169 175 184 175 206 c 0 + 175 215 172 221 166 225 c 1 + 162 230 156 233 147 233 c 0 + 135 233 119 226 100 212 c 0 + 84 201 71 193 54 187 c 1 + 21 191 1 211 0 247 c 1 + 0 277 22 302 52 302 c 0 + 74 302 89 292 104 280 c 2 + 125 264 l 1 + 147 255 l 1 + 168 260 178 269 178 282 c 0 + 178 309 160 322 123 322 c 0 + 80 322 57 339 52 374 c 1 +EndSplineSet +EndChar + +StartChar: uniE046 +Encoding: 57414 57414 74 +Width: 935 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +51 64 m 1 + 130 349 l 1 + 132 358 l 1 + 133 363 l 1 + 133 371 130.333 377.333 125 382 c 128 + 119.667 386.667 106.333 391 85 395 c 1 + 85 404 l 1 + 237 404 l 2 + 371 404 438 348.667 438 238 c 0 + 438 190 425 147.333 399 110 c 0 + 386.333 92.6667 371 77 353 63 c 128 + 335 49 315 37.3333 293 28 c 0 + 249.667 9.33333 203.667 9.53674e-07 155 0 c 2 + 0 0 l 1 + 0 10 l 1 + 14.6667 10 26.3333 14.6667 35 24 c 0 + 39.6667 28.6667 43.3334 34.3333 46 41 c 128 + 48.6669 47.6667 50.3335 55.3334 51 64 c 1 +200 374 m 1 + 110 51 l 1 + 108 40 l 1 + 110 24.6667 125 17 153 17 c 0 + 193 17 229.667 28.3333 263 51 c 1 + 279.667 61 294.333 72.6667 307 86 c 128 + 319.667 99.3333 330.333 115 339 133 c 1 + 348.333 148.333 355 165.667 359 185 c 128 + 363 204.333 365.333 225.667 366 249 c 1 + 366 294.333 355.667 328.333 335 351 c 128 + 314.333 373.667 282 385 238 385 c 0 + 228.667 385 220.667 384.333 214 383 c 128 + 207.333 381.667 202.667 378.667 200 374 c 1 +890 404 m 1 + 868 279 l 1 + 857 279 l 1 + 857 295 855 309.667 851 323 c 128 + 847 336.333 840.667 348 832 358 c 1 + 813.333 375.333 789.667 384 761 384 c 0 + 742.333 384 725 381 709 375 c 128 + 693 369 678 359 664 345 c 1 + 635.333 320.333 614 288.666 600 250 c 1 + 591.333 230 585.333 212 582 196 c 128 + 578.667 180 576.667 161.667 576 141 c 0 + 576 121 577.667 103.667 581 89 c 128 + 584.333 74.3333 591 60.3333 601 47 c 1 + 617.667 22.3333 643 10 677 10 c 0 + 705 10 731 15.6667 755 27 c 128 + 779 38.3333 802.667 57.3333 826 84 c 1 + 834 74 l 1 + 787.333 10 730.333 -22 663 -22 c 0 + 633 -22 605.333 -14.3333 580 1 c 1 + 570 8.33333 560.333 17.3333 551 28 c 128 + 541.667 38.6667 533 50.6667 525 64 c 1 + 512.333 90 506 118.333 506 149 c 0 + 506.002 191.667 517.335 233 540 273 c 1 + 564 311.667 595.333 344.333 634 371 c 1 + 674 394.333 715.333 406 758 406 c 2 + 776 406 l 2 + 783.333 406 788.333 405.333 791 404 c 1 + 827 397 l 1 + 855 389 l 1 + 880 404 l 1 + 890 404 l 1 +398 33 m 128 + 398 44.3333 400.667 51.6667 406 55 c 1 + 414 63 422 67 430 67 c 128 + 438 67 445 63 451 55 c 1 + 457.667 51 461 43.6667 461 33 c 0 + 461 24.3333 457.667 16.6667 451 10 c 1 + 446.333 3.33333 439.333 0 430 0 c 128 + 420.667 -4.76837e-07 413 2.66667 407 8 c 128 + 401 13.3333 398 21.6667 398 33 c 128 +871 28 m 1 + 871 39.3333 874.333 47 881 51 c 1 + 887 57.6667 894.667 61 904 61 c 0 + 912 61 920 58 928 52 c 1 + 932.667 46 935 38 935 28 c 0 + 935 20 932 13.3333 926 8 c 1 + 920.66 2 913.326 -1 904 -1 c 0 + 894 -1 886.667 2 882 8 c 1 + 876 12.6667 872.333 19.3333 871 28 c 1 +EndSplineSet +EndChar + +StartChar: uniE045 +Encoding: 57413 57413 75 +Width: 860 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +133 363 m 1 + 133 387 115 389 85 395 c 1 + 85 404 l 1 + 237 404 l 2 + 371 404 438 349 438 238 c 0 + 438 190 425 147 399 110 c 1 + 352 45 261 0 155 0 c 2 + 0 0 l 1 + 0 10 l 1 + 32 10 49 33 51 64 c 1 + 130 349 l 1 + 132 358 l 1 + 133 363 l 1 +366 249 m 0 + 366 339 327 385 238 385 c 0 + 221 385 206 384 200 374 c 1 + 110 51 l 1 + 108 40 l 1 + 110 25 125 17 153 17 c 0 + 292 17 365 109 366 249 c 0 +704 384 m 0 + 669 384 640 358 640 323 c 0 + 640 306 645 290 655 276 c 1 + 675 252 681 245 703 226 c 1 + 716 210 739 183 751 167 c 1 + 763 148 769 129 769 108 c 0 + 769 82 760 62 750 43 c 1 + 737 24 721 10 704 1 c 1 + 689 -9 670 -14 645 -14 c 0 + 634 -14 617 -10 594 -1 c 1 + 578 3 562 5 552 10 c 1 + 545 10 540 7 536 1 c 1 + 532 0 529 -5 528 -13 c 1 + 516 -13 l 1 + 537 122 l 1 + 552 122 l 1 + 549 105 l 1 + 549 90 552 79 554 68 c 1 + 558 57 565 47 576 36 c 1 + 591 17 611 8 638 8 c 0 + 662 8 680 16 692 32 c 1 + 708 47 716 66 716 87 c 0 + 716 107 711 123 702 135 c 1 + 690 148 682 160 669 173 c 128 + 664 178 658 184 652 191 c 0 + 630 212 614 231 603 249 c 1 + 592 262 587 280 587 303 c 0 + 587 341 595 356 618 375 c 1 + 637 394 662 404 693 404 c 0 + 717 404 735 402 747 397 c 1 + 758 390 768 387 778 387 c 0 + 785 387 793 393 802 404 c 1 + 815 404 l 1 + 791 285 l 1 + 781 285 l 1 + 781 351 755 384 704 384 c 0 +430 0 m 128 + 410 0 398 12 398 33 c 128 + 398 54 415 67 430 67 c 128 + 438 67 445 63 451 55 c 1 + 458 51 461 44 461 33 c 0 + 461 17 448 0 430 0 c 128 +829 -1 m 0 + 809 -1 797 11 794 28 c 1 + 794 45 811 61 829 61 c 0 + 848 61 860 49 860 28 c 0 + 860 10 845 -1 829 -1 c 0 +EndSplineSet +EndChar + +StartChar: uniE047 +Encoding: 57415 57415 76 +Width: 410 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +108 474 m 4 + 86 474 70 444 70 418 c 4 + 70 364 143 333 210 302 c 5 + 348 507 l 5 + 389 507 l 5 + 243 286 l 5 + 284 265 316 242 339 219 c 4 + 367 190 381 157 381 122 c 4 + 381 54 327 2 257 1 c 4 + 217 1 181 33 181 73 c 4 + 181 95 202 111 224 111 c 4 + 247 111 258 94 263 73 c 4 + 269 50 279 39 294 39 c 4 + 321 39 336 62 336 93 c 4 + 336 106 333 116 328 125 c 4 + 319 142 295 161 256 182 c 5 + 226 197 226 197 196 212 c 5 + 62 4 l 5 + 22 4 l 5 + 163 227 l 5 + 114 250 78 277 54 307 c 4 + 33 334 22 362 22 391 c 4 + 22 438 47 471 76 493 c 132 + 93 506 113 513 134 513 c 4 + 180 513 224 481 225 436 c 4 + 225 414 202 401 180 400 c 4 + 161 400 150 408 145 425 c 6 + 138 448 l 6 + 133 465 123 474 108 474 c 4 +75 192 m 5 + 75 171 59 155 39 154 c 5 + 16 154 2 167 1 189 c 4 + 0 210 15 228 36 228 c 132 + 58 228 74 213 75 192 c 5 +337 322 m 4 + 337 346 353 360 374 360 c 4 + 397 360 411 341 411 323 c 4 + 411 300 394 286 374 286 c 4 + 351 286 337 303 337 322 c 4 +EndSplineSet +EndChar + +StartChar: uniE048 +Encoding: 57416 57416 77 +Width: 536 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +537 233 m 1 + 473 233 l 1 + 473 217 469 193 460 160 c 1 + 446 121 l 1 + 430 90 l 1 + 417 73 400 50 383 37 c 128 + 361 20 326 10 286 0 c 1 + 286 -73 l 1 + 251 -73 l 1 + 251 0 l 1 + 212 6 l 130 + 203 7 196 9 189 12 c 0 + 132 43 100 86 78 160 c 1 + 67 199 l 1 + 65 233 l 1 + 0 233 l 1 + 0 273 l 1 + 65 273 l 1 + 65 307 67 316 77 346 c 1 + 83 370 95 398 107 416 c 1 + 130 446 l 1 + 154 471 l 1 + 175 487 184 494 215 499 c 128 + 227 501 239 503 251 506 c 1 + 251 580 l 1 + 286 580 l 1 + 286 506 l 1 + 307 503 332 502 347 493 c 1 + 360 488 372 480 382 471 c 0 + 398 458 414 439 430 416 c 1 + 443 393 473 309 473 273 c 1 + 537 273 l 1 + 537 233 l 1 +370 273 m 1 + 369 295 l 1 + 367 332 l 2 + 367 349 364 369 358 390 c 1 + 352 425 320 471 286 471 c 1 + 286 273 l 1 + 370 273 l 1 +251 273 m 1 + 251 471 l 1 + 236 471 221 462 205 445 c 1 + 190 426 181 409 178 393 c 0 + 175 375 173 357 170 339 c 1 + 169 303 l 2 + 169 290 168 280 167 273 c 1 + 251 273 l 1 +370 233 m 1 + 286 233 l 1 + 286 37 l 1 + 301 37 317 45 332 61 c 0 + 345 76 354 94 358 115 c 2 + 367 177 l 1 + 370 233 l 1 +251 37 m 1 + 251 233 l 1 + 167 233 l 1 + 167 212 l 1 + 169 175 l 1 + 169 133 182 88 204 61 c 1 + 219 45 235 37 251 37 c 1 +EndSplineSet +EndChar + +StartChar: uniE04B +Encoding: 57419 57419 78 +Width: 477 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +187 643 m 1 + 253 605 l 1 + 253 751 l 1 + 187 788 l 1 + 187 643 l 1 +320 572 m 1 + 349 580 380 608 380 644 c 0 + 380 671 364 698 346 707 c 1 + 282 745 l 1 + 282 597 l 1 + 320 572 l 1 +159 381 m 1 + 159 530 l 1 + 122 552 l 1 + 103 552 94 545 83 533 c 1 + 68 520 61 507 61 496 c 0 + 61 460 79 433 100 418 c 1 + 159 381 l 1 +187 375 m 1 + 253 339 l 1 + 253 483 l 1 + 187 520 l 1 + 187 375 l 1 +320 305 m 1 + 352 310 380 337 380 373 c 0 + 380 402 368 424 344 440 c 1 + 282 476 l 1 + 282 330 l 1 + 320 305 l 1 +159 924 m 1 + 159 962 l 1 + 187 962 l 1 + 187 909 l 1 + 253 874 l 1 + 253 962 l 1 + 282 962 l 1 + 282 863 l 1 + 315 849 341 835 360 822 c 1 + 401 797 439 759 442 696 c 0 + 442 686 440 676 437 667 c 2 + 431 651 l 2 + 426 638 420 626 413 617 c 1 + 407 606 396 595 387 585 c 2 + 356 553 l 1 + 378 541 395 528 407 514 c 1 + 420 501 428 487 432 472 c 1 + 439 459 442 440 442 416 c 0 + 442 360 413 316 356 285 c 1 + 383 266 406 247 423 226 c 128 + 440 205 449 181 450 152 c 0 + 450 111 439 83 420 57 c 1 + 401 28 375 6 343 -10 c 1 + 314 -23 281 -32 244 -34 c 1 + 201 -34 187 -30 149 -18 c 1 + 102 -5 46 27 44 78 c 1 + 46 91 l 1 + 51 116 65 128 88 128 c 2 + 101 128 l 1 + 116 126 134 111 155 84 c 0 + 178 54 193 34 216 19 c 128 + 223 15 242 10 250 7 c 128 + 254 6 259 5 266 6 c 0 + 308 6 339 27 357 51 c 1 + 365 64 369 78 369 91 c 1 + 366 113 l 2 + 365 121 362 129 357 136 c 1 + 340 167 314 184 282 201 c 1 + 282 164 l 1 + 253 164 l 1 + 253 217 l 1 + 187 249 l 1 + 187 164 l 1 + 159 164 l 1 + 159 262 l 1 + 109 288 l 2 + 95 296 66 315 54 326 c 1 + 39 338 26 353 17 370 c 1 + 5 399 l 1 + 3 407 2 412 2 415 c 128 + 2 418 2 423 1 430 c 1 + 3 450 l 1 + 12 488 33 515 56 540 c 1 + 88 572 l 1 + 56 591 33 611 20 630 c 1 + 7 651 1 677 1 708 c 0 + 1 741 9 767 24 786 c 128 + 39 805 61 824 90 842 c 1 + 63 859 41 879 25 902 c 128 + 9 925 1 955 0 992 c 0 + 0 1026 10 1055 29 1078 c 1 + 65 1125 124 1157 201 1158 c 1 + 270 1158 333 1137 370 1103 c 128 + 390 1085 400 1067 400 1049 c 1 + 398 1034 l 1 + 391 1005 376 990 352 990 c 0 + 337 990 325 994 318 1001 c 128 + 308 1011 279 1054 264 1070 c 128 + 257 1077 249 1085 239 1093 c 1 + 222 1104 200 1111 174 1114 c 1 + 143 1114 118 1106 101 1091 c 1 + 86 1076 72 1061 71 1034 c 1 + 72 1029 l 1 + 72 983 123 940 159 924 c 1 +161 649 m 1 + 161 797 l 1 + 124 820 l 1 + 111 818 101 814 94 807 c 1 + 87 797 84 791 79 779 c 2 + 68 749 l 1 + 68 726 67 723 77 709 c 0 + 84 698 92 689 100 684 c 2 + 161 649 l 1 +EndSplineSet +EndChar + +StartChar: uniE500 +Encoding: 58624 58624 79 +Width: 508 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +508 242 m 1 + 146 -242 l 1 + 0 -242 l 1 + 362 242 l 1 + 508 242 l 1 +52 118 m 4 + 52 131.333 56.333 142.667 65 152 c 132 + 73.667 161.333 84.333 166.333 97 167 c 5 + 111 167 122.667 163 132 155 c 132 + 141.333 147 146.333 136 147 122 c 4 + 147 108.667 142.667 97.333 134 88 c 132 + 125.333 78.667 114.667 73.667 102 73 c 5 + 88 73 76.333 77 67 85 c 132 + 57.667 93 52.667 104 52 118 c 4 +361 -121 m 0 + 361 -107.667 365.333 -96.333 374 -87 c 128 + 382.667 -77.667 393.334 -72.667 406 -72 c 1 + 420 -72 431.667 -76 441 -84 c 128 + 450.333 -92 455.333 -103 456 -117 c 0 + 456 -130.333 451.667 -141.667 443 -151 c 128 + 434.333 -160.333 423.667 -165.333 411 -166 c 1 + 397 -166 385.333 -162 376 -154 c 128 + 366.667 -146 361.667 -135 361 -121 c 0 +EndSplineSet +EndChar + +StartChar: uniE220 +Encoding: 57888 57888 80 +Width: 163 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +-163 -124 m 1 + -163 -41 l 1 + 163 125 l 1 + 163 39 l 1 + -163 -124 l 1 +EndSplineSet +EndChar + +StartChar: uniE222 +Encoding: 57890 57890 81 +Width: 162 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +162 175 m 1 + -162 11 l 1 + -162 95 l 1 + 162 258 l 1 + 162 175 l 1 +162 40 m 1 + -162 -124 l 1 + -162 -40 l 1 + 162 124 l 1 + 162 40 l 1 +162 -95 m 1 + -162 -258 l 1 + -162 -175 l 1 + 162 -11 l 1 + 162 -95 l 1 +EndSplineSet +EndChar + +StartChar: uniE223 +Encoding: 57891 57891 82 +Width: 162 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +162 108 m 1 + -162 -56 l 1 + -162 28 l 1 + 162 191 l 1 + 162 108 l 1 +162 -27 m 1 + -162 -191 l 1 + -162 -107 l 1 + 162 57 l 1 + 162 -27 l 1 +162 -162 m 1 + -162 -325 l 1 + -162 -242 l 1 + 162 -78 l 1 + 162 -162 l 1 +162 242 m 1 + -162 78 l 1 + -162 162 l 1 + 162 326 l 1 + 162 242 l 1 +EndSplineSet +EndChar + +StartChar: uniE224 +Encoding: 57892 57892 83 +Width: 162 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +162 41 m 1 + -162 -123 l 1 + -162 -39 l 1 + 162 124 l 1 + 162 41 l 1 +162 -94 m 1 + -162 -258 l 1 + -162 -174 l 1 + 162 -10 l 1 + 162 -94 l 1 +162 -229 m 1 + -162 -392 l 1 + -162 -309 l 1 + 162 -145 l 1 + 162 -229 l 1 +162 310 m 1 + -162 146 l 1 + -162 230 l 1 + 162 393 l 1 + 162 310 l 1 +162 175 m 1 + -162 11 l 1 + -162 95 l 1 + 162 259 l 1 + 162 175 l 1 +EndSplineSet +EndChar + +StartChar: uniE221 +Encoding: 57889 57889 84 +Width: 164 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +-163 -193 m 1 + -163 -110 l 1 + 163 56 l 1 + 163 -30 l 1 + -163 -193 l 1 +-163 -57 m 1 + -163 27 l 1 + 163 193 l 1 + 163 110 l 1 + -163 -57 l 1 +EndSplineSet +EndChar + +StartChar: uniE530 +Encoding: 58672 58672 85 +Width: 692 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +363 -69 m 1 + 386 -69 398 -92 399 -116 c 0 + 399 -124 395 -139 390 -147 c 2 + 380 -162 l 2 + 373 -172 372 -174 367 -183 c 1 + 367 -188 370 -190 377 -190 c 0 + 396 -190 412 -176 425 -148 c 1 + 438 -116 448 -88 458 -51 c 1 + 472 11 485 72 499 134 c 2 + 517 220 l 1 + 377 220 l 1 + 363 131 317 -36 284 -98 c 1 + 269 -129 254 -155 237 -177 c 128 + 220 -199 199 -214 172 -221 c 1 + 154 -223 l 1 + 110 -223 87 -183 87 -136 c 0 + 87 -97 105 -83 132 -69 c 1 + 138 -69 143 -70 146 -73 c 1 + 151 -75 155 -80 159 -84 c 0 + 166 -93 169 -104 169 -118 c 0 + 169 -133 158 -154 137 -183 c 1 + 137 -188 140 -190 146 -190 c 0 + 180 -190 207 -144 228 -51 c 0 + 235 -22 241 8 248 38 c 0 + 261 99 274 159 287 220 c 1 + 146 220 l 1 + 133 135 84 -35 53 -98 c 1 + 20 -170 -17 -211 -57 -221 c 1 + -76 -223 l 1 + -111 -223 -127 -199 -139 -169 c 1 + -144 -136 l 1 + -139 -97 -131 -81 -98 -69 c 1 + -75 -69 -60 -95 -60 -118 c 0 + -60 -126 -62 -134 -66 -141 c 2 + -80 -164 l 1 + -94 -183 l 1 + -94 -188 -91 -190 -84 -190 c 0 + -73 -190 -63 -185 -54 -175 c 1 + -36 -160 -28 -129 -17 -104 c 1 + -2 -51 l 1 + 15 26 32 104 48 182 c 128 + 51 195 54 208 57 220 c 1 + 0 220 l 1 + 0 258 l 1 + 69 258 l 1 + 78 291 92 320 109 347 c 1 + 126 375 147 398 172 417 c 1 + 197 434 225 442 255 442 c 0 + 288 442 304 412 304 376 c 128 + 304 338 285 306 254 300 c 1 + 237 300 227 311 225 332 c 1 + 225 359 242 385 262 394 c 1 + 265 394 267 396 267 400 c 1 + 261 409 l 1 + 256 412 250 414 243 414 c 0 + 220 414 202 398 188 366 c 128 + 174 334 163 299 156 260 c 1 + 300 260 l 1 + 323 344 385 442 485 442 c 0 + 521 442 532 411 534 376 c 1 + 534 358 530 341 521 325 c 1 + 513 313 501 305 484 300 c 1 + 466 300 456 311 454 332 c 1 + 454 361 472 383 491 394 c 1 + 494 394 496 396 496 400 c 1 + 492 410 485 414 473 414 c 0 + 436 414 406 362 385 258 c 1 + 529 258 l 1 + 544 307 568 351 601 390 c 0 + 632 426 670 444 715 444 c 0 + 749 444 764 408 764 374 c 0 + 764 337 745 306 713 300 c 1 + 697 300 688 311 686 332 c 1 + 686 358 704 384 721 394 c 1 + 725 394 727 396 727 400 c 1 + 722 409 716 414 703 414 c 0 + 666 414 636 362 615 258 c 1 + 691 258 l 1 + 691 220 l 1 + 606 220 l 1 + 599 176 591 136 580 99 c 1 + 562 24 541 -42 514 -98 c 1 + 499 -126 483 -153 464 -177 c 1 + 448 -198 428 -213 403 -221 c 1 + 385 -223 l 1 + 350 -223 332 -200 323 -169 c 1 + 319 -159 317 -148 317 -136 c 1 + 321 -99 332 -79 363 -69 c 1 +EndSplineSet +EndChar + +StartChar: uniE52F +Encoding: 58671 58671 86 +Width: 479 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +481 220 m 1 + 398 220 l 1 + 389.333 164.667 375.667 105.667 357 43 c 128 + 338.333 -19.667 321.333 -66.667 306 -98 c 128 + 290.667 -129.333 274 -156 256 -178 c 1 + 240 -199.333 219 -213.666 193 -221 c 1 + 174 -223 l 1 + 152.667 -223 136.667 -214.333 126 -197 c 0 + 122 -191.667 119 -186.667 117 -182 c 128 + 115 -177.334 113 -171.667 111 -165 c 128 + 109 -158.334 108 -148.667 108 -136 c 0 + 108 -117.333 112 -103.333 120 -94 c 128 + 128 -84.667 138.667 -76.333 152 -69 c 1 + 157.333 -69 162 -70 166 -72 c 128 + 170 -74 174.333 -78 179 -84 c 0 + 186.333 -93.333 190 -104.667 190 -118 c 0 + 190 -132.667 179.333 -154.333 158 -183 c 1 + 158 -187.667 161 -190 167 -190 c 0 + 201 -190 228.333 -143.667 249 -51 c 1 + 256 -22 l 1 + 269 38 l 1 + 291 140 l 1 + 308 220 l 1 + 147 220 l 1 + 139 166.667 124.667 106.667 104 40 c 0 + 92 0.666992 83.333 -26 78 -40 c 0 + 70 -61.333 61.667 -80.667 53 -98 c 1 + 20.333 -170 -16.333 -211 -57 -221 c 1 + -75 -223 l 1 + -96.3311 -223 -112.664 -214.333 -124 -197 c 1 + -129.333 -191 -134.333 -181.667 -139 -169 c 1 + -139.667 -163.667 -140.333 -158.667 -141 -154 c 128 + -141.667 -149.333 -142.333 -143.333 -143 -136 c 1 + -141.667 -124.667 -140.333 -115.667 -139 -109 c 128 + -137.667 -102.333 -134.667 -96 -130 -90 c 0 + -123.333 -81.333 -112.333 -74.333 -97 -69 c 1 + -86.3379 -69 -77.6719 -74 -71 -84 c 128 + -64.3428 -94 -60.6758 -105.333 -60 -118 c 0 + -60 -125.333 -60.667 -130.667 -62 -134 c 128 + -63.333 -137.332 -64.333 -139.666 -65 -141 c 2 + -79 -164 l 1 + -94 -183 l 1 + -94 -187.667 -90.667 -190 -84 -190 c 0 + -72.667 -190 -62.333 -185 -53 -175 c 0 + -49.667 -171.667 -46 -167 -42 -161 c 128 + -38 -155 -34 -148 -30 -140 c 1 + -16 -104 l 1 + -1 -51 l 1 + 18 35 l 1 + 40 140 l 1 + 57 220 l 1 + 0 220 l 1 + 0 258 l 1 + 70 258 l 1 + 79.333 289.334 92 318.667 108 346 c 128 + 124 373.333 145.667 397 173 417 c 1 + 197.667 433.667 225.333 442 256 442 c 0 + 271.333 442 283.333 435.667 292 423 c 128 + 300.667 410.333 305 394.666 305 376 c 128 + 305 357.333 300.667 340.666 292 326 c 128 + 283.334 311.332 270.667 302.665 254 300 c 1 + 237.333 300 228 310.667 226 332 c 1 + 226 343.335 229.333 355.668 236 369 c 1 + 242.667 380.335 251.667 388.668 263 394 c 1 + 266.333 396.667 268 398.667 268 400 c 1 + 264.667 404.667 262.333 407.667 261 409 c 0 + 256.333 412.333 250.333 414 243 414 c 0 + 221 414 203 398.333 189 367 c 128 + 175 335.667 164 300 156 260 c 1 + 320 260 l 1 + 333.333 309.333 356.667 352 390 388 c 128 + 423.333 424 462 442 506 442 c 0 + 514 442 521 440.667 527 438 c 128 + 533 435.333 538 430 542 422 c 1 + 544.667 418.667 547.333 413 550 405 c 128 + 552.667 397 554.333 387.333 555 376 c 1 + 555 357.333 550.667 341 542 327 c 128 + 533.333 313 521 304 505 300 c 1 + 487 300 477 310.667 475 332 c 0 + 475 338 476 344 478 350 c 128 + 480 356 482.667 362 486 368 c 128 + 489.333 374 493 379 497 383 c 128 + 501 387 506 390.667 512 394 c 1 + 515.333 396.667 517 398.667 517 400 c 1 + 511 409 l 1 + 506.333 412.333 500.667 414 494 414 c 0 + 456.667 414 427.333 362 406 258 c 1 + 481 258 l 1 + 481 220 l 1 +EndSplineSet +EndChar + +StartChar: uniE531 +Encoding: 58673 58673 87 +Width: 925 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +597 -69 m 0 + 618.386 -69 632 -99.9219 632 -120 c 0 + 632 -140.113 619.398 -151.813 611 -165 c 128 + 606.336 -172.333 602.67 -177 600 -179 c 0 + 594.479 -186.362 598.662 -188.966 609 -190 c 1 + 644.075 -190 663.221 -135.5 676 -101 c 128 + 682.667 -83 687.667 -65.667 691 -49 c 0 + 711.706 39.2939 729.664 130.336 749 220 c 1 + 606 220 l 1 + 599 176 591 136 580 99 c 1 + 562 24 541 -42 514 -98 c 1 + 499 -126 483 -153 464 -177 c 0 + 448 -198 428 -213 403 -221 c 1 + 385 -223 l 1 + 350 -223 332 -200 323 -169 c 1 + 319 -159 317 -148 317 -136 c 1 + 321 -99 332 -79 363 -69 c 1 + 386 -69 398 -92 399 -116 c 0 + 399 -124 395 -139 390 -147 c 2 + 380 -162 l 2 + 373 -172 372 -174 367 -183 c 1 + 367 -188 370 -190 377 -190 c 0 + 396 -190 412 -176 425 -148 c 1 + 438 -116 448 -88 458 -51 c 1 + 472 11 485 72 499 134 c 1 + 517 220 l 1 + 377 220 l 1 + 363 131 317 -36 284 -98 c 1 + 269 -129 254 -155 237 -177 c 128 + 220 -199 199 -214 172 -221 c 1 + 154 -223 l 1 + 110 -223 87 -183 87 -136 c 0 + 87 -97 105 -83 132 -69 c 1 + 138 -69 143 -70 146 -73 c 1 + 160.846 -78.9385 169 -98.0508 169 -118 c 0 + 169 -133 158 -154 137 -183 c 1 + 137 -188 140 -190 146 -190 c 0 + 180 -190 207 -144 228 -51 c 1 + 249.424 37.7559 267.772 129.774 287 220 c 1 + 146 220 l 1 + 133 135 84 -35 53 -98 c 1 + 20 -170 -17 -211 -57 -221 c 1 + -76 -223 l 1 + -111 -223 -127 -199 -139 -169 c 1 + -144 -136 l 1 + -139 -97 -131 -81 -98 -69 c 1 + -75 -69 -60 -95 -60 -118 c 0 + -60 -126 -62 -134 -66 -141 c 2 + -80 -164 l 1 + -94 -183 l 1 + -94 -188 -91 -190 -84 -190 c 0 + -73 -190 -63 -185 -54 -175 c 1 + -36 -160 -28 -129 -17 -104 c 1 + -2 -51 l 1 + 15 26 32 104 48 182 c 128 + 51 195 54 208 57 220 c 1 + 0 220 l 1 + 0 258 l 1 + 69 258 l 1 + 78 291 92 320 109 347 c 0 + 126 375 147 398 172 417 c 1 + 197 434 225 442 255 442 c 0 + 288 442 304 412 304 376 c 128 + 304 338 285 306 254 300 c 1 + 237 300 227 311 225 332 c 1 + 225 359 242 385 262 394 c 1 + 265 394 267 396 267 400 c 1 + 261 409 l 1 + 256 412 250 414 243 414 c 0 + 220 414 202 398 188 366 c 128 + 174 334 163 299 156 260 c 1 + 300 260 l 1 + 323 344 385 442 485 442 c 0 + 521 442 532 411 534 376 c 1 + 534 358 530 341 521 325 c 1 + 513 313 501 305 484 300 c 1 + 466 300 456 311 454 332 c 1 + 454 361 472 383 491 394 c 1 + 494 394 496 396 496 400 c 1 + 492 410 485 414 473 414 c 0 + 436 414 406 362 385 258 c 1 + 529 258 l 1 + 544 307 568 351 601 390 c 0 + 632 426 670 444 715 444 c 0 + 749 444 764 408 764 374 c 0 + 764 337 745 306 713 300 c 1 + 697 300 688 311 686 332 c 1 + 686 358 704 384 721 394 c 1 + 725 394 727 396 727 400 c 1 + 722 409 716 414 703 414 c 0 + 666 414 636 362 615 258 c 1 + 761 258 l 1 + 774.429 295.847 783.957 322.661 801 349 c 0 + 821.666 379 843.333 402 866 418 c 128 + 888.667 434 913.667 442 941 442 c 0 + 969.318 442 986.6 428.326 992 404 c 2 + 996 388 l 1 + 996 354.861 995 351.993 983 328 c 0 + 979.862 320.94 965.617 302.946 952 301 c 128 + 947.333 300.333 941.667 300.333 935 301 c 0 + 922.394 303.801 918.434 318.612 916 332 c 1 + 916 359.28 927.325 376.216 945 388 c 2 + 959 398 l 1 + 959 406.667 953 412 941 414 c 0 + 927.667 415.33 916.333 412.663 907 406 c 128 + 897.667 399.333 888 385 878 363 c 1 + 871.086 345.222 852.1 279.121 847 260 c 1 + 924 260 l 1 + 924 220 l 1 + 839 220 l 1 + 819.986 111.195 778.939 -34.5586 736 -117 c 0 + 712.343 -163.132 671.698 -223 619 -223 c 0 + 574.383 -223 548 -186.317 548 -140 c 0 + 548 -108.178 563.31 -69 597 -69 c 0 +EndSplineSet +EndChar + +StartChar: uniE532 +Encoding: 58674 58674 88 +Width: 1158 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +983 220 m 1 + 939 12 l 1 + 925 -49 l 2 + 921.667 -65.667 916.667 -83 910 -101 c 128 + 903.333 -119 896.667 -135 890 -149 c 0 + 877.333 -176.333 861.667 -190 843 -190 c 1 + 836.333 -189.333 832.667 -188 832 -186 c 128 + 831.333 -184 832 -181.667 834 -179 c 1 + 836.67 -177 840.336 -172.333 845 -165 c 128 + 849.67 -157.667 854.336 -150.667 859 -144 c 128 + 863.667 -137.333 866 -129.333 866 -120 c 0 + 866 -115.333 865 -109.667 863 -103 c 128 + 861 -96.333 857.333 -89 852 -81 c 128 + 846.667 -73 839.667 -69 831 -69 c 0 + 824.333 -69 817.667 -71 811 -75 c 128 + 804.333 -79 798.667 -84.667 794 -92 c 1 + 786 -107.333 782 -123.333 782 -140 c 0 + 782 -160.667 787 -178.667 797 -194 c 0 + 809.667 -213.333 828.334 -223 853 -223 c 0 + 879 -223 904.333 -208.667 929 -180 c 0 + 943 -164 956.667 -143 970 -117 c 0 + 986.67 -85 1004 -41.333 1022 14 c 0 + 1044 82.667 1061 151.333 1073 220 c 1 + 1158 220 l 1 + 1158 260 l 1 + 1081 260 l 1 + 1083.67 270 1088.33 286.667 1095 310 c 128 + 1101.67 333.333 1107.33 351 1112 363 c 1 + 1122 385 1131.67 399.333 1141 406 c 128 + 1150.33 412.663 1161.67 415.33 1175 414 c 1 + 1187 412 1193 406.667 1193 398 c 1 + 1186 393 1186 393 1179 388 c 0 + 1169 381.333 1161.67 373.333 1157 364 c 128 + 1152.33 354.667 1150 344 1150 332 c 1 + 1151.33 324.667 1153.33 318 1156 312 c 128 + 1158.67 306 1163 302.333 1169 301 c 1 + 1175.67 300.333 1181.33 300.333 1186 301 c 128 + 1190.67 301.667 1195 303.667 1199 307 c 0 + 1208.33 315 1214.33 322 1217 328 c 0 + 1223 340 1226.67 349.333 1228 356 c 128 + 1229.33 362.666 1230 373.333 1230 388 c 1 + 1226 404 l 2 + 1224.67 410 1221.67 416.333 1217 423 c 0 + 1210.33 431.667 1204 437 1198 439 c 128 + 1192 441 1184.33 442 1175 442 c 0 + 1147.67 442 1122.67 434 1100 418 c 128 + 1077.33 402 1055.67 379 1035 349 c 0 + 1027.67 337.667 1020.33 323 1013 305 c 0 + 1008.33 294.333 1002.33 278.667 995 258 c 1 + 847 258 l 1 + 852.1 277.121 871.086 345.222 878 363 c 1 + 888 385 897.667 399.333 907 406 c 128 + 916.333 412.663 927.667 415.33 941 414 c 0 + 953 412 959 406.667 959 398 c 1 + 945 388 l 2 + 927.325 376.216 916 359.28 916 332 c 1 + 918.434 318.612 922.394 303.801 935 301 c 0 + 941.667 300.333 947.333 300.333 952 301 c 128 + 965.617 302.946 979.862 320.94 983 328 c 0 + 995 351.993 996 354.861 996 388 c 1 + 992 404 l 2 + 986.6 428.326 969.318 442 941 442 c 0 + 913.667 442 888.667 434 866 418 c 128 + 843.333 402 821.666 379 801 349 c 0 + 783.957 322.661 774.429 295.847 761 258 c 1 + 615 258 l 1 + 636 362 666 414 703 414 c 0 + 716 414 722 409 727 400 c 1 + 727 396 725 394 721 394 c 1 + 704 384 686 358 686 332 c 1 + 688 311 697 300 713 300 c 1 + 745 306 764 337 764 374 c 0 + 764 408 749 444 715 444 c 0 + 670 444 632 426 601 390 c 0 + 568 351 544 307 529 258 c 1 + 385 258 l 1 + 406 362 436 414 473 414 c 0 + 485 414 492 410 496 400 c 1 + 496 396 494 394 491 394 c 1 + 472 383 454 361 454 332 c 1 + 456 311 466 300 484 300 c 1 + 501 305 513 313 521 325 c 1 + 530 341 534 358 534 376 c 1 + 532 411 521 442 485 442 c 0 + 385 442 323 344 300 260 c 1 + 156 260 l 1 + 163 299 174 334 188 366 c 128 + 202 398 220 414 243 414 c 0 + 250 414 256 412 261 409 c 1 + 267 400 l 1 + 267 396 265 394 262 394 c 1 + 242 385 225 359 225 332 c 1 + 227 311 237 300 254 300 c 1 + 285 306 304 338 304 376 c 128 + 304 412 288 442 255 442 c 0 + 225 442 197 434 172 417 c 1 + 147 398 126 375 109 347 c 0 + 92 320 78 291 69 258 c 1 + 0 258 l 1 + 0 220 l 1 + 57 220 l 1 + 54 208 51 195 48 182 c 128 + 32 104 15 26 -2 -51 c 1 + -17 -104 l 1 + -28 -129 -36 -160 -54 -175 c 1 + -63 -185 -73 -190 -84 -190 c 0 + -91 -190 -94 -188 -94 -183 c 1 + -80 -164 l 1 + -66 -141 l 2 + -62 -134 -60 -126 -60 -118 c 0 + -60 -95 -75 -69 -98 -69 c 1 + -131 -81 -139 -97 -144 -136 c 1 + -139 -169 l 1 + -127 -199 -111 -223 -76 -223 c 1 + -57 -221 l 1 + -17 -211 20 -170 53 -98 c 1 + 84 -35 133 135 146 220 c 1 + 287 220 l 1 + 267.772 129.774 249.424 37.7559 228 -51 c 1 + 207 -144 180 -190 146 -190 c 0 + 140 -190 137 -188 137 -183 c 1 + 158 -154 169 -133 169 -118 c 0 + 169 -98.0508 160.846 -78.9385 146 -73 c 1 + 143 -70 138 -69 132 -69 c 1 + 105 -83 87 -97 87 -136 c 0 + 87 -183 110 -223 154 -223 c 1 + 172 -221 l 1 + 199 -214 220 -199 237 -177 c 128 + 254 -155 269 -129 284 -98 c 1 + 317 -36 363 131 377 220 c 1 + 517 220 l 1 + 499 134 l 1 + 485 72 472 11 458 -51 c 1 + 448 -88 438 -116 425 -148 c 1 + 412 -176 396 -190 377 -190 c 0 + 370 -190 367 -188 367 -183 c 1 + 372 -174 373 -172 380 -162 c 2 + 390 -147 l 2 + 395 -139 399 -124 399 -116 c 0 + 398 -92 386 -69 363 -69 c 1 + 332 -79 321 -99 317 -136 c 1 + 317 -148 319 -159 323 -169 c 1 + 332 -200 350 -223 385 -223 c 1 + 403 -221 l 1 + 428 -213 448 -198 464 -177 c 0 + 483 -153 499 -126 514 -98 c 1 + 541 -42 562 24 580 99 c 1 + 591 136 599 176 606 220 c 1 + 749 220 l 1 + 729.664 130.336 711.706 39.2939 691 -49 c 0 + 687.667 -65.667 682.667 -83 676 -101 c 128 + 663.221 -135.5 644.075 -190 609 -190 c 1 + 598.662 -188.966 594.479 -186.362 600 -179 c 0 + 602.67 -177 606.336 -172.333 611 -165 c 128 + 619.398 -151.813 632 -140.113 632 -120 c 0 + 632 -99.9219 618.386 -69 597 -69 c 0 + 563.31 -69 548 -108.178 548 -140 c 0 + 548 -186.317 574.383 -223 619 -223 c 0 + 671.698 -223 712.343 -163.132 736 -117 c 0 + 778.939 -34.5586 819.986 111.195 839 220 c 1 + 983 220 l 1 +EndSplineSet +EndChar + +StartChar: u +Encoding: 117 117 89 +Width: 322 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 265 m 5 + 322 265 l 5 + 322 -2 l 5 + 270 -2 l 5 + 270 189 l 5 + 52 189 l 5 + 52 -2 l 5 + 0 -2 l 5 + 0 265 l 5 +EndSplineSet +EndChar + +StartChar: NameMe.58897 +Encoding: 1114112 -1 90 +Width: 322 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -2 m 5 + 322 -2 l 5 + 322 265 l 5 + 270 265 l 5 + 270 74 l 5 + 52 74 l 5 + 52 265 l 5 + 0 265 l 5 + 0 -2 l 5 +EndSplineSet +EndChar + +StartChar: NameMe.58898 +Encoding: 1114113 -1 91 +Width: 263 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 418 m 5 + 36 418 l 5 + 130 104 l 5 + 226 418 l 5 + 262 418 l 5 + 130 0 l 5 + 0 418 l 5 +EndSplineSet +EndChar + +StartChar: NameMe.58899 +Encoding: 1114114 -1 92 +Width: 263 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 418 m 5 + 36 418 l 5 + 130 104 l 5 + 226 418 l 5 + 262 418 l 5 + 130 0 l 5 + 0 418 l 5 +EndSplineSet +EndChar + +StartChar: uniE4A0 +Encoding: 58528 58528 93 +Width: 347 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 236 m 5 + 347 117 l 5 + 0 0 l 5 + 0 28 l 5 + 257 117 l 5 + 0 208 l 5 + 0 236 l 5 +EndSplineSet +EndChar + +StartChar: uniE4A1 +Encoding: 58529 58529 94 +Width: 347 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +0 -236 m 5 + 347 -117 l 5 + 0 0 l 5 + 0 -28 l 5 + 257 -117 l 5 + 0 -208 l 5 + 0 -236 l 5 +EndSplineSet +EndChar + +StartChar: uniE4A8 +Encoding: 58536 58536 95 +Width: 153 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +153 214 m 5 + 116 214 l 5 + 106 210 97.333 200 90 184 c 4 + 86.667 176.667 82 172 76 170 c 5 + 72 171.333 65.333 180 56 196 c 4 + 51.333 204.667 44.667 210.667 36 214 c 5 + 0 214 l 5 + 76 0 l 5 + 153 214 l 5 +EndSplineSet +EndChar + +StartChar: uniE4A9 +Encoding: 58537 58537 96 +Width: 153 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +153 -214 m 1 + 116 -214 l 1 + 106 -210 97.333 -200 90 -184 c 0 + 86.667 -176.667 82 -172 76 -170 c 1 + 72 -171.333 65.333 -180 56 -196 c 0 + 51.333 -204.667 44.667 -210.667 36 -214 c 1 + 0 -214 l 1 + 76 0 l 1 + 153 -214 l 1 +EndSplineSet +EndChar + +StartChar: uniE4AA +Encoding: 58538 58538 97 +Width: 1000 +VWidth: 0 +Flags: HW +LayerCount: 2 +EndChar + +StartChar: uniE4AB +Encoding: 58539 58539 98 +Width: 274 +VWidth: 2048 +Flags: HW +LayerCount: 2 +EndChar + +StartChar: uniE568 +Encoding: 58728 58728 99 +Width: 468 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +468 126 m 4 + 468 195.355 430.486 242.042 362 244 c 4 + 339.333 244 318.333 239 299 229 c 5 + 278.398 216.323 254.209 196.949 235 180 c 5 + 212.439 156.228 189.186 133.147 166 110 c 5 + 150 96 135 85 121 77 c 132 + 107 69 94.667 64.667 84 64 c 4 + 64.2417 64 56.2814 77.5628 47 92 c 5 + 35 118 l 6 + 31.667 127.333 30 133.667 30 137 c 134 + 30 145 l 6 + 30 173.667 43.333 188 70 188 c 5 + 79 186 l 5 + 90 177 l 5 + 97 170 l 5 + 103.447 165.97 111.151 162 121 162 c 4 + 138.333 162 149.333 171.333 154 190 c 5 + 154 224.187 127.229 242.58 96 244 c 5 + 73.1704 244 70.2894 244.34 55 236 c 5 + 22.0184 222.418 0 182.422 0 139 c 4 + 0 88.5491 20.6276 52.237 49 25 c 5 + 67 10.333 85.333 2 104 0 c 5 + 130 0 155 7 179 21 c 4 + 187.667 26.333 193.667 30 197 32 c 6 + 215 47 l 134 + 223.638 54.1975 240.24 69.1328 248 78 c 6 + 313 145 l 5 + 323 154 l 5 + 345 170 l 5 + 358.333 177.333 370.667 181 382 181 c 4 + 419.101 181 437 145.129 437 111 c 4 + 437 83.0401 425.03 56 398 56 c 5 + 391.647 58.1187 387.309 60.7935 381 65 c 6 + 363 78 l 6 + 359.667 80.667 353.667 82 345 82 c 4 + 325.549 82 315.324 64.7595 313 45 c 5 + 313 16.949 341.285 3.28677 371 1 c 5 + 414.494 1 440.733 32.4674 456 63 c 132 + 464.667 80.333 468.667 101.333 468 126 c 4 +EndSplineSet +EndChar + +StartChar: uniE567 +Encoding: 58727 58727 100 +Width: 468 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +468 118 m 4 + 468 48.6445 430.486 1.95801 362 0 c 4 + 339.333 0 318.333 5 299 15 c 5 + 278.397 27.6768 254.209 47.0508 235 64 c 5 + 212.438 87.7725 189.187 110.854 166 134 c 5 + 150 148 135 159 121 167 c 132 + 107 175 94.667 179.333 84 180 c 4 + 64.2422 180 56.2812 166.438 47 152 c 5 + 35 126 l 6 + 31.667 116.667 30 110.333 30 107 c 134 + 30 99 l 6 + 30 70.333 43.333 56 70 56 c 5 + 79 58 l 5 + 90 67 l 5 + 97 74 l 5 + 103.447 78.0293 111.151 82 121 82 c 4 + 138.333 82 149.333 72.667 154 54 c 5 + 154 19.8125 127.229 1.41992 96 0 c 5 + 73.1699 0 70.2891 -0.339844 55 8 c 5 + 22.0186 21.582 0 61.5781 0 105 c 4 + 0 155.451 20.6279 191.763 49 219 c 5 + 67 233.667 85.333 242 104 244 c 5 + 130 244 155 237 179 223 c 4 + 187.667 217.667 193.667 214 197 212 c 6 + 215 197 l 134 + 223.638 189.803 240.24 174.867 248 166 c 6 + 313 99 l 5 + 323 90 l 5 + 345 74 l 5 + 358.333 66.667 370.667 63 382 63 c 4 + 419.102 63 437 98.8711 437 133 c 4 + 437 160.96 425.029 188 398 188 c 5 + 391.646 185.881 387.309 183.206 381 179 c 6 + 363 166 l 6 + 359.667 163.333 353.667 162 345 162 c 4 + 325.549 162 315.324 179.24 313 199 c 5 + 313 227.051 341.285 240.713 371 243 c 5 + 414.493 243 440.732 211.532 456 181 c 132 + 464.667 163.667 468.667 142.667 468 118 c 4 +EndSplineSet +EndChar + +StartChar: uniE56E +Encoding: 58734 58734 101 +Width: 711 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +710 134 m 1 + 601 7 l 2 + 598.333 3.66667 596 1.66667 594 1 c 128 + 591 0 591 0 588 -1 c 1 + 582.649 1 579.316 2.66667 578 4 c 2 + 489 82 l 2 + 484.33 86.6667 478.663 89.3333 472 90 c 1 + 468 88.6667 465.333 87.3333 464 86 c 2 + 398 7 l 1 + 394.667 1.66667 390.333 -1 385 -1 c 1 + 374 4 l 1 + 285 82 l 2 + 279 86.6667 273.667 89.3333 269 90 c 1 + 265 88.6667 262.333 87.3333 261 86 c 2 + 194 7 l 2 + 188.667 1.66667 184 -1 180 -1 c 0 + 178 -1 174.667 0.666667 170 4 c 2 + 82 82 l 2 + 76.6667 86.6667 71 89.3333 65 90 c 1 + 60.3333 88.6667 57.6667 87.3333 57 86 c 2 + 0 18 l 1 + 0 67 l 1 + 108 194 l 1 + 118 198 l 2 + 118.667 198 120 197.667 122 197 c 128 + 124 196.333 128 194 134 190 c 1 + 222 112 l 1 + 232 107 l 1 + 236 107 240.667 109.667 246 115 c 2 + 313 194 l 1 + 316.333 196.667 319 198 321 198 c 0 + 325.667 198 331 195.333 337 190 c 2 + 426 112 l 1 + 437 107 l 1 + 443 108 l 1 + 450 115 l 1 + 517 194 l 1 + 520.333 196.667 522.667 198 524 198 c 0 + 528 196.666 530.667 195.333 532 194 c 2 + 539 188 l 1 + 628 111 l 2 + 631.333 107.667 635 106 639 106 c 128 + 643 106 647.333 108.667 652 114 c 2 + 710 181 l 1 + 710 134 l 1 +EndSplineSet +EndChar + +StartChar: uniE56A +Encoding: 58730 58730 102 +Width: 248 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +126 468 m 4 + 195.355 468 242.042 430.486 244 362 c 4 + 244 339.333 239 318.333 229 299 c 5 + 216.323 278.397 196.949 254.209 180 235 c 5 + 156.228 212.438 133.146 189.187 110 166 c 5 + 96 150 85 135 77 121 c 132 + 69 107 64.667 94.667 64 84 c 4 + 64 64.2422 77.5625 56.2812 92 47 c 5 + 118 35 l 6 + 127.333 31.667 133.667 30 137 30 c 134 + 145 30 l 6 + 173.667 30 188 43.333 188 70 c 5 + 186 79 l 5 + 177 90 l 5 + 170 97 l 5 + 165.971 103.447 162 111.151 162 121 c 4 + 162 138.333 171.333 149.333 190 154 c 5 + 224.188 154 242.58 127.229 244 96 c 5 + 244 73.1699 244.34 70.2891 236 55 c 5 + 222.418 22.0186 182.422 0 139 0 c 4 + 88.5488 0 52.2373 20.6279 25 49 c 5 + 10.333 67 2 85.333 0 104 c 5 + 0 130 7 155 21 179 c 4 + 26.333 187.667 30 193.667 32 197 c 6 + 47 215 l 134 + 54.1973 223.638 69.1328 240.24 78 248 c 6 + 145 313 l 5 + 154 323 l 5 + 170 345 l 5 + 177.333 358.333 181 370.667 181 382 c 4 + 181 419.102 145.129 437 111 437 c 4 + 83.04 437 56 425.029 56 398 c 5 + 58.1191 391.646 60.7939 387.309 65 381 c 6 + 78 363 l 6 + 80.667 359.667 82 353.667 82 345 c 4 + 82 325.549 64.7598 315.324 45 313 c 5 + 16.9492 313 3.28711 341.285 1 371 c 5 + 1 414.493 32.4678 440.732 63 456 c 132 + 80.333 464.667 101.333 468.667 126 468 c 4 +EndSplineSet +EndChar + +StartChar: uniE569 +Encoding: 58729 58729 103 +Width: 248 +VWidth: 2048 +Flags: HW +LayerCount: 2 +EndChar + +StartChar: uniE4AC +Encoding: 58540 58540 104 +Width: 274 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +273 0 m 5 + 214 0 l 5 + 106 180 l 5 + 24 0 l 5 + 0 0 l 5 + 114 265 l 5 + 273 0 l 5 +EndSplineSet +EndChar + +StartChar: uniE4AD +Encoding: 58541 58541 105 +Width: 274 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +273 0 m 5 + 214 0 l 5 + 106 -180 l 5 + 24 0 l 5 + 0 0 l 5 + 114 -265 l 5 + 273 0 l 5 +EndSplineSet +EndChar + +StartChar: uniE56B +Encoding: 58731 58731 106 +Width: 248 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +118 468 m 4 + 48.6445 468 1.95801 430.486 0 362 c 4 + 0 339.333 5 318.333 15 299 c 5 + 27.6768 278.397 47.0508 254.209 64 235 c 5 + 87.7725 212.438 110.854 189.187 134 166 c 5 + 148 150 159 135 167 121 c 132 + 175 107 179.333 94.667 180 84 c 4 + 180 64.2422 166.438 56.2812 152 47 c 5 + 126 35 l 6 + 116.667 31.667 110.333 30 107 30 c 134 + 99 30 l 6 + 70.333 30 56 43.333 56 70 c 5 + 58 79 l 5 + 67 90 l 5 + 74 97 l 5 + 78.0293 103.447 82 111.151 82 121 c 4 + 82 138.333 72.667 149.333 54 154 c 5 + 19.8125 154 1.41992 127.229 0 96 c 5 + 0 73.1699 -0.339844 70.2891 8 55 c 5 + 21.582 22.0186 61.5781 0 105 0 c 4 + 155.451 0 191.763 20.6279 219 49 c 5 + 233.667 67 242 85.333 244 104 c 5 + 244 130 237 155 223 179 c 4 + 217.667 187.667 214 193.667 212 197 c 6 + 197 215 l 134 + 189.803 223.638 174.867 240.24 166 248 c 6 + 99 313 l 5 + 90 323 l 5 + 74 345 l 5 + 66.667 358.333 63 370.667 63 382 c 4 + 63 419.102 98.8711 437 133 437 c 4 + 160.96 437 188 425.029 188 398 c 5 + 185.881 391.646 183.206 387.309 179 381 c 6 + 166 363 l 6 + 163.333 359.667 162 353.667 162 345 c 4 + 162 325.549 179.24 315.324 199 313 c 5 + 227.051 313 240.713 341.285 243 371 c 5 + 243 414.493 211.532 440.732 181 456 c 132 + 163.667 464.667 142.667 468.667 118 468 c 4 +EndSplineSet +EndChar + +StartChar: uniE938 +Encoding: 59704 59704 107 +Width: 312 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +EndSplineSet +EndChar + +StartChar: uniE939 +Encoding: 59705 59705 108 +Width: 312 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +125 111 m 5 + 68 38 l 5 + 190 -111 l 5 + 246 -40 l 5 + 125 111 l 5 +EndSplineSet +EndChar + +StartChar: uniE93C +Encoding: 59708 59708 109 +Width: 312 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +125 111 m 5 + 68 38 l 5 + 190 -111 l 5 + 246 -40 l 5 + 125 111 l 5 +EndSplineSet +EndChar + +StartChar: uniE93D +Encoding: 59709 59709 110 +Width: 312 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +155 194 m 5 + 312 0 l 5 + 155 -192 l 5 + 0 0 l 5 + 155 194 l 5 +EndSplineSet +EndChar + +StartChar: uniE101 +Encoding: 57601 57601 111 +Width: 508 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +508 242 m 1 + 146 -242 l 1 + 0 -242 l 1 + 362 242 l 1 + 508 242 l 1 +EndSplineSet +EndChar + +StartChar: uniE501 +Encoding: 58625 58625 112 +Width: 751 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +750 242 m 1 + 388 -242 l 1 + 242 -242 l 1 + 604 242 l 1 + 750 242 l 1 +508 242 m 1 + 146 -242 l 1 + 0 -242 l 1 + 362 242 l 1 + 508 242 l 1 +52 118 m 4 + 52 131.333 56.333 142.667 65 152 c 132 + 73.667 161.333 84.333 166.333 97 167 c 5 + 111 167 122.667 163 132 155 c 132 + 141.333 147 146.333 136 147 122 c 4 + 147 108.667 142.667 97.333 134 88 c 132 + 125.333 78.667 114.667 73.667 102 73 c 5 + 88 73 76.333 77 67 85 c 132 + 57.667 93 52.667 104 52 118 c 4 +603 -121 m 0 + 603 -107.667 607.333 -96.333 616 -87 c 128 + 624.667 -77.667 635.334 -72.667 648 -72 c 1 + 662 -72 673.667 -76 683 -84 c 128 + 692.333 -92 697.333 -103 698 -117 c 0 + 698 -130.333 693.667 -141.667 685 -151 c 128 + 676.333 -160.333 665.667 -165.333 653 -166 c 1 + 639 -166 627.333 -162 618 -154 c 128 + 608.667 -146 603.667 -135 603 -121 c 0 +EndSplineSet +EndChar + +StartChar: uniE502 +Encoding: 58626 58626 113 +Width: 1234 +VWidth: 2048 +Flags: HW +LayerCount: 2 +Fore +SplineSet +1234 242 m 1 + 872 -242 l 5 + 726 -242 l 5 + 1088 242 l 1 + 1234 242 l 1 +992 242 m 1 + 630 -242 l 5 + 484 -242 l 5 + 846 242 l 1 + 992 242 l 1 +750 242 m 1 + 388 -242 l 5 + 242 -242 l 5 + 604 242 l 1 + 750 242 l 1 +508 242 m 1 + 146 -242 l 5 + 0 -242 l 5 + 362 242 l 1 + 508 242 l 1 +52 118 m 0 + 52 131.333 56.333 142.667 65 152 c 128 + 73.667 161.333 84.333 166.333 97 167 c 1 + 111 167 122.667 163 132 155 c 128 + 141.333 147 146.333 136 147 122 c 0 + 147 108.667 142.667 97.333 134 88 c 128 + 125.333 78.667 114.667 73.667 102 73 c 1 + 88 73 76.333 77 67 85 c 128 + 57.667 93 52.667 104 52 118 c 0 +1087 -121 m 0 + 1087 -107.667 1091.33 -96.333 1100 -87 c 128 + 1108.67 -77.667 1119.33 -72.667 1132 -72 c 1 + 1146 -72 1157.67 -76 1167 -84 c 128 + 1176.33 -92 1181.33 -103 1182 -117 c 0 + 1182 -130.333 1177.67 -141.667 1169 -151 c 128 + 1160.33 -160.333 1149.67 -165.333 1137 -166 c 1 + 1123 -166 1111.33 -162 1102 -154 c 128 + 1092.67 -146 1087.67 -135 1087 -121 c 0 +EndSplineSet +EndChar +EndChars +EndSplineFont diff --git a/fonts/Leipzig.svg b/fonts/Leipzig.svg index 43d799fd2cc..49f630b76ff 100644 --- a/fonts/Leipzig.svg +++ b/fonts/Leipzig.svg @@ -1,16 +1,22 @@ -Created by FontForge 20120731 at Tue Jan 6 16:47:08 2015 +Created by FontForge 20120731 at Fri Aug 28 13:54:39 2015 By laurent -Created by Etienne Darbellay, Jean-Francois Marti and Laurent Pugin with FontForge 2.0. This font is licensed under the SIL Open Font License \(http://scripts.sil.org/OFL\). +Created by Etienne Darbellay, Jean-Francois Marti and Laurent Pugin. +This font is licensed under the SIL Open Font License \(http://scripts.sil.org/OFL\). +Version 5.2.1 - + - - - - - - - - @@ -259,15 +266,221 @@ c-13 -5 -21 -8 -37 -8c-43 0 -69 29 -69 72c0 33 11 63 32 90s52 41 91 41zM167 264c d="M18 208c0 -27 17 -47 45 -47l3 -2l13 4l23 9l14 55c-17 15 -35 22 -55 22c-26 0 -43 -17 -43 -41zM432 225c0 -21 -11 -36 -31 -37c-15 0 -20 10 -23 25l3 14l2 11l1 9l-4 4c-1 -1 -2 -1 -3 -1c-23 -13 -36 -24 -47 -48l-12 -27c-18 -50 -31 -105 -47 -157h-60l58 214 c0 7 -3 5 -5 9c-7 0 -25 -8 -51 -28l-43 -33l5 6c21 -35 32 -68 32 -98c0 -12 -1 -21 -4 -28l-6 -15c-1 -3 -5 -10 -12 -19c-14 -18 -30 -26 -49 -26c-30 0 -67 18 -67 52c1 1 1 6 3 15l20 84c-9 -5 -21 -8 -36 -8c-21 0 -29 7 -40 19c-10 12 -16 27 -16 47c0 23 6 33 17 45 s25 18 46 18c19 0 39 -8 60 -25l34 117h63l-46 -158l38 31l32 20c21 10 35 13 62 15c16 0 24 -7 24 -21l-1 -10l-6 -24c21 37 44 55 70 55c23 0 39 -23 39 -47zM162 167l-36 -115l-1 -10c0 -10 5 -16 16 -19c32 18 48 43 48 75c0 20 -9 43 -27 69z" /> - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fonts/extract-glyphs.xsl b/fonts/extract-glyphs.xsl index eafb4903830..0b32514ffb8 100644 --- a/fonts/extract-glyphs.xsl +++ b/fonts/extract-glyphs.xsl @@ -30,10 +30,11 @@ + - + diff --git a/fonts/supported.xsl b/fonts/supported.xsl index a5a3787f519..38373b1a7ae 100644 --- a/fonts/supported.xsl +++ b/fonts/supported.xsl @@ -68,13 +68,13 @@ - - - - + + + + - + U+E04F @@ -269,7 +269,7 @@ Slash noteheads - + @@ -554,11 +554,11 @@ Tremolos - - - - - + + + + + @@ -1108,20 +1108,20 @@ Articulation - - + --> + --> - - + + - - + + @@ -1196,9 +1196,9 @@ Bar repeats - - - + + + U+E50F U+E500 @@ -1221,12 +1221,12 @@ Dynamics - - - - - - + + + + + + @@ -1236,10 +1236,10 @@ - - - - + + + + @@ -1277,14 +1277,14 @@ - - + + - - + + - + U+E56F U+E560 @@ -1505,12 +1505,12 @@ Keyboard techniques - + - + @@ -2015,7 +2015,7 @@ - + U+E88F U+E880 @@ -2185,13 +2185,13 @@ - - + + - - + + diff --git a/include/vrv/accid.h b/include/vrv/accid.h index e9dec144259..f75e782b7e2 100644 --- a/include/vrv/accid.h +++ b/include/vrv/accid.h @@ -32,8 +32,12 @@ class Accid: public LayerElement, public PositionInterface, virtual ~Accid(); virtual void Reset(); virtual std::string GetClassName( ) { return "Accid"; }; + virtual ClassId Is() { return ACCID; }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + //----------// // Functors // @@ -42,13 +46,18 @@ class Accid: public LayerElement, public PositionInterface, /** * See Object::PreparePointersByLayer */ - virtual int PreparePointersByLayer( ArrayPtrVoid params ); + virtual int PreparePointersByLayer( ArrayPtrVoid *params ); protected: private: public: + /** + * Indicates if is cue size for accid object created for @accid. + * See Note::PreparePointersByLayer and View::DrawAccid + */ + bool m_drawingCueSize; private: diff --git a/include/vrv/aligner.h b/include/vrv/aligner.h index 7a6013dbb1e..8ff753aa9da 100644 --- a/include/vrv/aligner.h +++ b/include/vrv/aligner.h @@ -13,9 +13,11 @@ namespace vrv { -class SystemAligner; -class StaffAlignment; +class GraceAligner; class MeasureAligner; +class Note; +class StaffAlignment; +class SystemAligner; /** * Alignment types for aligning types together. @@ -24,12 +26,14 @@ class MeasureAligner; * this to avoid notes aligning to it */ enum AlignmentType { + // Non-justiable ALIGNMENT_MEASURE_START = 0, ALIGNMENT_BARLINE, ALIGNMENT_CLEF_ATTR, ALIGNMENT_KEYSIG_ATTR, ALIGNMENT_MENSUR_ATTR, ALIGNMENT_METERSIG_ATTR, + // Justifiable ALIGNMENT_CLEF, ALIGNMENT_KEYSIG, ALIGNMENT_MENSUR, @@ -37,7 +41,8 @@ enum AlignmentType { ALIGNMENT_DOT, ALIGNMENT_GRACENOTE, ALIGNMENT_CONTAINER, - ALIGNMENT_MULTIREST, + ALIGNMENT_FULLMEASURE, + ALIGNMENT_FULLMEASURE2, ALIGNMENT_DEFAULT, ALIGNMENT_MEASURE_END }; @@ -56,6 +61,7 @@ class SystemAligner: public Object // constructors and destructors SystemAligner(); virtual ~SystemAligner(); + virtual ClassId Is() { return SYSTEM_ALIGNER; } int GetStaffAlignmentCount() const { return (int)m_children.size(); }; @@ -102,6 +108,7 @@ class StaffAlignment: public Object // constructors and destructors StaffAlignment(); virtual ~StaffAlignment(); + virtual ClassId Is() { return STAFF_ALIGNMENT; } void SetYRel( int yRel ) { m_yRel = yRel; }; int GetYRel() { return m_yRel; }; @@ -125,13 +132,13 @@ class StaffAlignment: public Object * Set the position of the StaffAlignment. * Functor redirected from System. */ - virtual int SetAligmentYPos( ArrayPtrVoid params ); + virtual int SetAligmentYPos( ArrayPtrVoid *params ); /** * Correct the Y alignment once the the content of a system has been aligned and laid out. * Special case of functor redirected from System. */ - virtual int IntegrateBoundingBoxYShift( ArrayPtrVoid params ); + virtual int IntegrateBoundingBoxYShift( ArrayPtrVoid *params ); private: @@ -154,7 +161,6 @@ class StaffAlignment: public Object int m_verseCount; }; - //---------------------------------------------------------------------------- // Alignment //---------------------------------------------------------------------------- @@ -169,6 +175,7 @@ class Alignment: public Object Alignment( ); Alignment( double time, AlignmentType type = ALIGNMENT_DEFAULT ); virtual ~Alignment(); + virtual ClassId Is() { return ALIGNMENT; } void SetXRel( int x_rel ); int GetXRel() { return m_xRel; }; @@ -176,9 +183,9 @@ class Alignment: public Object void SetXShift( int xShift ); int GetXShift() { return m_xShift; }; - void SetMaxWidth( int max_width ); + void SetMaxWidth( int maxWidth ); int GetMaxWidth() { return m_maxWidth; }; - + /** * @name Set and get the time value of the alignment */ @@ -195,23 +202,43 @@ class Alignment: public Object AlignmentType GetType() { return m_type; }; ///@} + /** + * Returns the GraceAligner for the Alignment. + * Creates it if necessary. + */ + GraceAligner *GetGraceAligner( ); + + /** + * Returns true if the aligner has a GraceAligner + */ + bool HasGraceAligner( ) { return (m_graceAligner != NULL); }; + + /** + * Correct the X alignment of grace notes once the the content of a system has been aligned and laid out. + * Special case that redirects the functor to the GraceAligner. + */ + virtual int IntegrateBoundingBoxGraceXShift( ArrayPtrVoid *params ); + /** * Correct the X alignment once the the content of a system has been aligned and laid out. * Special case of functor redirected from Measure. */ - virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid params ); + virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid *params ); + + virtual int HorizontalSpaceForDuration(double intervalTime, bool isMensural); + /** * Set the position of the Alignment. * Looks at the time different with the previous Alignment. */ - virtual int SetAligmentXPos( ArrayPtrVoid params ); + virtual int SetAligmentXPos( ArrayPtrVoid *params ); /** * Justify the X positions * Special case of functor redirected from Measure. */ - virtual int JustifyX( ArrayPtrVoid params ); + virtual int JustifyX( ArrayPtrVoid *params ); private: @@ -250,6 +277,11 @@ class Alignment: public Object * of them occur at time 0. */ AlignmentType m_type; + /** + * A pointer to a GraceAligner if any. + * The Algnment owns it. + */ + GraceAligner *m_graceAligner; }; @@ -267,6 +299,7 @@ class MeasureAligner: public Object // constructors and destructors MeasureAligner(); virtual ~MeasureAligner(); + virtual ClassId Is() { return MEASURE_ALIGNER; } int GetAlignmentCount() const { return (int)m_children.size(); }; @@ -275,7 +308,7 @@ class MeasureAligner: public Object */ virtual void Reset(); - Alignment* GetAlignmentAtTime( double time, AlignmentType type ); + Alignment* GetAlignmentAtTime( double time, AlignmentType type, bool hasEndAlignment = true ); /** * Keep the maximum time of the measure. @@ -310,20 +343,20 @@ class MeasureAligner: public Object * Correct the X alignment once the the content of a system has been aligned and laid out. * Special case of functor redirected from Measure. */ - virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid params ); + virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid *params ); /** * Set the position of the Alignment. * Looks at the time different with the previous Alignment. * For each MeasureAlignment, we need to reset the previous time position. */ - virtual int SetAligmentXPos( ArrayPtrVoid params ); + virtual int SetAligmentXPos( ArrayPtrVoid *params ); /** * Justify the X positions * Special case of functor redirected from Measure. */ - virtual int JustifyX( ArrayPtrVoid params ); + virtual int JustifyX( ArrayPtrVoid *params ); private: void AddAlignment( Alignment *alignment, int idx = -1 ); @@ -346,6 +379,60 @@ class MeasureAligner: public Object */ int m_nonJustifiableLeftMargin; }; + +//---------------------------------------------------------------------------- +// GraceAligner +//---------------------------------------------------------------------------- + +/** + * This class aligns the content of a grace note group + * It contains a vector of Alignment + */ +class GraceAligner: public MeasureAligner +{ +public: + // constructors and destructors + GraceAligner( ); + virtual ~GraceAligner(); + virtual ClassId Is() { return GRACE_ALIGNER; } + + /** + * Because the grace notes appear from left to right but need to be aligned + * from right to left, we first need to stack them and align them eventually + * when we have all of them. This is done by GraceAligner::AlignNote called + * at the end of each Layer in + */ + void StackNote( Note *note ); + + /** + * Align the notes in the reverse order + */ + void AlignStack( ); + + /** + * @name Setter and getter for the width ofthe group of grace notes + */ + ///@{ + void SetWidth( int totalWidth ) { m_totalWidth = totalWidth; }; + int GetWidth( ) { return m_totalWidth; }; + ///@} + +private: + +public: + +private: + /** + * The stack of notes where the are piled up before getting aligned + */ + ArrayOfObjects m_noteStack; + /** + * The witdth of the group of grace notes instanciated after the bounding + * boxes X are integrated in Alignment::IntegrateBoundingBoxGraceXShift + */ + int m_totalWidth; + +}; } // namespace vrv diff --git a/include/vrv/att.h b/include/vrv/att.h index 20eb7b37adc..a12558ddf5d 100644 --- a/include/vrv/att.h +++ b/include/vrv/att.h @@ -8,15 +8,14 @@ #ifndef __VRV_ATT_H__ #define __VRV_ATT_H__ -#include #include //---------------------------------------------------------------------------- -#include "attdef.h" +#include "vrvdef.h" namespace vrv { - + class Object; //---------------------------------------------------------------------------- @@ -111,6 +110,9 @@ class Att std::string BarRenditionToStr(data_BARRENDITION data); data_BARRENDITION StrToBarRendition(std::string value); + std::string BeatrptRendToStr(data_BEATRPT_REND data); + data_BEATRPT_REND StrToBeatrptRend(std::string value); + std::string BoolToStr(data_BOOLEAN data); data_BOOLEAN StrToBool(std::string value); @@ -120,6 +122,9 @@ class Att std::string ConToStr(data_CON data); data_CON StrToCon(std::string value); + std::string CurvedirToStr(data_CURVEDIR data); + data_CURVEDIR StrToCurvedir(std::string value); + std::string DurToStr(data_DURATION data); data_DURATION StrToDur(std::string value); @@ -131,6 +136,9 @@ class Att std::string FuncToStr(data_FUNC data); data_FUNC StrToFunc(std::string value); + + std::string GraceToStr(data_GRACE data); + data_GRACE StrToGrace(std::string value); std::string KeySignatureToStr(data_KEYSIGNATURE data); data_KEYSIGNATURE StrToKeySignature(std::string value); @@ -156,6 +164,12 @@ class Att std::string ModusminorToStr(data_MODUSMINOR data); data_MODUSMINOR StrToModusminor(std::string value); + std::string NumformatToStr(data_NUMFORMAT data); + data_NUMFORMAT StrToNumformat(std::string value); + + std::string PercentToStr(data_PERCENT data); + data_PERCENT StrToPercent(std::string value); + std::string OctaveDisToStr(data_OCTAVE_DIS data); data_OCTAVE_DIS StrToOctaveDis(std::string value); @@ -170,6 +184,9 @@ class Att std::string ProlatioToStr(data_PROLATIO data); data_PROLATIO StrToProlatio(std::string value); + + std::string StaffRelToStr(data_STAFFREL data); + data_STAFFREL StrToStaffRel(std::string value); std::string StemDirectionToStr(data_STEMDIRECTION data); data_STEMDIRECTION StrToStemDirection(std::string value); @@ -177,6 +194,9 @@ class Att std::string StemPositionToStr(data_STEMPOSITION data); data_STEMPOSITION StrToStemPosition(std::string value); + std::string SymbolToStr(data_SYMBOL data); + data_SYMBOL StrToSymbol(std::string value); + std::string TempusToStr(data_TEMPUS data); data_TEMPUS StrToTempus(std::string value); @@ -193,6 +213,54 @@ class Att }; +//---------------------------------------------------------------------------- +// Interface +//---------------------------------------------------------------------------- + +/** + * This is a base class for regrouping MEI att classes. + * It is not an abstract class but it should not be instanciated directly. + * The inherited classes should overwrite the InterfaceId method for returning + * their own InterfaceId. + */ + +class Interface +{ + +public: + /** + * @name Constructors, destructors, and other standard methods + * Reset method reset all attribute classes + */ + ///@{ + Interface() {}; + virtual ~Interface() {}; + ///@} + + /** + * Method for registering an MEI att classes in the interface. + */ + void RegisterInterfaceAttClass( AttClassId attClassId ) { m_interfaceAttClasses.push_back( attClassId ); }; + + /** + * Method for obtaining a pointer to the attribute class vector of the interface + */ + std::vector *GetAttClasses() { return &m_interfaceAttClasses; }; + + /** + * Virtual method returning the InterfaceId of the interface. + * Needs to be overwritten in child classes. + */ + virtual InterfaceId IsInterface() { return INTERFACE; }; + + +private: + /** + * A vector for storing all the MEI att classes grouped in the interface + */ + std::vector m_interfaceAttClasses; +}; + //---------------------------------------------------------------------------- // AttComparison //---------------------------------------------------------------------------- @@ -201,18 +269,18 @@ class AttComparison { public: - AttComparison( const std::type_info *elementType ) { - m_elementType = elementType; + AttComparison( ClassId classId ) { + m_classId = classId; }; virtual bool operator() (Object *object); - const std::type_info *GetType() { return m_elementType; }; + ClassId GetType() { return m_classId; }; bool MatchesType( Object *object ); protected: - const std::type_info *m_elementType; + ClassId m_classId; }; } // namespace vrv diff --git a/include/vrv/att_comparison.h b/include/vrv/att_comparison.h index 222757e953a..300324dd2c2 100644 --- a/include/vrv/att_comparison.h +++ b/include/vrv/att_comparison.h @@ -20,8 +20,8 @@ class AttCommonNComparison: public AttComparison { public: - AttCommonNComparison( const std::type_info *elementType, const int n ): - AttComparison( elementType ) + AttCommonNComparison( ClassId AttClassId, const int n ): + AttComparison( AttClassId ) { m_n = n; }; @@ -31,8 +31,10 @@ class AttCommonNComparison: public AttComparison virtual bool operator() (Object *object) { if (!MatchesType(object)) return false; + // This should not happen but, but just in case + if (!object->HasAttClass( ATT_COMMON )) return false; AttCommon *element = dynamic_cast(object); - if (!element) return false; + assert( element ); return (element->GetN() == m_n); } diff --git a/include/vrv/attdef.h b/include/vrv/attdef.h index eb79eff763a..85238119c3a 100644 --- a/include/vrv/attdef.h +++ b/include/vrv/attdef.h @@ -20,8 +20,7 @@ namespace vrv { typedef std::vector > ArrayOfStrAttr; #define VRV_UNSET -0x7FFFFFFF - - + //---------------------------------------------------------------------------- // Durations //---------------------------------------------------------------------------- @@ -95,7 +94,7 @@ enum data_ACCIDENTAL_IMPLICIT { }; /** - * MEI data_BARRENDITION + * MEI data.BARRENDITION */ enum data_BARRENDITION { BARRENDITION_NONE = 0, @@ -112,6 +111,20 @@ enum data_BARRENDITION { BARRENDITION_single }; +/** + * MEI data.BEATRPT_REND + */ +enum data_BEATRPT_REND { + BEATRPT_REND_NONE = 0, + BEATRPT_REND_4, + BEATRPT_REND_8, + BEATRPT_REND_16, + BEATRPT_REND_32, + BEATRPT_REND_64, + BEATRPT_REND_128, + BEATRPT_REND_mixed +}; + /** * MEI data.BOOEAN */ @@ -148,6 +161,15 @@ enum data_CON { CON_i, CON_b }; + +/** + * MEI values for @curvedir (no datatype in MEI) + */ +enum data_CURVEDIR { + CURVEDIR_NONE = 0, + CURVEDIR_above, + CURVEDIR_below +}; /** * MEI data.DURATION @@ -197,6 +219,16 @@ enum data_FONTWEIGHT { FONTWEIGHT_normal }; +/** + * MEI data.GRACE + */ +enum data_GRACE { + GRACE_NONE = 0, + GRACE_acc, + GRACE_unacc, + GRACE_unknown +}; + /** * MEI values for @func (no datatype in MEI) @@ -307,6 +339,15 @@ enum data_MODUSMINOR { MODUSMINOR_3 }; +/** + * MEI values for @num.format (no datatype in MEI) + */ +enum data_NUMFORMAT { + NUMFORMAT_NONE = 0, + NUMFORMAT_count, + NUMFORMAT_ratio, +}; + /** * MEI data.OCTAVE.DIS */ @@ -317,6 +358,11 @@ enum data_OCTAVE_DIS { OCTAVE_DIS_22 = 22 }; +/** + * MEI value for @scale (no datatype in MEI) + */ +typedef int data_PERCENT; + /** * MEI data.PITCHNAME */ @@ -360,6 +406,26 @@ enum data_PLACE { PLACE_below }; +/** + * MEI values for @symbol (no datatype in MEI) + */ +enum data_SYMBOL { + SYMBOL_NONE = 0, + SYMBOL_brace, + SYMBOL_bracket, + SYMBOL_line +}; + +/** + * MEI data.STAFFREL + */ +enum data_STAFFREL { + STAFFREL_NONE = 0, + STAFFREL_above, + STAFFREL_below, + STAFFREL_within +}; + /** * MEI data.STEMDIRECTION */ diff --git a/include/vrv/barline.h b/include/vrv/barline.h index 4c4b9bc499c..12d66971ce6 100644 --- a/include/vrv/barline.h +++ b/include/vrv/barline.h @@ -35,7 +35,11 @@ class Barline: public LayerElement, virtual void Reset(); virtual Object* Clone() { return new Barline(*this); }; virtual std::string GetClassName( ) { return "Barline"; }; - ///@} + virtual ClassId Is() { return BARLINE; }; + ///@} + + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; /** * Use to set the alignment for the Measure Barline members. @@ -51,10 +55,6 @@ class Barline: public LayerElement, private: public: - /** Indicates a partial barLine (inbetween the staves) - no MEI equivalent */ - bool m_partialBarline; - /** Indicates a barLine displayed only on the staff - no MEI equivalent */ - bool m_onStaffOnly; private: @@ -65,7 +65,7 @@ class Barline: public LayerElement, //---------------------------------------------------------------------------- /** - * This class models the barLine reltaed attributes of a MEI measure + * This class models the barLine related attributes of a MEI measure. */ class BarlineAttr: public Barline { @@ -80,6 +80,7 @@ class BarlineAttr: public Barline virtual ~BarlineAttr(); virtual Object* Clone() { return new BarlineAttr(*this); }; virtual std::string GetClassName( ) { return "BarlineAttr"; }; + virtual ClassId Is() { return BARLINE_ATTR; }; ///@} }; diff --git a/include/vrv/beam.h b/include/vrv/beam.h index b39cea87373..b7c1efb2c75 100644 --- a/include/vrv/beam.h +++ b/include/vrv/beam.h @@ -10,7 +10,7 @@ #define __VRV_BEAM_H__ #include "layerelement.h" -#include "drawinglistinterface.h" +#include "drawinginterface.h" namespace vrv { @@ -40,6 +40,7 @@ class Beam: public LayerElement, public ObjectListInterface, public DrawingListI virtual ~Beam(); virtual void Reset(); virtual std::string GetClassName( ) { return "Beam"; }; + virtual ClassId Is() { return BEAM; }; ///@} int GetNoteCount() const { return (int)m_children.size(); }; @@ -50,6 +51,14 @@ class Beam: public LayerElement, public ObjectListInterface, public DrawingListI */ void AddLayerElement(LayerElement *element); + /** + * Return information about the position in the beam + */ + ///@{ + bool IsFirstInBeam(LayerElement *element); + bool IsLastInBeam(LayerElement *element); + ///@} + /** * @name Set and get the stem direction of the beam. */ diff --git a/include/vrv/chord.h b/include/vrv/chord.h index 0cdb819139f..8769df47468 100644 --- a/include/vrv/chord.h +++ b/include/vrv/chord.h @@ -9,10 +9,6 @@ #ifndef __VRV_CHORD_H__ #define __VRV_CHORD_H__ -#include - -//---------------------------------------------------------------------------- - #include "atts_shared.h" #include "durationinterface.h" #include "layerelement.h" @@ -48,8 +44,12 @@ class Chord: public LayerElement, public ObjectListInterface, public DurationInt virtual ~Chord(); virtual void Reset(); virtual std::string GetClassName( ) { return "Chord"; }; + virtual ClassId Is() { return CHORD; }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + /** * Add an element (only note supported) to a chord. */ @@ -64,6 +64,14 @@ class Chord: public LayerElement, public ObjectListInterface, public DurationInt */ void ResetAccidList(); + /** + * Return information about the position in the chord + */ + ///@{ + /** Return 0 if the note id the middle note, -1 if below it and 1 if above */ + int PositionInChord(Note *note); + ///@} + /** * Prepares a 2D grid of booleans to track where accidentals are placed. * Further documentation in chord.cpp comments. @@ -71,12 +79,11 @@ class Chord: public LayerElement, public ObjectListInterface, public DurationInt void ResetAccidSpace(int fullUnit); /** - * @name Set and get the stem direction of the beam. + * @name Set and get the stem direction of the chord. */ ///@{ void SetDrawingStemDir( data_STEMDIRECTION stemDirection ) { m_drawingStemDir = stemDirection; }; data_STEMDIRECTION GetDrawingStemDir() { return m_drawingStemDir; }; - ///@} //----------// @@ -86,12 +93,12 @@ class Chord: public LayerElement, public ObjectListInterface, public DurationInt /** * See Object::PrepareTieAttr */ - virtual int PrepareTieAttr( ArrayPtrVoid params ); + virtual int PrepareTieAttr( ArrayPtrVoid *params ); /** * See Object::PrepareTieAttr */ - virtual int PrepareTieAttrEnd( ArrayPtrVoid params ); + virtual int PrepareTieAttrEnd( ArrayPtrVoid *params ); protected: /** diff --git a/include/vrv/clef.h b/include/vrv/clef.h index fc7ef4dd803..0dfd1154c63 100644 --- a/include/vrv/clef.h +++ b/include/vrv/clef.h @@ -13,8 +13,8 @@ #include "layerelement.h" namespace vrv { - -class ClefAttr; + +class ScoreDefInterface; //---------------------------------------------------------------------------- // Clef @@ -35,13 +35,18 @@ class Clef: public LayerElement, */ ///@{ Clef(); - Clef( ClefAttr *clefAttr ); + Clef( ScoreDefInterface *clefAttr ); + void Init(); virtual ~Clef(); virtual void Reset(); virtual Object* Clone() { return new Clef(*this); }; virtual std::string GetClassName( ) { return "Clef"; }; + virtual ClassId Is() { return CLEF; }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + /** * Return the offset of the clef */ @@ -59,37 +64,6 @@ class Clef: public LayerElement, private: -}; - -//---------------------------------------------------------------------------- -// ClefAttr -//---------------------------------------------------------------------------- - -/** - * This class models the MEI @clef attributes in scoreDef or staffDef elements. - */ -class ClefAttr: public Object, - public AttCleffingLog -{ -public: - /** - * @name Constructors, destructors, reset and class name methods - * Reset method reset all attribute classes - */ - ///@{ - ClefAttr(); - virtual ~ClefAttr(); - virtual void Reset(); - virtual std::string GetClassName( ) { return "ClefAttr"; }; - virtual Object* Clone() { return new ClefAttr(*this); }; - ///@} - -private: - -public: - -private: - }; } // namespace vrv diff --git a/include/vrv/custos.h b/include/vrv/custos.h index 4494534fe5f..da7c2cf38bd 100644 --- a/include/vrv/custos.h +++ b/include/vrv/custos.h @@ -30,8 +30,12 @@ class Custos: public LayerElement, public PositionInterface virtual ~Custos(); virtual void Reset(); virtual std::string GetClassName( ) { return "Custos"; }; + virtual ClassId Is() { return CUSTOS; }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + protected: private: diff --git a/include/vrv/devicecontext.h b/include/vrv/devicecontext.h index be3c52f324d..08f6840ca31 100644 --- a/include/vrv/devicecontext.h +++ b/include/vrv/devicecontext.h @@ -44,7 +44,7 @@ class DeviceContext * @name Constructors, destructors, and other standard methods */ ///@{ - DeviceContext () { m_correctMusicAscent = true; m_drawingBoundingBoxes = false; m_isDeactivated = false; }; + DeviceContext () { m_drawingBoundingBoxes = false; m_isDeactivated = false; }; virtual ~DeviceContext() {}; ///@} @@ -80,7 +80,6 @@ class DeviceContext */ ///@{ virtual Point GetLogicalOrigin( ) = 0; - virtual bool CorrectMusicAscent( ) { return m_correctMusicAscent; }; ///@} /** @@ -173,7 +172,6 @@ class DeviceContext protected: - bool m_correctMusicAscent; // specify if the ascent has to be correct when view the music font (true wxDC, false SVG) bool m_drawingBoundingBoxes; /** * Flag for indicating if the VerovioText font is currently used. diff --git a/include/vrv/doc.h b/include/vrv/doc.h index 523b0d0c837..56279613ff2 100644 --- a/include/vrv/doc.h +++ b/include/vrv/doc.h @@ -11,12 +11,12 @@ #include "devicecontextbase.h" #include "scoredef.h" +#include "style.h" namespace vrv { class FontInfo; class Page; -class Style; enum DocType { Raw = 0, @@ -39,6 +39,7 @@ class Doc: public Object // constructors and destructors Doc(); virtual ~Doc(); + virtual ClassId Is() { return DOC; } void AddPage( Page *page ); @@ -67,7 +68,35 @@ class Doc: public Object * Get the total page count */ int GetPageCount( ); - + + /** + * @name Get the height or width for a glyph taking into account the staff and grace sizes + */ + ///@{ + int GetGlyphHeight( wchar_t smuflCode, int staffSize, bool graceSize ); + int GetGlyphWidth( wchar_t smuflCode, int staffSize, bool graceSize ); + int GetDrawingUnit( int staffSize ); + int GetDrawingDoubleUnit( int staffSize ); + int GetDrawingStaffSize( int staffSize ); + int GetDrawingOctaveSize( int staffSize ); + int GetDrawingBrevisWidth( int staffSize ); + int GetDrawingBarLineWidth( int staffSize ); + int GetDrawingStaffLineWidth( int staffSize ); + int GetDrawingStemWidth( int staffSize ); + int GetDrawingBeamWidth( int staffSize, bool graceSize ); + int GetDrawingBeamWhiteWidth( int staffSize, bool graceSize ); + int GetDrawingLedgerLineLength( int staffSize, bool graceSize ); + int GetGraceSize( int value ); + ///@} + + /** + * @name Get the height or width for a glyph taking into account the staff and grace sizes + */ + ///@{ + FontInfo *GetDrawingSmuflFont( int staffSize, bool graceSize ); + FontInfo *GetDrawingLyricFont( int staffSize ); + ///@} + /** * @name Setters for the page dimensions and margins */ @@ -80,6 +109,17 @@ class Doc: public Object void SetSpacingStaff( short spacingStaff ); void SetSpacingSystem( short spacingSystem ); ///@} + + /** + * @name Getters for tie and slur parameters + */ + ///@{ + char GetTieThickness() { return m_style->m_tieThickness; }; + char GetSlurMinHeight() { return m_style->m_minSlurHeight; }; + char GetSlurMaxHeight() { return m_style->m_maxSlurHeight; }; + char GetSlurThickness() { return m_style->m_slurThickness; }; + ///@} + /** * @name Getters for the page dimensions and margins @@ -96,8 +136,9 @@ class Doc: public Object * These should eventually be set at parameters. */ ///@{ - short GetLeftMargin( const std::type_info *elementType ); - short GetRightMargin( const std::type_info *elementType ); + char GetLeftMargin( const ClassId classId ); + char GetRightMargin( const ClassId classId ); + char GetLeftPosition( ); ///@} /* @@ -185,7 +226,7 @@ class Doc: public Object * Functor for setting wordpos and connector ends * The functor is process by doc at the end of a document of closing opened syl. */ - virtual int PrepareLyricsEnd( ArrayPtrVoid params ); + virtual int PrepareLyricsEnd( ArrayPtrVoid *params ); private: /** @@ -194,81 +235,17 @@ class Doc: public Object int CalcMusicFontSize( ); public: - - - /** - * The full name of the file. Exact use to be clarified. - */ - std::string m_fname; - /** * A copy of the header tree stored as pugi::xml_document */ pugi::xml_document m_header; - /** - * The object with the default values. - * This could be saved somewhere as preferences (todo). - */ - Style *m_style; - - /** - * The source id. Exact use to be clarified. - */ - std::string m_source; - /** * Holds the top scoreDef. * In a standard MEI file, this is the encoded before the first
. */ ScoreDef m_scoreDef; - /* - * The following values are set in the Doc::SetRenderedPage. - * They are all current values to be used when drawing a page in a View and - * reset for every page. However, most of them are based on the m_staffDefin values - * and will remain the same. This can be optimized. - * The pages dimensions and margins are based on the page ones, the document ones or - * the default in the following order and if available. - */ - - /** The page currently being drawn */ - Page *m_drawingPage; - /** Half a the space between to staff lines for normal and small staff */ - int m_drawingUnit[2]; - /** Space between to staff lines for normal and small staff */ - int m_drawingDoubleUnit[2]; - /** Height of a five line staff for normal and small staff */ - int m_drawingStaffSize[2]; - /** Height of an octave for normal and small staff */ - int m_drawingOctaveSize[2]; - /** Font height (100 par defaut) */ - int m_drawingFontHeight; - /** Font height with ascent for normal and small staff and normal and grace size */ - int m_drawingFontHeightAscent[2][2]; - /** Normal and small staff ration (4 / 5 by default) */ - int m_drawingSmallStaffRatio[2]; - /** Normal and grace size (3 / 4 by default) */ - int m_drawingGraceRatio[2]; - /** Height of a beam for normal and small staff (10 and 6 by default) */ - int m_drawingBeamWidth[2]; - /** Height of a beam spacing (white) for normal and small staff (10 and 6 by default) */ - int m_drawingBeamWhiteWidth[2]; - /** Note radius for normal and small staff and normal and grace size */ - int m_drawingNoteRadius[2][2]; - /** Ledger line length for normal and small staff and normal and grace size */ - int m_drawingLedgerLine[2][3]; - /** Brevis width for normal and small staff */ - int m_drawingBrevisWidth[2]; - /** Accident width/height for normal and small staff and normal and grace size */ - int m_drawingAccidWidth[2][2]; - int m_drawingAccidHeight[2][2]; - /** Current music font for normal and small staff and normal and grace size */ - FontInfo m_drawingSmuflFonts[2][2]; - /** Current lyric font for normal and small staff and normal and grace size */ - FontInfo m_drawingLyricFonts[2]; - /** Lyric font by default */ - FontInfo m_drawingLyricFont; /** The current page height */ int m_drawingPageHeight; /** The current page height */ @@ -296,6 +273,49 @@ class Doc: public Object */ DocType m_type; + /** + * The object with the default values. + * This could be saved somewhere as preferences (todo). + */ + Style *m_style; + + /* + * The following values are set in the Doc::SetDrawingPage. + * They are all current values to be used when drawing a page in a View and + * reset for every page. However, most of them are based on the m_staffDefin values + * and will remain the same. This can be optimized. + * The pages dimensions and margins are based on the page ones, the document ones or + * the default in the following order and if available. + */ + + /** The page currently being drawn */ + Page *m_drawingPage; + /** Half a the space between to staff lines */ + int m_drawingUnit; + /** Space between to staff lines */ + int m_drawingDoubleUnit; + /** Height of a five line staff */ + int m_drawingStaffSize; + /** Height of an octave */ + int m_drawingOctaveSize; + /** Height of a beam (10 and 6 by default) */ + int m_drawingBeamWidth; + /** Height of a beam spacing (white) (10 and 6 by default) */ + int m_drawingBeamWhiteWidth; + /** Ledger line length and normal and grace size */ + int m_drawingLedgerLine; + /** Brevis width */ + int m_drawingBrevisWidth; + + /** Smufl font size (100 par defaut) */ + int m_drawingSmuflFontSize; + /** Lyric font size */ + int m_drawingLyricFontSize; + /** Current music font */ + FontInfo m_drawingSmuflFont; + /** Current lyric font */ + FontInfo m_drawingLyricFont; + /** * A flag for indicating whether the currentScoreDef has been set or not * If yes, SetCurrentScoreDef will not parse the document (again) unless diff --git a/include/vrv/dot.h b/include/vrv/dot.h index b9fbf741b6b..726911adbad 100644 --- a/include/vrv/dot.h +++ b/include/vrv/dot.h @@ -32,8 +32,11 @@ class Dot: public LayerElement, public PositionInterface virtual ~Dot(); virtual void Reset(); virtual std::string GetClassName( ) { return "Dot"; }; + virtual ClassId Is() { return DOT; }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; //----------// // Functors // @@ -42,12 +45,12 @@ class Dot: public LayerElement, public PositionInterface /** * See Object::PreparePointersByLayer */ - virtual int PreparePointersByLayer( ArrayPtrVoid params ); + virtual int PreparePointersByLayer( ArrayPtrVoid *params ); /** * Reset the drawing values before calling PrepareDrawing after changes. */ - virtual int ResetDarwing( ArrayPtrVoid params ); + virtual int ResetDarwing( ArrayPtrVoid *params ); protected: diff --git a/include/vrv/drawinginterface.h b/include/vrv/drawinginterface.h new file mode 100644 index 00000000000..445b164e80d --- /dev/null +++ b/include/vrv/drawinginterface.h @@ -0,0 +1,172 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: drawinginterface.h +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __VRV_DRAWING_INTERFACE_H__ +#define __VRV_DRAWING_INTERFACE_H__ + +#include "vrvdef.h" + +namespace vrv { + +class Clef; +class DocObject; +class KeySig; +class Mensur; +class MeterSig; + +//---------------------------------------------------------------------------- +// DrawingListInterface +//---------------------------------------------------------------------------- + +/** + * This class is an interface for elements with duration, such as notes and rests. + * It is not an abstract class but should not be instanciate directly. + */ +class DrawingListInterface +{ +public: + /** + * @name Constructors, destructors, reset methods + * Reset method reset all attribute classes + */ + ///@{ + DrawingListInterface(); + virtual ~DrawingListInterface(); + virtual void Reset(); + ///@} + + /** + * Add an element to the drawing list. + * The drawing list is used to postponed the drawing of elements + * that need to be drawn in a particular order. + * For example, we need to draw beams before tuplets + */ + void AddToDrawingList( DocObject *element ); + + /** + * Return the drawing list. + * This is used when actually drawing the list (see View::DrawLayerList) + */ + ListOfObjects *GetDrawingList( ); + + /** + * Reset the drawing list. + * Clears the list - called when the layer starts to be drawn + */ + void ResetDrawingList( ); + +private: + +public: + +private: + /** The list of object for which drawing is postponed */ + ListOfObjects m_drawingList; +}; + +//---------------------------------------------------------------------------- +// StaffDefDrawingInterface +//---------------------------------------------------------------------------- + +/** + * This class is an interface for MEI scoreDef or staffDef attributes clef, keysig and mensur. + * It can either hold element or attribute values. Element values are hold in normal objects + * (e.g., Clef) and attribute values are hold in dedicated Object classes (e.g., ClefAttr) + * During rendering, only Element object are used. They are obained by the GetXXXCopy methods + * that create a copy of the Element object or a corresponding Element object if a attribute value + * object is hold. + */ +class StaffDefDrawingInterface +{ +public: + /** + * @name Constructors, destructors, and other standard methods + */ + ///@{ + StaffDefDrawingInterface(); + virtual ~StaffDefDrawingInterface(); + virtual void Reset(); + StaffDefDrawingInterface( const StaffDefDrawingInterface& interface ); // copy contructor + StaffDefDrawingInterface& operator=( const StaffDefDrawingInterface& interface ); // copy assignement; + ///@} + + /** + * @name Set and get the layer drawing flags for clef, keysig and mensur. + * This will be true when starting a new system or when a scoreDef or staffDef changes occurs + * This will be true only for the first layer in the staff. + */ + ///@{ + bool DrawClef() const { return m_drawClef; }; + void SetDrawClef( bool drawClef ) { m_drawClef = drawClef; }; + bool DrawKeySig() const { return m_drawKeySig; }; + void SetDrawKeySig( bool drawKeySig ) { m_drawKeySig = drawKeySig; }; + bool DrawKeySigCancellation() const { return m_drawKeySigCancellation; }; + void SetDrawKeySigCancellation( bool drawKeySigCancellation ) { m_drawKeySigCancellation = drawKeySigCancellation; }; + bool DrawMensur() const { return m_drawMensur; }; + void SetDrawMensur( bool drawMensur ) { m_drawMensur = drawMensur; }; + bool DrawMeterSig() const { return m_drawMeterSig; }; + void SetDrawMeterSig( bool drawMeterSig ) { m_drawMeterSig = drawMeterSig; }; + ///@} + + /** + * @name Set the current clef, keySig, mensur and meterSig. + */ + ///@{ + void SetCurrentClef( Clef *clef ); + void SetCurrentKeySig( KeySig *keySig ); + void SetCurrentMensur( Mensur *mensur ); + void SetCurrentMeterSig( MeterSig *meterSig ); + ///@} + + /** + * @name Get the clef, keySig, mensur and meterSig to be drawn. + */ + ///@{ + Clef *GetDrawingClef( ) { if (m_drawClef) return m_currentClef; return NULL; }; + KeySig *GetDrawingKeySig( ) { if (m_drawKeySig) return m_currentKeySig; return NULL; }; + Mensur *GetDrawingMensur( ) { if (m_drawMensur) return m_currentMensur; return NULL; }; + MeterSig *GetDrawingMeterSig( ) { if (m_drawMeterSig) return m_currentMeterSig; return NULL; }; + ///@} + + /** + * @name Get the clef, keysig, mensur and meterSig object. + * They will return a reference to the hold object (element or attribute). + */ + ///@{ + Clef *GetCurrentClef() const { return m_currentClef; }; + KeySig *GetCurrentKeySig() const { return m_currentKeySig; }; + Mensur *GetCurrentMensur() const { return m_currentMensur; }; + MeterSig *GetCurrentMeterSig() const { return m_currentMeterSig; }; + ///@} + +private: + /** The clef or clef attributes */ + Clef *m_currentClef; + /** The key signature */ + KeySig *m_currentKeySig; + /** The mensur */ + Mensur *m_currentMensur; + /** The meter signature (time signature) */ + MeterSig *m_currentMeterSig; + + /** + * @name Flags for indicating whether the clef, keysig and mensur needs to be drawn or not + */ + ///@{ + bool m_drawClef; + bool m_drawKeySig; + bool m_drawKeySigCancellation; + bool m_drawMensur; + bool m_drawMeterSig; + ///@} + +}; + +} // namespace vrv + +#endif diff --git a/include/vrv/durationinterface.h b/include/vrv/durationinterface.h index c0792c25a65..2d178e8bd55 100644 --- a/include/vrv/durationinterface.h +++ b/include/vrv/durationinterface.h @@ -25,7 +25,7 @@ class Object; * This class is an interface for elements with duration, such as notes and rests. * It is not an abstract class but should not be instanciate directly. */ -class DurationInterface: +class DurationInterface: public Interface, public AttAugmentdots, public AttBeamsecondary, public AttDurationMusical, @@ -43,6 +43,7 @@ class DurationInterface: DurationInterface(); virtual ~DurationInterface(); virtual void Reset(); + virtual InterfaceId IsInterface() { return INTERFACE_DURATION; }; ///@}SetDurationGes /** diff --git a/include/vrv/editorial.h b/include/vrv/editorial.h index c95f6acdaa7..585a7132e7a 100644 --- a/include/vrv/editorial.h +++ b/include/vrv/editorial.h @@ -15,13 +15,14 @@ namespace vrv { +class FloatingElement; class Layer; class LayerElement; class Lem; class Measure; -class MeasureElement; class Rdg; class ScoreDef; +class Staff; class StaffDef; class StaffGrp; @@ -52,17 +53,19 @@ class EditorialElement: public DocObject, EditorialElement(std::string classid); virtual ~EditorialElement(); virtual void Reset(); + virtual ClassId Is() { return EDITORIAL_ELEMENT; }; ///@} /** * @name Add children to an editorial element. */ ///@{ + void AddFloatingElement( FloatingElement *child ); void AddLayerElement( LayerElement *child ); void AddLayer( Layer *child ); void AddMeasure( Measure *child ); - void AddMeasureElement( MeasureElement *child ); void AddScoreDef( ScoreDef *child ); + void AddStaff( Staff *child ); void AddStaffDef( StaffDef *child ); void AddStaffGrp( StaffGrp *child ); ///@} @@ -77,7 +80,7 @@ class EditorialElement: public DocObject, * For EditorialElement, this means only moving them since their width is not * taken into account. Only system children EditorialElement are processed. */ - virtual int CastOffSystems( ArrayPtrVoid params ); + virtual int CastOffSystems( ArrayPtrVoid *params ); protected: @@ -107,6 +110,7 @@ class App: public EditorialElement virtual ~App(); virtual void Reset(); virtual std::string GetClassName( ) { return "App"; }; + virtual ClassId Is() { return APP; }; ///@} /** Getter for level **/ @@ -134,7 +138,8 @@ class App: public EditorialElement // Lem //---------------------------------------------------------------------------- -class Lem: public EditorialElement +class Lem: public EditorialElement, + public AttSource { public: /** @@ -146,6 +151,7 @@ class Lem: public EditorialElement virtual ~Lem(); virtual void Reset(); virtual std::string GetClassName( ) { return "Lem"; }; + virtual ClassId Is() { return LEM; }; ///@} protected: @@ -162,7 +168,8 @@ class Lem: public EditorialElement // Rdg //---------------------------------------------------------------------------- -class Rdg: public EditorialElement +class Rdg: public EditorialElement, + public AttSource { public: /** @@ -174,6 +181,37 @@ class Rdg: public EditorialElement virtual ~Rdg(); virtual void Reset(); virtual std::string GetClassName( ) { return "Rdg"; }; + virtual ClassId Is() { return RDG; }; + ///@} + +protected: + +private: + +public: + +private: + +}; + +//---------------------------------------------------------------------------- +// Supplied +//---------------------------------------------------------------------------- + +class Supplied: public EditorialElement, + public AttSource +{ +public: + /** + * @name Constructors, destructors, and other standard methods + * Reset method reset all attribute classes + */ + ///@{ + Supplied(); + virtual ~Supplied(); + virtual void Reset(); + virtual std::string GetClassName( ) { return "Supplied"; }; + virtual ClassId Is() { return SUPPLIED; }; ///@} protected: diff --git a/include/vrv/drawinglistinterface.h b/include/vrv/floatingelement.h similarity index 50% rename from include/vrv/drawinglistinterface.h rename to include/vrv/floatingelement.h index 22f198f199e..f8ee26d4f10 100644 --- a/include/vrv/drawinglistinterface.h +++ b/include/vrv/floatingelement.h @@ -1,29 +1,27 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: drawinglistinterface +// Name: floatingelement.h // Author: Laurent Pugin // Created: 2015 // Copyright (c) Authors and others. All rights reserved. ///////////////////////////////////////////////////////////////////////////// -#ifndef __VRV_DRAWING_LIST_INTERFACE_H__ -#define __VRV_DRAWING_LIST_INTERFACE_H__ +#ifndef __VRV_FLOATING_ELEMENT_H__ +#define __VRV_FLOATING_ELEMENT_H__ -#include "vrvdef.h" +#include "object.h" namespace vrv { - -class DocObject; //---------------------------------------------------------------------------- -// DrawingListInterface +// FloatingElement //---------------------------------------------------------------------------- /** * This class is an interface for elements with duration, such as notes and rests. * It is not an abstract class but should not be instanciate directly. */ -class DrawingListInterface +class FloatingElement: public DocObject { public: /** @@ -31,38 +29,39 @@ class DrawingListInterface * Reset method reset all attribute classes */ ///@{ - DrawingListInterface(); - virtual ~DrawingListInterface(); + FloatingElement(); + FloatingElement(std::string classid); + virtual ~FloatingElement(); virtual void Reset(); + virtual ClassId Is() { return FLOATING_ELEMENT; }; ///@} + //----------// + // Functors // + //----------// + /** - * Add an element to the drawing list. - * The drawing list is used to postponed the drawing of elements - * that need to be drawn in a particular order. - * For example, we need to draw beams before tuplets + * See Object::FillStaffCurrentTimeSpanning */ - void AddToDrawingList( DocObject *element ); + virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ); /** - * Return the drawing list. - * This is used when actually drawing the list (see View::DrawLayerList) + * See Object::PrepareTimeSpanning */ - ListOfObjects *GetDrawingList( ); + virtual int PrepareTimeSpanning( ArrayPtrVoid *params ); /** - * Reset the drawing list. - * Clears the list - called when the layer starts to be drawn + * Reset the drawing values before calling PrepareDrawing after changes. */ - void ResetDrawingList( ); + virtual int ResetDarwing( ArrayPtrVoid *params ); + ///@} private: public: private: - /** The list of object for which drawing is postponed */ - ListOfObjects m_drawingList; + }; } // namespace vrv diff --git a/include/vrv/iomei.h b/include/vrv/iomei.h index 0a93309f244..128d8aa7b1c 100644 --- a/include/vrv/iomei.h +++ b/include/vrv/iomei.h @@ -23,31 +23,40 @@ class Accid; class Annot; class Barline; class Beam; +class BeatRpt; class Chord; class Clef; class Custos; class Dot; class DurationInterface; +class FloatingElement; class Layer; class LayerElement; class Lem; class Measure; -class MeasureElement; class Mensur; class MeterSig; class MRest; +class MRpt; +class MRpt2; class MultiRest; +class MultiRpt; class Note; class PitchInterface; class PositionInterface; +class Proport; class Rdg; class Rest; class ScoreDef; +class ScoreDefInterface; class Slur; class Space; class Staff; +class Supplied; class Syl; class System; +class Tempo; +class TextDirInterface; class Tie; class TimeSpanningInterface; class Tuplet; @@ -123,6 +132,7 @@ class MeiOutput: public FileOutputStream void WriteMeiAccid( pugi::xml_node currentNode, Accid *accid ); void WriteMeiBarline( pugi::xml_node currentNode, Barline *barLine ); void WriteMeiBeam( pugi::xml_node currentNode, Beam *beam ); + void WriteMeiBeatRpt( pugi::xml_node currentNode, BeatRpt *beatRpt ); void WriteMeiChord( pugi::xml_node currentNode, Chord *chord ); void WriteMeiClef( pugi::xml_node currentNode, Clef *clef ); void WriteMeiCustos( pugi::xml_node currentNode, Custos *custos ); @@ -131,19 +141,24 @@ class MeiOutput: public FileOutputStream void WriteMeiMensur( pugi::xml_node currentNode, Mensur *mensur ); void WriteMeiMeterSig( pugi::xml_node currentNode, MeterSig *meterSig ); void WriteMeiMRest( pugi::xml_node currentNode, MRest *mRest ); + void WriteMeiMRpt( pugi::xml_node currentNode, MRpt *mRpt ); + void WriteMeiMRpt2( pugi::xml_node currentNode, MRpt2 *mRpt2 ); void WriteMeiMultiRest( pugi::xml_node currentNode, MultiRest *multiRest ); + void WriteMeiMultiRpt( pugi::xml_node currentNode, MultiRpt *multiRpt ); void WriteMeiNote( pugi::xml_node currentNode, Note *note ); + void WriteMeiProport( pugi::xml_node currentNode, Proport *proport ); void WriteMeiRest( pugi::xml_node currentNode, Rest *rest ); void WriteMeiSpace( pugi::xml_node currentNode, Space *space ); void WriteMeiTuplet( pugi::xml_node currentNode, Tuplet *tuplet ); ///@} /** - * @name Methods for wrinting MeasureElement children (other the staff). + * @name Methods for wrining FloatingElement */ ///@{ - void WriteMeiTie( pugi::xml_node currentNode, Tie *tie ); void WriteMeiSlur( pugi::xml_node currentNode, Slur *slur ); + void WriteMeiTempo( pugi::xml_node currentNode, Tempo *tempo ); + void WriteMeiTie( pugi::xml_node currentNode, Tie *tie ); ///@} /** @@ -153,6 +168,7 @@ class MeiOutput: public FileOutputStream bool WriteMeiApp( pugi::xml_node currentNode, App *app ); bool WriteMeiLem( pugi::xml_node currentNode, Lem *lem ); bool WriteMeiRdg( pugi::xml_node currentNode, Rdg *rdg ); + bool WriteMeiSupplied( pugi::xml_node currentNode, Supplied *supplied ); bool WriteMeiAnnot( pugi::xml_node currentNode, Annot *annot ); ///@} @@ -186,6 +202,8 @@ class MeiOutput: public FileOutputStream void WriteDurationInterface( pugi::xml_node currentNode, DurationInterface *interface ); void WritePitchInterface( pugi::xml_node currentNode, PitchInterface *interface ); void WritePositionInterface( pugi::xml_node currentNode, PositionInterface *interface ); + void WriteScoreDefInterface( pugi::xml_node currentNode, ScoreDefInterface *interface ); + void WriteTextDirInterface( pugi::xml_node currentNode, TextDirInterface *interface ); void WriteTimeSpanningInterface( pugi::xml_node currentNode, TimeSpanningInterface *interface ); ///@} @@ -197,9 +215,7 @@ class MeiOutput: public FileOutputStream /** @name Methods for converting members into MEI attributes. */ ///@{ std::string UuidToMeiStr( Object *element ); - std::string BoolToStr(bool value ); std::string DocTypeToStr(DocType type); - std::string StaffGrpSymbolToStr(StaffGrpSymbol symbol); ///@} @@ -283,6 +299,7 @@ class MeiInput: public FileInputStream bool ReadMeiAccid( Object *parent, pugi::xml_node accid ); bool ReadMeiBarline( Object *parent, pugi::xml_node barLine ); bool ReadMeiBeam( Object *parent, pugi::xml_node beam ); + bool ReadMeiBeatRpt( Object *parent, pugi::xml_node beatRpt ); bool ReadMeiChord( Object* parent, pugi::xml_node chord ); bool ReadMeiClef( Object *parent, pugi::xml_node clef ); bool ReadMeiCustos( Object *parent, pugi::xml_node custos ); @@ -291,8 +308,12 @@ class MeiInput: public FileInputStream bool ReadMeiMensur( Object *parent, pugi::xml_node mensur ); bool ReadMeiMeterSig( Object *parent, pugi::xml_node meterSig ); bool ReadMeiMRest( Object *parent, pugi::xml_node mRest ); + bool ReadMeiMRpt( Object *parent, pugi::xml_node mRpt ); + bool ReadMeiMRpt2( Object *parent, pugi::xml_node mRpt2 ); bool ReadMeiMultiRest( Object *parent, pugi::xml_node multiRest ); + bool ReadMeiMultiRpt( Object *parent, pugi::xml_node multiRpt ); bool ReadMeiNote( Object *parent, pugi::xml_node note ); + bool ReadMeiProport( Object *parent, pugi::xml_node proport ); bool ReadMeiRest( Object *parent, pugi::xml_node rest ); bool ReadMeiSpace( Object *parent, pugi::xml_node space ); bool ReadMeiSyl( Object *parent, pugi::xml_node syl ); @@ -301,22 +322,25 @@ class MeiInput: public FileInputStream ///@} /** - * @name Methods for reading MEI measure elements + * @name Methods for reading MEI floating elements */ ///@{ bool ReadMeiSlur( Object *parent, pugi::xml_node slur ); + bool ReadMeiTempo( Object *parent, pugi::xml_node tempo ); bool ReadMeiTie( Object *parent, pugi::xml_node tie ); ///@} /** - * @name Methods for reading critical apparatus. - * Only one child of is loaded + * @name Methods for reading critical apparatus, other editorial markup and . * The filter is propagated (if any) */ ///@{ bool ReadMeiApp( Object *parent, pugi::xml_node app, EditorialLevel level, Object *filter = NULL ); bool ReadMeiAppChildren( Object *parent, pugi::xml_node parentNode, EditorialLevel level, Object *filter = NULL ); - bool ReadMeiLemOrRdg( Object *parent, pugi::xml_node lemOrRdg, EditorialLevel level, Object *filter = NULL ); + bool ReadMeiLem( Object *parent, pugi::xml_node lem, EditorialLevel level, Object *filter = NULL ); + bool ReadMeiRdg( Object *parent, pugi::xml_node rdg, EditorialLevel level, Object *filter = NULL ); + bool ReadMeiSupplied( Object *parent, pugi::xml_node supplied, EditorialLevel level, Object *filter = NULL ); + bool ReadMeiEditorialChildren( Object *parent, pugi::xml_node supplied, EditorialLevel level, Object *filter = NULL ); bool ReadMeiAnnot( Object *parent, pugi::xml_node annot ); ///@} ///@} @@ -330,6 +354,8 @@ class MeiInput: public FileInputStream bool ReadDurationInterface( pugi::xml_node element, DurationInterface *interface ); bool ReadPitchInterface( pugi::xml_node element, PitchInterface *interface ); bool ReadPositionInterface( pugi::xml_node element, PositionInterface *interface ); + bool ReadScoreDefInterface( pugi::xml_node element, ScoreDefInterface *interface ); + bool ReadTextDirInterface( pugi::xml_node element, TextDirInterface *interface ); bool ReadTimeSpanningInterface( pugi::xml_node element, TimeSpanningInterface *interface ); ///@} @@ -366,7 +392,7 @@ class MeiInput: public FileInputStream */ ///@{ void AddLayerElement( Object *parent, LayerElement *element ); - void AddMeasureElement( Object *parent, MeasureElement *element ); + void AddFloatingElement( Object *parent, FloatingElement *element ); void AddScoreDef( Object *parent, ScoreDef *element ); void AddStaffGrp( Object *parent, StaffGrp *element ); ///@} @@ -381,9 +407,7 @@ class MeiInput: public FileInputStream */ ///@{ void SetMeiUuid( pugi::xml_node element, Object *object ); - bool StrToBool(std::string value); DocType StrToDocType(std::string type); - StaffGrpSymbol StrToStaffGrpSymbol(std::string sign); /** Extract the uuid for references to uuids with ..#uuid values */ std::string ExtractUuidFragment(std::string refUuid); ///@} diff --git a/include/vrv/iopae.h b/include/vrv/iopae.h index ad03bb993ff..2445cf88c83 100644 --- a/include/vrv/iopae.h +++ b/include/vrv/iopae.h @@ -226,7 +226,9 @@ class PaeInput: public FileInputStream virtual bool ImportFile( ); virtual bool ImportString(std::string pae); - + +#ifndef NO_PAE_SUPPORT + private: // function declarations: @@ -260,7 +262,8 @@ class PaeInput: public FileInputStream // input functions void getAtRecordKeyValue (char *key, char* value, const char* input); - + +#endif // NO_PAE_SUPPORT public: diff --git a/include/vrv/keysig.h b/include/vrv/keysig.h index a5b46d10112..52dd081c825 100644 --- a/include/vrv/keysig.h +++ b/include/vrv/keysig.h @@ -15,7 +15,7 @@ namespace vrv { -class KeySigAttr; +class ScoreDefInterface; //---------------------------------------------------------------------------- // KeySig @@ -43,31 +43,52 @@ class KeySig: public LayerElement, */ ///@{ KeySig(); - KeySig(int num_alter, char alter); - KeySig( KeySigAttr *keySigAttr ); + KeySig(int alterationNumber, data_ACCIDENTAL_EXPLICIT alterationType); + KeySig( ScoreDefInterface *keySigAttr ); + void Init(); virtual ~KeySig(); virtual void Reset(); virtual Object* Clone() { return new KeySig(*this); }; virtual std::string GetClassName( ) { return "KeySig"; }; + virtual ClassId Is() { return KEYSIG; }; - unsigned char GetAlterationAt(int pos); - int GetOctave(unsigned char pitch, int clefId); + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; /* Alteration number getter/setter */ - int GetAlterationNumber() { return m_num_alter; }; - void SetAlterationNumber(int n) { m_num_alter = n; }; + int GetAlterationNumber() { return m_alterationNumber; }; + void SetAlterationNumber(int alterationNumber) { m_alterationNumber = alterationNumber; }; /* Alteration number getter/setter */ - unsigned char GetAlteration() { return m_alteration; }; - void SetAlteration(int n) { m_alteration = n; }; + data_ACCIDENTAL_EXPLICIT GetAlterationType() { return m_alterationType; }; + void SetAlterationType( data_ACCIDENTAL_EXPLICIT alterationType ) { m_alterationType = alterationType; }; /* Temporary methods for turning @accid and @pitch into num_alter and alter */ void ConvertToMei( ); void ConvertToInternal( ); + /** + * Static methods for calculating position; + */ + static data_PITCHNAME GetAlterationAt( data_ACCIDENTAL_EXPLICIT alterationType, int pos ); + static int GetOctave( data_ACCIDENTAL_EXPLICIT alterationType, data_PITCHNAME pitch, int clefId); + private: -public: +public: + /** + * Variables for storing cancellation introduced by the key sig. + * The values are StaffDefDrawingInterface::ReplaceKeySig + */ + data_ACCIDENTAL_EXPLICIT m_drawingCancelAccidType; + char m_drawingCancelAccidCount; + /** + * Equivalent to @key.sig.show and @showchange, but set for drawing + * KeySig has no equivalent in MEI and will be true and false by default + * See KeySig::KeySig( KeySigAttr *keySigAttr ) for initialisation + */ + bool m_drawingShow; + bool m_drawingShowchange; private: static data_PITCHNAME flats[]; @@ -75,39 +96,8 @@ class KeySig: public LayerElement, static int octave_map[2][9][7]; // This is temporary - it needs to be changed to libMEI atts - int m_num_alter; - unsigned char m_alteration; - -}; - -//---------------------------------------------------------------------------- -// KeySigAttr -//---------------------------------------------------------------------------- - -/** - * This class models the MEI @key attributes in scoreDef or staffDef elements. - */ -class KeySigAttr: public Object, - public AttKeySigDefaultLog -{ -public: - /** - * @name Constructors, destructors, reset and class name methods - * Reset method reset all attribute classes - */ - ///@{ - KeySigAttr(); - virtual ~KeySigAttr(); - virtual void Reset(); - virtual std::string GetClassName( ) { return "KeySigAttr"; }; - virtual Object* Clone() { return new KeySigAttr(*this); }; - ///@} - -private: - -public: - -private: + int m_alterationNumber; + data_ACCIDENTAL_EXPLICIT m_alterationType; }; diff --git a/include/vrv/layer.h b/include/vrv/layer.h index 3b3f0ffe882..91bb81cde3c 100644 --- a/include/vrv/layer.h +++ b/include/vrv/layer.h @@ -9,25 +9,18 @@ #ifndef __VRV_LAYER_H__ #define __VRV_LAYER_H__ -#include - -//---------------------------------------------------------------------------- - #include "atts_shared.h" #include "clef.h" -#include "drawinglistinterface.h" +#include "drawinginterface.h" #include "object.h" namespace vrv { class DeviceContext; -class KeySig; class LayerElement; class Note; class ScoreDef; class StaffDef; -class Mensur; -class MeterSig; //---------------------------------------------------------------------------- // Layer @@ -38,7 +31,7 @@ class MeterSig; * A Layer is contained in a Staff. * It contains LayerElement objects. */ -class Layer: public DocObject, public DrawingListInterface, public ObjectListInterface, +class Layer: public DocObject, public DrawingListInterface, public ObjectListInterface, public StaffDefDrawingInterface, public AttCommon { public: @@ -51,12 +44,16 @@ class Layer: public DocObject, public DrawingListInterface, public ObjectListInt virtual ~Layer(); virtual void Reset(); virtual std::string GetClassName( ) { return "Layer"; }; + virtual ClassId Is() { return LAYER; }; ///@} + /** + * @name Methods for adding allowed content + */ + ///@{ void AddLayerElement( LayerElement *element, int idx = -1 ); - - int GetElementCount() const { return (int)m_children.size(); }; - + ///@} + /** * Return the index position of the layer in its staff parent. * The index position is 0-based. @@ -67,17 +64,6 @@ class Layer: public DocObject, public DrawingListInterface, public ObjectListInt LayerElement *GetAtPos( int x ); LayerElement *Insert( LayerElement *element, int x ); // return a pointer on the inserted element - void Insert( LayerElement *element, LayerElement *before ); - - void Delete( LayerElement *element ); - - /** - * Looks for the first LayerElement of type elementType. - * Looks FORWARD of BACKWARD depending on the direction parameter. - * Returns the retrieved element if *succ == true or the original element if not. - */ - LayerElement *GetFirstOld( LayerElement *element, bool direction, const std::type_info *elementType, bool *succ ); - /** * Get the current clef for the test element. * Goes back on the layer until a clef is found. @@ -92,47 +78,11 @@ class Layer: public DocObject, public DrawingListInterface, public ObjectListInt */ int GetClefOffset( LayerElement *test ); - /** - * Basic method that remove intermediate clefs and custos. - * Used for building collations (See CmpFile::Collate). - */ - void RemoveClefAndCustos( ); - /** * Set drawing clef, keysig and mensur if necessary and if available. * Also set the current clef. */ - void SetDrawingAndCurrentValues( ScoreDef *currentScoreDef, StaffDef *currentStaffDef ); - - /** - * @name Set the clef, keySig, mensur and meterSig to be drawn. - */ - ///@{ - void SetDrawClef( bool draw ) { m_drawClef = draw; }; - void SetDrawKeySig( bool draw ) { m_drawKeySig = draw; }; - void SetDrawMensur( bool draw ) { m_drawMensur = draw; }; - void SetDrawMeterSig( bool draw ) { m_drawMeterSig = draw; }; - ///@} - - /** - * @name Get the clef, keySig, mensur and meterSig to be drawn. - */ - ///@{ - Clef *GetDrawingClef( ) { if (m_drawClef) return m_currentClef; return NULL; }; - KeySig *GetDrawingKeySig( ) { if (m_drawKeySig) return m_currentKeySig; return NULL; }; - Mensur *GetDrawingMensur( ) { if (m_drawMensur) return m_currentMensur; return NULL; }; - MeterSig *GetDrawingMeterSig( ) { if (m_drawMeterSig) return m_currentMeterSig; return NULL; }; - ///@} - - /** - * @name Set the current clef, keySig, mensur and meterSig. - */ - ///@{ - void SetCurrentClef( Clef *clef ); - void SetCurrentKeySig( KeySig *keySig ); - void SetCurrentMensur( Mensur *mensur ); - void SetCurrentMeterSig( MeterSig *meterSig ); - ///@} + void SetDrawingAndCurrentValues( StaffDef *currentStaffDef ); /** * @name Set and get the stem direction of the layer. @@ -151,52 +101,37 @@ class Layer: public DocObject, public DrawingListInterface, public ObjectListInt /** * Align horizontally the content of a layer. */ - virtual int AlignHorizontally( ArrayPtrVoid params ); + virtual int AlignHorizontally( ArrayPtrVoid *params ); + + /** + * Align horizontally the content of a layer. + */ + virtual int AlignHorizontallyEnd( ArrayPtrVoid *params ); /** * Builds a tree of int (IntTree) with the staff/layer/verse numbers * and for staff/layer to be then processed. */ - virtual int PrepareProcessingLists( ArrayPtrVoid params ); + virtual int PrepareProcessingLists( ArrayPtrVoid *params ); /** * Set the drawing position (m_drawingX and m_drawingY) values for objects */ - virtual int SetDrawingXY( ArrayPtrVoid params ); + virtual int SetDrawingXY( ArrayPtrVoid *params ); + + /** + * Functor for setting mRpt drawing numbers (if required) + * See implementation and Object::PrepareRpt + */ + virtual int PrepareRpt( ArrayPtrVoid *params ); private: public: protected: - /** - * @name Drawing flags - */ - ///@{ - /** The clef attribute */ - bool m_drawClef; - /** The key signature */ - bool m_drawKeySig; - /** The mensur */ - bool m_drawMensur; - /** The meter signature (time signature) */ - bool m_drawMeterSig; - ///@} private: - /** - * @name The current values - */ - ///@{ - /** The clef attribute */ - Clef *m_currentClef; - /** The key signature */ - KeySig *m_currentKeySig; - /** The mensur */ - Mensur *m_currentMensur; - /** The meter signature (time signature) */ - MeterSig *m_currentMeterSig; - ///@} /** * */ diff --git a/include/vrv/layerelement.h b/include/vrv/layerelement.h index 0f98785b1f6..89005691c1b 100644 --- a/include/vrv/layerelement.h +++ b/include/vrv/layerelement.h @@ -15,6 +15,7 @@ namespace vrv { class Alignment; +class Beam; class BeamElementCoord; class Layer; class Mensur; @@ -41,15 +42,13 @@ class LayerElement: public DocObject LayerElement(std::string classid); virtual ~LayerElement(); virtual void Reset(); + virtual ClassId Is() { return LAYER_ELEMENT; }; ///@} - LayerElement& operator=( const LayerElement& element ); // copy assignement - this need to be changed to the Object::Clone way; - /** - * Return a copy of the LayerElement (child class). - * By default, a new uuid is generated + * Copy assignment for resetting pointers */ - LayerElement *GetChildCopy( bool newUuid = true ); + LayerElement& operator=( const LayerElement& element ); /** * Reset the alignment values (m_drawingX, m_drawingXRel, etc.) @@ -65,7 +64,8 @@ class LayerElement: public DocObject /** * @name Set and get the flag for indication whether it is a ScoreDef or StaffDef attribute. * The value is false by default. Is it set to true of ScoreDef and StaffDef and used when - * drawing the element + * drawing the element. + * NB In the scoreDef or staffDef itself, it can be attributes or an element. */ ///@{ bool GetScoreOrStaffDefAttr() const { return m_isScoreOrStaffDefAttr; }; @@ -76,35 +76,35 @@ class LayerElement: public DocObject * @name Child type checkers. */ ///@{ - bool IsAccid(); - bool IsBarline(); - bool IsBeam(); - bool IsChord(); - bool IsClef(); - bool IsCustos(); - bool IsDot(); - bool HasDurationInterface(); - bool IsKeySig(); - bool IsMensur(); - bool IsMeterSig(); - bool IsMultiRest(); - bool IsMRest(); - bool IsNote(); - bool HasPitchInterface(); - bool HasPositionInterface(); - bool IsRest(); - bool IsTie(); - bool IsTuplet(); - bool IsSpace(); - bool IsSyl(); - bool IsVerse(); + /** Returns true if the element is a grace note */ bool IsGraceNote(); + /** Returns true if the element is a note or a note child and the note has a @grace */ + bool IsCueSize(); + /** Return true if the element has to be aligned horizontally */ + virtual bool HasToBeAligned() { return false; }; + /** Returns the beam parent if in beam */ + Beam *IsInBeam(); ///@} + + /** + * Returns the drawing stem direction if the element is a note or a chord. + * (Could one day go in a drawing stem interface) + */ + data_STEMDIRECTION GetDrawingStemDir(); + /** + * Alignment getter + */ Alignment *GetAlignment() { return m_alignment; }; + int GetXRel(); + /** + * Returns the duration if the child element has a DurationInterface + */ + virtual double GetAlignmentDuration( Mensur *mensur = NULL, MeterSig *meterSig = NULL, bool notGraceOnly = true ); + //----------// // Functors // //----------// @@ -112,33 +112,28 @@ class LayerElement: public DocObject /** * See Object::AlignHorizontally */ - virtual int AlignHorizontally( ArrayPtrVoid params ); + virtual int AlignHorizontally( ArrayPtrVoid *params ); /** * See Object::PrepareTimeSpanning */ - virtual int PrepareTimeSpanning( ArrayPtrVoid params ); + virtual int PrepareTimeSpanning( ArrayPtrVoid *params ); /** * Set the drawing position (m_drawingX and m_drawingY) values for objects */ - virtual int SetDrawingXY( ArrayPtrVoid params ); + virtual int SetDrawingXY( ArrayPtrVoid *params ); -protected: - /** - * Returns the duration if the child element has a DurationInterface - */ - virtual double GetAlignmentDuration( Mensur *mensur = NULL, MeterSig *meterSig = NULL ); + virtual int TimeSpanningLayerElements( ArrayPtrVoid *params ); private: public: /** Absolute position X. This is used for facsimile (transcription) encoding */ int m_xAbs; - /** Indicates if cue size - to be changed to MEI equivalent (size="cue") */ - bool m_cueSize; - - /** If this is a note, store here the stem coordinates (useful for ex. tuplets) */ + /** + * If this is a note, store here the stem coordinates (useful for ex. tuplets) + */ Point m_drawingStemStart; // beginning point, the one near the note Point m_drawingStemEnd; // end point (!), near beam or stem /** diff --git a/include/vrv/measure.h b/include/vrv/measure.h index feb79c9b833..509d49becfa 100644 --- a/include/vrv/measure.h +++ b/include/vrv/measure.h @@ -16,7 +16,7 @@ namespace vrv { -class MeasureElement; +class FloatingElement; //---------------------------------------------------------------------------- // Measure @@ -43,6 +43,7 @@ class Measure: public DocObject, virtual ~Measure(); virtual void Reset(); virtual std::string GetClassName( ) { return "Measure"; }; + virtual ClassId Is() { return MEASURE; }; ///@} /** @@ -50,10 +51,14 @@ class Measure: public DocObject, */ bool IsMeasuredMusic() { return m_measuredMusic; }; - void AddMeasureElement( MeasureElement *element ); - - int GetStaffCount() const { return (int)m_children.size(); }; - + /** + * @name Methods for adding allowed content + */ + ///@{ + void AddStaff( Staff *staff ); + void AddFloatingElement( FloatingElement *element ); + ///@} + /** * Return the index position of the measure in its system parent */ @@ -87,6 +92,11 @@ class Measure: public DocObject, ///@} int GetXRel( ); + + /** + * Return the non justifiable with for the measure + */ + int GetNonJustifiableLeftMargin() { return m_measureAligner.GetNonJustifiableMargin(); } /** * Return the X rel position of the right barLine (without its width) @@ -111,47 +121,53 @@ class Measure: public DocObject, /** * AlignHorizontally the content of a measure. */ - virtual int AlignHorizontally( ArrayPtrVoid params ); + virtual int AlignHorizontally( ArrayPtrVoid *params ); /** * AlignVertically the content of a measure. */ - virtual int AlignVertically( ArrayPtrVoid params ); + virtual int AlignVertically( ArrayPtrVoid *params ); + + /** + * Correct the X alignment of grace notes once the the content of a system has been aligned and laid out. + * Special case that redirects the functor to the GraceAligner. + */ + virtual int IntegrateBoundingBoxGraceXShift( ArrayPtrVoid *params ); /** * Correct the X alignment once the the content of a system has been aligned and laid out. * Special case that redirects the functor to the MeasureAligner. */ - virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid params ); + virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid *params ); /** * Set the position of the Alignment. * Special case that redirects the functor to the MeasureAligner. */ - virtual int SetAligmentXPos( ArrayPtrVoid params ); + virtual int SetAligmentXPos( ArrayPtrVoid *params ); /** * Align the measures by adjusting the m_drawingXRel position looking at the MeasureAligner. * This method also moves the end position of the measure according to the barLine width. */ - virtual int AlignMeasures( ArrayPtrVoid params ); + virtual int AlignMeasures( ArrayPtrVoid *params ); /** * Justify the X positions * Special case that redirects the functor to the MeasureAligner. */ - virtual int JustifyX( ArrayPtrVoid params ); + virtual int JustifyX( ArrayPtrVoid *params ); /** * Fill a page by adding systems with the appropriate length * */ - virtual int CastOffSystems( ArrayPtrVoid params ); + virtual int CastOffSystems( ArrayPtrVoid *params ); /** * Set the drawing position (m_drawingX and m_drawingY) values for objects */ - virtual int SetDrawingXY( ArrayPtrVoid params ); + virtual int SetDrawingXY( ArrayPtrVoid *params ); public: diff --git a/include/vrv/mensur.h b/include/vrv/mensur.h index 3b52216ba39..0ae0d33dc02 100644 --- a/include/vrv/mensur.h +++ b/include/vrv/mensur.h @@ -19,7 +19,7 @@ namespace vrv { // Mensur //---------------------------------------------------------------------------- -class MensurAttr; +class ScoreDefInterface; /** * This class models the MEI element. @@ -38,13 +38,18 @@ class Mensur: public LayerElement, */ ///@{ Mensur(); - Mensur( MensurAttr *mensurAttr ); + Mensur( ScoreDefInterface *mensurAttr ); + void Init(); virtual ~Mensur(); virtual void Reset(); virtual std::string GetClassName( ) { return "Mensur"; }; + virtual ClassId Is() { return MENSUR; }; virtual Object* Clone() { return new Mensur(*this); }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + private: public: @@ -63,39 +68,6 @@ class Mensur: public LayerElement, }; - -//---------------------------------------------------------------------------- -// MensurAttr -//---------------------------------------------------------------------------- - -/** - * This class models the MEI @mensur attributes in scoreDef or staffDef elements. - */ -class MensurAttr: public Object, - public AttMensuralShared, - public AttMensuralLog -{ -public: - /** - * @name Constructors, destructors, reset and class name methods - * Reset method reset all attribute classes - */ - ///@{ - MensurAttr(); - virtual ~MensurAttr(); - virtual void Reset(); - virtual std::string GetClassName( ) { return "MensurAttr"; }; - virtual Object* Clone() { return new MensurAttr(*this); }; - ///@} - -private: - -public: - -private: - -}; - } // namespace vrv #endif diff --git a/include/vrv/metersig.h b/include/vrv/metersig.h index 56f8c240301..88bd09edb79 100644 --- a/include/vrv/metersig.h +++ b/include/vrv/metersig.h @@ -13,8 +13,8 @@ #include "layerelement.h" namespace vrv { - -class MeterSigAttr; + +class ScoreDefInterface; //---------------------------------------------------------------------------- // MeterSig @@ -33,50 +33,22 @@ class MeterSig: public LayerElement, */ ///@{ MeterSig(); - MeterSig( MeterSigAttr *meterSigAttr ); + MeterSig( ScoreDefInterface *meterSigAttr ); + void Init(); virtual ~MeterSig(); virtual void Reset(); virtual std::string GetClassName( ) { return "MeterSig"; }; + virtual ClassId Is() { return METERSIG; }; virtual Object* Clone() { return new MeterSig(*this); }; ///@} - -private: - -public: - -private: - -}; + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; -//---------------------------------------------------------------------------- -// MeterSigAttr -//---------------------------------------------------------------------------- - -/** - * This class models the MEI @meter attributes in scoreDef or staffDef elements. - */ -class MeterSigAttr: public Object, - public AttMeterSigDefaultLog, - public AttMeterSigDefaultVis -{ -public: - /** - * @name Constructors, destructors, reset and class name methods - * Reset method reset all attribute classes - */ - ///@{ - MeterSigAttr(); - virtual ~MeterSigAttr(); - virtual void Reset(); - virtual std::string GetClassName( ) { return "MeterSigAttr"; }; - virtual Object* Clone() { return new MeterSigAttr(*this); }; - ///@} - private: public: - + private: }; diff --git a/include/vrv/mrest.h b/include/vrv/mrest.h index 1d10f2ea337..f8f26b5f291 100644 --- a/include/vrv/mrest.h +++ b/include/vrv/mrest.h @@ -32,6 +32,7 @@ class MRest: public LayerElement virtual ~MRest(); virtual void Reset(); virtual std::string GetClassName( ){ return "MRest"; }; ; + virtual ClassId Is() { return MREST; }; ///@} private: diff --git a/include/vrv/multirest.h b/include/vrv/multirest.h index bb0d425ec8e..79712ed5570 100644 --- a/include/vrv/multirest.h +++ b/include/vrv/multirest.h @@ -31,10 +31,11 @@ class MultiRest: public LayerElement, */ ///@{ MultiRest(); - MultiRest(int number); + //MultiRest(int number); virtual ~MultiRest(); virtual void Reset(); virtual std::string GetClassName( ) { return "MultiRest"; }; + virtual ClassId Is() { return MULTIREST; }; ///@} private: diff --git a/include/vrv/note.h b/include/vrv/note.h index 838c51d6689..98e8174b83e 100644 --- a/include/vrv/note.h +++ b/include/vrv/note.h @@ -44,6 +44,7 @@ typedef std::vector ChordCluster; class Note: public LayerElement, public DurationInterface, public PitchInterface, public AttColoration, + public AttGraced, public AttNoteLogMensural, public AttStemmed, public AttTiepresent @@ -58,8 +59,12 @@ class Note: public LayerElement, public DurationInterface, public PitchInterface virtual ~Note(); virtual void Reset(); virtual std::string GetClassName( ) { return "Note"; }; + virtual ClassId Is() { return NOTE; }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + /** * Add an element (a verse or an accid) to a note. * Only Verse and Accid elements will be actually added to the note. @@ -77,20 +82,37 @@ class Note: public LayerElement, public DurationInterface, public PitchInterface ///@} /** - * Overriding functions to return information from chord parent if - * note is direct child of a chord. + * @name Setter and getter for the Algnment the grace note is pointing to (NULL by default) + */ + ///@{ + Alignment *GetGraceAlignment(); + void SetGraceAlignment( Alignment *graceAlignment ); + bool HasGraceAlignment( ) { return (m_graceAlignment != NULL); }; + void ResetGraceAlignment( ) { m_graceAlignment = NULL; }; + ///@} + + /** + * Overriding functions to return information from chord parent if any */ ///@{ Chord* IsChordTone( ); int GetDrawingDur( ); bool IsClusterExtreme( ); //used to find if is the highest or lowest note in a cluster + ///@} - bool HasDrawingStemDir( ); - data_STEMDIRECTION GetDrawingStemDir( ); - - + /** + * @name Set and get the stem direction of the note. + */ + ///@{ + void SetDrawingStemDir( data_STEMDIRECTION stemDirection ) { m_drawingStemDir = stemDirection; }; + data_STEMDIRECTION GetDrawingStemDir() { return m_drawingStemDir; }; ///@} + /** + * Calculate the drawing stem direction looking a potential beam or chord parents + */ + data_STEMDIRECTION CalcDrawingStemDir( ); + /** * Returns a single integer representing pitch and octave. */ @@ -103,50 +125,34 @@ class Note: public LayerElement, public DurationInterface, public PitchInterface /** * See Object::PrepareTieAttr */ - virtual int PrepareTieAttr( ArrayPtrVoid params ); + virtual int PrepareTieAttr( ArrayPtrVoid *params ); /** * Functor for setting wordpos and connector ends * The functor is process by staff/layer/verse using an ArrayOfAttComparisons filter. */ - virtual int PrepareLyrics( ArrayPtrVoid params ); + virtual int PrepareLyrics( ArrayPtrVoid *params ); /** * See Object::PreparePointersByLayer */ - virtual int PreparePointersByLayer( ArrayPtrVoid params ); + virtual int PreparePointersByLayer( ArrayPtrVoid *params ); /** */ - virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid params ); + virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ); /** * Reset the drawing values before calling PrepareDrawing after changes. */ - virtual int ResetDarwing( ArrayPtrVoid params ); + virtual int ResetDarwing( ArrayPtrVoid *params ); private: -protected: - - /** - * @name Tie attributes are represented a pointers to Tie objects. - * There is one pointer for the initial attribute (TIE_i or TIE_m). - * The note with the initial attribute owns the Tie object and take care of deleting it - */ - ///@{ - Tie *m_drawingTieAttr; - ///@} - public: - /** indicates if the appoggiatura is slashed (i.e. it is an acciaccatura) - used with cueSize = true */ - bool m_acciaccatura; // To be changed to Att grace="acc" /** embellishment on this note **/ unsigned int m_embellishment; // To be changed to Att - /** drawing stem direction */ - data_STEMDIRECTION m_drawingStemDir; /** drawing stem length */ int d_stemLen; @@ -163,9 +169,19 @@ class Note: public LayerElement, public DurationInterface, public PitchInterface */ bool m_isDrawingAccidAttr; - - private: + /** + * Tie attributes are represented a pointers to Tie objects. + * There is one pointer for the initial attribute (TIE_i or TIE_m). + * The note with the initial attribute owns the Tie object and take care of deleting it + */ + Tie *m_drawingTieAttr; + /** + * An alignment for grace notes + */ + Alignment *m_graceAlignment; + /** drawing stem direction */ + data_STEMDIRECTION m_drawingStemDir; }; diff --git a/include/vrv/object.h b/include/vrv/object.h index f6b5ece89b5..4e024446516 100644 --- a/include/vrv/object.h +++ b/include/vrv/object.h @@ -12,14 +12,14 @@ #include #include #include -#include //---------------------------------------------------------------------------- +#include "att_classes.h" #include "vrvdef.h" namespace vrv { - + class Doc; class EditorialElement; class FileOutputStream; @@ -64,10 +64,39 @@ typedef std::map StaffN_LayerN_VerseN_t; class Object { public: - // constructors and destructors + /** + * @name Constructors, destructors, and other standard methods + * Reset method reset all attribute classes + */ + ///@{ Object(); Object(std::string classid); virtual ~Object(); + virtual ClassId Is(); + virtual std::string GetClassName( ) { return "[MISSING]"; }; + ///@} + + /** + * @name Methods for checking if an object is part of a group of classId. + * For example, all LayerElement child class classId is in between LAYER_ELEMENT and LAYER_ELEMENT_max. + * See classId enum. + */ + ///@{ + bool IsEditorialElement() { return (this->Is() > EDITORIAL_ELEMENT && this->Is() < EDITORIAL_ELEMENT_max); }; + bool IsLayerElement() { return (this->Is() > LAYER_ELEMENT && this->Is() < LAYER_ELEMENT_max); }; + bool IsFloatingElement() { return (this->Is() > FLOATING_ELEMENT && this->Is() < FLOATING_ELEMENT_max); }; + bool IsScoreDefElement() { return (this->Is() > SCOREDEF_ELEMENT && this->Is() < SCOREDEF_ELEMENT_max); }; + ///@} + + /** + * @name Methods for registering a MEI att class and for registering interfaces regrouping MEI att classes. + */ + ///@{ + void RegisterAttClass( AttClassId attClassId ) { m_attClasses.push_back( attClassId ); }; + bool HasAttClass( AttClassId attClassId ) { return std::find(m_attClasses.begin(), m_attClasses.end(), attClassId) != m_attClasses.end(); }; + void RegisterInterface( std::vector *attClasses, InterfaceId interfaceId ); + bool HasInterface( InterfaceId interfaceId ) { return std::find(m_interfaces.begin(), m_interfaces.end(), interfaceId) != m_interfaces.end(); }; + ///@} /** * Reset the object, that is 1) removing all childs and 2) resetting all attributes. @@ -86,9 +115,9 @@ class Object Object( const Object& object ); /** - * See copy constructor. + * Copy assignement - see copy constructor. */ - Object& operator=( const Object& object ); // copy assignement; + Object& operator=( const Object& object ); /** * Move all the children of the object passed as parameter to this one. @@ -98,22 +127,24 @@ class Object void MoveChildren( Object *object ); /** - * Method call for copying child classes + * Method call for copying child classes. + * The method has to be overwritten. */ virtual Object* Clone(); - virtual bool operator==( Object& other ); - std::string GetUuid() { return m_uuid; }; void SetUuid( std::string uuid ); void ResetUuid( ); /** - * Children count - * Used for classes with several types of children + * @name Children count, with or without a ClassId. + * Used for classes with several types of children. + * The method with a ClassId only searches at the first level. */ + ///@{ int GetChildCount() { return (int)m_children.size(); }; - int GetChildCount( const std::type_info *elementType ); + int GetChildCount( const ClassId classId ); + ///@} /** * Child access (generic) @@ -139,7 +170,7 @@ class Object * Always call GetFirst before calling GetNext */ ///@{ - Object *GetFirst( const std::type_info *elementType = NULL ); + Object *GetFirst( const ClassId classId = UNSPECIFIED ); Object *GetNext( ); ///@} @@ -149,8 +180,6 @@ class Object */ void SetParent( Object *parent ); - virtual std::string GetClassName( ) { return "[MISSING]"; }; - /** * Add an EditorialElement as child. * This can happen at many level. @@ -198,7 +227,7 @@ class Object * Look for a child with the specified type (returns NULL if not found) * This method is a wrapper to a Object::FindByType functor. */ - Object *FindChildByType( const std::type_info *elementType, + Object *FindChildByType( ClassId classId, int deepness = UNLIMITED_DEPTH, bool direction = FORWARD ); /** @@ -228,32 +257,32 @@ class Object * Return the first parent of the specified type. * The maxSteps parameter limit the search to a certain number of level if not -1. */ - Object *GetFirstParent( const std::type_info *elementType, int maxSteps = -1 ); + Object *GetFirstParent( const ClassId classId, int maxSteps = -1 ); /** * Return the last parent that is NOT of the specified type. * The maxSteps parameter limit the search to a certain number of level if not -1. */ - Object *GetLastParentNot( const std::type_info *elementType, int maxSteps = -1 ); + Object *GetLastParentNot( const ClassId classId, int maxSteps = -1 ); /** * Return the first of the specified type. */ - Object *GetFirstChild( const std::type_info *elementType ); + Object *GetFirstChild( const ClassId classId ); /** * Return the previous sibling object of the specified type. * If no type is specified, returns the previous object. * Returns NULL if not found in both cases. */ - Object *GetPreviousSibling( const std::type_info *elementType = NULL ); + Object *GetPreviousSibling( const ClassId classId = UNSPECIFIED ); /** * Return the next sibling object of the specified type. * If no type is specified, returns the next object. * Returns NULL if not found in both cases. */ - Object *GetNextSibling( const std::type_info *elementType = NULL ); + Object *GetNextSibling( const ClassId classId = UNSPECIFIED ); /** * Fill the list of all the children LayerElement. @@ -309,8 +338,8 @@ class Object * Deepness allow to specify how many child levels should be processed UNLIMITED_DEPTH means no * limit (EditorialElement objects do not count). */ - virtual void Process( Functor *functor, ArrayPtrVoid params, Functor *endFunctor = NULL, - ArrayOfAttComparisons * filters = NULL, int deepness = UNLIMITED_DEPTH, + virtual void Process( Functor *functor, ArrayPtrVoid *params, Functor *endFunctor = NULL, + ArrayOfAttComparisons *filters = NULL, int deepness = UNLIMITED_DEPTH, bool direction = FORWARD ); //----------// @@ -320,33 +349,33 @@ class Object /** * Add each LayerElements and its children to a flat list */ - virtual int AddLayerElementToFlatList( ArrayPtrVoid params ); + virtual int AddLayerElementToFlatList( ArrayPtrVoid *params ); /** * Find a Object with a specified uuid. * param 0: the uuid we are looking for. * param 1: the pointer to pointer to the Object retrieved (if found). */ - virtual int FindByUuid( ArrayPtrVoid params ); + virtual int FindByUuid( ArrayPtrVoid *params ); /** * Find a Object with a AttComparison functor . * param 0: the pointer to the AttComparsion we are evaluating. * param 1: the pointer to pointer to the Object retrieved (if found). */ - virtual int FindByAttComparison( ArrayPtrVoid params ); + virtual int FindByAttComparison( ArrayPtrVoid *params ); /** * Save the content of and object by calling the appropriate FileOutputStream method * param 0: a pointer to the FileOutputStream. */ - virtual int Save( ArrayPtrVoid params ); + virtual int Save( ArrayPtrVoid *params ); /** * Save the content of and object by calling the appropriate FileOutputStream method * param 0: a pointer to the FileOutputStream. */ - virtual int SaveEnd( ArrayPtrVoid params ); + virtual int SaveEnd( ArrayPtrVoid *params ); /** * @name Functors for aligning the content horizontally @@ -359,42 +388,60 @@ class Object * It creates it if no other note or event occurs at its position. * Any functor overriding this one needs to call ResetHorizontalAlignment */ - virtual int AlignHorizontally( ArrayPtrVoid params ); + virtual int AlignHorizontally( ArrayPtrVoid *params ); + + /** + * For each Layer, align the grace note stacked in GraceAlignment + */ + virtual int AlignHorizontallyEnd( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Align the measures by adjusting the m_drawingXRel position looking at the MeasureAligner. + * param 0: the cumulated shift */ - virtual int AlignMeasures( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int AlignMeasures( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Store the width of the system in the MeasureAligner for justification * This method is called at the end of a system. */ - virtual int AlignMeasuresEnd( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int AlignMeasuresEnd( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Correct the X alignment once the the content of a system has been aligned and laid out * See Measure::IntegrateBoundingBoxXShift for actual implementation */ - virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int IntegrateBoundingBoxGraceXShift( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; + + /** + * Correct the X alignment once the the content of a system has been aligned and laid out + * See Measure::IntegrateBoundingBoxXShift for actual implementation + */ + virtual int IntegrateBoundingBoxXShift( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Set the position of the Alignment. * Looks at the time different with the previous Alignment. */ - virtual int SetAligmentXPos( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int SetAligmentXPos( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; + + /** + * Lay out the X positions of the grace notes looking that the bounding boxes. + * The m_xShift is updated appropriately + */ + virtual int SetBoundingBoxGraceXShift( ArrayPtrVoid *params ); /** * Lay out the X positions of the staff content looking that the bounding boxes. * The m_xShift is updated appropriately */ - virtual int SetBoundingBoxXShift( ArrayPtrVoid params ); + virtual int SetBoundingBoxXShift( ArrayPtrVoid *params ); /** * Lay out the X positions of the staff content looking that the bounding boxes. * This is the Functor called at the end of the measure or a layer. */ - virtual int SetBoundingBoxXShiftEnd( ArrayPtrVoid params ); + virtual int SetBoundingBoxXShiftEnd( ArrayPtrVoid *params ); ///@} @@ -408,42 +455,42 @@ class Object * For each Staff, instanciate its StaffAlignment. * Any functor overriding this one needs to call ResetVerticalAlignment */ - virtual int AlignVertically( ArrayPtrVoid params ); + virtual int AlignVertically( ArrayPtrVoid *params ); /** * Align the system by adjusting the m_drawingYRel position looking at the SystemAligner. */ - virtual int AlignSystems( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int AlignSystems( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Store the height of the system in the SystemAligner for justification * This method is called at the end of a system. */ - virtual int AlignSystemsEnd( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int AlignSystemsEnd( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Correct the Y alignment once the the content of a system has been aligned and laid out * See System::IntegrateBoundingBoxYShift for actual implementation */ - virtual int IntegrateBoundingBoxYShift( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int IntegrateBoundingBoxYShift( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Set the position of the StaffAlignment. */ - virtual int SetAligmentYPos( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int SetAligmentYPos( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Lay out the Y positions of the staff looking that the bounding box of each staff. * The m_yShift is updated appropriately */ - virtual int SetBoundingBoxYShift( ArrayPtrVoid params ); + virtual int SetBoundingBoxYShift( ArrayPtrVoid *params ); /** * Lay out the Y positions of the staff looking that the bounding boxes of each staff * This is the Functor called at the end of the system or a measure. */ - virtual int SetBoundingBoxYShiftEnd( ArrayPtrVoid params ); + virtual int SetBoundingBoxYShiftEnd( ArrayPtrVoid *params ); ///@} @@ -453,16 +500,19 @@ class Object ///@{ /** - * Replace all the staffDefs in a scoreDef. - * param 0: a pointer to the scoreDef we are going to replace the staffDefs + * Replace the drawing values a staffDef. + * param 0: Clef pointer (NULL if none) + * param 1: KeySig pointer (NULL if none) + * param 2: Mensur pointer (NULL if none) + * param 3: MeterSig pointer (NULL if none) */ - virtual int ReplaceStaffDefsInScoreDef( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int ReplaceDrawingValuesInStaffDef( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Set the initial scoreDef of each page. * This is necessary for integrating changes that occur within a page. */ - virtual int SetCurrentScoreDef( ArrayPtrVoid params ); + virtual int SetCurrentScoreDef( ArrayPtrVoid *params ); /** * Set the initial scoreDef of each page. @@ -471,8 +521,9 @@ class Object * param 1: bool keysig flag. * param 2: bool the mensur flag. * param 3: bool the metersig flag. + * param 4: bool the keysig cancellation flag; */ - virtual int SetStaffDefRedrawFlags( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int SetStaffDefRedrawFlags( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; ///@} @@ -482,7 +533,7 @@ class Object * param 0: IntTree* * param 1: IntTree* */ - virtual int PrepareProcessingLists( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int PrepareProcessingLists( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Matches start and end for TimeSpanningInterface elements (such as tie or slur) @@ -491,7 +542,7 @@ class Object * param 0: std::vector* that holds the current elements to match * param 1: bool* fillList for indicating whether the elements have to be stack or not */ - virtual int PrepareTimeSpanning( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int PrepareTimeSpanning( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Processes Chord and Note for matching @tie by processing by Layer and by looking @@ -499,7 +550,7 @@ class Object * param 0: std::vector* that holds the current notes with open ties * param 1: Chord** currentChord for the current chord if in a chord */ - virtual int PrepareTieAttr( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int PrepareTieAttr( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Processes Chord and Note for matching @tie by processing by Layer; resets the @@ -507,7 +558,7 @@ class Object * param 0: std::vector* that holds the current notes with open ties (unused) * param 1: Chord** currentChord for the current chord if in a chord */ - virtual int PrepareTieAttrEnd( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int PrepareTieAttrEnd( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Processes by Layer and set drawing pointers. @@ -515,36 +566,45 @@ class Object * Set Note::m_drawingAccid for Note elements having an Accid child * param 0: Note** currentNote for the current not to w */ - virtual int PreparePointersByLayer( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int PreparePointersByLayer( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Functor for setting wordpos and connector ends * The functor is process by staff/layer/verse using an ArrayOfAttComparisons filter. */ - virtual int PrepareLyrics( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int PrepareLyrics( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Functor for setting wordpos and connector ends * The functor is process by doc at the end of a document of closing opened syl. */ - virtual int PrepareLyricsEnd( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int PrepareLyricsEnd( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; + + /** + * Functor for setting mRpt drawing numbers (if required) + * The functor is process by staff/layer using an ArrayOfAttComparisons filter. + * param 0: MRpt **currentMRpt + * param 1: data_BOOLEAN for indicating if the MRpt::m_drawingNumber has to be set or not + * param 2: ScoreDef * doc scoreDef + */ + virtual int PrepareRpt( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Goes through all the TimeSpanningInterface element and set them a current to each staff * where require. For Note with DrawingTieAttr, the functor is redireted to the tie object * param 0: std::vector* of the current running TimeSpanningInterface elements */ - virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Reset the drawing values before calling PrepareDrawing after changes. */ - virtual int ResetDarwing( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int ResetDarwing( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Set the drawing position (m_drawingX and m_drawingY) values for objects */ - virtual int SetDrawingXY( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int SetDrawingXY( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * @name Functors for justification @@ -554,12 +614,12 @@ class Object /** * Justify the X positions */ - virtual int JustifyX( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int JustifyX( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Justify the Y positions */ - virtual int JustifyY( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int JustifyY( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; ///@} @@ -572,21 +632,26 @@ class Object * Fill a page by adding systems with the appropriate length. * */ - virtual int CastOffSystems( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int CastOffSystems( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * */ - virtual int CastOffPages( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int CastOffPages( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; /** * Undo the cast of of both pages and system. * This is used by Doc::ContinuousLayout for putting all pages / system continously. */ - virtual int UnCastOff( ArrayPtrVoid params ) { return FUNCTOR_CONTINUE; }; + virtual int UnCastOff( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; ///@} + /** + * + */ + virtual int TimeSpanningLayerElements( ArrayPtrVoid *params ) { return FUNCTOR_CONTINUE; }; + protected: /** * Clear the children vector and delete all the objects. @@ -631,10 +696,19 @@ class Object * Values are set when GetFirst is called (which is mandatory) */ ArrayOfObjects::iterator m_iteratorEnd, m_iteratorCurrent; - const std::type_info *m_iteratorElementType; + ClassId m_iteratorElementType; + + /** + * A vector for storing the list of AttClassId (MEI att classes) implemented. + */ + std::vector m_attClasses; + + /** + * A vector for storing the list of InterfaceId (group of MEI att classes) implemented. + */ + std::vector m_interfaces; }; - //---------------------------------------------------------------------------- // DocObject //---------------------------------------------------------------------------- @@ -649,18 +723,15 @@ class DocObject: public Object DocObject(); DocObject(std::string classid); virtual ~DocObject(); - - /** - * Refreshes the views from Doc. - * From other DocObject, simply pass it to its parent until Doc is reached. - */ - virtual void Refresh(); + virtual ClassId Is() { return DOC_OBJECT; } void UpdateContentBB( int x1, int y1, int x2, int y2); void UpdateSelfBB( int x1, int y1, int x2, int y2 ); bool HasContentBB(); bool HasSelfBB(); void ResetBB(); + void SetEmptyBB(); + bool HasEmptyBB(); /** * @name Get and set the X and Y drawing position @@ -726,8 +797,8 @@ class ObjectListInterface /** * Gets the first item of type elementType starting at startFrom */ - Object *GetListFirst(const Object *startFrom, const std::type_info *elementType = NULL ); - Object *GetListFirstBackward(Object *startFrom, const std::type_info *elementType = NULL ); + Object *GetListFirst(const Object *startFrom, const ClassId classId = UNSPECIFIED ); + Object *GetListFirstBackward(Object *startFrom, const ClassId classId = UNSPECIFIED ); /** * Returns the previous object in the list (NULL if not found) @@ -777,18 +848,18 @@ class ObjectListInterface class Functor { private: - int (Object::*obj_fpt)( ArrayPtrVoid params ); // pointer to member function + int (Object::*obj_fpt)( ArrayPtrVoid *params ); // pointer to member function public: // constructor - takes pointer to an object and pointer to a member and stores // them in two private variables Functor( ); - Functor( int(Object::*_obj_fpt)( ArrayPtrVoid )); + Functor( int(Object::*_obj_fpt)( ArrayPtrVoid* )); virtual ~Functor() {}; // override function "Call" - virtual void Call( Object *ptr, ArrayPtrVoid params ); + virtual void Call( Object *ptr, ArrayPtrVoid *params ); private: @@ -824,14 +895,14 @@ class ObjectComparison { public: - ObjectComparison( const std::type_info *elementType ) { m_elementType = elementType; }; + ObjectComparison( const ClassId classId ) { m_classId = classId; }; bool operator() (Object *object) { - if (!m_elementType) { + if (m_classId == UNSPECIFIED) { return true; } - return (typeid(*object) == *m_elementType); + return (object->Is() == m_classId); } private: @@ -839,7 +910,7 @@ class ObjectComparison public: private: - const std::type_info *m_elementType; + ClassId m_classId; }; diff --git a/include/vrv/page.h b/include/vrv/page.h index b3d6f73e0fc..a0dd3d6cb39 100644 --- a/include/vrv/page.h +++ b/include/vrv/page.h @@ -40,11 +40,15 @@ class Page: public DocObject virtual ~Page(); virtual void Reset(); virtual std::string GetClassName( ) { return "Page"; }; + virtual ClassId Is() { return PAGE; }; ///@} + /** + * @name Methods for adding allowed content + */ + ///@{ void AddSystem( System *system ); - - System *GetAtPos( int y ); + ///@} int GetSystemCount() const { return (int)m_children.size(); }; diff --git a/include/vrv/pitchinterface.h b/include/vrv/pitchinterface.h index e3bf7d64c0d..7c2bc71a583 100644 --- a/include/vrv/pitchinterface.h +++ b/include/vrv/pitchinterface.h @@ -21,7 +21,7 @@ namespace vrv { * This class is an interface for elements with pitch, such as notes and neumes. * It is not an abstract class but should not be instanciate directly. */ -class PitchInterface: +class PitchInterface: public Interface, public AttAccidental, public AttOctave, public AttPitch @@ -35,6 +35,7 @@ class PitchInterface: PitchInterface(); virtual ~PitchInterface(); virtual void Reset(); + virtual InterfaceId IsInterface() { return INTERFACE_PITCH; }; ///@} /** diff --git a/include/vrv/positioninterface.h b/include/vrv/positioninterface.h index 7facba31a27..d42c1e4132d 100644 --- a/include/vrv/positioninterface.h +++ b/include/vrv/positioninterface.h @@ -22,7 +22,8 @@ namespace vrv { * It is not an abstract class but should not be instanciate directly. * For now, the position is handled in a similar way that for PitchInterface, that is with a pitch and octave. */ -class PositionInterface: public AttStafflocPitched +class PositionInterface: public Interface, + public AttStafflocPitched { public: /** @@ -33,6 +34,7 @@ class PositionInterface: public AttStafflocPitched PositionInterface(); virtual ~PositionInterface(); virtual void Reset(); + virtual InterfaceId IsInterface() { return INTERFACE_POSITION; }; ///@} /** diff --git a/include/vrv/proport.h b/include/vrv/proport.h new file mode 100755 index 00000000000..b9b198ecef4 --- /dev/null +++ b/include/vrv/proport.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: proport.h +// Author: Donald Byrd +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __VRV_PROPORT_H__ +#define __VRV_PROPORT_H__ + +#include "atts_shared.h" +#include "layerelement.h" + +namespace vrv { + +//---------------------------------------------------------------------------- +// Proport +//---------------------------------------------------------------------------- + +/** + * This class models the MEI element. + */ +class Proport: public LayerElement, + public AttDurationRatio +{ +public: + /** + * @name Constructors, destructors, and other standard methods + * Reset method reset all attribute classes. + */ + ///@{ + Proport(); + virtual ~Proport(); + virtual void Reset(); + virtual std::string GetClassName( ) { return "Proport"; }; + virtual ClassId Is() { return PROPORT; }; + virtual Object* Clone() { return new Proport(*this); }; + ///@} + + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + +private: + +public: + +private: + +}; + + +} // namespace vrv + +#endif diff --git a/include/vrv/rest.h b/include/vrv/rest.h index 8278a0b6de3..30eea5a7664 100644 --- a/include/vrv/rest.h +++ b/include/vrv/rest.h @@ -34,8 +34,12 @@ class Rest: public LayerElement, public DurationInterface, public PositionInterf virtual ~Rest(); virtual void Reset(); virtual std::string GetClassName( ) { return "Rest"; }; + virtual ClassId Is() { return REST; }; ///@} + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + private: public: diff --git a/include/vrv/rpt.h b/include/vrv/rpt.h new file mode 100644 index 00000000000..54163056d18 --- /dev/null +++ b/include/vrv/rpt.h @@ -0,0 +1,164 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: rpt.h +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __VRV_RPT_H__ +#define __VRV_RPT_H__ + +#include "atts_cmn.h" +#include "layerelement.h" + +namespace vrv { + +//---------------------------------------------------------------------------- +// BeatRpt +//---------------------------------------------------------------------------- + +/** + * This class models the MEI + */ +class BeatRpt: public LayerElement, + public AttBeatRptVis +{ +public: + /** + * @name Constructors, destructors, reset and class name methods + * Reset method reset all attribute classes + */ + ///@{ + BeatRpt( ); + virtual ~BeatRpt(); + virtual void Reset(); + virtual std::string GetClassName( ){ return "BeatRpt"; }; ; + virtual ClassId Is() { return BEATRPT; }; + ///@} + + /** Override the method since alignment is required */ + virtual bool HasToBeAligned() { return true; }; + + /** + * Returns the duration (in double) for the element. + * Careful: this method is not overriding LayerElement::GetAlignmentDuration since + * LayerElement and DurationInterface have no inheritance link. + */ + virtual double GetAlignmentDuration( int meterUnit ); + +private: + +public: + +private: + +}; + +//---------------------------------------------------------------------------- +// MRpt +//---------------------------------------------------------------------------- + +/** + * This class models the MEI + */ +class MRpt: public LayerElement +{ +public: + /** + * @name Constructors, destructors, reset and class name methods + * Reset method reset all attribute classes + */ + ///@{ + MRpt( ); + virtual ~MRpt(); + virtual void Reset(); + virtual std::string GetClassName( ){ return "MRpt"; }; ; + virtual ClassId Is() { return MRPT; }; + ///@} + + //----------// + // Functors // + //----------// + + /** + * Functor for setting mRpt drawing numbers (if required) + * See implementation and Object::PrepareRpt + */ + virtual int PrepareRpt( ArrayPtrVoid *params ); + +private: + +public: + /** measure count */ + int m_drawingMeasureCount; + +private: + +}; + +//---------------------------------------------------------------------------- +// MRpt2 +//---------------------------------------------------------------------------- + +/** + * This class models the MEI + */ +class MRpt2: public LayerElement +{ +public: + /** + * @name Constructors, destructors, reset and class name methods + * Reset method reset all attribute classes + */ + ///@{ + MRpt2( ); + virtual ~MRpt2(); + virtual void Reset(); + virtual std::string GetClassName( ){ return "MRpt2"; }; ; + virtual ClassId Is() { return MRPT2; }; + ///@} + +private: + +public: + +private: + +}; + + +//---------------------------------------------------------------------------- +// MultiRpt +//---------------------------------------------------------------------------- + +/** + * This class models the MEI + */ +class MultiRpt: public LayerElement, + public AttNumbered +{ +public: + /** + * @name Constructors, destructors, reset and class name methods + * Reset method reset all attribute classes + */ + ///@{ + MultiRpt( ); + virtual ~MultiRpt(); + virtual void Reset(); + virtual std::string GetClassName( ){ return "MultiRpt"; }; ; + virtual ClassId Is() { return MULTIRPT; }; + ///@} + +private: + +public: + +private: + +}; + +} // namespace vrv + +#endif diff --git a/include/vrv/scoredef.h b/include/vrv/scoredef.h index 18bb6dea700..c2c6533213c 100644 --- a/include/vrv/scoredef.h +++ b/include/vrv/scoredef.h @@ -10,131 +10,97 @@ #define __VRV_SCOREDEF_H__ #include "atts_shared.h" +#include "drawinginterface.h" #include "object.h" +#include "scoredefinterface.h" namespace vrv { class Clef; -class ClefAttr; class KeySig; -class KeySigAttr; class Mensur; -class MensurAttr; class MeterSig; -class MeterSigAttr; class StaffGrp; class StaffDef; -// unused? LP -#define STAFFDEF_DRAW_NONE 0 -#define STAFFDEF_DRAW_CLEF (1<<0) -#define STAFFDEF_DRAW_KEYSIG (1<<1) -#define STAFFDEF_DRAW_MENSUR (1<<2) -#define STAFFDEF_DRAW_ALL (1<<3) - 1 - //---------------------------------------------------------------------------- -// ScoreOrStaffDefAttrInterface +// ScoreDefElement //---------------------------------------------------------------------------- /** - * This class is an interface for MEI scoreDef or staffDef attributes clef, keysig and mensur. - * It can either hold element or attribute values. Element values are hold in normal objects - * (e.g., Clef) and attribute values are hold in dedicated Object classes (e.g., ClefAttr) - * During rendering, only Element object are used. They are obained by the GetXXXCopy methods - * that create a copy of the Element object or a corresponding Element object if a attribute value - * object is hold. + * This class is a base class for MEI scoreDef or staffDef elements. + * It implements the ScoreDefInterface that implements the attribute classes + * for clef, key signature, mensur and meter signature. + * It also provides methods for checking if the scoreDef or staffDef has some + * information about clef, key signature, etc. This information can be either + * attributes (implemented) of the ScoreDefInterface or elements (not implemented). */ -class ScoreOrStaffDefAttrInterface +class ScoreDefElement: public Object, public ScoreDefInterface { public: /** - * @name Constructors, destructors, and other standard methods + * @name Constructors, destructors, and other standard methods. */ ///@{ - ScoreOrStaffDefAttrInterface(); - virtual ~ScoreOrStaffDefAttrInterface(); + ScoreDefElement(std::string classid); + virtual ~ScoreDefElement(); virtual void Reset(); - ScoreOrStaffDefAttrInterface( const ScoreOrStaffDefAttrInterface& interface ); // copy contructor - ScoreOrStaffDefAttrInterface& operator=( const ScoreOrStaffDefAttrInterface& interface ); // copy assignement; + virtual ClassId Is() { return SCOREDEF_ELEMENT; }; ///@} /** - * @name Replace the clef, keysig, mensur and meterSig. - * The current value (if any) is replaced by the new value (if any). - * Values passed and hold can be either a object or attribute value object. - * For example, it can be either a Clef or a ClefAttr. - ///@{ + * @name Methods for checking the presence of clef, key signature, etc. information. + * Look both at the attributes (e.g., @key.sig) and at child elements (not implemented) */ - void ReplaceClef( Object *newClef ); - void ReplaceKeySig( Object *newKeySig ); - void ReplaceMensur( Object *newMensur ); - void ReplaceMeterSig( Object *newMeterSig ); + ///@{ + bool HasClefInfo(); + bool HasKeySigInfo(); + bool HasMensurInfo(); + bool HasMeterSigInfo(); ///@} /** * @name Get a copy of the clef, keysig, mensur and meterSig. - * These methods creates new objects that need to be deleted. + * These methods create new objects (heap) that will need to be deleted. * The also convert attribute value object to an object. For example, - * if m_clef holds a ClefAttr object, the copy will be a Clef object. - * They are used when writing the MEI. + * if a staffDef has a @key.sig, the copy will be a KeySig object. + * The conversion from attribute to element is performed in the appropriate + * constructor of each corresponding class (Clef, KeySig, etc.) */ ///@{ - Clef *GetClefCopy() const; - KeySig *GetKeySigCopy() const; - Mensur *GetMensurCopy() const; - MeterSig *GetMeterSigCopy() const; + Clef *GetClefCopy(); + KeySig *GetKeySigCopy(); + Mensur *GetMensurCopy(); + MeterSig *GetMeterSigCopy(); ///@} - /** - * @name Get the clef, keysig, mensur and meterSig. - * They will return a reference only if the value hold is - * an element (e.g., Clef) and not a attribute value object (ClefAttr). - * They are used when writing the MEI. - */ - ///@{ - Clef *GetClefElement() const; - KeySig *GetKeySigElement() const; - Mensur *GetMensurElement() const; - MeterSig *GetMeterSigElement() const; - ///@} +protected: +private: /** - * @name Get the clef, keysig, mensur and meterSig attributes. - * They will return a reference only if the value hold is - * an attibute value object (e.g., ClefAtt) and not an element (Clef). + * @name Methods for checking if clef info is available at the attribute level. */ ///@{ - ClefAttr *GetClefAttr() const; - KeySigAttr *GetKeySigAttr() const; - MensurAttr *GetMensurAttr() const; - MeterSigAttr *GetMeterSigAttr() const; + bool HasClefAttrInfo(); + bool HasKeySigAttrInfo(); + bool HasMensurAttrInfo(); + bool HasMeterSigAttrInfo(); ///@} - + /** - * @name Get the clef, keysig, mensur and meterSig object. - * They will return a reference to the hold object (element or attribute). + * @name Methods for checking if clef info is available at the element level. + * To be implemented. */ ///@{ - Object *GetClef() const { return m_clef; }; - Object *GetKeySig() const { return m_keySig; }; - Object *GetMensur() const { return m_mensur; }; - Object *GetMeterSig() const { return m_meterSig; }; + bool HasClefElementInfo(); + bool HasKeySigElementInfo(); + bool HasMensurElementInfo(); + bool HasMeterSigElementInfo(); ///@} -protected: - /** The clef or clef attributes */ - Object *m_clef; - /** The key signature */ - Object *m_keySig; - /** The mensur */ - Object *m_mensur; - /** The meter signature (time signature) */ - Object *m_meterSig; - }; - //---------------------------------------------------------------------------- // ScoreDef //---------------------------------------------------------------------------- @@ -143,7 +109,7 @@ class ScoreOrStaffDefAttrInterface * This class represents a MEI scoreDef. * It contains StaffGrp objects. */ -class ScoreDef: public Object, public ScoreOrStaffDefAttrInterface, public ObjectListInterface +class ScoreDef: public ScoreDefElement, public ObjectListInterface { public: /** @@ -155,6 +121,7 @@ class ScoreDef: public Object, public ScoreOrStaffDefAttrInterface, public Objec virtual ~ScoreDef(); virtual void Reset(); virtual std::string GetClassName( ) { return "ScoreDef"; }; + virtual ClassId Is() { return SCOREDEF; }; ///@} void AddStaffGrp( StaffGrp *staffGrp ); @@ -162,14 +129,14 @@ class ScoreDef: public Object, public ScoreOrStaffDefAttrInterface, public Objec /** * Replace the scoreDef with the content of the newScoreDef. */ - void Replace( ScoreDef *newScoreDef ); + void ReplaceDrawingValues( ScoreDef *newScoreDef ); /** * Replace the corresponding staffDef with the content of the newStaffDef. * Looks for the staffDef with the same m_n (@n) and replace the attribute set. - * Attribute set is provided by the ScoreOrStaffDefAttrInterface. + * Attribute set is provided by the ScoreOrStaffDefInterface. */ - void Replace( StaffDef *newStaffDef ); + void ReplaceDrawingValues( StaffDef *newStaffDef ); /** * Get the staffDef with number n (NULL if not found). @@ -180,7 +147,7 @@ class ScoreDef: public Object, public ScoreOrStaffDefAttrInterface, public Objec * Set the redraw flag to all staffDefs. * This is necessary at the beginning or when a scoreDef occurs. */ - void SetRedrawFlags( bool clef, bool keysig, bool mensur, bool meterSig ); + void SetRedrawFlags( bool clef, bool keySig, bool mensur, bool meterSig, bool keySigCancellation ); /** * @name Set and get the scoreDef drawing flags for clef, keysig and mensur. @@ -199,7 +166,7 @@ class ScoreDef: public Object, public ScoreOrStaffDefAttrInterface, public Objec * For ScoreDef, this means only moving them since their width is not taken into * account */ - virtual int CastOffSystems( ArrayPtrVoid params ); + virtual int CastOffSystems( ArrayPtrVoid *params ); protected: /** @@ -227,7 +194,11 @@ class ScoreDef: public Object, public ScoreOrStaffDefAttrInterface, public Objec * This class represents a MEI staffGrp. * It contains StaffDef objects. */ -class StaffGrp: public Object, public ObjectListInterface +class StaffGrp: public Object, public ObjectListInterface, + public AttCommon, + public AttLabelsAddl, + public AttStaffgroupingsym, + public AttStaffGrpVis { public: /** @@ -240,26 +211,15 @@ class StaffGrp: public Object, public ObjectListInterface virtual Object* Clone() { return new StaffGrp(*this); }; virtual void Reset(); virtual std::string GetClassName( ) { return "StaffGrp"; }; + virtual ClassId Is() { return STAFFGRP; }; ///@} - void AddStaffDef( StaffDef *staffDef ); - - void AddStaffGrp( StaffGrp *staffGrp ); - - /** - * @name Set and get the staffGrp @symbol - */ - ///@{ - StaffGrpSymbol GetSymbol() const { return m_symbol; }; - void SetSymbol( StaffGrpSymbol symbol ) { m_symbol = symbol; }; - ///@} - /** - * @name Set and get the staffGrp @barthru + * @name Methods for adding allowed content */ ///@{ - bool GetBarthru() const { return m_barthru; }; - void SetBarthru( bool barthru ) { m_barthru = barthru; }; + void AddStaffDef( StaffDef *staffDef ); + void AddStaffGrp( StaffGrp *staffGrp ); ///@} //----------// @@ -278,8 +238,6 @@ class StaffGrp: public Object, public ObjectListInterface public: private: - StaffGrpSymbol m_symbol; - bool m_barthru; }; @@ -291,9 +249,10 @@ class StaffGrp: public Object, public ObjectListInterface /** * This class represents a MEI staffDef. */ -class StaffDef: public Object, public ScoreOrStaffDefAttrInterface, +class StaffDef: public ScoreDefElement, public StaffDefDrawingInterface, public AttCommon, public AttLabelsAddl, + public AttScalable, public AttStaffDefVis { public: @@ -307,59 +266,33 @@ class StaffDef: public Object, public ScoreOrStaffDefAttrInterface, virtual Object* Clone() { return new StaffDef(*this); }; virtual void Reset(); virtual std::string GetClassName( ) { return "StaffDef"; }; + virtual ClassId Is() { return STAFFDEF; }; ///@} - /** - * @name Set and get the layer drawing flags for clef, keysig and mensur. - * This will be true when starting a new system or when a scoreDef or staffDef changes occurs - * This will be true only for the first layer in the staff. - */ - ///@{ - bool DrawClef() const { return m_drawClef; }; - void SetDrawClef( bool drawClef ) { m_drawClef = drawClef; }; - bool DrawKeySig() const { return m_drawKeySig; }; - void SetDrawKeySig( bool drawKeySig ) { m_drawKeySig = drawKeySig; }; - bool DrawMensur() const { return m_drawMensur; }; - void SetDrawMensur( bool drawMensur ) { m_drawMensur = drawMensur; }; - bool DrawMeterSig() const { return m_drawMeterSig; }; - void SetDrawMeterSig( bool drawMeterSig ) { m_drawMeterSig = drawMeterSig; }; - ///@} - - //----------// // Functors // //----------// /** - * Replace all the staffDefs in a scoreDef. - * Calls ScoreDef::Replace. - * param 0: a pointer to the scoreDef we are going to replace the staffDefs + * Set the current / drawing clef, key signature, etc. to the StaffDef + * Called form ScoreDef::ReplaceDrawingValues. + * See implementation and Object::ReplaceDrawingValuesInStaffDef for the parameters. */ - virtual int ReplaceStaffDefsInScoreDef( ArrayPtrVoid params ); + virtual int ReplaceDrawingValuesInStaffDef( ArrayPtrVoid *params ); /** - * Set flags for the staff set for indicating whether clefs, keysig, etc. needs to be redrawn. - * This is typically occurs when a new system or a new scoreDef is encountered. - * param 0: bool clef flag. - * param 1: bool keysig flag. - * param 2: bool the mensur flag. + * Set drawing flags for the StaffDef for indicating whether clefs, keysig, etc. needs + * to be redrawn. + * This typically occurs when a new System or a new ScoreDef is encountered. + * See implementation and Object::SetStaffDefRedrawFlags for the parameters. */ - virtual int SetStaffDefRedrawFlags( ArrayPtrVoid params ); + virtual int SetStaffDefRedrawFlags( ArrayPtrVoid *params ); private: public: private: - /** - * @name Flags for indicating whether the clef, keysig and mensur needs to be drawn or not - */ - ///@{ - bool m_drawClef; - bool m_drawKeySig; - bool m_drawMensur; - bool m_drawMeterSig; - ///@} }; diff --git a/include/vrv/scoredefinterface.h b/include/vrv/scoredefinterface.h new file mode 100644 index 00000000000..9ebade95047 --- /dev/null +++ b/include/vrv/scoredefinterface.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: scoredefinterface.h +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __VRV_SCOREDEF_INTERFACE_H__ +#define __VRV_SCOREDEF_INTERFACE_H__ + +#include "atts_mensural.h" +#include "atts_shared.h" +#include "vrvdef.h" + +namespace vrv { + +//---------------------------------------------------------------------------- +// ScoreDefInterface +//---------------------------------------------------------------------------- + +/** + * This class is an interface for elements implementing score attributes, such + * as , or + * It is not an abstract class but should not be instanciate directly. + */ +class ScoreDefInterface: public Interface, + public AttCleffingLog, + public AttKeySigDefaultLog, + public AttKeySigDefaultVis, + public AttMensuralLog, + public AttMensuralShared, + public AttMeterSigDefaultLog, + public AttMeterSigDefaultVis, + public AttMultinummeasures +{ +public: + /** + * @name Constructors, destructors, reset methods + * Reset method reset all attribute classes + */ + ///@{ + ScoreDefInterface(); + virtual ~ScoreDefInterface(); + virtual void Reset(); + virtual InterfaceId IsInterface() { return INTERFACE_SCOREDEF; }; + ///@} + +protected: + +private: + +public: + +private: + +}; + +} // namespace vrv + +#endif diff --git a/include/vrv/slur.h b/include/vrv/slur.h index 75105a98709..d5f5d069ddb 100644 --- a/include/vrv/slur.h +++ b/include/vrv/slur.h @@ -9,7 +9,7 @@ #ifndef __VRV_SLUR_H__ #define __VRV_SLUR_H__ -#include "measureelement.h" +#include "floatingelement.h" #include "timeinterface.h" namespace vrv { @@ -18,7 +18,8 @@ namespace vrv { // Slur //---------------------------------------------------------------------------- -class Slur: public MeasureElement, public TimeSpanningInterface +class Slur: public FloatingElement, public TimeSpanningInterface, + public AttCurvature { public: /** @@ -30,27 +31,9 @@ class Slur: public MeasureElement, public TimeSpanningInterface virtual ~Slur(); virtual void Reset(); virtual std::string GetClassName( ) { return "Slur"; }; + virtual ClassId Is() { return SLUR; }; ///@} - //----------// - // Functors // - //----------// - - /** - * See Object::FillStaffCurrentTimeSpanning - */ - virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid params ); - - /** - * See Object::PrepareTimeSpanning - */ - virtual int PrepareTimeSpanning( ArrayPtrVoid params ); - - /** - * Reset the drawing values before calling PrepareDrawing after changes. - */ - virtual int ResetDarwing( ArrayPtrVoid params ); - private: public: diff --git a/include/vrv/smufl.h b/include/vrv/smufl.h index 7e9a3785836..8cdc759e804 100644 --- a/include/vrv/smufl.h +++ b/include/vrv/smufl.h @@ -24,6 +24,11 @@ namespace vrv { enum { SMUFL_E003_bracketTop = 0xE003, SMUFL_E004_bracketBottom = 0xE004, + SMUFL_E045_dalSegno = 0xE045, + SMUFL_E046_daCapo = 0xE046, + SMUFL_E047_segno = 0xE047, + SMUFL_E048_coda = 0xE048, + SMUFL_E04B_segnoSerpent2 = 0xE04B, SMUFL_E050_gClef = 0xE050, SMUFL_E051_gClef15mb = 0xE051, SMUFL_E052_gClef8vb = 0xE052, @@ -52,6 +57,12 @@ enum { SMUFL_E0A3_noteheadHalf = 0xE0A3, SMUFL_E0A4_noteheadBlack = 0xE0A4, SMUFL_E0FA_noteheadWholeFilled = 0xE0FA, + SMUFL_E101_noteheadSlashHorizontalEnds = 0xE101, + SMUFL_E220_tremolo1 = 0xE220, + SMUFL_E221_tremolo2 = 0xE221, + SMUFL_E222_tremolo3 = 0xE222, + SMUFL_E223_tremolo4 = 0xE223, + SMUFL_E224_tremolo5 = 0xE224, SMUFL_E240_flag8thUp = 0xE240, SMUFL_E241_flag8thDown = 0xE241, SMUFL_E260_accidentalFlat = 0xE260, @@ -66,6 +77,12 @@ enum { SMUFL_E269_accidentalSharpSharp = 0xE269, SMUFL_E26A_accidentalParensLeft = 0xE26A, SMUFL_E26B_accidentalParensRight = 0xE26B, + SMUFL_E4A0_articAccentAbove = 0xE4A0, + SMUFL_E4A1_articAccentBelow = 0xE4A1, + SMUFL_E4A8_articStaccatissimoWedgeAbove = 0xE4A8, + SMUFL_E4A9_articStaccatissimoWedgeBelow = 0xE4A9, + SMUFL_E4AC_articMarcatoAbove = 0xE4AC, + SMUFL_E4AD_articMarcatoBelow = 0xE4AD, SMUFL_E4C0_fermataAbove = 0xE4C0, SMUFL_E4C1_fermataBelow = 0xE4C1, SMUFL_E4E5_restQuarter = 0xE4E5, @@ -74,9 +91,29 @@ enum { SMUFL_E4E8_rest32nd = 0xE4E8, SMUFL_E4E9_rest64th = 0xE4E9, SMUFL_E4EA_rest128th = 0xE4EA, + SMUFL_E500_repeat1Bar = 0xE500, + SMUFL_E501_repeat2Bars = 0xE501, + SMUFL_E502_repeat4Bars = 0xE502, + SMUFL_E520_dynamicPiano = 0xE520, + SMUFL_E521_dynamicMezzo = 0xE521, + SMUFL_E522_dynamicForte = 0xE522, + SMUFL_E523_dynamicRinforzando = 0xE523, + SMUFL_E524_dynamicSforzando = 0xE524, + SMUFL_E525_dynamicZ = 0xE525, + SMUFL_E52F_dynamicFF = 0xE52F, + SMUFL_E530_dynamicFFF = 0xE530, + SMUFL_E531_dynamicFFFF = 0xE531, + SMUFL_E532_dynamicFFFFF = 0xE532, SMUFL_E566_ornamentTrill = 0xE566, + SMUFL_E567_ornamentTurn = 0xE567, + SMUFL_E568_ornamentTurnInverted = 0xE568, + SMUFL_E56A_ornamentTurnUp = 0xE56A, + SMUFL_E56B_ornamentTurnUpS = 0xE56B, SMUFL_E56C_ornamentMordent = 0xE56C, SMUFL_E56D_ornamentMordentInverted = 0xE56D, + SMUFL_E56E_ornamentTremblement = 0xE56E, + SMUFL_E650_keyboardPedalPed = 0xE650, + SMUFL_E655_keyboardPedalUp = 0xE655, SMUFL_E880_tuplet0 = 0xE880, SMUFL_E881_tuplet1 = 0xE881, SMUFL_E882_tuplet2 = 0xE882, @@ -87,10 +124,15 @@ enum { SMUFL_E887_tuplet7 = 0xE887, SMUFL_E888_tuplet8 = 0xE888, SMUFL_E889_tuplet9 = 0xE889, + SMUFL_E88A_tupletColon = 0xE88A, + SMUFL_E938_mensuralNoteheadSemibrevisBlack = 0xE938, + SMUFL_E939_mensuralNoteheadSemibrevisVoid = 0xE939, + SMUFL_E93C_mensuralNoteheadMinimaWhite = 0xE93C, + SMUFL_E93D_mensuralNoteheadSemiminimaWhite = 0xE93D, }; /** The number of glyphs for verification **/ -#define SMUFL_COUNT 65 +#define SMUFL_COUNT 107 } // vrv namespace diff --git a/include/vrv/space.h b/include/vrv/space.h index 832be52b634..911cdf149d7 100644 --- a/include/vrv/space.h +++ b/include/vrv/space.h @@ -33,6 +33,7 @@ class Space: public LayerElement, public DurationInterface virtual ~Space(); virtual void Reset(); virtual std::string GetClassName( ){ return "Space"; }; ; + virtual ClassId Is() { return SPACE; }; ///@} private: diff --git a/include/vrv/staff.h b/include/vrv/staff.h index e4db5b3eb27..233a73fa815 100644 --- a/include/vrv/staff.h +++ b/include/vrv/staff.h @@ -10,7 +10,7 @@ #define __VRV_STAFF_H__ #include "atts_shared.h" -#include "measureelement.h" +#include "object.h" namespace vrv { @@ -30,7 +30,7 @@ class TimeSpanningInterface; * It contains Measure objects. * For unmeasured music, on single Measure is added for simplifying internal processing */ -class Staff: public MeasureElement, +class Staff: public DocObject, public AttCommon { @@ -43,10 +43,16 @@ class Staff: public MeasureElement, Staff( int n = -1 ); virtual ~Staff(); virtual void Reset(); - virtual std::string GetClassName( ) { return "Staff"; }; + virtual std::string GetClassName( ) { return "Staff"; }; + virtual ClassId Is() { return STAFF; }; ///@} + /** + * @name Methods for adding allowed content + */ + ///@{ void AddLayer( Layer *layer ); + ///@} int GetLayerCount() const { return (int)m_children.size(); }; @@ -77,33 +83,39 @@ class Staff: public MeasureElement, /** * Currently unused - kept for "documentation" */ - virtual bool GetPosOnPage( ArrayPtrVoid params ); + virtual bool GetPosOnPage( ArrayPtrVoid *params ); /** * Align the content of a staff vertically. */ - virtual int AlignVertically( ArrayPtrVoid params ); + virtual int AlignVertically( ArrayPtrVoid *params ); /** */ - virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid params ); + virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ); /** * Functor for setting running lyrics in staves * This is necessary for that starts in one measure and ends in another one * The functor is process by staff/layer/verse using an ArrayOfAttComparisons filter. */ - virtual int FillStaffCurrentLyrics( ArrayPtrVoid params ); + virtual int FillStaffCurrentLyrics( ArrayPtrVoid *params ); /** * Reset the drawing values before calling PrepareDrawing after changes. */ - virtual int ResetDarwing( ArrayPtrVoid params ); + virtual int ResetDarwing( ArrayPtrVoid *params ); /** * Set the drawing position (m_drawingX and m_drawingY) values for objects */ - virtual int SetDrawingXY( ArrayPtrVoid params ); + virtual int SetDrawingXY( ArrayPtrVoid *params ); + + /** + * Functor for setting mRpt drawing numbers (if required) + * See implementation and Object::PrepareRpt + */ + virtual int PrepareRpt( ArrayPtrVoid *params ); public: /** @@ -131,7 +143,7 @@ class Staff: public MeasureElement, /** portee invisible (wolfgang legacy) */ char invisible; /** taille. 0 = normale1 = petite (wolfgang legacy) (to be set as scale in staffDef) */ - unsigned char staffSize; + int m_drawingStaffSize; private: /** diff --git a/include/vrv/style.h b/include/vrv/style.h index 1419f9c8e12..842d0e190b0 100644 --- a/include/vrv/style.h +++ b/include/vrv/style.h @@ -19,14 +19,14 @@ namespace vrv { #define MIN_UNIT 6 #define MAX_UNIT 18 -#define DEFAULT_PAGE_RIGHT_MAR 50 -#define MIN_PAGE_RIGHT_MAR 0 -#define MAX_PAGE_RIGHT_MAR 500 - #define DEFAULT_PAGE_LEFT_MAR 50 #define MIN_PAGE_LEFT_MAR 0 #define MAX_PAGE_LEFT_MAR 500 +#define DEFAULT_PAGE_RIGHT_MAR 50 +#define MIN_PAGE_RIGHT_MAR 0 +#define MAX_PAGE_RIGHT_MAR 500 + #define DEFAULT_PAGE_TOP_MAR 50 #define MIN_PAGE_TOP_MAR 0 #define MAX_PAGE_TOP_MAR 500 @@ -43,7 +43,7 @@ namespace vrv { #define MIN_BARLINE_WIDTH 1.0 #define MAX_BARLINE_WIDTH 8.0 -#define DEFAULT_STAFFLINE_WITDH 3.0 +#define DEFAULT_STAFFLINE_WITDH 2.0 #define MIN_STAFFLINE_WIDTH 1.0 #define MAX_STAFFLINE_WIDTH 8.0 @@ -51,9 +51,6 @@ namespace vrv { #define MIN_STEM_WIDTH 1.0 #define MAX_STEM_WIDTH 5.0 -#define MIN_TIE_HEIGHT 20 -#define MIN_TIE_THICKNESS 6 - //---------------------------------------------------------------------------- // Default scaling (%) and spacing (units) values //---------------------------------------------------------------------------- @@ -74,13 +71,76 @@ namespace vrv { #define MIN_LYRIC_SIZE 2.0 #define MAX_LYRIC_SIZE 8.0 -#define DEFAULT_MEASURE_WIDTH 3.0 +#define DEFAULT_MEASURE_WIDTH 12.0 #define MIN_MEASURE_WIDTH 1.0 #define MAX_MEASURE_WIDTH 30.0 + +#define DEFAULT_TIE_THICKNESS 0.5 + +#define DEFAULT_MIN_SLUR_HEIGHT 1.2 +#define DEFAULT_MAX_SLUR_HEIGHT 3.0 +#define DEFAULT_SLUR_THICKNESS 0.6 + +/** The default position at the beginning of a measure */ +#define DEFAULT_LEFT_POSITION 1.3 + +/** Left margins */ + +#define DEFAULT_LEFT_MARGIN_DEFAULT 0.0 +#define MIN_LEFT_MARGIN_DEFAULT -10.0 +#define MAX_LEFT_MARGIN_DEFAULT 10.0 + +#define DEFAULT_LEFT_MARGIN_BARLINE DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_BARLINE_ATTR 2.0 +#define DEFAULT_LEFT_MARGIN_BEATRPT 2.0 +#define DEFAULT_LEFT_MARGIN_CHORD 1.0 +#define DEFAULT_LEFT_MARGIN_CLEF DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_KEYSIG DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_MENSUR DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_METERSIG DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_MREST DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_MRPT2 DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_MULTIREST DEFAULT_RIGHT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_MULTIRPT DEFAULT_LEFT_MARGIN_DEFAULT +#define DEFAULT_LEFT_MARGIN_NOTE 1.0 +#define DEFAULT_LEFT_MARGIN_REST 1.0 + +/** Right margins */ + +#define DEFAULT_RIGHT_MARGIN_DEFAULT 1.0 +#define MIN_RIGHT_MARGIN_DEFAULT 0.0 +#define MAX_RIGHT_MARGIN_DEFAULT 10.0 + +#define DEFAULT_RIGHT_MARGIN_BARLINE 2.0 +#define DEFAULT_RIGHT_MARGIN_BARLINE_ATTR 0.0 +#define DEFAULT_RIGHT_MARGIN_BEATRPT DEFAULT_RIGHT_MARGIN_DEFAULT +#define DEFAULT_RIGHT_MARGIN_CHORD 0.0 +#define DEFAULT_RIGHT_MARGIN_CLEF 2.0 +#define DEFAULT_RIGHT_MARGIN_KEYSIG 2.0 +#define DEFAULT_RIGHT_MARGIN_MENSUR 2.0 +#define DEFAULT_RIGHT_MARGIN_METERSIG 2.0 +#define DEFAULT_RIGHT_MARGIN_MREST DEFAULT_RIGHT_MARGIN_DEFAULT +#define DEFAULT_RIGHT_MARGIN_MRPT2 DEFAULT_RIGHT_MARGIN_DEFAULT +#define DEFAULT_RIGHT_MARGIN_MULTIREST DEFAULT_RIGHT_MARGIN_DEFAULT +#define DEFAULT_RIGHT_MARGIN_MULTIRPT DEFAULT_RIGHT_MARGIN_DEFAULT +#define DEFAULT_RIGHT_MARGIN_NOTE 0.0 +#define DEFAULT_RIGHT_MARGIN_REST 0.0 //---------------------------------------------------------------------------- // Style //---------------------------------------------------------------------------- + +// the space between the staff and an editorial accid in units +#define TEMP_STYLE_ACCID_EDIT_SPACE 3.5 * PARAM_DENOMINATOR + +// the space between each lyric line in units +#define TEMP_STYLE_LYIRC_LINE_SPACE 5.0 * PARAM_DENOMINATOR + +// the maximum angle of a slur +#define TEMP_STYLE_MAX_SLUR_SLOPE (45 * M_PI / 180) +#define TEMP_STYLE_SLUR_HEIGHT_FACTOR 8 // high value means flatter slurs +#define TEMP_STYLE_SLUR_CONTROL_POINT_FACTOR 5 // higher value means more curved at the end + /** * This class contains the document default environment variables. @@ -104,15 +164,11 @@ class Style /** The stem width */ unsigned short m_stemWidth; /** The barLine width */ - unsigned short m_barlineWidth; + unsigned short m_barLineWidth; /** The maximum beam slope */ unsigned char m_beamMaxSlope; /** The minimum beam slope */ unsigned char m_beamMinSlope; - /** The small staff size ratio numerator */ - unsigned char m_smallStaffNum; - /** The small staff size ratio denominator */ - unsigned char m_smallStaffDen; /** The grace size ratio numerator */ unsigned char m_graceNum; /** The grace size ratio denominator */ @@ -137,6 +193,52 @@ class Style /** The lyrics size (in units / PARAM_DENOMINATOR) */ int m_lyricSize; + /** ties and slurs */ + char m_tieThickness; + char m_minSlurHeight; + char m_maxSlurHeight; + char m_slurThickness; + + /** The left position */ + char m_leftPosition; + + /** The layout left margin by element */ + char m_leftMarginBarline; + char m_leftMarginBarlineAttr; + char m_leftMarginBeatRpt; + char m_leftMarginChord; + char m_leftMarginClef; + char m_leftMarginKeySig; + char m_leftMarginMensur; + char m_leftMarginMeterSig; + char m_leftMarginMRest; + char m_leftMarginMRpt2; + char m_leftMarginMultiRest; + char m_leftMarginMultiRpt; + char m_leftMarginNote; + char m_leftMarginRest; + /** The default left margin */ + char m_leftMarginDefault; + + /** The layout right margin by element */ + char m_rightMarginBarline; + char m_rightMarginBarlineAttr; + char m_rightMarginBeatRpt; + char m_rightMarginChord; + char m_rightMarginClef; + char m_rightMarginKeySig; + char m_rightMarginMensur; + char m_rightMarginMeterSig; + char m_rightMarginMRest; + char m_rightMarginMRpt2; + char m_rightMarginMultiRest; + char m_rightMarginMultiRpt; + char m_rightMarginNote; + char m_rightMarginRest; + + /** The default right margin */ + char m_rightMarginDefault; + }; diff --git a/include/vrv/syl.h b/include/vrv/syl.h index 4342804cc49..a7f4c392ff7 100644 --- a/include/vrv/syl.h +++ b/include/vrv/syl.h @@ -41,6 +41,7 @@ class Syl: public LayerElement, public TimeSpanningInterface, virtual ~Syl(); virtual void Reset(); virtual std::string GetClassName( ) { return "Syl"; }; + virtual ClassId Is() { return SYL; }; ///@} //----------// @@ -52,17 +53,17 @@ class Syl: public LayerElement, public TimeSpanningInterface, * The functor is process by staff/layer/verse using an ArrayOfAttComparisons filter * See PrepareDarwing */ - virtual int PrepareLyrics( ArrayPtrVoid params ); + virtual int PrepareLyrics( ArrayPtrVoid *params ); /** * See Object::FillStaffCurrentTimeSpanning */ - virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid params ); + virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ); /** * Reset the drawing values before calling PrepareDrawing after changes. */ - virtual int ResetDarwing( ArrayPtrVoid params ); + virtual int ResetDarwing( ArrayPtrVoid *params ); private: diff --git a/include/vrv/system.h b/include/vrv/system.h index 93b9b2d2b46..568dc5bdcfa 100644 --- a/include/vrv/system.h +++ b/include/vrv/system.h @@ -10,7 +10,7 @@ #define __VRV_SYSTEM_H__ #include "aligner.h" -#include "drawinglistinterface.h" +#include "drawinginterface.h" #include "object.h" namespace vrv { @@ -40,13 +40,16 @@ class System: public DocObject, public DrawingListInterface virtual ~System(); virtual void Reset(); virtual std::string GetClassName( ) { return "System"; }; + virtual ClassId Is() { return SYSTEM; }; ///@} + /** + * @name Methods for adding allowed content + */ + ///@{ void AddMeasure( Measure *measure ); - void AddScoreDef( ScoreDef *scoreDef ); - - Measure *GetAtPos( int x ); + ///@} /** * @name Reset the alignment values (m_drawingX, m_drawingXRel, etc.) @@ -87,63 +90,63 @@ class System: public DocObject, public DrawingListInterface /** * Align the content of a system vertically. */ - virtual int AlignVertically( ArrayPtrVoid params ); + virtual int AlignVertically( ArrayPtrVoid *params ); /** * Set the position of the StaffAlignment. * Redirect the functor to the SytemAligner */ - virtual int SetAligmentYPos( ArrayPtrVoid params ); + virtual int SetAligmentYPos( ArrayPtrVoid *params ); /** * Correct the Y alignment once the the content of a system has been aligned and laid out. * Special case that redirects the functor to the SystemAligner. */ - virtual int IntegrateBoundingBoxYShift( ArrayPtrVoid params ); + virtual int IntegrateBoundingBoxYShift( ArrayPtrVoid *params ); /** * Align the system by adjusting the m_drawingYRel position looking at the SystemAligner. */ - virtual int AlignSystems( ArrayPtrVoid params ); + virtual int AlignSystems( ArrayPtrVoid *params ); /** * Align the measures by adjusting the m_drawingXRel position looking at the MeasureAligner. * In System object resets the shift to 0; */ - virtual int AlignMeasures( ArrayPtrVoid params ); + virtual int AlignMeasures( ArrayPtrVoid *params ); /** * Store the width of the system in the MeasureAligner for justification */ - virtual int AlignMeasuresEnd( ArrayPtrVoid params ); + virtual int AlignMeasuresEnd( ArrayPtrVoid *params ); /** * Justify the X positions * Special case that redirects the functor to the MeasureAligner. */ - virtual int JustifyX( ArrayPtrVoid params ); + virtual int JustifyX( ArrayPtrVoid *params ); /** * Lay out the Y positions of the staff looking that the bounding boxes of each staff * This is the Functor called at the end of the system or a measure. */ - virtual int SetBoundingBoxYShiftEnd( ArrayPtrVoid params ); + virtual int SetBoundingBoxYShiftEnd( ArrayPtrVoid *params ); /** * */ - virtual int CastOffPages( ArrayPtrVoid params ); + virtual int CastOffPages( ArrayPtrVoid *params ); /** * Undo the cast of the system. * This is used by Doc::ContinuousLayout */ - virtual int UnCastOff( ArrayPtrVoid params ); + virtual int UnCastOff( ArrayPtrVoid *params ); /** * Set the drawing position (m_drawingX and m_drawingY) values for objects */ - virtual int SetDrawingXY( ArrayPtrVoid params ); + virtual int SetDrawingXY( ArrayPtrVoid *params ); private: diff --git a/include/vrv/measureelement.h b/include/vrv/textdirective.h similarity index 59% rename from include/vrv/measureelement.h rename to include/vrv/textdirective.h index 781c31c0b55..12f5d2a5631 100644 --- a/include/vrv/measureelement.h +++ b/include/vrv/textdirective.h @@ -1,27 +1,27 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: measureelement.h +// Name: textdirective.h // Author: Laurent Pugin // Created: 2015 // Copyright (c) Authors and others. All rights reserved. ///////////////////////////////////////////////////////////////////////////// -#ifndef __VRV_MEASURE_ELEMENT_H__ -#define __VRV_MEASURE_ELEMENT_H__ +#ifndef __VRV_TEXT_DIRECTIVE_H__ +#define __VRV_TEXT_DIRECTIVE_H__ -#include "object.h" +#include "floatingelement.h" +#include "textdirinterface.h" namespace vrv { - + //---------------------------------------------------------------------------- -// MeasureElement +// MeasureTempo //---------------------------------------------------------------------------- -/** - * This class is an interface for elements with duration, such as notes and rests. - * It is not an abstract class but should not be instanciate directly. +/** + * This class is an interface for elements at the measure level */ -class MeasureElement: public DocObject +class Tempo: public FloatingElement, public TextDirInterface { public: /** @@ -29,16 +29,19 @@ class MeasureElement: public DocObject * Reset method reset all attribute classes */ ///@{ - MeasureElement(); - MeasureElement(std::string classid); - virtual ~MeasureElement(); + Tempo(); + virtual ~Tempo(); virtual void Reset(); + virtual std::string GetClassName( ) { return "Tempo"; }; + virtual ClassId Is() { return TEMPO; }; ///@} +protected: + private: public: - + private: }; diff --git a/include/vrv/textdirinterface.h b/include/vrv/textdirinterface.h new file mode 100644 index 00000000000..69da31dd07a --- /dev/null +++ b/include/vrv/textdirinterface.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: textdirinterface.h +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __VRV_TEXT_DIR_INTERFACE_H__ +#define __VRV_TEXT_DIR_INTERFACE_H__ + +#include "atts_shared.h" +#include "vrvdef.h" + +namespace vrv { + +//---------------------------------------------------------------------------- +// TextDirInterface +//---------------------------------------------------------------------------- + +/** + * This class is an interface for elements implementing a text directive, such + * as , , or + * It is not an abstract class but should not be instanciate directly. + */ +class TextDirInterface: public Interface, + public AttCommon, + public AttPlacement, + public AttStaffident +{ +public: + /** + * @name Constructors, destructors, reset methods + * Reset method reset all attribute classes + */ + ///@{ + TextDirInterface(); + virtual ~TextDirInterface(); + virtual void Reset(); + virtual InterfaceId IsInterface() { return INTERFACE_TEXT_DIR; }; + ///@} + +protected: + +private: + +public: + +private: + +}; + +} // namespace vrv + +#endif diff --git a/include/vrv/tie.h b/include/vrv/tie.h index 57d5407aa69..ab4d4af7321 100644 --- a/include/vrv/tie.h +++ b/include/vrv/tie.h @@ -9,7 +9,7 @@ #ifndef __VRV_TIE_H__ #define __VRV_TIE_H__ -#include "measureelement.h" +#include "floatingelement.h" #include "timeinterface.h" namespace vrv { @@ -20,7 +20,8 @@ namespace vrv { // NOTE tie NOTE tie etc //---------------------------------------------------------------------------- -class Tie: public MeasureElement, public TimeSpanningInterface +class Tie: public FloatingElement, public TimeSpanningInterface, + public AttCurvature { public: /** @@ -32,27 +33,8 @@ class Tie: public MeasureElement, public TimeSpanningInterface virtual ~Tie(); virtual void Reset(); virtual std::string GetClassName( ) { return "Tie"; }; + virtual ClassId Is() { return TIE; }; ///@} - ///@} - - //----------// - // Functors // - //----------// - - /** - * See Object::FillStaffCurrentTimeSpanning - */ - virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid params ); - - /** - * See Object::PrepareTimeSpanning - */ - virtual int PrepareTimeSpanning( ArrayPtrVoid params ); - - /** - * Reset the drawing values before calling PrepareDrawing after changes. - */ - virtual int ResetDarwing( ArrayPtrVoid params ); private: diff --git a/include/vrv/timeinterface.h b/include/vrv/timeinterface.h index 3b57b5bb40e..fe3b2a90ea4 100644 --- a/include/vrv/timeinterface.h +++ b/include/vrv/timeinterface.h @@ -25,7 +25,7 @@ class LayerElement; * This class is an interface for elements with duration, such as notes and rests. * It is not an abstract class but should not be instanciate directly. */ -class TimeSpanningInterface: +class TimeSpanningInterface: public Interface, public AttStartendid, public AttStartid, public AttTimestampMusical, @@ -40,6 +40,7 @@ class TimeSpanningInterface: TimeSpanningInterface(); virtual ~TimeSpanningInterface(); virtual void Reset(); + virtual InterfaceId IsInterface() { return INTERFACE_TIME_SPANNING; }; ///@} /** @@ -68,9 +69,6 @@ class TimeSpanningInterface: */ void SetUuidStr(); - -protected: - //-----------------// // Pseudo functors // //-----------------// @@ -85,17 +83,17 @@ class TimeSpanningInterface: /** * See Object::FillStaffCurrentTimeSpanning */ - virtual int FillStaffCurrentTimeSpanning( ArrayPtrVoid params, DocObject *object ); + virtual int InterfaceFillStaffCurrentTimeSpanning( ArrayPtrVoid *params, DocObject *object ); /** * See Object::PrepareTimeSpanning */ - virtual int PrepareTimeSpanning( ArrayPtrVoid params, DocObject *object ); + virtual int InterfacePrepareTimeSpanning( ArrayPtrVoid *params, DocObject *object ); /** * See Object::ResetDrawing */ - virtual int ResetDrawing( ArrayPtrVoid params, DocObject *object ); + virtual int InterfaceResetDrawing( ArrayPtrVoid *params, DocObject *object ); private: /** diff --git a/include/vrv/toolkit.h b/include/vrv/toolkit.h index 30632e45d1c..debac7e3094 100644 --- a/include/vrv/toolkit.h +++ b/include/vrv/toolkit.h @@ -46,6 +46,12 @@ class Toolkit Toolkit( bool initFont = true ); virtual ~Toolkit(); ///@} + + /** + * Set the resource path. To be called if the constructor had initFont=false. + * This needs refactoring. + */ + bool SetResourcePath( const std::string &path ); /** * Load a file with the specified type. @@ -241,6 +247,14 @@ class Toolkit void SetRdgXPathQuery( std::string const &rdgXPathQuery ) { m_rdgXPathQuery = rdgXPathQuery; }; std::string GetRdgXPathQuery() { return m_rdgXPathQuery; }; ///@} + + /** + * @name Set and get the xPath query for selecting (if any) + */ + ///@{ + void SetScoreBasedMei( bool scoreBasedMei ) { m_scoreBasedMei = scoreBasedMei; }; + bool GetScoreBasedMei() { return m_scoreBasedMei; }; + ///@} /** * @name Set a specific font @@ -303,6 +317,7 @@ class Toolkit bool m_ignoreLayout; bool m_adjustPageHeight; std::string m_rdgXPathQuery; + bool m_scoreBasedMei; // for debugging bool m_noJustification; bool m_showBoundingBoxes; diff --git a/include/vrv/trem.h b/include/vrv/trem.h new file mode 100644 index 00000000000..8349c8c0b6c --- /dev/null +++ b/include/vrv/trem.h @@ -0,0 +1,18 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: trem.h +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __VRV_TREM_H__ +#define __VRV_TREM_H__ + +#include "layerelement.h" + +namespace vrv { + +} // namespace vrv + +#endif diff --git a/include/vrv/tuplet.h b/include/vrv/tuplet.h index a5e52beb327..89e1930fe5b 100644 --- a/include/vrv/tuplet.h +++ b/include/vrv/tuplet.h @@ -10,6 +10,7 @@ #define __VRV_TUPLET_H__ #include "atts_shared.h" +#include "atts_cmn.h" #include "layerelement.h" namespace vrv { @@ -21,7 +22,9 @@ class Note; //---------------------------------------------------------------------------- class Tuplet: public LayerElement, public ObjectListInterface, - public AttDurationRatio + public AttDurationRatio, + public AttNumberplacement, + public AttTupletVis { public: /** @@ -33,6 +36,7 @@ class Tuplet: public LayerElement, public ObjectListInterface, virtual ~Tuplet(); virtual void Reset(); virtual std::string GetClassName( ) { return "Tuplet"; }; + virtual ClassId Is() { return TUPLET; }; ///@} int GetNoteCount() const { return (int)m_children.size(); }; diff --git a/include/vrv/verse.h b/include/vrv/verse.h index 2c792dab41d..1b0d08271d8 100644 --- a/include/vrv/verse.h +++ b/include/vrv/verse.h @@ -33,6 +33,7 @@ class Verse: public LayerElement, virtual ~Verse(); virtual void Reset(); virtual std::string GetClassName( ) { return "Verse"; }; + virtual ClassId Is() { return VERSE; }; ///@} /** @@ -49,13 +50,13 @@ class Verse: public LayerElement, * Align the content of a staff vertically. * See Object::AlignVertically */ - virtual int AlignVertically( ArrayPtrVoid params ); + virtual int AlignVertically( ArrayPtrVoid *params ); /** * Builds a tree of int (IntTree) with the staff/layer/verse numbers * and for staff/layer to be then processed. */ - virtual int PrepareProcessingLists( ArrayPtrVoid params ); + virtual int PrepareProcessingLists( ArrayPtrVoid *params ); protected: diff --git a/include/vrv/view.h b/include/vrv/view.h index 6b898e554c7..a9274b296da 100644 --- a/include/vrv/view.h +++ b/include/vrv/view.h @@ -9,10 +9,6 @@ #ifndef __VRV_RENDERER_H__ #define __VRV_RENDERER_H__ -#include - -//---------------------------------------------------------------------------- - #include "devicecontextbase.h" #include "scoredef.h" #include "vrvdef.h" @@ -26,10 +22,10 @@ class Chord; class DeviceContext; class Doc; class EditorialElement; +class FloatingElement; class Layer; class LayerElement; class Measure; -class MeasureElement; class Page; class Slur; class Staff; @@ -134,7 +130,7 @@ class View * Defined in view_element.cpp */ ///@{ - int CalculatePitchPosY ( Staff *staff, char pname, int dec_clef, int oct); + int CalculatePitchPosY ( Staff *staff, data_PITCHNAME pname, int dec_clef, int oct); int CalculateRestPosY ( Staff *staff, char duration); int CalculatePitchCode ( Layer *layer, int y_n, int x_pos, int *octave ); ///@} @@ -147,22 +143,20 @@ class View */ ///@{ void DrawSystem( DeviceContext *dc, System *system ); - void DrawSystemList( DeviceContext *dc, System *system, const std::type_info *elementType ); + void DrawSystemList( DeviceContext *dc, System *system, const ClassId classId ); void DrawScoreDef( DeviceContext *dc, ScoreDef *scoreDef, Measure *measure, int x, Barline *barLine = NULL ); - void DrawStaffGrp( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, int x, bool topStaffGrp = false ); + void DrawStaffGrp( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, int x, bool topStaffGrp = false, bool abbreviations = false ); void DrawStaffDefLabels( DeviceContext *dc, Measure *measure, ScoreDef *scoreDef, bool abbreviations = false ); void DrawBracket ( DeviceContext *dc, int x, int y1, int y2, int staffSize); void DrawBrace ( DeviceContext *dc, int x, int y1, int y2, int staffSize); void DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, Barline *barLine ); void DrawBarline( DeviceContext *dc, int y_top, int y_bottom, Barline *barLine ); void DrawBarlineDots ( DeviceContext *dc, StaffDef *staffDef, Staff *staff, Barline *barLine ); - void DrawPartialBarline ( DeviceContext *dc, System *system, int x, Staff *pportee); void DrawMeasure( DeviceContext *dc, Measure *measure, System *system ); void DrawStaff( DeviceContext *dc, Staff *staff, Measure *measure, System *system ); void DrawStaffLines( DeviceContext *dc, Staff *staff, Measure *measure, System *system ); void DrawLayer( DeviceContext *dc, Layer *layer, Staff *staff, Measure *measure ); - void DrawLayerList( DeviceContext *dc, Layer *layer, Staff *staff, Measure *measure, const std::type_info *elementType ); - void DrawSlur( DeviceContext *dc, Layer *layer, int x1, int y1, int x2, int y2, bool up, int height = -1); + void DrawLayerList( DeviceContext *dc, Layer *layer, Staff *staff, Measure *measure, const ClassId classId ); ///@} /** @@ -191,28 +185,6 @@ class View void DrawLayerEditorialElement( DeviceContext *dc, EditorialElement *element, Layer *layer, Staff *staff, Measure *measure ); ///@} - /** - * @name Top level method for drawing MeasureElement. - * Call appropriate method of child classes (Staff, Slur, etc). - * Defined in page_element.cpp - */ - ///@{ - void DrawMeasureElement( DeviceContext *dc, MeasureElement *element, Measure *measure, System *system ); - ///@} - - /** - * @name Methods for drawing MeasureElement child classes. - * They are base drawing methods that are called directly from DrawMeasureElement - * Defined in view_page.cpp - */ - ///@{ - void DrawTimeSpanningElement( DeviceContext *dc, DocObject *object, System *system ); - void DrawTieOrSlur( DeviceContext *dc, MeasureElement *element, int x1, int x2, - Staff *staff, char spanningType, DocObject *graphic = NULL ); - void DrawSylConnector( DeviceContext *dc, Syl *syl, int x1, int x2, - Staff *staff, char spanningType, DocObject *graphic = NULL ); - ///@} - /** * @name Top level method for drawing LayerElement. * This can be called recursively for elements containing other elements. @@ -233,6 +205,7 @@ class View ///@{ void DrawAccid( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure, Accid* prevAccid = NULL ); void DrawBeam(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); + void DrawBeatRpt(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawBarline( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawClef( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); @@ -241,13 +214,16 @@ class View void DrawDurationElement( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawKeySig( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawMeterSig( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); + void DrawMRpt( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); + void DrawMRpt2( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawMRest( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawMultiRest( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); + void DrawMultiRpt( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawNote( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); + void DrawProport( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawRest( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawSpace( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawSyl( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); - void DrawTie( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawTuplet( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); void DrawVerse( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ); ///@} @@ -266,12 +242,30 @@ class View void DrawLedgerLines ( DeviceContext *dc, LayerElement *element, Staff *staff, bool aboveStaff, bool doubleLength, int skip, int n); void DrawLongRest ( DeviceContext *dc, int x, int y, Staff *staff); void DrawMeterSigFigures( DeviceContext *dc, int x, int y, int num, int numBase, Staff *staff); - void DrawQuarterRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, unsigned int smaller, Staff *staff); + void DrawMRptPart(DeviceContext *dc, int x, wchar_t smulfCode, int num, bool line, Staff *staff, Measure *measure ); + void DrawQuarterRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, bool cueSize, Staff *staff); void DrawStem( DeviceContext *dc, LayerElement *object, Staff *staff, data_STEMDIRECTION dir, int radius, int xn, int originY, int heightY = 0); - void DrawSylConnector( DeviceContext *dc, Syl *syl, System *system ); - void DrawSylConnectorLines( DeviceContext *dc, int x1, int x2, int y, Syl *syl, Staff *staff ); void DrawTrill(DeviceContext *dc, LayerElement *element, Staff *staff ); - void DrawWholeRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, unsigned int smaller, Staff *staff); + void DrawWholeRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, bool cueSize, Staff *staff); + ///@} + + /** + * @name Methods for drawing Floating child classes. + * They are base drawing methods that are called directly from DrawFloatingElement + * Call appropriate method of child classes (Slur, Tempo, Tie, etc). + * Defined in floating_element.cpp + */ + ///@{ + void DrawFloatingElement( DeviceContext *dc, FloatingElement *element, Measure *measure, System *system ); + void DrawSylConnector( DeviceContext *dc, Syl *syl, int x1, int x2, + Staff *staff, char spanningType, DocObject *graphic = NULL ); + void DrawSylConnectorLines( DeviceContext *dc, int x1, int x2, int y, Syl *syl, Staff *staff ); + void DrawTimeSpanningElement( DeviceContext *dc, DocObject *object, System *system ); + void DrawSlur( DeviceContext *dc, Slur *slur, int x1, int x2, + Staff *staff, char spanningType, DocObject *graphic = NULL ); + void DrawTie( DeviceContext *dc, Tie *tie, int x1, int x2, + Staff *staff, char spanningType, DocObject *graphic = NULL ); + ///@} /** @@ -316,12 +310,13 @@ class View void DrawVerticalLine ( DeviceContext *dc, int y1, int y2, int x1, int nbr); void DrawHorizontalLine ( DeviceContext *dc, int x1, int x2, int y1, int nbr); void DrawSmuflCode ( DeviceContext *dc, int x, int y, wchar_t code, int staffSize, bool dimin ); - void DrawTieOrSlurBezier(DeviceContext *dc, int x, int y, int x1, int y1, bool direction); - void DrawSmuflString ( DeviceContext *dc, int x, int y, std::wstring s, int centrer, int staffSize = 0); - void DrawLyricString ( DeviceContext *dc, int x, int y, std::wstring s, int staffSize = 0); + void DrawThickBezierCurve(DeviceContext *dc, Point p1, Point p2, Point c1, Point c2, int thickness, int staffSize, float angle = 0.0); + void DrawPartFullRectangle( DeviceContext *dc, int x1, int y1, int x2, int y2, int fillSection); + void DrawSmuflString ( DeviceContext *dc, int x, int y, std::wstring s, bool center, int staffSize = 100); + void DrawLyricString ( DeviceContext *dc, int x, int y, std::wstring s, int staffSize = 100); void DrawFullRectangle( DeviceContext *dc, int x1, int y1, int x2, int y2); void DrawObliquePolygon ( DeviceContext *dc, int x1, int y1, int x2, int y2, int height); - void DrawDot ( DeviceContext *dc, int x, int y ); + void DrawDot ( DeviceContext *dc, int x, int y, int staffSize ); ///@} private: @@ -329,7 +324,7 @@ class View * @name Internal methods used for calculating tuplets */ ///@{ - bool GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Point* end, Point *center); + data_STEMDIRECTION GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Point* end, Point *center); std::wstring IntToTupletFigures(unsigned short number); std::wstring IntToTimeSigFigures(unsigned short number); std::wstring IntToSmuflFigures(unsigned short number, int offset); @@ -337,6 +332,8 @@ class View int GetSylY( Syl* syl, Staff *staff ); ///@} + float AdjustSlurPosition(Slur *slur, Staff *staff, int layerN, bool up, Point points[]); + /** * @name Used for calculating clustered information/dot position */ @@ -358,6 +355,17 @@ class View */ static void SwapPoints (Point *x1, Point *x2); + /** + * Calculate the position of a point after a rotation of rot_alpha around the center + */ + static Point CalcPositionAfterRotation(Point point , float rot_alpha, Point center); + + /** + * Calculate the position of a point after a rotation of rot_alpha around the center + */ + static int CalcBezierAtPosition(Point bezier[], int x); + + /** * Swap values passed as reference. * This is useful for example when switching to the device context world. @@ -399,7 +407,9 @@ class View ScoreDef m_drawingScoreDef; private: - + /** buffer for De-Casteljau algorithm */ + static int s_deCasteljau[4][4]; + /** @name Internal values for storing temporary values for ligatures */ ///@{ static int s_drawingLigX[2], s_drawingLigY[2]; diff --git a/include/vrv/vrvdef.h b/include/vrv/vrvdef.h index e9bd7235570..673cd540300 100644 --- a/include/vrv/vrvdef.h +++ b/include/vrv/vrvdef.h @@ -16,10 +16,25 @@ //---------------------------------------------------------------------------- +#include "att_classes.h" #include "attdef.h" namespace vrv { +//---------------------------------------------------------------------------- +// Version +//---------------------------------------------------------------------------- + +#define VERSION_MAJOR 0 +#define VERSION_MINOR 9 +#define VERSION_REVISION 9 +// Adds "-dev" in the version number - should be set to false for releases +#define VERSION_DEV false + +//---------------------------------------------------------------------------- +// Typedefs +//---------------------------------------------------------------------------- + class AttComparison; class BeamElementCoord; class Note; @@ -39,7 +54,103 @@ typedef std::vector ChordCluster; typedef std::vector ArrayOfBeamElementCoords; typedef std::map > MapOfLedgerLineFlags; - + +//---------------------------------------------------------------------------- +// Object defines +//---------------------------------------------------------------------------- + +/** + * The ClassIds are used to identify Object child classes through the Object::Is virtual method. + * Each Object child class has to have its own id and has to overwrite the Is() method. + * Base classes (e.g., LayerElement) that are never instanciated have boundary ids + * used for checking if an Object is child of a base class. See for example + * Object::IsLayerElement. + */ +enum ClassId { + OBJECT = 0, + // + ALIGNMENT, + CLEF_ATTR, + DOC, + DOC_OBJECT, + GRACE_ALIGNER, + KEYSIG_ATTR, + LAYER, + MEASURE, + MEASURE_ALIGNER, + MENSUR_ATTR, + METERSIG_ATTR, + PAGE, + STAFF, + STAFF_ALIGNMENT, + STAFFGRP, + SYSTEM, + SYSTEM_ALIGNER, + SYSTEM_ALIGNMENT, + // Ids for EditorialElement child classes + EDITORIAL_ELEMENT, + ANNOT, + APP, + LEM, + RDG, + SUPPLIED, + EDITORIAL_ELEMENT_max, + // Ids for LayerElement child classes + LAYER_ELEMENT, + ACCID, + BARLINE, + BARLINE_ATTR, + BEAM, + BEATRPT, + CHORD, + CLEF, + CUSTOS, + DOT, + KEYSIG, + MENSUR, + METERSIG, + MREST, + MRPT, + MRPT2, + MULTIREST, + MULTIRPT, + NOTE, + PROPORT, + REST, + SPACE, + SYL, + TUPLET, + VERSE, + LAYER_ELEMENT_max, + // Ids for FloatingElement child classes + FLOATING_ELEMENT, + SLUR, + TEMPO, + TIE, + FLOATING_ELEMENT_max, + // Ids for ScoreDefElement child classes + SCOREDEF_ELEMENT, + SCOREDEF, + STAFFDEF, + SCOREDEF_ELEMENT_max, + // + UNSPECIFIED +}; + +/** + * The InterfaceIds are used to identify Interface child classes through the Interface::IsInterface virtual method. + * Each Interface child class has to have its own id and has to overwrite the IsInterface() method. + */ +enum InterfaceId { + INTERFACE, + INTERFACE_DURATION, + INTERFACE_PITCH, + INTERFACE_POSITION, + INTERFACE_SCOREDEF, + INTERFACE_TEXT_DIR, + INTERFACE_TIME_SPANNING +}; + //---------------------------------------------------------------------------- // Global defines //---------------------------------------------------------------------------- @@ -47,10 +158,6 @@ typedef std::map > MapOfLedgerLineFlags; #define DEFINITON_FACTOR 10 #define PARAM_DENOMINATOR 10 -#define VERSION_MAJOR 0 -#define VERSION_MINOR 9 -#define VERSION_REVISION 8 - #define is_in(x,a,b) (((x) >= std::min((a),(b))) && ((x) <= std::max((a),(b)))) /** @@ -71,6 +178,9 @@ enum FunctorCode { /** All values set to -1 (no limit) since this has not major incidence **/ +/** Define the maximum levels between a note and its accids **/ +#define MAX_ACCID_DEPTH -1 + /** Define the maximum levels between a beam and its notes **/ #define MAX_BEAM_DEPTH -1 @@ -99,65 +209,31 @@ enum FunctorCode { #define VRV_TEXT_E550 0xE550 #define VRV_TEXT_E551 0xE551 #define VRV_TEXT_E552 0xE552 - + //---------------------------------------------------------------------------- -// Legacy Wolfgang defines +// Types for editorial element //---------------------------------------------------------------------------- - -#define OCTAVE_OFFSET 4 - -// ACCID -#define ACCID_SHARP 1 -#define ACCID_FLAT 2 -#define ACCID_NATURAL 3 -#define ACCID_DOUBLE_SHARP 4 -#define ACCID_DOUBLE_FLAT 5 -#define ACCID_QUARTER_SHARP 6 -#define ACCID_QUARTER_FLAT 7 - -#define ON 1 -#define OFF 0 - -// TODO // ax2 - -// RESTS -#define VALSilSpec 15 /* val indiquant silence sp‚cial avec chiffre */ // ??? - -// pour le flag tetenote -#define LOSANGEVIDE 1 -#define OPTIONLIBRE 6 -#define SANSQUEUE 7 - -/* valeurs des attributs de staccato in menu (getcode2()) */ -#define STACC 0 -#define LOURE 1 -#define ACCENT_OBL 2 -#define ACCENT_VERT 3 -#define BEBUNG 4 -#define STAC_AIGU 5 -#define ACCENT_OBL_PNT 6 -#define ACCENT_VERT_PNT 7 - // the maximum is 255 (unsigned char) enum EditorialLevel { EDITORIAL_UNDEFINED = 0, EDITORIAL_SYSTEM, EDITORIAL_SCOREDEF, - EDITORIAL_STAFFGRP, + EDITORIAL_STAFFGRP, EDITORIAL_MEASURE, EDITORIAL_STAFF, EDITORIAL_LAYER, EDITORIAL_NOTE }; - -// the maximum is 255 (unsigned char) -enum StaffGrpSymbol { - STAFFGRP_NONE = 0, - STAFFGRP_LINE, - STAFFGRP_BRACE, - STAFFGRP_BRACKET -}; + +//---------------------------------------------------------------------------- +// Legacy Wolfgang defines +//---------------------------------------------------------------------------- + +#define OCTAVE_OFFSET 4 + +#define ON 1 +#define OFF 0 /* This is used for fast clef offset calculation. * It uses 4 bytes with, from right to left @@ -202,4 +278,4 @@ enum ClefId { } // namespace vrv -#endif // __VRV_DEF_H__ \ No newline at end of file +#endif // __VRV_DEF_H__ diff --git a/java/build.sh b/java/build.sh index 73c835065ca..077307caeba 100755 --- a/java/build.sh +++ b/java/build.sh @@ -21,9 +21,10 @@ FILES="../src/accid.cpp \ ../src/devicecontext.cpp \ ../src/doc.cpp \ ../src/dot.cpp \ - ../src/drawinglistinterface.cpp \ + ../src/drawinginterface.cpp \ ../src/durationinterface.cpp \ ../src/editorial.cpp \ + ../src/floatingelement.cpp \ ../src/glyph.cpp \ ../src/io.cpp \ ../src/iodarms.cpp \ @@ -36,7 +37,6 @@ FILES="../src/accid.cpp \ ../src/mensur.cpp \ ../src/metersig.cpp \ ../src/measure.cpp \ - ../src/measureelement.cpp \ ../src/mrest.cpp \ ../src/multirest.cpp \ ../src/note.cpp \ @@ -44,15 +44,11 @@ FILES="../src/accid.cpp \ ../src/page.cpp \ ../src/pitchinterface.cpp \ ../src/positioninterface.cpp \ - ../src/view.cpp \ - ../src/view_beam.cpp \ - ../src/view_element.cpp \ - ../src/view_graph.cpp \ - ../src/view_mensural.cpp \ - ../src/view_page.cpp \ - ../src/view_tuplet.cpp \ + ../src/proport.cpp \ ../src/rest.cpp \ + ../src/rpt.cpp \ ../src/scoredef.cpp \ + ../src/scoredefinterface.cpp \ ../src/slur.cpp \ ../src/space.cpp \ ../src/staff.cpp \ @@ -60,11 +56,22 @@ FILES="../src/accid.cpp \ ../src/svgdevicecontext.cpp \ ../src/syl.cpp \ ../src/system.cpp \ + ../src/textdirective.cpp \ + ../src/textdirinterface.cpp \ ../src/tie.cpp \ ../src/timeinterface.cpp \ + ../src/trem.cpp \ ../src/toolkit.cpp \ ../src/tuplet.cpp \ ../src/verse.cpp \ + ../src/view.cpp \ + ../src/view_beam.cpp \ + ../src/view_element.cpp \ + ../src/view_floating.cpp \ + ../src/view_graph.cpp \ + ../src/view_mensural.cpp \ + ../src/view_page.cpp \ + ../src/view_tuplet.cpp \ ../src/vrv.cpp \ ../src/pugixml.cpp \ ../libmei/atts_shared.cpp \ diff --git a/libmei/att_classes.h b/libmei/att_classes.h new file mode 100644 index 00000000000..d8f7a8a37cc --- /dev/null +++ b/libmei/att_classes.h @@ -0,0 +1,232 @@ +///////////////////////////////////////////////////////////////////////////// +// Authors: Laurent Pugin and Rodolfo Zitellini +// Created: 2014 +// Copyright (c) Authors and others. All rights reserved. +// +// Code generated using a modified version of libmei +// by Andrew Hankinson, Alastair Porter, and Others +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +// NOTE: this file was generated with the Verovio libmei version and +// should not be edited because changes will be lost. +///////////////////////////////////////////////////////////////////////////// + +#ifndef __VRV_ATT_CLASSES_H__ +#define __VRV_ATT_CLASSES_H__ + +//---------------------------------------------------------------------------- + +namespace vrv { + +enum AttClassId { + ATT_CLASS_min = 0, + ATT_COMMONANL, + ATT_HARMONICFUNCTION, + ATT_INTERVALHARMONIC, + ATT_INTERVALLICDESC, + ATT_MELODICFUNCTION, + ATT_PITCHCLASS, + ATT_SOLFA, + ATT_ARPEGLOG, + ATT_ARPEGVIS, + ATT_BTREMLOG, + ATT_BEAMED, + ATT_BEAMEDWITH, + ATT_BEAMINGLOG, + ATT_BEAMREND, + ATT_BEAMSECONDARY, + ATT_BEATRPTVIS, + ATT_BENDGES, + ATT_CUTOUT, + ATT_EXPANDABLE, + ATT_FTREMLOG, + ATT_FERMATAVIS, + ATT_GLISSVIS, + ATT_GRACED, + ATT_HAIRPINLOG, + ATT_HAIRPINVIS, + ATT_HARPPEDALLOG, + ATT_LVPRESENT, + ATT_MULTIRESTVIS, + ATT_NOTEGESCMN, + ATT_NUMBERED, + ATT_NUMBERPLACEMENT, + ATT_OCTAVELOG, + ATT_PEDALLOG, + ATT_PEDALVIS, + ATT_PIANOPEDALS, + ATT_REHEARSAL, + ATT_SCOREDEFVISCMN, + ATT_SLURREND, + ATT_STEMMEDCMN, + ATT_TIEREND, + ATT_TREMMEASURED, + ATT_TUPLETVIS, + ATT_MORDENTLOG, + ATT_ORNAM, + ATT_ORNAMENTACCID, + ATT_TURNLOG, + ATT_CRIT, + ATT_SOURCE, + ATT_AGENTIDENT, + ATT_EDIT, + ATT_EXTENT, + ATT_REASONIDENT, + ATT_FACSIMILE, + ATT_TABULAR, + ATT_FRETLOCATION, + ATT_HARMLOG, + ATT_HARMVIS, + ATT_REGULARMETHOD, + ATT_ALIGNMENT, + ATT_VERSELOG, + ATT_LIGATURELOG, + ATT_MENSURVIS, + ATT_MENSURALLOG, + ATT_MENSURALSHARED, + ATT_MENSURALVIS, + ATT_NOTELOGMENSURAL, + ATT_RESTVISMENSURAL, + ATT_CHANNELIZED, + ATT_MIDIINSTRUMENT, + ATT_MIDINUMBER, + ATT_MIDITEMPO, + ATT_MIDIVALUE, + ATT_TIMEBASE, + ATT_INEUMELOG, + ATT_UNEUMELOG, + ATT_SURFACE, + ATT_ACCIDLOG, + ATT_ACCIDENTAL, + ATT_ACCIDENTALPERFORMED, + ATT_ALTSYM, + ATT_ARTICULATION, + ATT_ARTICULATIONPERFORMED, + ATT_AUGMENTDOTS, + ATT_AUTHORIZED, + ATT_BARLINELOG, + ATT_BARPLACEMENT, + ATT_BEAMINGVIS, + ATT_BIBL, + ATT_CALENDARED, + ATT_CANONICAL, + ATT_CHORDVIS, + ATT_CLEFLOG, + ATT_CLEFFINGLOG, + ATT_CLEFFINGVIS, + ATT_CLEFSHAPE, + ATT_CODED, + ATT_COLOR, + ATT_COLORATION, + ATT_COMMON, + ATT_COORDINATED, + ATT_CURVATURE, + ATT_CURVEREND, + ATT_CUSTOSLOG, + ATT_DATABLE, + ATT_DATAPOINTING, + ATT_DECLARING, + ATT_DISTANCES, + ATT_DOTLOG, + ATT_DURATIONADDITIVE, + ATT_DURATIONDEFAULT, + ATT_DURATIONMUSICAL, + ATT_DURATIONPERFORMED, + ATT_DURATIONRATIO, + ATT_ENCLOSINGCHARS, + ATT_FERMATAPRESENT, + ATT_HANDIDENT, + ATT_HORIZONTALALIGN, + ATT_INSTRUMENTIDENT, + ATT_INTERNETMEDIA, + ATT_JOINED, + ATT_KEYSIGLOG, + ATT_KEYSIGDEFAULTLOG, + ATT_KEYSIGDEFAULTVIS, + ATT_LABELSADDL, + ATT_LANG, + ATT_LAYERLOG, + ATT_LAYERIDENT, + ATT_LINELOC, + ATT_LINEREND, + ATT_LYRICSTYLE, + ATT_MEASURELOG, + ATT_MEASUREMENT, + ATT_MEDIABOUNDS, + ATT_MEDIUM, + ATT_MEIVERSION, + ATT_MENSURLOG, + ATT_METERSIGLOG, + ATT_METERSIGVIS, + ATT_METERSIGDEFAULTLOG, + ATT_METERSIGDEFAULTVIS, + ATT_METERCONFORMANCE, + ATT_METERCONFORMANCEBAR, + ATT_MMTEMPO, + ATT_MULTINUMMEASURES, + ATT_NAME, + ATT_NOTEGES, + ATT_NOTEVIS, + ATT_OCTAVE, + ATT_OCTAVEDEFAULT, + ATT_OCTAVEDISPLACEMENT, + ATT_ONELINESTAFF, + ATT_PADLOG, + ATT_PBVIS, + ATT_PITCH, + ATT_PLACEMENT, + ATT_PLIST, + ATT_POINTING, + ATT_RELATIVESIZE, + ATT_RESPONSIBILITY, + ATT_SBVIS, + ATT_SCALABLE, + ATT_SCOREDEFGES, + ATT_SCOREDEFVIS, + ATT_SECTIONVIS, + ATT_SEQUENCE, + ATT_SLASHCOUNT, + ATT_SLURPRESENT, + ATT_SPACEVIS, + ATT_STAFFLOG, + ATT_STAFFDEFVIS, + ATT_STAFFGRPVIS, + ATT_STAFFGROUPINGSYM, + ATT_STAFFIDENT, + ATT_STAFFLOC, + ATT_STAFFLOCPITCHED, + ATT_STARTENDID, + ATT_STARTID, + ATT_STEMMED, + ATT_SYLLOG, + ATT_SYLTEXT, + ATT_TEXTSTYLE, + ATT_TIEPRESENT, + ATT_TIMESTAMPMUSICAL, + ATT_TIMESTAMPPERFORMED, + ATT_TIMESTAMP2MUSICAL, + ATT_TRANSPOSITION, + ATT_TUPLETPRESENT, + ATT_TYPED, + ATT_TYPOGRAPHY, + ATT_VISIBILITY, + ATT_VISUALOFFSETHO, + ATT_VISUALOFFSETTO, + ATT_VISUALOFFSETVO, + ATT_VISUALOFFSET2HO, + ATT_VISUALOFFSET2TO, + ATT_VISUALOFFSET2VO, + ATT_WHITESPACE, + ATT_WIDTH, + ATT_XY, + ATT_XY2, + ATT_NOTEGESTABLATURE, + ATT_STAFFDEFGESTABLATURE, + ATT_CLASS_max +}; + +} // vrv namespace + +#endif // __VRV_ATT_CLASSES_H__ + diff --git a/libmei/atts_analysis.cpp b/libmei/atts_analysis.cpp index 2765491c1fd..146a8c18e16 100644 --- a/libmei/atts_analysis.cpp +++ b/libmei/atts_analysis.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -399,8 +403,9 @@ bool AttSolfa::HasPsolfa( ) /* include */ bool Att::SetAnalysis( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COMMONANL ) ) { AttCommonAnl *att = dynamic_cast(element); + assert( att ); if (attrType == "copyof") { att->SetCopyof(att->StrToStr(attrValue)); return true; @@ -426,43 +431,49 @@ bool Att::SetAnalysis( Object *element, std::string attrType, std::string attrVa return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARMONICFUNCTION ) ) { AttHarmonicfunction *att = dynamic_cast(element); + assert( att ); if (attrType == "deg") { att->SetDeg(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INTERVALHARMONIC ) ) { AttIntervalharmonic *att = dynamic_cast(element); + assert( att ); if (attrType == "inth") { att->SetInth(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INTERVALLICDESC ) ) { AttIntervallicdesc *att = dynamic_cast(element); + assert( att ); if (attrType == "intm") { att->SetIntm(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MELODICFUNCTION ) ) { AttMelodicfunction *att = dynamic_cast(element); + assert( att ); if (attrType == "mfunc") { att->SetMfunc(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PITCHCLASS ) ) { AttPitchclass *att = dynamic_cast(element); + assert( att ); if (attrType == "pclass") { att->SetPclass(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SOLFA ) ) { AttSolfa *att = dynamic_cast(element); + assert( att ); if (attrType == "psolfa") { att->SetPsolfa(att->StrToStr(attrValue)); return true; @@ -473,8 +484,9 @@ bool Att::SetAnalysis( Object *element, std::string attrType, std::string attrVa } void Att::GetAnalysis( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COMMONANL ) ) { AttCommonAnl *att = dynamic_cast(element); + assert( att ); if (att->HasCopyof()) { attributes->push_back(std::make_pair("copyof", att->StrToStr(att->GetCopyof()))); } @@ -494,38 +506,44 @@ void Att::GetAnalysis( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("synch", att->StrToStr(att->GetSynch()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARMONICFUNCTION ) ) { AttHarmonicfunction *att = dynamic_cast(element); + assert( att ); if (att->HasDeg()) { attributes->push_back(std::make_pair("deg", att->StrToStr(att->GetDeg()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INTERVALHARMONIC ) ) { AttIntervalharmonic *att = dynamic_cast(element); + assert( att ); if (att->HasInth()) { attributes->push_back(std::make_pair("inth", att->StrToStr(att->GetInth()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INTERVALLICDESC ) ) { AttIntervallicdesc *att = dynamic_cast(element); + assert( att ); if (att->HasIntm()) { attributes->push_back(std::make_pair("intm", att->StrToStr(att->GetIntm()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MELODICFUNCTION ) ) { AttMelodicfunction *att = dynamic_cast(element); + assert( att ); if (att->HasMfunc()) { attributes->push_back(std::make_pair("mfunc", att->StrToStr(att->GetMfunc()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PITCHCLASS ) ) { AttPitchclass *att = dynamic_cast(element); + assert( att ); if (att->HasPclass()) { attributes->push_back(std::make_pair("pclass", att->StrToStr(att->GetPclass()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SOLFA ) ) { AttSolfa *att = dynamic_cast(element); + assert( att ); if (att->HasPsolfa()) { attributes->push_back(std::make_pair("psolfa", att->StrToStr(att->GetPsolfa()))); } diff --git a/libmei/atts_analysis.h b/libmei/atts_analysis.h index 33afabe0b39..cbefc6b340e 100644 --- a/libmei/atts_analysis.h +++ b/libmei/atts_analysis.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_ANALYSIS_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_cmn.cpp b/libmei/atts_cmn.cpp index ea1d4731264..896e883f4c1 100644 --- a/libmei/atts_cmn.cpp +++ b/libmei/atts_cmn.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -308,14 +312,14 @@ AttBeamrend::~AttBeamrend() { } void AttBeamrend::ResetBeamrend() { - m_rend = ""; + m_rend = BEATRPT_REND_NONE; m_slopeDbl = 0.0; } bool AttBeamrend::ReadBeamrend( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("rend")) { - this->SetRend(StrToStr(element.attribute("rend").value())); + this->SetRend(StrToBeatrptRend(element.attribute("rend").value())); element.remove_attribute("rend"); hasAttribute = true; } @@ -330,7 +334,7 @@ bool AttBeamrend::ReadBeamrend( pugi::xml_node element ) { bool AttBeamrend::WriteBeamrend( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasRend()) { - element.append_attribute("rend") = StrToStr(this->GetRend()).c_str(); + element.append_attribute("rend") = BeatrptRendToStr(this->GetRend()).c_str(); wroteAttribute = true; } if (this->HasSlope()) { @@ -342,7 +346,7 @@ bool AttBeamrend::WriteBeamrend( pugi::xml_node element ) { bool AttBeamrend::HasRend( ) { - return (m_rend != ""); + return (m_rend != BEATRPT_REND_NONE); } bool AttBeamrend::HasSlope( ) @@ -409,13 +413,13 @@ AttBeatRptVis::~AttBeatRptVis() { } void AttBeatRptVis::ResetBeatRptVis() { - m_rend = ""; + m_rend = BEATRPT_REND_NONE; } bool AttBeatRptVis::ReadBeatRptVis( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("rend")) { - this->SetRend(StrToStr(element.attribute("rend").value())); + this->SetRend(StrToBeatrptRend(element.attribute("rend").value())); element.remove_attribute("rend"); hasAttribute = true; } @@ -425,7 +429,7 @@ bool AttBeatRptVis::ReadBeatRptVis( pugi::xml_node element ) { bool AttBeatRptVis::WriteBeatRptVis( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasRend()) { - element.append_attribute("rend") = StrToStr(this->GetRend()).c_str(); + element.append_attribute("rend") = BeatrptRendToStr(this->GetRend()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -433,7 +437,7 @@ bool AttBeatRptVis::WriteBeatRptVis( pugi::xml_node element ) { bool AttBeatRptVis::HasRend( ) { - return (m_rend != ""); + return (m_rend != BEATRPT_REND_NONE); } @@ -725,14 +729,14 @@ AttGraced::~AttGraced() { } void AttGraced::ResetGraced() { - m_grace = ""; + m_grace = GRACE_NONE; m_graceTime = ""; } bool AttGraced::ReadGraced( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("grace")) { - this->SetGrace(StrToStr(element.attribute("grace").value())); + this->SetGrace(StrToGrace(element.attribute("grace").value())); element.remove_attribute("grace"); hasAttribute = true; } @@ -747,7 +751,7 @@ bool AttGraced::ReadGraced( pugi::xml_node element ) { bool AttGraced::WriteGraced( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasGrace()) { - element.append_attribute("grace") = StrToStr(this->GetGrace()).c_str(); + element.append_attribute("grace") = GraceToStr(this->GetGrace()).c_str(); wroteAttribute = true; } if (this->HasGraceTime()) { @@ -759,7 +763,7 @@ bool AttGraced::WriteGraced( pugi::xml_node element ) { bool AttGraced::HasGrace( ) { - return (m_grace != ""); + return (m_grace != GRACE_NONE); } bool AttGraced::HasGraceTime( ) @@ -1174,19 +1178,19 @@ AttNumberplacement::~AttNumberplacement() { } void AttNumberplacement::ResetNumberplacement() { - m_numPlace = ""; - m_numVisible = ""; + m_numPlace = PLACE_NONE; + m_numVisible = BOOLEAN_NONE; } bool AttNumberplacement::ReadNumberplacement( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("num.place")) { - this->SetNumPlace(StrToStr(element.attribute("num.place").value())); + this->SetNumPlace(StrToPlace(element.attribute("num.place").value())); element.remove_attribute("num.place"); hasAttribute = true; } if (element.attribute("num.visible")) { - this->SetNumVisible(StrToStr(element.attribute("num.visible").value())); + this->SetNumVisible(StrToBool(element.attribute("num.visible").value())); element.remove_attribute("num.visible"); hasAttribute = true; } @@ -1196,11 +1200,11 @@ bool AttNumberplacement::ReadNumberplacement( pugi::xml_node element ) { bool AttNumberplacement::WriteNumberplacement( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasNumPlace()) { - element.append_attribute("num.place") = StrToStr(this->GetNumPlace()).c_str(); + element.append_attribute("num.place") = PlaceToStr(this->GetNumPlace()).c_str(); wroteAttribute = true; } if (this->HasNumVisible()) { - element.append_attribute("num.visible") = StrToStr(this->GetNumVisible()).c_str(); + element.append_attribute("num.visible") = BoolToStr(this->GetNumVisible()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -1208,12 +1212,12 @@ bool AttNumberplacement::WriteNumberplacement( pugi::xml_node element ) { bool AttNumberplacement::HasNumPlace( ) { - return (m_numPlace != ""); + return (m_numPlace != PLACE_NONE); } bool AttNumberplacement::HasNumVisible( ) { - return (m_numVisible != ""); + return (m_numVisible != BOOLEAN_NONE); } @@ -1677,31 +1681,31 @@ AttTupletVis::~AttTupletVis() { } void AttTupletVis::ResetTupletVis() { - m_bracketPlace = ""; - m_bracketVisible = ""; - m_durVisible = ""; - m_numFormat = ""; + m_bracketPlace = PLACE_NONE; + m_bracketVisible = BOOLEAN_NONE; + m_durVisible = BOOLEAN_NONE; + m_numFormat = NUMFORMAT_NONE; } bool AttTupletVis::ReadTupletVis( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("bracket.place")) { - this->SetBracketPlace(StrToStr(element.attribute("bracket.place").value())); + this->SetBracketPlace(StrToPlace(element.attribute("bracket.place").value())); element.remove_attribute("bracket.place"); hasAttribute = true; } if (element.attribute("bracket.visible")) { - this->SetBracketVisible(StrToStr(element.attribute("bracket.visible").value())); + this->SetBracketVisible(StrToBool(element.attribute("bracket.visible").value())); element.remove_attribute("bracket.visible"); hasAttribute = true; } if (element.attribute("dur.visible")) { - this->SetDurVisible(StrToStr(element.attribute("dur.visible").value())); + this->SetDurVisible(StrToBool(element.attribute("dur.visible").value())); element.remove_attribute("dur.visible"); hasAttribute = true; } if (element.attribute("num.format")) { - this->SetNumFormat(StrToStr(element.attribute("num.format").value())); + this->SetNumFormat(StrToNumformat(element.attribute("num.format").value())); element.remove_attribute("num.format"); hasAttribute = true; } @@ -1711,19 +1715,19 @@ bool AttTupletVis::ReadTupletVis( pugi::xml_node element ) { bool AttTupletVis::WriteTupletVis( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasBracketPlace()) { - element.append_attribute("bracket.place") = StrToStr(this->GetBracketPlace()).c_str(); + element.append_attribute("bracket.place") = PlaceToStr(this->GetBracketPlace()).c_str(); wroteAttribute = true; } if (this->HasBracketVisible()) { - element.append_attribute("bracket.visible") = StrToStr(this->GetBracketVisible()).c_str(); + element.append_attribute("bracket.visible") = BoolToStr(this->GetBracketVisible()).c_str(); wroteAttribute = true; } if (this->HasDurVisible()) { - element.append_attribute("dur.visible") = StrToStr(this->GetDurVisible()).c_str(); + element.append_attribute("dur.visible") = BoolToStr(this->GetDurVisible()).c_str(); wroteAttribute = true; } if (this->HasNumFormat()) { - element.append_attribute("num.format") = StrToStr(this->GetNumFormat()).c_str(); + element.append_attribute("num.format") = NumformatToStr(this->GetNumFormat()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -1731,65 +1735,71 @@ bool AttTupletVis::WriteTupletVis( pugi::xml_node element ) { bool AttTupletVis::HasBracketPlace( ) { - return (m_bracketPlace != ""); + return (m_bracketPlace != PLACE_NONE); } bool AttTupletVis::HasBracketVisible( ) { - return (m_bracketVisible != ""); + return (m_bracketVisible != BOOLEAN_NONE); } bool AttTupletVis::HasDurVisible( ) { - return (m_durVisible != ""); + return (m_durVisible != BOOLEAN_NONE); } bool AttTupletVis::HasNumFormat( ) { - return (m_numFormat != ""); + return (m_numFormat != NUMFORMAT_NONE); } /* include */ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARPEGLOG ) ) { AttArpegLog *att = dynamic_cast(element); + assert( att ); if (attrType == "order") { att->SetOrder(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARPEGVIS ) ) { AttArpegVis *att = dynamic_cast(element); + assert( att ); if (attrType == "arrow") { att->SetArrow(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BTREMLOG ) ) { AttBTremLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMED ) ) { AttBeamed *att = dynamic_cast(element); + assert( att ); if (attrType == "beam") { att->SetBeam(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMEDWITH ) ) { AttBeamedwith *att = dynamic_cast(element); + assert( att ); if (attrType == "beamWith") { att->SetBeamWith(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMINGLOG ) ) { AttBeamingLog *att = dynamic_cast(element); + assert( att ); if (attrType == "beamGroup") { att->SetBeamGroup(att->StrToStr(attrValue)); return true; @@ -1799,10 +1809,11 @@ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMREND ) ) { AttBeamrend *att = dynamic_cast(element); + assert( att ); if (attrType == "rend") { - att->SetRend(att->StrToStr(attrValue)); + att->SetRend(att->StrToBeatrptRend(attrValue)); return true; } if (attrType == "slopeDbl") { @@ -1810,50 +1821,57 @@ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMSECONDARY ) ) { AttBeamsecondary *att = dynamic_cast(element); + assert( att ); if (attrType == "breaksecInt") { att->SetBreaksec(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEATRPTVIS ) ) { AttBeatRptVis *att = dynamic_cast(element); + assert( att ); if (attrType == "rend") { - att->SetRend(att->StrToStr(attrValue)); + att->SetRend(att->StrToBeatrptRend(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BENDGES ) ) { AttBendGes *att = dynamic_cast(element); + assert( att ); if (attrType == "amount") { att->SetAmount(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CUTOUT ) ) { AttCutout *att = dynamic_cast(element); + assert( att ); if (attrType == "cutout") { att->SetCutout(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_EXPANDABLE ) ) { AttExpandable *att = dynamic_cast(element); + assert( att ); if (attrType == "expand") { att->SetExpand(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FTREMLOG ) ) { AttFTremLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FERMATAVIS ) ) { AttFermataVis *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; @@ -1863,17 +1881,19 @@ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_GLISSVIS ) ) { AttGlissVis *att = dynamic_cast(element); + assert( att ); if (attrType == "text") { att->SetText(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_GRACED ) ) { AttGraced *att = dynamic_cast(element); + assert( att ); if (attrType == "grace") { - att->SetGrace(att->StrToStr(attrValue)); + att->SetGrace(att->StrToGrace(attrValue)); return true; } if (attrType == "graceTime") { @@ -1881,22 +1901,25 @@ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HAIRPINLOG ) ) { AttHairpinLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HAIRPINVIS ) ) { AttHairpinVis *att = dynamic_cast(element); + assert( att ); if (attrType == "opening") { att->SetOpening(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARPPEDALLOG ) ) { AttHarpPedalLog *att = dynamic_cast(element); + assert( att ); if (attrType == "c") { att->SetC(att->StrToStr(attrValue)); return true; @@ -1926,96 +1949,109 @@ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LVPRESENT ) ) { AttLvpresent *att = dynamic_cast(element); + assert( att ); if (attrType == "lv") { att->SetLv(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MULTIRESTVIS ) ) { AttMultiRestVis *att = dynamic_cast(element); + assert( att ); if (attrType == "block") { att->SetBlock(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEGESCMN ) ) { AttNoteGesCmn *att = dynamic_cast(element); + assert( att ); if (attrType == "gliss") { att->SetGliss(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NUMBERED ) ) { AttNumbered *att = dynamic_cast(element); + assert( att ); if (attrType == "numInt") { att->SetNum(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NUMBERPLACEMENT ) ) { AttNumberplacement *att = dynamic_cast(element); + assert( att ); if (attrType == "numPlace") { - att->SetNumPlace(att->StrToStr(attrValue)); + att->SetNumPlace(att->StrToPlace(attrValue)); return true; } if (attrType == "numVisible") { - att->SetNumVisible(att->StrToStr(attrValue)); + att->SetNumVisible(att->StrToBool(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVELOG ) ) { AttOctaveLog *att = dynamic_cast(element); + assert( att ); if (attrType == "coll") { att->SetColl(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PEDALLOG ) ) { AttPedalLog *att = dynamic_cast(element); + assert( att ); if (attrType == "dir") { att->SetDir(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PEDALVIS ) ) { AttPedalVis *att = dynamic_cast(element); + assert( att ); if (attrType == "style") { att->SetStyle(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PIANOPEDALS ) ) { AttPianopedals *att = dynamic_cast(element); + assert( att ); if (attrType == "pedalStyle") { att->SetPedalStyle(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_REHEARSAL ) ) { AttRehearsal *att = dynamic_cast(element); + assert( att ); if (attrType == "rehEnclose") { att->SetRehEnclose(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCOREDEFVISCMN ) ) { AttScoreDefVisCmn *att = dynamic_cast(element); + assert( att ); if (attrType == "gridShow") { att->SetGridShow(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SLURREND ) ) { AttSlurrend *att = dynamic_cast(element); + assert( att ); if (attrType == "slurRend") { att->SetSlurRend(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STEMMEDCMN ) ) { AttStemmedCmn *att = dynamic_cast(element); + assert( att ); if (attrType == "stemMod") { att->SetStemMod(att->StrToStr(attrValue)); return true; @@ -2025,36 +2061,39 @@ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIEREND ) ) { AttTierend *att = dynamic_cast(element); + assert( att ); if (attrType == "tieRend") { att->SetTieRend(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TREMMEASURED ) ) { AttTremmeasured *att = dynamic_cast(element); + assert( att ); if (attrType == "measperf") { att->SetMeasperf(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TUPLETVIS ) ) { AttTupletVis *att = dynamic_cast(element); + assert( att ); if (attrType == "bracketPlace") { - att->SetBracketPlace(att->StrToStr(attrValue)); + att->SetBracketPlace(att->StrToPlace(attrValue)); return true; } if (attrType == "bracketVisible") { - att->SetBracketVisible(att->StrToStr(attrValue)); + att->SetBracketVisible(att->StrToBool(attrValue)); return true; } if (attrType == "durVisible") { - att->SetDurVisible(att->StrToStr(attrValue)); + att->SetDurVisible(att->StrToBool(attrValue)); return true; } if (attrType == "numFormat") { - att->SetNumFormat(att->StrToStr(attrValue)); + att->SetNumFormat(att->StrToNumformat(attrValue)); return true; } } @@ -2063,38 +2102,44 @@ bool Att::SetCmn( Object *element, std::string attrType, std::string attrValue ) } void Att::GetCmn( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARPEGLOG ) ) { AttArpegLog *att = dynamic_cast(element); + assert( att ); if (att->HasOrder()) { attributes->push_back(std::make_pair("order", att->StrToStr(att->GetOrder()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARPEGVIS ) ) { AttArpegVis *att = dynamic_cast(element); + assert( att ); if (att->HasArrow()) { attributes->push_back(std::make_pair("arrow", att->StrToStr(att->GetArrow()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BTREMLOG ) ) { AttBTremLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMED ) ) { AttBeamed *att = dynamic_cast(element); + assert( att ); if (att->HasBeam()) { attributes->push_back(std::make_pair("beam", att->StrToStr(att->GetBeam()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMEDWITH ) ) { AttBeamedwith *att = dynamic_cast(element); + assert( att ); if (att->HasBeamWith()) { attributes->push_back(std::make_pair("beamWith", att->StrToStr(att->GetBeamWith()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMINGLOG ) ) { AttBeamingLog *att = dynamic_cast(element); + assert( att ); if (att->HasBeamGroup()) { attributes->push_back(std::make_pair("beamGroup", att->StrToStr(att->GetBeamGroup()))); } @@ -2102,53 +2147,61 @@ void Att::GetCmn( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("beamRests", att->StrToStr(att->GetBeamRests()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMREND ) ) { AttBeamrend *att = dynamic_cast(element); + assert( att ); if (att->HasRend()) { - attributes->push_back(std::make_pair("rend", att->StrToStr(att->GetRend()))); + attributes->push_back(std::make_pair("rend", att->BeatrptRendToStr(att->GetRend()))); } if (att->HasSlope()) { attributes->push_back(std::make_pair("slopeDbl", att->DblToStr(att->GetSlope()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMSECONDARY ) ) { AttBeamsecondary *att = dynamic_cast(element); + assert( att ); if (att->HasBreaksec()) { attributes->push_back(std::make_pair("breaksecInt", att->IntToStr(att->GetBreaksec()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEATRPTVIS ) ) { AttBeatRptVis *att = dynamic_cast(element); + assert( att ); if (att->HasRend()) { - attributes->push_back(std::make_pair("rend", att->StrToStr(att->GetRend()))); + attributes->push_back(std::make_pair("rend", att->BeatrptRendToStr(att->GetRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BENDGES ) ) { AttBendGes *att = dynamic_cast(element); + assert( att ); if (att->HasAmount()) { attributes->push_back(std::make_pair("amount", att->StrToStr(att->GetAmount()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CUTOUT ) ) { AttCutout *att = dynamic_cast(element); + assert( att ); if (att->HasCutout()) { attributes->push_back(std::make_pair("cutout", att->StrToStr(att->GetCutout()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_EXPANDABLE ) ) { AttExpandable *att = dynamic_cast(element); + assert( att ); if (att->HasExpand()) { attributes->push_back(std::make_pair("expand", att->StrToStr(att->GetExpand()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FTREMLOG ) ) { AttFTremLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FERMATAVIS ) ) { AttFermataVis *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } @@ -2156,35 +2209,40 @@ void Att::GetCmn( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("shape", att->StrToStr(att->GetShape()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_GLISSVIS ) ) { AttGlissVis *att = dynamic_cast(element); + assert( att ); if (att->HasText()) { attributes->push_back(std::make_pair("text", att->StrToStr(att->GetText()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_GRACED ) ) { AttGraced *att = dynamic_cast(element); + assert( att ); if (att->HasGrace()) { - attributes->push_back(std::make_pair("grace", att->StrToStr(att->GetGrace()))); + attributes->push_back(std::make_pair("grace", att->GraceToStr(att->GetGrace()))); } if (att->HasGraceTime()) { attributes->push_back(std::make_pair("graceTime", att->StrToStr(att->GetGraceTime()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HAIRPINLOG ) ) { AttHairpinLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HAIRPINVIS ) ) { AttHairpinVis *att = dynamic_cast(element); + assert( att ); if (att->HasOpening()) { attributes->push_back(std::make_pair("opening", att->StrToStr(att->GetOpening()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARPPEDALLOG ) ) { AttHarpPedalLog *att = dynamic_cast(element); + assert( att ); if (att->HasC()) { attributes->push_back(std::make_pair("c", att->StrToStr(att->GetC()))); } @@ -2207,83 +2265,96 @@ void Att::GetCmn( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("b", att->StrToStr(att->GetB()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LVPRESENT ) ) { AttLvpresent *att = dynamic_cast(element); + assert( att ); if (att->HasLv()) { attributes->push_back(std::make_pair("lv", att->StrToStr(att->GetLv()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MULTIRESTVIS ) ) { AttMultiRestVis *att = dynamic_cast(element); + assert( att ); if (att->HasBlock()) { attributes->push_back(std::make_pair("block", att->StrToStr(att->GetBlock()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEGESCMN ) ) { AttNoteGesCmn *att = dynamic_cast(element); + assert( att ); if (att->HasGliss()) { attributes->push_back(std::make_pair("gliss", att->StrToStr(att->GetGliss()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NUMBERED ) ) { AttNumbered *att = dynamic_cast(element); + assert( att ); if (att->HasNum()) { attributes->push_back(std::make_pair("numInt", att->IntToStr(att->GetNum()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NUMBERPLACEMENT ) ) { AttNumberplacement *att = dynamic_cast(element); + assert( att ); if (att->HasNumPlace()) { - attributes->push_back(std::make_pair("numPlace", att->StrToStr(att->GetNumPlace()))); + attributes->push_back(std::make_pair("numPlace", att->PlaceToStr(att->GetNumPlace()))); } if (att->HasNumVisible()) { - attributes->push_back(std::make_pair("numVisible", att->StrToStr(att->GetNumVisible()))); + attributes->push_back(std::make_pair("numVisible", att->BoolToStr(att->GetNumVisible()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVELOG ) ) { AttOctaveLog *att = dynamic_cast(element); + assert( att ); if (att->HasColl()) { attributes->push_back(std::make_pair("coll", att->StrToStr(att->GetColl()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PEDALLOG ) ) { AttPedalLog *att = dynamic_cast(element); + assert( att ); if (att->HasDir()) { attributes->push_back(std::make_pair("dir", att->StrToStr(att->GetDir()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PEDALVIS ) ) { AttPedalVis *att = dynamic_cast(element); + assert( att ); if (att->HasStyle()) { attributes->push_back(std::make_pair("style", att->StrToStr(att->GetStyle()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PIANOPEDALS ) ) { AttPianopedals *att = dynamic_cast(element); + assert( att ); if (att->HasPedalStyle()) { attributes->push_back(std::make_pair("pedalStyle", att->StrToStr(att->GetPedalStyle()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_REHEARSAL ) ) { AttRehearsal *att = dynamic_cast(element); + assert( att ); if (att->HasRehEnclose()) { attributes->push_back(std::make_pair("rehEnclose", att->StrToStr(att->GetRehEnclose()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCOREDEFVISCMN ) ) { AttScoreDefVisCmn *att = dynamic_cast(element); + assert( att ); if (att->HasGridShow()) { attributes->push_back(std::make_pair("gridShow", att->StrToStr(att->GetGridShow()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SLURREND ) ) { AttSlurrend *att = dynamic_cast(element); + assert( att ); if (att->HasSlurRend()) { attributes->push_back(std::make_pair("slurRend", att->StrToStr(att->GetSlurRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STEMMEDCMN ) ) { AttStemmedCmn *att = dynamic_cast(element); + assert( att ); if (att->HasStemMod()) { attributes->push_back(std::make_pair("stemMod", att->StrToStr(att->GetStemMod()))); } @@ -2291,31 +2362,34 @@ void Att::GetCmn( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("stemWith", att->StrToStr(att->GetStemWith()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIEREND ) ) { AttTierend *att = dynamic_cast(element); + assert( att ); if (att->HasTieRend()) { attributes->push_back(std::make_pair("tieRend", att->StrToStr(att->GetTieRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TREMMEASURED ) ) { AttTremmeasured *att = dynamic_cast(element); + assert( att ); if (att->HasMeasperf()) { attributes->push_back(std::make_pair("measperf", att->StrToStr(att->GetMeasperf()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TUPLETVIS ) ) { AttTupletVis *att = dynamic_cast(element); + assert( att ); if (att->HasBracketPlace()) { - attributes->push_back(std::make_pair("bracketPlace", att->StrToStr(att->GetBracketPlace()))); + attributes->push_back(std::make_pair("bracketPlace", att->PlaceToStr(att->GetBracketPlace()))); } if (att->HasBracketVisible()) { - attributes->push_back(std::make_pair("bracketVisible", att->StrToStr(att->GetBracketVisible()))); + attributes->push_back(std::make_pair("bracketVisible", att->BoolToStr(att->GetBracketVisible()))); } if (att->HasDurVisible()) { - attributes->push_back(std::make_pair("durVisible", att->StrToStr(att->GetDurVisible()))); + attributes->push_back(std::make_pair("durVisible", att->BoolToStr(att->GetDurVisible()))); } if (att->HasNumFormat()) { - attributes->push_back(std::make_pair("numFormat", att->StrToStr(att->GetNumFormat()))); + attributes->push_back(std::make_pair("numFormat", att->NumformatToStr(att->GetNumFormat()))); } } diff --git a/libmei/atts_cmn.h b/libmei/atts_cmn.h index a3b0c92db9d..231a1640b3f 100644 --- a/libmei/atts_cmn.h +++ b/libmei/atts_cmn.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_CMN_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- @@ -294,8 +295,8 @@ class AttBeamrend: public Att * to the default value) **/ ///@{ - void SetRend(std::string rend_) { m_rend = rend_; }; - std::string GetRend() const { return m_rend; }; + void SetRend(data_BEATRPT_REND rend_) { m_rend = rend_; }; + data_BEATRPT_REND GetRend() const { return m_rend; }; bool HasRend( ); // @@ -307,7 +308,7 @@ class AttBeamrend: public Att private: /** Records the appearance and usually the function of the bar line. **/ - std::string m_rend; + data_BEATRPT_REND m_rend; /** Records the slope of the beam. **/ double m_slopeDbl; @@ -382,15 +383,15 @@ class AttBeatRptVis: public Att * to the default value) **/ ///@{ - void SetRend(std::string rend_) { m_rend = rend_; }; - std::string GetRend() const { return m_rend; }; + void SetRend(data_BEATRPT_REND rend_) { m_rend = rend_; }; + data_BEATRPT_REND GetRend() const { return m_rend; }; bool HasRend( ); ///@} private: /** Records the appearance and usually the function of the bar line. **/ - std::string m_rend; + data_BEATRPT_REND m_rend; /* include */ }; @@ -664,8 +665,8 @@ class AttGraced: public Att * to the default value) **/ ///@{ - void SetGrace(std::string grace_) { m_grace = grace_; }; - std::string GetGrace() const { return m_grace; }; + void SetGrace(data_GRACE grace_) { m_grace = grace_; }; + data_GRACE GetGrace() const { return m_grace; }; bool HasGrace( ); // @@ -680,7 +681,7 @@ class AttGraced: public Att * Marks a note or chord as a "grace" (without a definitive written duration) and * records from which other note/chord it should "steal" time. **/ - std::string m_grace; + data_GRACE m_grace; /** Records the amount of time to be "stolen" from a non-grace note/chord. **/ std::string m_graceTime; @@ -1033,22 +1034,22 @@ class AttNumberplacement: public Att * to the default value) **/ ///@{ - void SetNumPlace(std::string numPlace_) { m_numPlace = numPlace_; }; - std::string GetNumPlace() const { return m_numPlace; }; + void SetNumPlace(data_PLACE numPlace_) { m_numPlace = numPlace_; }; + data_PLACE GetNumPlace() const { return m_numPlace; }; bool HasNumPlace( ); // - void SetNumVisible(std::string numVisible_) { m_numVisible = numVisible_; }; - std::string GetNumVisible() const { return m_numVisible; }; + void SetNumVisible(data_BOOLEAN numVisible_) { m_numVisible = numVisible_; }; + data_BOOLEAN GetNumVisible() const { return m_numVisible; }; bool HasNumVisible( ); ///@} private: /** States where the tuplet number will be placed in relation to the note heads. **/ - std::string m_numPlace; + data_PLACE m_numPlace; /** Determines if the tuplet number is visible. **/ - std::string m_numVisible; + data_BOOLEAN m_numVisible; /* include */ }; @@ -1478,23 +1479,23 @@ class AttTupletVis: public Att * to the default value) **/ ///@{ - void SetBracketPlace(std::string bracketPlace_) { m_bracketPlace = bracketPlace_; }; - std::string GetBracketPlace() const { return m_bracketPlace; }; + void SetBracketPlace(data_PLACE bracketPlace_) { m_bracketPlace = bracketPlace_; }; + data_PLACE GetBracketPlace() const { return m_bracketPlace; }; bool HasBracketPlace( ); // - void SetBracketVisible(std::string bracketVisible_) { m_bracketVisible = bracketVisible_; }; - std::string GetBracketVisible() const { return m_bracketVisible; }; + void SetBracketVisible(data_BOOLEAN bracketVisible_) { m_bracketVisible = bracketVisible_; }; + data_BOOLEAN GetBracketVisible() const { return m_bracketVisible; }; bool HasBracketVisible( ); // - void SetDurVisible(std::string durVisible_) { m_durVisible = durVisible_; }; - std::string GetDurVisible() const { return m_durVisible; }; + void SetDurVisible(data_BOOLEAN durVisible_) { m_durVisible = durVisible_; }; + data_BOOLEAN GetDurVisible() const { return m_durVisible; }; bool HasDurVisible( ); // - void SetNumFormat(std::string numFormat_) { m_numFormat = numFormat_; }; - std::string GetNumFormat() const { return m_numFormat; }; + void SetNumFormat(data_NUMFORMAT numFormat_) { m_numFormat = numFormat_; }; + data_NUMFORMAT GetNumFormat() const { return m_numFormat; }; bool HasNumFormat( ); ///@} @@ -1504,13 +1505,13 @@ class AttTupletVis: public Att * Used to state where a tuplet bracket will be placed in relation to the note * heads. **/ - std::string m_bracketPlace; + data_PLACE m_bracketPlace; /** States whether a bracket should be rendered with a tuplet. **/ - std::string m_bracketVisible; + data_BOOLEAN m_bracketVisible; /** Determines if the tuplet duration is visible. **/ - std::string m_durVisible; + data_BOOLEAN m_durVisible; /** Controls how the num:numbase ratio is to be displayed. **/ - std::string m_numFormat; + data_NUMFORMAT m_numFormat; /* include */ }; diff --git a/libmei/atts_cmnornaments.cpp b/libmei/atts_cmnornaments.cpp index 34cd482a6e4..3296cf5892c 100644 --- a/libmei/atts_cmnornaments.cpp +++ b/libmei/atts_cmnornaments.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -240,8 +244,9 @@ bool AttTurnLog::HasForm( ) /* include */ bool Att::SetCmnornaments( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MORDENTLOG ) ) { AttMordentLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; @@ -251,15 +256,17 @@ bool Att::SetCmnornaments( Object *element, std::string attrType, std::string at return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ORNAM ) ) { AttOrnam *att = dynamic_cast(element); + assert( att ); if (attrType == "ornam") { att->SetOrnam(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ORNAMENTACCID ) ) { AttOrnamentaccid *att = dynamic_cast(element); + assert( att ); if (attrType == "accidupper") { att->SetAccidupper(att->StrToStr(attrValue)); return true; @@ -269,8 +276,9 @@ bool Att::SetCmnornaments( Object *element, std::string attrType, std::string at return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TURNLOG ) ) { AttTurnLog *att = dynamic_cast(element); + assert( att ); if (attrType == "delayed") { att->SetDelayed(att->StrToStr(attrValue)); return true; @@ -285,8 +293,9 @@ bool Att::SetCmnornaments( Object *element, std::string attrType, std::string at } void Att::GetCmnornaments( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MORDENTLOG ) ) { AttMordentLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } @@ -294,14 +303,16 @@ void Att::GetCmnornaments( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("long", att->StrToStr(att->GetLong()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ORNAM ) ) { AttOrnam *att = dynamic_cast(element); + assert( att ); if (att->HasOrnam()) { attributes->push_back(std::make_pair("ornam", att->StrToStr(att->GetOrnam()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ORNAMENTACCID ) ) { AttOrnamentaccid *att = dynamic_cast(element); + assert( att ); if (att->HasAccidupper()) { attributes->push_back(std::make_pair("accidupper", att->StrToStr(att->GetAccidupper()))); } @@ -309,8 +320,9 @@ void Att::GetCmnornaments( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("accidlower", att->StrToStr(att->GetAccidlower()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TURNLOG ) ) { AttTurnLog *att = dynamic_cast(element); + assert( att ); if (att->HasDelayed()) { attributes->push_back(std::make_pair("delayed", att->StrToStr(att->GetDelayed()))); } diff --git a/libmei/atts_cmnornaments.h b/libmei/atts_cmnornaments.h index f5091a5ac59..0d19b82ca28 100644 --- a/libmei/atts_cmnornaments.h +++ b/libmei/atts_cmnornaments.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_CMNORNAMENTS_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_critapp.cpp b/libmei/atts_critapp.cpp index 5bcacc8143c..3a9afc8da86 100644 --- a/libmei/atts_critapp.cpp +++ b/libmei/atts_critapp.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -109,15 +113,17 @@ bool AttSource::HasSource( ) /* include */ bool Att::SetCritapp( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CRIT ) ) { AttCrit *att = dynamic_cast(element); + assert( att ); if (attrType == "cause") { att->SetCause(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SOURCE ) ) { AttSource *att = dynamic_cast(element); + assert( att ); if (attrType == "source") { att->SetSource(att->StrToStr(attrValue)); return true; @@ -128,14 +134,16 @@ bool Att::SetCritapp( Object *element, std::string attrType, std::string attrVal } void Att::GetCritapp( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CRIT ) ) { AttCrit *att = dynamic_cast(element); + assert( att ); if (att->HasCause()) { attributes->push_back(std::make_pair("cause", att->StrToStr(att->GetCause()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SOURCE ) ) { AttSource *att = dynamic_cast(element); + assert( att ); if (att->HasSource()) { attributes->push_back(std::make_pair("source", att->StrToStr(att->GetSource()))); } diff --git a/libmei/atts_critapp.h b/libmei/atts_critapp.h index 6a56654d495..3b1d043e915 100644 --- a/libmei/atts_critapp.h +++ b/libmei/atts_critapp.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_CRITAPP_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_edittrans.cpp b/libmei/atts_edittrans.cpp index 93b4540bb35..309363dd850 100644 --- a/libmei/atts_edittrans.cpp +++ b/libmei/atts_edittrans.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -210,15 +214,17 @@ bool AttReasonident::HasReason( ) /* include */ bool Att::SetEdittrans( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_AGENTIDENT ) ) { AttAgentident *att = dynamic_cast(element); + assert( att ); if (attrType == "agent") { att->SetAgent(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_EDIT ) ) { AttEdit *att = dynamic_cast(element); + assert( att ); if (attrType == "cert") { att->SetCert(att->StrToStr(attrValue)); return true; @@ -228,15 +234,17 @@ bool Att::SetEdittrans( Object *element, std::string attrType, std::string attrV return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_EXTENT ) ) { AttExtent *att = dynamic_cast(element); + assert( att ); if (attrType == "extent") { att->SetExtent(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_REASONIDENT ) ) { AttReasonident *att = dynamic_cast(element); + assert( att ); if (attrType == "reason") { att->SetReason(att->StrToStr(attrValue)); return true; @@ -247,14 +255,16 @@ bool Att::SetEdittrans( Object *element, std::string attrType, std::string attrV } void Att::GetEdittrans( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_AGENTIDENT ) ) { AttAgentident *att = dynamic_cast(element); + assert( att ); if (att->HasAgent()) { attributes->push_back(std::make_pair("agent", att->StrToStr(att->GetAgent()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_EDIT ) ) { AttEdit *att = dynamic_cast(element); + assert( att ); if (att->HasCert()) { attributes->push_back(std::make_pair("cert", att->StrToStr(att->GetCert()))); } @@ -262,14 +272,16 @@ void Att::GetEdittrans( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("evidence", att->StrToStr(att->GetEvidence()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_EXTENT ) ) { AttExtent *att = dynamic_cast(element); + assert( att ); if (att->HasExtent()) { attributes->push_back(std::make_pair("extent", att->StrToStr(att->GetExtent()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_REASONIDENT ) ) { AttReasonident *att = dynamic_cast(element); + assert( att ); if (att->HasReason()) { attributes->push_back(std::make_pair("reason", att->StrToStr(att->GetReason()))); } diff --git a/libmei/atts_edittrans.h b/libmei/atts_edittrans.h index 3c16fef48a9..483edee8dbe 100644 --- a/libmei/atts_edittrans.h +++ b/libmei/atts_edittrans.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_EDITTRANS_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_facsimile.cpp b/libmei/atts_facsimile.cpp index b8c6e259274..f7147eba268 100644 --- a/libmei/atts_facsimile.cpp +++ b/libmei/atts_facsimile.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -68,8 +72,9 @@ void AttFacsimile::getCoords() { } bool Att::SetFacsimile( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FACSIMILE ) ) { AttFacsimile *att = dynamic_cast(element); + assert( att ); if (attrType == "facs") { att->SetFacs(att->StrToStr(attrValue)); return true; @@ -80,8 +85,9 @@ bool Att::SetFacsimile( Object *element, std::string attrType, std::string attrV } void Att::GetFacsimile( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FACSIMILE ) ) { AttFacsimile *att = dynamic_cast(element); + assert( att ); if (att->HasFacs()) { attributes->push_back(std::make_pair("facs", att->StrToStr(att->GetFacs()))); } diff --git a/libmei/atts_facsimile.h b/libmei/atts_facsimile.h index 052beca36ba..f8435d5ec91 100644 --- a/libmei/atts_facsimile.h +++ b/libmei/atts_facsimile.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_FACSIMILE_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_figtable.cpp b/libmei/atts_figtable.cpp index 2ee9a5d798c..301966496cb 100644 --- a/libmei/atts_figtable.cpp +++ b/libmei/atts_figtable.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -81,8 +85,9 @@ bool AttTabular::HasRowspan( ) /* include */ bool Att::SetFigtable( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TABULAR ) ) { AttTabular *att = dynamic_cast(element); + assert( att ); if (attrType == "colspanInt") { att->SetColspan(att->StrToInt(attrValue)); return true; @@ -97,8 +102,9 @@ bool Att::SetFigtable( Object *element, std::string attrType, std::string attrVa } void Att::GetFigtable( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TABULAR ) ) { AttTabular *att = dynamic_cast(element); + assert( att ); if (att->HasColspan()) { attributes->push_back(std::make_pair("colspanInt", att->IntToStr(att->GetColspan()))); } diff --git a/libmei/atts_figtable.h b/libmei/atts_figtable.h index 0cd69a73cc2..89dff3b3e74 100644 --- a/libmei/atts_figtable.h +++ b/libmei/atts_figtable.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_FIGTABLE_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_harmony.cpp b/libmei/atts_harmony.cpp index a65130f8f8d..babe881857c 100644 --- a/libmei/atts_harmony.cpp +++ b/libmei/atts_harmony.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -167,22 +171,25 @@ bool AttHarmVis::HasRendgrid( ) /* include */ bool Att::SetHarmony( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FRETLOCATION ) ) { AttFretlocation *att = dynamic_cast(element); + assert( att ); if (attrType == "fret") { att->SetFret(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARMLOG ) ) { AttHarmLog *att = dynamic_cast(element); + assert( att ); if (attrType == "chordref") { att->SetChordref(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARMVIS ) ) { AttHarmVis *att = dynamic_cast(element); + assert( att ); if (attrType == "extender") { att->SetExtender(att->StrToStr(attrValue)); return true; @@ -197,20 +204,23 @@ bool Att::SetHarmony( Object *element, std::string attrType, std::string attrVal } void Att::GetHarmony( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FRETLOCATION ) ) { AttFretlocation *att = dynamic_cast(element); + assert( att ); if (att->HasFret()) { attributes->push_back(std::make_pair("fret", att->StrToStr(att->GetFret()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARMLOG ) ) { AttHarmLog *att = dynamic_cast(element); + assert( att ); if (att->HasChordref()) { attributes->push_back(std::make_pair("chordref", att->StrToStr(att->GetChordref()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HARMVIS ) ) { AttHarmVis *att = dynamic_cast(element); + assert( att ); if (att->HasExtender()) { attributes->push_back(std::make_pair("extender", att->StrToStr(att->GetExtender()))); } diff --git a/libmei/atts_harmony.h b/libmei/atts_harmony.h index 493fb08c865..cadb0c3e355 100644 --- a/libmei/atts_harmony.h +++ b/libmei/atts_harmony.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_HARMONY_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_header.cpp b/libmei/atts_header.cpp index 2e027ae6d60..a710e453c4a 100644 --- a/libmei/atts_header.cpp +++ b/libmei/atts_header.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -66,8 +70,9 @@ bool AttRegularmethod::HasMethod( ) /* include */ bool Att::SetHeader( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_REGULARMETHOD ) ) { AttRegularmethod *att = dynamic_cast(element); + assert( att ); if (attrType == "method") { att->SetMethod(att->StrToStr(attrValue)); return true; @@ -78,8 +83,9 @@ bool Att::SetHeader( Object *element, std::string attrType, std::string attrValu } void Att::GetHeader( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_REGULARMETHOD ) ) { AttRegularmethod *att = dynamic_cast(element); + assert( att ); if (att->HasMethod()) { attributes->push_back(std::make_pair("method", att->StrToStr(att->GetMethod()))); } diff --git a/libmei/atts_header.h b/libmei/atts_header.h index e287aa0d5e4..95ca2abdfac 100644 --- a/libmei/atts_header.h +++ b/libmei/atts_header.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_HEADER_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_linkalign.cpp b/libmei/atts_linkalign.cpp index 8faefba1641..012b8142b3c 100644 --- a/libmei/atts_linkalign.cpp +++ b/libmei/atts_linkalign.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -66,8 +70,9 @@ bool AttAlignment::HasWhen( ) /* include */ bool Att::SetLinkalign( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ALIGNMENT ) ) { AttAlignment *att = dynamic_cast(element); + assert( att ); if (attrType == "when") { att->SetWhen(att->StrToStr(attrValue)); return true; @@ -78,8 +83,9 @@ bool Att::SetLinkalign( Object *element, std::string attrType, std::string attrV } void Att::GetLinkalign( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ALIGNMENT ) ) { AttAlignment *att = dynamic_cast(element); + assert( att ); if (att->HasWhen()) { attributes->push_back(std::make_pair("when", att->StrToStr(att->GetWhen()))); } diff --git a/libmei/atts_linkalign.h b/libmei/atts_linkalign.h index e57df581d54..ae7cd6dd6ec 100644 --- a/libmei/atts_linkalign.h +++ b/libmei/atts_linkalign.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_LINKALIGN_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_lyrics.cpp b/libmei/atts_lyrics.cpp index 75a83a61692..62172baafaa 100644 --- a/libmei/atts_lyrics.cpp +++ b/libmei/atts_lyrics.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -81,8 +85,9 @@ bool AttVerseLog::HasRhythm( ) /* include */ bool Att::SetLyrics( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VERSELOG ) ) { AttVerseLog *att = dynamic_cast(element); + assert( att ); if (attrType == "refrain") { att->SetRefrain(att->StrToStr(attrValue)); return true; @@ -97,8 +102,9 @@ bool Att::SetLyrics( Object *element, std::string attrType, std::string attrValu } void Att::GetLyrics( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VERSELOG ) ) { AttVerseLog *att = dynamic_cast(element); + assert( att ); if (att->HasRefrain()) { attributes->push_back(std::make_pair("refrain", att->StrToStr(att->GetRefrain()))); } diff --git a/libmei/atts_lyrics.h b/libmei/atts_lyrics.h index 24ecab87c4e..38fd739f1f8 100644 --- a/libmei/atts_lyrics.h +++ b/libmei/atts_lyrics.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_LYRICS_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_mensural.cpp b/libmei/atts_mensural.cpp index 77b51aa8275..f5c6aa11609 100644 --- a/libmei/atts_mensural.cpp +++ b/libmei/atts_mensural.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -504,15 +508,17 @@ bool AttRestVisMensural::HasSpaces( ) /* include */ bool Att::SetMensural( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LIGATURELOG ) ) { AttLigatureLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURVIS ) ) { AttMensurVis *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; @@ -522,8 +528,9 @@ bool Att::SetMensural( Object *element, std::string attrType, std::string attrVa return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURALLOG ) ) { AttMensuralLog *att = dynamic_cast(element); + assert( att ); if (attrType == "mensurDot") { att->SetMensurDot(att->StrToBool(attrValue)); return true; @@ -545,8 +552,9 @@ bool Att::SetMensural( Object *element, std::string attrType, std::string attrVa return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURALSHARED ) ) { AttMensuralShared *att = dynamic_cast(element); + assert( att ); if (attrType == "modusmaior") { att->SetModusmaior(att->StrToModusmaior(attrValue)); return true; @@ -564,8 +572,9 @@ bool Att::SetMensural( Object *element, std::string attrType, std::string attrVa return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURALVIS ) ) { AttMensuralVis *att = dynamic_cast(element); + assert( att ); if (attrType == "mensurColor") { att->SetMensurColor(att->StrToStr(attrValue)); return true; @@ -587,15 +596,17 @@ bool Att::SetMensural( Object *element, std::string attrType, std::string attrVa return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTELOGMENSURAL ) ) { AttNoteLogMensural *att = dynamic_cast(element); + assert( att ); if (attrType == "lig") { att->SetLig(att->StrToLigature(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_RESTVISMENSURAL ) ) { AttRestVisMensural *att = dynamic_cast(element); + assert( att ); if (attrType == "spacesInt") { att->SetSpaces(att->StrToInt(attrValue)); return true; @@ -606,14 +617,16 @@ bool Att::SetMensural( Object *element, std::string attrType, std::string attrVa } void Att::GetMensural( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LIGATURELOG ) ) { AttLigatureLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURVIS ) ) { AttMensurVis *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } @@ -621,8 +634,9 @@ void Att::GetMensural( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("orient", att->OrientationToStr(att->GetOrient()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURALLOG ) ) { AttMensuralLog *att = dynamic_cast(element); + assert( att ); if (att->HasMensurDot()) { attributes->push_back(std::make_pair("mensurDot", att->BoolToStr(att->GetMensurDot()))); } @@ -639,8 +653,9 @@ void Att::GetMensural( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("proportNumbase", att->IntToStr(att->GetProportNumbase()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURALSHARED ) ) { AttMensuralShared *att = dynamic_cast(element); + assert( att ); if (att->HasModusmaior()) { attributes->push_back(std::make_pair("modusmaior", att->ModusmaiorToStr(att->GetModusmaior()))); } @@ -654,8 +669,9 @@ void Att::GetMensural( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("tempus", att->TempusToStr(att->GetTempus()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURALVIS ) ) { AttMensuralVis *att = dynamic_cast(element); + assert( att ); if (att->HasMensurColor()) { attributes->push_back(std::make_pair("mensurColor", att->StrToStr(att->GetMensurColor()))); } @@ -672,14 +688,16 @@ void Att::GetMensural( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("mensurSize", att->StrToStr(att->GetMensurSize()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTELOGMENSURAL ) ) { AttNoteLogMensural *att = dynamic_cast(element); + assert( att ); if (att->HasLig()) { attributes->push_back(std::make_pair("lig", att->LigatureToStr(att->GetLig()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_RESTVISMENSURAL ) ) { AttRestVisMensural *att = dynamic_cast(element); + assert( att ); if (att->HasSpaces()) { attributes->push_back(std::make_pair("spacesInt", att->IntToStr(att->GetSpaces()))); } diff --git a/libmei/atts_mensural.h b/libmei/atts_mensural.h index 44d3c5d5bca..f121e5fe54b 100644 --- a/libmei/atts_mensural.h +++ b/libmei/atts_mensural.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_MENSURAL_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_midi.cpp b/libmei/atts_midi.cpp index f5e7058c5ac..04618f8382f 100644 --- a/libmei/atts_midi.cpp +++ b/libmei/atts_midi.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -371,8 +375,9 @@ bool AttTimebase::HasPpq( ) /* include */ bool Att::SetMidi( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CHANNELIZED ) ) { AttChannelized *att = dynamic_cast(element); + assert( att ); if (attrType == "midiChannel") { att->SetMidiChannel(att->StrToStr(attrValue)); return true; @@ -390,8 +395,9 @@ bool Att::SetMidi( Object *element, std::string attrType, std::string attrValue return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDIINSTRUMENT ) ) { AttMidiinstrument *att = dynamic_cast(element); + assert( att ); if (attrType == "midiInstrnum") { att->SetMidiInstrnum(att->StrToStr(attrValue)); return true; @@ -409,29 +415,33 @@ bool Att::SetMidi( Object *element, std::string attrType, std::string attrValue return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDINUMBER ) ) { AttMidinumber *att = dynamic_cast(element); + assert( att ); if (attrType == "numInt") { att->SetNum(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDITEMPO ) ) { AttMiditempo *att = dynamic_cast(element); + assert( att ); if (attrType == "midiTempo") { att->SetMidiTempo(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDIVALUE ) ) { AttMidivalue *att = dynamic_cast(element); + assert( att ); if (attrType == "val") { att->SetVal(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMEBASE ) ) { AttTimebase *att = dynamic_cast(element); + assert( att ); if (attrType == "ppqInt") { att->SetPpq(att->StrToInt(attrValue)); return true; @@ -442,8 +452,9 @@ bool Att::SetMidi( Object *element, std::string attrType, std::string attrValue } void Att::GetMidi( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CHANNELIZED ) ) { AttChannelized *att = dynamic_cast(element); + assert( att ); if (att->HasMidiChannel()) { attributes->push_back(std::make_pair("midiChannel", att->StrToStr(att->GetMidiChannel()))); } @@ -457,8 +468,9 @@ void Att::GetMidi( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("midiTrackInt", att->IntToStr(att->GetMidiTrack()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDIINSTRUMENT ) ) { AttMidiinstrument *att = dynamic_cast(element); + assert( att ); if (att->HasMidiInstrnum()) { attributes->push_back(std::make_pair("midiInstrnum", att->StrToStr(att->GetMidiInstrnum()))); } @@ -472,26 +484,30 @@ void Att::GetMidi( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("midiVolume", att->StrToStr(att->GetMidiVolume()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDINUMBER ) ) { AttMidinumber *att = dynamic_cast(element); + assert( att ); if (att->HasNum()) { attributes->push_back(std::make_pair("numInt", att->IntToStr(att->GetNum()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDITEMPO ) ) { AttMiditempo *att = dynamic_cast(element); + assert( att ); if (att->HasMidiTempo()) { attributes->push_back(std::make_pair("midiTempo", att->StrToStr(att->GetMidiTempo()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MIDIVALUE ) ) { AttMidivalue *att = dynamic_cast(element); + assert( att ); if (att->HasVal()) { attributes->push_back(std::make_pair("val", att->StrToStr(att->GetVal()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMEBASE ) ) { AttTimebase *att = dynamic_cast(element); + assert( att ); if (att->HasPpq()) { attributes->push_back(std::make_pair("ppqInt", att->IntToStr(att->GetPpq()))); } diff --git a/libmei/atts_midi.h b/libmei/atts_midi.h index 30bb3d51a50..d03c26c1479 100644 --- a/libmei/atts_midi.h +++ b/libmei/atts_midi.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_MIDI_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_neumes.cpp b/libmei/atts_neumes.cpp index b6940d703e0..d62a40e76a9 100644 --- a/libmei/atts_neumes.cpp +++ b/libmei/atts_neumes.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -139,8 +143,9 @@ bool AttUneumeLog::HasName( ) /* include */ bool Att::SetNeumes( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INEUMELOG ) ) { AttIneumeLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; @@ -150,8 +155,9 @@ bool Att::SetNeumes( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_UNEUMELOG ) ) { AttUneumeLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; @@ -166,8 +172,9 @@ bool Att::SetNeumes( Object *element, std::string attrType, std::string attrValu } void Att::GetNeumes( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INEUMELOG ) ) { AttIneumeLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } @@ -175,8 +182,9 @@ void Att::GetNeumes( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("name", att->StrToStr(att->GetName()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_UNEUMELOG ) ) { AttUneumeLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } diff --git a/libmei/atts_neumes.h b/libmei/atts_neumes.h index a41db8ca631..1aeb642aa21 100644 --- a/libmei/atts_neumes.h +++ b/libmei/atts_neumes.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_NEUMES_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_pagebased.cpp b/libmei/atts_pagebased.cpp index fb3d7d3614b..c98d37bb061 100644 --- a/libmei/atts_pagebased.cpp +++ b/libmei/atts_pagebased.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -66,8 +70,9 @@ bool AttSurface::HasSurface( ) /* include */ bool Att::SetPagebased( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SURFACE ) ) { AttSurface *att = dynamic_cast(element); + assert( att ); if (attrType == "surface") { att->SetSurface(att->StrToStr(attrValue)); return true; @@ -78,8 +83,9 @@ bool Att::SetPagebased( Object *element, std::string attrType, std::string attrV } void Att::GetPagebased( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SURFACE ) ) { AttSurface *att = dynamic_cast(element); + assert( att ); if (att->HasSurface()) { attributes->push_back(std::make_pair("surface", att->StrToStr(att->GetSurface()))); } diff --git a/libmei/atts_pagebased.h b/libmei/atts_pagebased.h index 746cb958541..df3b74eb5c1 100644 --- a/libmei/atts_pagebased.h +++ b/libmei/atts_pagebased.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_PAGEBASED_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/libmei/atts_shared.cpp b/libmei/atts_shared.cpp index 41352e3ebdd..6e6794db2d7 100644 --- a/libmei/atts_shared.cpp +++ b/libmei/atts_shared.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -1263,8 +1267,8 @@ AttCurvature::~AttCurvature() { void AttCurvature::ResetCurvature() { m_bezier = ""; - m_bulge = ""; - m_curvedir = ""; + m_bulge = 0.0; + m_curvedir = CURVEDIR_NONE; } bool AttCurvature::ReadCurvature( pugi::xml_node element ) { @@ -1275,12 +1279,12 @@ bool AttCurvature::ReadCurvature( pugi::xml_node element ) { hasAttribute = true; } if (element.attribute("bulge")) { - this->SetBulge(StrToStr(element.attribute("bulge").value())); + this->SetBulge(StrToDbl(element.attribute("bulge").value())); element.remove_attribute("bulge"); hasAttribute = true; } if (element.attribute("curvedir")) { - this->SetCurvedir(StrToStr(element.attribute("curvedir").value())); + this->SetCurvedir(StrToCurvedir(element.attribute("curvedir").value())); element.remove_attribute("curvedir"); hasAttribute = true; } @@ -1294,11 +1298,11 @@ bool AttCurvature::WriteCurvature( pugi::xml_node element ) { wroteAttribute = true; } if (this->HasBulge()) { - element.append_attribute("bulge") = StrToStr(this->GetBulge()).c_str(); + element.append_attribute("bulge") = DblToStr(this->GetBulge()).c_str(); wroteAttribute = true; } if (this->HasCurvedir()) { - element.append_attribute("curvedir") = StrToStr(this->GetCurvedir()).c_str(); + element.append_attribute("curvedir") = CurvedirToStr(this->GetCurvedir()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -1311,12 +1315,12 @@ bool AttCurvature::HasBezier( ) bool AttCurvature::HasBulge( ) { - return (m_bulge != ""); + return (m_bulge != 0.0); } bool AttCurvature::HasCurvedir( ) { - return (m_curvedir != ""); + return (m_curvedir != CURVEDIR_NONE); } @@ -2433,19 +2437,19 @@ AttKeySigDefaultVis::~AttKeySigDefaultVis() { } void AttKeySigDefaultVis::ResetKeySigDefaultVis() { - m_keySigShow = ""; - m_keySigShowchange = ""; + m_keySigShow = BOOLEAN_NONE; + m_keySigShowchange = BOOLEAN_NONE; } bool AttKeySigDefaultVis::ReadKeySigDefaultVis( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("key.sig.show")) { - this->SetKeySigShow(StrToStr(element.attribute("key.sig.show").value())); + this->SetKeySigShow(StrToBool(element.attribute("key.sig.show").value())); element.remove_attribute("key.sig.show"); hasAttribute = true; } if (element.attribute("key.sig.showchange")) { - this->SetKeySigShowchange(StrToStr(element.attribute("key.sig.showchange").value())); + this->SetKeySigShowchange(StrToBool(element.attribute("key.sig.showchange").value())); element.remove_attribute("key.sig.showchange"); hasAttribute = true; } @@ -2455,11 +2459,11 @@ bool AttKeySigDefaultVis::ReadKeySigDefaultVis( pugi::xml_node element ) { bool AttKeySigDefaultVis::WriteKeySigDefaultVis( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasKeySigShow()) { - element.append_attribute("key.sig.show") = StrToStr(this->GetKeySigShow()).c_str(); + element.append_attribute("key.sig.show") = BoolToStr(this->GetKeySigShow()).c_str(); wroteAttribute = true; } if (this->HasKeySigShowchange()) { - element.append_attribute("key.sig.showchange") = StrToStr(this->GetKeySigShowchange()).c_str(); + element.append_attribute("key.sig.showchange") = BoolToStr(this->GetKeySigShowchange()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -2467,12 +2471,12 @@ bool AttKeySigDefaultVis::WriteKeySigDefaultVis( pugi::xml_node element ) { bool AttKeySigDefaultVis::HasKeySigShow( ) { - return (m_keySigShow != ""); + return (m_keySigShow != BOOLEAN_NONE); } bool AttKeySigDefaultVis::HasKeySigShowchange( ) { - return (m_keySigShowchange != ""); + return (m_keySigShowchange != BOOLEAN_NONE); } @@ -3621,13 +3625,13 @@ AttMultinummeasures::~AttMultinummeasures() { } void AttMultinummeasures::ResetMultinummeasures() { - m_multiNumber = ""; + m_multiNumber = BOOLEAN_NONE; } bool AttMultinummeasures::ReadMultinummeasures( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("multi.number")) { - this->SetMultiNumber(StrToStr(element.attribute("multi.number").value())); + this->SetMultiNumber(StrToBool(element.attribute("multi.number").value())); element.remove_attribute("multi.number"); hasAttribute = true; } @@ -3637,7 +3641,7 @@ bool AttMultinummeasures::ReadMultinummeasures( pugi::xml_node element ) { bool AttMultinummeasures::WriteMultinummeasures( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasMultiNumber()) { - element.append_attribute("multi.number") = StrToStr(this->GetMultiNumber()).c_str(); + element.append_attribute("multi.number") = BoolToStr(this->GetMultiNumber()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -3645,7 +3649,7 @@ bool AttMultinummeasures::WriteMultinummeasures( pugi::xml_node element ) { bool AttMultinummeasures::HasMultiNumber( ) { - return (m_multiNumber != ""); + return (m_multiNumber != BOOLEAN_NONE); } @@ -4154,13 +4158,13 @@ AttPlacement::~AttPlacement() { } void AttPlacement::ResetPlacement() { - m_place = ""; + m_place = STAFFREL_NONE; } bool AttPlacement::ReadPlacement( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("place")) { - this->SetPlace(StrToStr(element.attribute("place").value())); + this->SetPlace(StrToStaffRel(element.attribute("place").value())); element.remove_attribute("place"); hasAttribute = true; } @@ -4170,7 +4174,7 @@ bool AttPlacement::ReadPlacement( pugi::xml_node element ) { bool AttPlacement::WritePlacement( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasPlace()) { - element.append_attribute("place") = StrToStr(this->GetPlace()).c_str(); + element.append_attribute("place") = StaffRelToStr(this->GetPlace()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -4178,7 +4182,7 @@ bool AttPlacement::WritePlacement( pugi::xml_node element ) { bool AttPlacement::HasPlace( ) { - return (m_place != ""); + return (m_place != STAFFREL_NONE); } @@ -4502,13 +4506,13 @@ AttScalable::~AttScalable() { } void AttScalable::ResetScalable() { - m_scale = ""; + m_scale = 0; } bool AttScalable::ReadScalable( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("scale")) { - this->SetScale(StrToStr(element.attribute("scale").value())); + this->SetScale(StrToPercent(element.attribute("scale").value())); element.remove_attribute("scale"); hasAttribute = true; } @@ -4518,7 +4522,7 @@ bool AttScalable::ReadScalable( pugi::xml_node element ) { bool AttScalable::WriteScalable( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasScale()) { - element.append_attribute("scale") = StrToStr(this->GetScale()).c_str(); + element.append_attribute("scale") = PercentToStr(this->GetScale()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -4526,7 +4530,7 @@ bool AttScalable::WriteScalable( pugi::xml_node element ) { bool AttScalable::HasScale( ) { - return (m_scale != ""); + return (m_scale != 0); } @@ -5337,13 +5341,13 @@ AttStaffGrpVis::~AttStaffGrpVis() { } void AttStaffGrpVis::ResetStaffGrpVis() { - m_barthru = ""; + m_barthru = BOOLEAN_NONE; } bool AttStaffGrpVis::ReadStaffGrpVis( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("barthru")) { - this->SetBarthru(StrToStr(element.attribute("barthru").value())); + this->SetBarthru(StrToBool(element.attribute("barthru").value())); element.remove_attribute("barthru"); hasAttribute = true; } @@ -5353,7 +5357,7 @@ bool AttStaffGrpVis::ReadStaffGrpVis( pugi::xml_node element ) { bool AttStaffGrpVis::WriteStaffGrpVis( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasBarthru()) { - element.append_attribute("barthru") = StrToStr(this->GetBarthru()).c_str(); + element.append_attribute("barthru") = BoolToStr(this->GetBarthru()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -5361,7 +5365,7 @@ bool AttStaffGrpVis::WriteStaffGrpVis( pugi::xml_node element ) { bool AttStaffGrpVis::HasBarthru( ) { - return (m_barthru != ""); + return (m_barthru != BOOLEAN_NONE); } @@ -5380,13 +5384,13 @@ AttStaffgroupingsym::~AttStaffgroupingsym() { } void AttStaffgroupingsym::ResetStaffgroupingsym() { - m_symbol = ""; + m_symbol = SYMBOL_NONE; } bool AttStaffgroupingsym::ReadStaffgroupingsym( pugi::xml_node element ) { bool hasAttribute = false; if (element.attribute("symbol")) { - this->SetSymbol(StrToStr(element.attribute("symbol").value())); + this->SetSymbol(StrToSymbol(element.attribute("symbol").value())); element.remove_attribute("symbol"); hasAttribute = true; } @@ -5396,7 +5400,7 @@ bool AttStaffgroupingsym::ReadStaffgroupingsym( pugi::xml_node element ) { bool AttStaffgroupingsym::WriteStaffgroupingsym( pugi::xml_node element ) { bool wroteAttribute = false; if (this->HasSymbol()) { - element.append_attribute("symbol") = StrToStr(this->GetSymbol()).c_str(); + element.append_attribute("symbol") = SymbolToStr(this->GetSymbol()).c_str(); wroteAttribute = true; } return wroteAttribute; @@ -5404,7 +5408,7 @@ bool AttStaffgroupingsym::WriteStaffgroupingsym( pugi::xml_node element ) { bool AttStaffgroupingsym::HasSymbol( ) { - return (m_symbol != ""); + return (m_symbol != SYMBOL_NONE); } @@ -6945,57 +6949,65 @@ bool AttXy2::HasY2( ) /* include */ bool Att::SetShared( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ACCIDLOG ) ) { AttAccidLog *att = dynamic_cast(element); + assert( att ); if (attrType == "func") { att->SetFunc(att->StrToFunc(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ACCIDENTAL ) ) { AttAccidental *att = dynamic_cast(element); + assert( att ); if (attrType == "accid") { att->SetAccid(att->StrToAccidentalExplicit(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ACCIDENTALPERFORMED ) ) { AttAccidentalPerformed *att = dynamic_cast(element); + assert( att ); if (attrType == "accidGes") { att->SetAccidGes(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ALTSYM ) ) { AttAltsym *att = dynamic_cast(element); + assert( att ); if (attrType == "altsym") { att->SetAltsym(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARTICULATION ) ) { AttArticulation *att = dynamic_cast(element); + assert( att ); if (attrType == "artic") { att->SetArtic(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARTICULATIONPERFORMED ) ) { AttArticulationPerformed *att = dynamic_cast(element); + assert( att ); if (attrType == "articGes") { att->SetArticGes(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_AUGMENTDOTS ) ) { AttAugmentdots *att = dynamic_cast(element); + assert( att ); if (attrType == "dots") { att->SetDots(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_AUTHORIZED ) ) { AttAuthorized *att = dynamic_cast(element); + assert( att ); if (attrType == "authority") { att->SetAuthority(att->StrToStr(attrValue)); return true; @@ -7005,15 +7017,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BARLINELOG ) ) { AttBarLineLog *att = dynamic_cast(element); + assert( att ); if (attrType == "rend") { att->SetRend(att->StrToBarRendition(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BARPLACEMENT ) ) { AttBarplacement *att = dynamic_cast(element); + assert( att ); if (attrType == "barplace") { att->SetBarplace(att->StrToStr(attrValue)); return true; @@ -7023,8 +7037,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMINGVIS ) ) { AttBeamingVis *att = dynamic_cast(element); + assert( att ); if (attrType == "beamColor") { att->SetBeamColor(att->StrToStr(attrValue)); return true; @@ -7038,43 +7053,49 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BIBL ) ) { AttBibl *att = dynamic_cast(element); + assert( att ); if (attrType == "analog") { att->SetAnalog(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CALENDARED ) ) { AttCalendared *att = dynamic_cast(element); + assert( att ); if (attrType == "calendar") { att->SetCalendar(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CANONICAL ) ) { AttCanonical *att = dynamic_cast(element); + assert( att ); if (attrType == "dbkey") { att->SetDbkey(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CHORDVIS ) ) { AttChordVis *att = dynamic_cast(element); + assert( att ); if (attrType == "cluster") { att->SetCluster(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFLOG ) ) { AttClefLog *att = dynamic_cast(element); + assert( att ); if (attrType == "cautionary") { att->SetCautionary(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFFINGLOG ) ) { AttCleffingLog *att = dynamic_cast(element); + assert( att ); if (attrType == "clefShape") { att->SetClefShape(att->StrToClefShape(attrValue)); return true; @@ -7092,8 +7113,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFFINGVIS ) ) { AttCleffingVis *att = dynamic_cast(element); + assert( att ); if (attrType == "clefColor") { att->SetClefColor(att->StrToStr(attrValue)); return true; @@ -7103,36 +7125,41 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFSHAPE ) ) { AttClefshape *att = dynamic_cast(element); + assert( att ); if (attrType == "shape") { att->SetShape(att->StrToClefShape(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CODED ) ) { AttCoded *att = dynamic_cast(element); + assert( att ); if (attrType == "code") { att->SetCode(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COLOR ) ) { AttColor *att = dynamic_cast(element); + assert( att ); if (attrType == "color") { att->SetColor(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COLORATION ) ) { AttColoration *att = dynamic_cast(element); + assert( att ); if (attrType == "colored") { att->SetColored(att->StrToBool(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COMMON ) ) { AttCommon *att = dynamic_cast(element); + assert( att ); if (attrType == "label") { att->SetLabel(att->StrToStr(attrValue)); return true; @@ -7146,8 +7173,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COORDINATED ) ) { AttCoordinated *att = dynamic_cast(element); + assert( att ); if (attrType == "ulxInt") { att->SetUlx(att->StrToInt(attrValue)); return true; @@ -7165,37 +7193,41 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CURVATURE ) ) { AttCurvature *att = dynamic_cast(element); + assert( att ); if (attrType == "bezier") { att->SetBezier(att->StrToStr(attrValue)); return true; } if (attrType == "bulge") { - att->SetBulge(att->StrToStr(attrValue)); + att->SetBulge(att->StrToDbl(attrValue)); return true; } if (attrType == "curvedir") { - att->SetCurvedir(att->StrToStr(attrValue)); + att->SetCurvedir(att->StrToCurvedir(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CURVEREND ) ) { AttCurverend *att = dynamic_cast(element); + assert( att ); if (attrType == "rend") { att->SetRend(att->StrToBarRendition(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CUSTOSLOG ) ) { AttCustosLog *att = dynamic_cast(element); + assert( att ); if (attrType == "target") { att->SetTarget(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DATABLE ) ) { AttDatable *att = dynamic_cast(element); + assert( att ); if (attrType == "enddate") { att->SetEnddate(att->StrToStr(attrValue)); return true; @@ -7217,22 +7249,25 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DATAPOINTING ) ) { AttDatapointing *att = dynamic_cast(element); + assert( att ); if (attrType == "data") { att->SetData(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DECLARING ) ) { AttDeclaring *att = dynamic_cast(element); + assert( att ); if (attrType == "decls") { att->SetDecls(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DISTANCES ) ) { AttDistances *att = dynamic_cast(element); + assert( att ); if (attrType == "dynamDist") { att->SetDynamDist(att->StrToStr(attrValue)); return true; @@ -7246,22 +7281,25 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DOTLOG ) ) { AttDotLog *att = dynamic_cast(element); + assert( att ); if (attrType == "form") { att->SetForm(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONADDITIVE ) ) { AttDurationAdditive *att = dynamic_cast(element); + assert( att ); if (attrType == "dur") { att->SetDur(att->StrToDur(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONDEFAULT ) ) { AttDurationDefault *att = dynamic_cast(element); + assert( att ); if (attrType == "durDefault") { att->SetDurDefault(att->StrToStr(attrValue)); return true; @@ -7275,22 +7313,25 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONMUSICAL ) ) { AttDurationMusical *att = dynamic_cast(element); + assert( att ); if (attrType == "dur") { att->SetDur(att->StrToDur(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONPERFORMED ) ) { AttDurationPerformed *att = dynamic_cast(element); + assert( att ); if (attrType == "durGes") { att->SetDurGes(att->StrToDur(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONRATIO ) ) { AttDurationRatio *att = dynamic_cast(element); + assert( att ); if (attrType == "num") { att->SetNum(att->StrToInt(attrValue)); return true; @@ -7300,64 +7341,73 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ENCLOSINGCHARS ) ) { AttEnclosingchars *att = dynamic_cast(element); + assert( att ); if (attrType == "enclose") { att->SetEnclose(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FERMATAPRESENT ) ) { AttFermatapresent *att = dynamic_cast(element); + assert( att ); if (attrType == "fermata") { att->SetFermata(att->StrToPlace(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HANDIDENT ) ) { AttHandident *att = dynamic_cast(element); + assert( att ); if (attrType == "hand") { att->SetHand(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HORIZONTALALIGN ) ) { AttHorizontalalign *att = dynamic_cast(element); + assert( att ); if (attrType == "halign") { att->SetHalign(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INSTRUMENTIDENT ) ) { AttInstrumentident *att = dynamic_cast(element); + assert( att ); if (attrType == "instr") { att->SetInstr(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INTERNETMEDIA ) ) { AttInternetmedia *att = dynamic_cast(element); + assert( att ); if (attrType == "mimetype") { att->SetMimetype(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_JOINED ) ) { AttJoined *att = dynamic_cast(element); + assert( att ); if (attrType == "join") { att->SetJoin(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_KEYSIGLOG ) ) { AttKeySigLog *att = dynamic_cast(element); + assert( att ); if (attrType == "mode") { att->SetMode(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_KEYSIGDEFAULTLOG ) ) { AttKeySigDefaultLog *att = dynamic_cast(element); + assert( att ); if (attrType == "keyAccid") { att->SetKeyAccid(att->StrToAccidentalImplicit(attrValue)); return true; @@ -7379,61 +7429,69 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_KEYSIGDEFAULTVIS ) ) { AttKeySigDefaultVis *att = dynamic_cast(element); + assert( att ); if (attrType == "keySigShow") { - att->SetKeySigShow(att->StrToStr(attrValue)); + att->SetKeySigShow(att->StrToBool(attrValue)); return true; } if (attrType == "keySigShowchange") { - att->SetKeySigShowchange(att->StrToStr(attrValue)); + att->SetKeySigShowchange(att->StrToBool(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LABELSADDL ) ) { AttLabelsAddl *att = dynamic_cast(element); + assert( att ); if (attrType == "labelAbbr") { att->SetLabelAbbr(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LANG ) ) { AttLang *att = dynamic_cast(element); + assert( att ); if (attrType == "lang") { att->SetLang(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LAYERLOG ) ) { AttLayerLog *att = dynamic_cast(element); + assert( att ); if (attrType == "def") { att->SetDef(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LAYERIDENT ) ) { AttLayerident *att = dynamic_cast(element); + assert( att ); if (attrType == "layer") { att->SetLayer(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LINELOC ) ) { AttLineloc *att = dynamic_cast(element); + assert( att ); if (attrType == "line") { att->SetLine(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LINEREND ) ) { AttLinerend *att = dynamic_cast(element); + assert( att ); if (attrType == "rend") { att->SetRend(att->StrToBarRendition(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LYRICSTYLE ) ) { AttLyricstyle *att = dynamic_cast(element); + assert( att ); if (attrType == "lyricAlign") { att->SetLyricAlign(att->StrToStr(attrValue)); return true; @@ -7459,8 +7517,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEASURELOG ) ) { AttMeasureLog *att = dynamic_cast(element); + assert( att ); if (attrType == "left") { att->SetLeft(att->StrToBarRendition(attrValue)); return true; @@ -7470,15 +7529,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEASUREMENT ) ) { AttMeasurement *att = dynamic_cast(element); + assert( att ); if (attrType == "unit") { att->SetUnit(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEDIABOUNDS ) ) { AttMediabounds *att = dynamic_cast(element); + assert( att ); if (attrType == "begin") { att->SetBegin(att->StrToStr(attrValue)); return true; @@ -7492,15 +7553,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEDIUM ) ) { AttMedium *att = dynamic_cast(element); + assert( att ); if (attrType == "medium") { att->SetMedium(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEIVERSION ) ) { AttMeiversion *att = dynamic_cast(element); + assert( att ); if (attrType == "meiversion") { att->SetMeiversion(att->StrToStr(attrValue)); return true; @@ -7510,8 +7573,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURLOG ) ) { AttMensurLog *att = dynamic_cast(element); + assert( att ); if (attrType == "dot") { att->SetDot(att->StrToBool(attrValue)); return true; @@ -7521,8 +7585,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGLOG ) ) { AttMeterSigLog *att = dynamic_cast(element); + assert( att ); if (attrType == "count") { att->SetCount(att->StrToInt(attrValue)); return true; @@ -7536,15 +7601,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGVIS ) ) { AttMeterSigVis *att = dynamic_cast(element); + assert( att ); if (attrType == "rend") { att->SetRend(att->StrToBarRendition(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGDEFAULTLOG ) ) { AttMeterSigDefaultLog *att = dynamic_cast(element); + assert( att ); if (attrType == "meterCount") { att->SetMeterCount(att->StrToInt(attrValue)); return true; @@ -7554,8 +7621,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGDEFAULTVIS ) ) { AttMeterSigDefaultVis *att = dynamic_cast(element); + assert( att ); if (attrType == "meterRend") { att->SetMeterRend(att->StrToStr(attrValue)); return true; @@ -7569,15 +7637,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERCONFORMANCE ) ) { AttMeterconformance *att = dynamic_cast(element); + assert( att ); if (attrType == "metcon") { att->SetMetcon(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERCONFORMANCEBAR ) ) { AttMeterconformanceBar *att = dynamic_cast(element); + assert( att ); if (attrType == "metcon") { att->SetMetcon(att->StrToStr(attrValue)); return true; @@ -7587,8 +7657,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MMTEMPO ) ) { AttMmtempo *att = dynamic_cast(element); + assert( att ); if (attrType == "mm") { att->SetMm(att->StrToStr(attrValue)); return true; @@ -7602,15 +7673,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MULTINUMMEASURES ) ) { AttMultinummeasures *att = dynamic_cast(element); + assert( att ); if (attrType == "multiNumber") { - att->SetMultiNumber(att->StrToStr(attrValue)); + att->SetMultiNumber(att->StrToBool(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NAME ) ) { AttName *att = dynamic_cast(element); + assert( att ); if (attrType == "nymref") { att->SetNymref(att->StrToStr(attrValue)); return true; @@ -7620,8 +7693,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEGES ) ) { AttNoteGes *att = dynamic_cast(element); + assert( att ); if (attrType == "octGes") { att->SetOctGes(att->StrToStr(attrValue)); return true; @@ -7635,29 +7709,33 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEVIS ) ) { AttNoteVis *att = dynamic_cast(element); + assert( att ); if (attrType == "headshape") { att->SetHeadshape(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVE ) ) { AttOctave *att = dynamic_cast(element); + assert( att ); if (attrType == "oct") { att->SetOct(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVEDEFAULT ) ) { AttOctavedefault *att = dynamic_cast(element); + assert( att ); if (attrType == "octaveDefault") { att->SetOctaveDefault(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVEDISPLACEMENT ) ) { AttOctavedisplacement *att = dynamic_cast(element); + assert( att ); if (attrType == "dis") { att->SetDis(att->StrToOctaveDis(attrValue)); return true; @@ -7667,43 +7745,49 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ONELINESTAFF ) ) { AttOnelinestaff *att = dynamic_cast(element); + assert( att ); if (attrType == "ontheline") { att->SetOntheline(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PADLOG ) ) { AttPadLog *att = dynamic_cast(element); + assert( att ); if (attrType == "num") { att->SetNum(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PBVIS ) ) { AttPbVis *att = dynamic_cast(element); + assert( att ); if (attrType == "func") { att->SetFunc(att->StrToFunc(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PITCH ) ) { AttPitch *att = dynamic_cast(element); + assert( att ); if (attrType == "pname") { att->SetPname(att->StrToPitchName(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PLACEMENT ) ) { AttPlacement *att = dynamic_cast(element); + assert( att ); if (attrType == "place") { - att->SetPlace(att->StrToStr(attrValue)); + att->SetPlace(att->StrToStaffRel(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PLIST ) ) { AttPlist *att = dynamic_cast(element); + assert( att ); if (attrType == "plist") { att->SetPlist(att->StrToStr(attrValue)); return true; @@ -7713,8 +7797,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_POINTING ) ) { AttPointing *att = dynamic_cast(element); + assert( att ); if (attrType == "actuate") { att->SetActuate(att->StrToStr(attrValue)); return true; @@ -7740,36 +7825,41 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_RELATIVESIZE ) ) { AttRelativesize *att = dynamic_cast(element); + assert( att ); if (attrType == "size") { att->SetSize(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_RESPONSIBILITY ) ) { AttResponsibility *att = dynamic_cast(element); + assert( att ); if (attrType == "resp") { att->SetResp(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SBVIS ) ) { AttSbVis *att = dynamic_cast(element); + assert( att ); if (attrType == "rend") { att->SetRend(att->StrToBarRendition(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCALABLE ) ) { AttScalable *att = dynamic_cast(element); + assert( att ); if (attrType == "scale") { - att->SetScale(att->StrToStr(attrValue)); + att->SetScale(att->StrToPercent(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCOREDEFGES ) ) { AttScoreDefGes *att = dynamic_cast(element); + assert( att ); if (attrType == "tunePname") { att->SetTunePname(att->StrToStr(attrValue)); return true; @@ -7783,8 +7873,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCOREDEFVIS ) ) { AttScoreDefVis *att = dynamic_cast(element); + assert( att ); if (attrType == "endingRend") { att->SetEndingRend(att->StrToStr(attrValue)); return true; @@ -7870,50 +7961,57 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SECTIONVIS ) ) { AttSectionVis *att = dynamic_cast(element); + assert( att ); if (attrType == "restart") { att->SetRestart(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SEQUENCE ) ) { AttSequence *att = dynamic_cast(element); + assert( att ); if (attrType == "seqInt") { att->SetSeq(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SLASHCOUNT ) ) { AttSlashcount *att = dynamic_cast(element); + assert( att ); if (attrType == "slash") { att->SetSlash(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SLURPRESENT ) ) { AttSlurpresent *att = dynamic_cast(element); + assert( att ); if (attrType == "slur") { att->SetSlur(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SPACEVIS ) ) { AttSpaceVis *att = dynamic_cast(element); + assert( att ); if (attrType == "compressable") { att->SetCompressable(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFLOG ) ) { AttStaffLog *att = dynamic_cast(element); + assert( att ); if (attrType == "def") { att->SetDef(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFDEFVIS ) ) { AttStaffDefVis *att = dynamic_cast(element); + assert( att ); if (attrType == "gridShow") { att->SetGridShow(att->StrToBool(attrValue)); return true; @@ -7939,36 +8037,41 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFGRPVIS ) ) { AttStaffGrpVis *att = dynamic_cast(element); + assert( att ); if (attrType == "barthru") { - att->SetBarthru(att->StrToStr(attrValue)); + att->SetBarthru(att->StrToBool(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFGROUPINGSYM ) ) { AttStaffgroupingsym *att = dynamic_cast(element); + assert( att ); if (attrType == "symbol") { - att->SetSymbol(att->StrToStr(attrValue)); + att->SetSymbol(att->StrToSymbol(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFIDENT ) ) { AttStaffident *att = dynamic_cast(element); + assert( att ); if (attrType == "staff") { att->SetStaff(att->StrToInt(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFLOC ) ) { AttStaffloc *att = dynamic_cast(element); + assert( att ); if (attrType == "loc") { att->SetLoc(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFLOCPITCHED ) ) { AttStafflocPitched *att = dynamic_cast(element); + assert( att ); if (attrType == "ploc") { att->SetPloc(att->StrToPitchName(attrValue)); return true; @@ -7978,22 +8081,25 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STARTENDID ) ) { AttStartendid *att = dynamic_cast(element); + assert( att ); if (attrType == "endid") { att->SetEndid(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STARTID ) ) { AttStartid *att = dynamic_cast(element); + assert( att ); if (attrType == "startid") { att->SetStartid(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STEMMED ) ) { AttStemmed *att = dynamic_cast(element); + assert( att ); if (attrType == "stemDir") { att->SetStemDir(att->StrToStemDirection(attrValue)); return true; @@ -8015,8 +8121,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SYLLOG ) ) { AttSylLog *att = dynamic_cast(element); + assert( att ); if (attrType == "con") { att->SetCon(att->StrToCon(attrValue)); return true; @@ -8026,15 +8133,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SYLTEXT ) ) { AttSyltext *att = dynamic_cast(element); + assert( att ); if (attrType == "syl") { att->SetSyl(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TEXTSTYLE ) ) { AttTextstyle *att = dynamic_cast(element); + assert( att ); if (attrType == "textFam") { att->SetTextFam(att->StrToStr(attrValue)); return true; @@ -8056,22 +8165,25 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIEPRESENT ) ) { AttTiepresent *att = dynamic_cast(element); + assert( att ); if (attrType == "tie") { att->SetTie(att->StrToTie(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMESTAMPMUSICAL ) ) { AttTimestampMusical *att = dynamic_cast(element); + assert( att ); if (attrType == "tstamp") { att->SetTstamp(att->StrToDbl(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMESTAMPPERFORMED ) ) { AttTimestampPerformed *att = dynamic_cast(element); + assert( att ); if (attrType == "tstampGesInt") { att->SetTstampGes(att->StrToInt(attrValue)); return true; @@ -8081,15 +8193,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMESTAMP2MUSICAL ) ) { AttTimestamp2Musical *att = dynamic_cast(element); + assert( att ); if (attrType == "tstamp2") { att->SetTstamp2(att->StrToTstamp2(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TRANSPOSITION ) ) { AttTransposition *att = dynamic_cast(element); + assert( att ); if (attrType == "transDiatDbl") { att->SetTransDiat(att->StrToDbl(attrValue)); return true; @@ -8099,15 +8213,17 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TUPLETPRESENT ) ) { AttTupletpresent *att = dynamic_cast(element); + assert( att ); if (attrType == "tuplet") { att->SetTuplet(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TYPED ) ) { AttTyped *att = dynamic_cast(element); + assert( att ); if (attrType == "type") { att->SetType(att->StrToStr(attrValue)); return true; @@ -8117,8 +8233,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TYPOGRAPHY ) ) { AttTypography *att = dynamic_cast(element); + assert( att ); if (attrType == "fontfam") { att->SetFontfam(att->StrToStr(attrValue)); return true; @@ -8140,36 +8257,41 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISIBILITY ) ) { AttVisibility *att = dynamic_cast(element); + assert( att ); if (attrType == "visible") { att->SetVisible(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSETHO ) ) { AttVisualoffsetHo *att = dynamic_cast(element); + assert( att ); if (attrType == "ho") { att->SetHo(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSETTO ) ) { AttVisualoffsetTo *att = dynamic_cast(element); + assert( att ); if (attrType == "to") { att->SetTo(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSETVO ) ) { AttVisualoffsetVo *att = dynamic_cast(element); + assert( att ); if (attrType == "vo") { att->SetVo(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSET2HO ) ) { AttVisualoffset2Ho *att = dynamic_cast(element); + assert( att ); if (attrType == "startho") { att->SetStartho(att->StrToStr(attrValue)); return true; @@ -8179,8 +8301,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSET2TO ) ) { AttVisualoffset2To *att = dynamic_cast(element); + assert( att ); if (attrType == "startto") { att->SetStartto(att->StrToStr(attrValue)); return true; @@ -8190,8 +8313,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSET2VO ) ) { AttVisualoffset2Vo *att = dynamic_cast(element); + assert( att ); if (attrType == "startvo") { att->SetStartvo(att->StrToStr(attrValue)); return true; @@ -8201,22 +8325,25 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_WHITESPACE ) ) { AttWhitespace *att = dynamic_cast(element); + assert( att ); if (attrType == "space") { att->SetSpace(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_WIDTH ) ) { AttWidth *att = dynamic_cast(element); + assert( att ); if (attrType == "width") { att->SetWidth(att->StrToStr(attrValue)); return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_XY ) ) { AttXy *att = dynamic_cast(element); + assert( att ); if (attrType == "xDbl") { att->SetX(att->StrToDbl(attrValue)); return true; @@ -8226,8 +8353,9 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_XY2 ) ) { AttXy2 *att = dynamic_cast(element); + assert( att ); if (attrType == "x2Dbl") { att->SetX2(att->StrToDbl(attrValue)); return true; @@ -8242,50 +8370,58 @@ bool Att::SetShared( Object *element, std::string attrType, std::string attrValu } void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ACCIDLOG ) ) { AttAccidLog *att = dynamic_cast(element); + assert( att ); if (att->HasFunc()) { attributes->push_back(std::make_pair("func", att->FuncToStr(att->GetFunc()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ACCIDENTAL ) ) { AttAccidental *att = dynamic_cast(element); + assert( att ); if (att->HasAccid()) { attributes->push_back(std::make_pair("accid", att->AccidentalExplicitToStr(att->GetAccid()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ACCIDENTALPERFORMED ) ) { AttAccidentalPerformed *att = dynamic_cast(element); + assert( att ); if (att->HasAccidGes()) { attributes->push_back(std::make_pair("accidGes", att->StrToStr(att->GetAccidGes()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ALTSYM ) ) { AttAltsym *att = dynamic_cast(element); + assert( att ); if (att->HasAltsym()) { attributes->push_back(std::make_pair("altsym", att->StrToStr(att->GetAltsym()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARTICULATION ) ) { AttArticulation *att = dynamic_cast(element); + assert( att ); if (att->HasArtic()) { attributes->push_back(std::make_pair("artic", att->StrToStr(att->GetArtic()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ARTICULATIONPERFORMED ) ) { AttArticulationPerformed *att = dynamic_cast(element); + assert( att ); if (att->HasArticGes()) { attributes->push_back(std::make_pair("articGes", att->StrToStr(att->GetArticGes()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_AUGMENTDOTS ) ) { AttAugmentdots *att = dynamic_cast(element); + assert( att ); if (att->HasDots()) { attributes->push_back(std::make_pair("dots", att->IntToStr(att->GetDots()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_AUTHORIZED ) ) { AttAuthorized *att = dynamic_cast(element); + assert( att ); if (att->HasAuthority()) { attributes->push_back(std::make_pair("authority", att->StrToStr(att->GetAuthority()))); } @@ -8293,14 +8429,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("authURI", att->StrToStr(att->GetAuthURI()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BARLINELOG ) ) { AttBarLineLog *att = dynamic_cast(element); + assert( att ); if (att->HasRend()) { attributes->push_back(std::make_pair("rend", att->BarRenditionToStr(att->GetRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BARPLACEMENT ) ) { AttBarplacement *att = dynamic_cast(element); + assert( att ); if (att->HasBarplace()) { attributes->push_back(std::make_pair("barplace", att->StrToStr(att->GetBarplace()))); } @@ -8308,8 +8446,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("taktplace", att->StrToStr(att->GetTaktplace()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BEAMINGVIS ) ) { AttBeamingVis *att = dynamic_cast(element); + assert( att ); if (att->HasBeamColor()) { attributes->push_back(std::make_pair("beamColor", att->StrToStr(att->GetBeamColor()))); } @@ -8320,38 +8459,44 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("beamSlopeDbl", att->DblToStr(att->GetBeamSlope()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_BIBL ) ) { AttBibl *att = dynamic_cast(element); + assert( att ); if (att->HasAnalog()) { attributes->push_back(std::make_pair("analog", att->StrToStr(att->GetAnalog()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CALENDARED ) ) { AttCalendared *att = dynamic_cast(element); + assert( att ); if (att->HasCalendar()) { attributes->push_back(std::make_pair("calendar", att->StrToStr(att->GetCalendar()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CANONICAL ) ) { AttCanonical *att = dynamic_cast(element); + assert( att ); if (att->HasDbkey()) { attributes->push_back(std::make_pair("dbkey", att->StrToStr(att->GetDbkey()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CHORDVIS ) ) { AttChordVis *att = dynamic_cast(element); + assert( att ); if (att->HasCluster()) { attributes->push_back(std::make_pair("cluster", att->StrToStr(att->GetCluster()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFLOG ) ) { AttClefLog *att = dynamic_cast(element); + assert( att ); if (att->HasCautionary()) { attributes->push_back(std::make_pair("cautionary", att->StrToStr(att->GetCautionary()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFFINGLOG ) ) { AttCleffingLog *att = dynamic_cast(element); + assert( att ); if (att->HasClefShape()) { attributes->push_back(std::make_pair("clefShape", att->ClefShapeToStr(att->GetClefShape()))); } @@ -8365,8 +8510,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("clefDisPlace", att->PlaceToStr(att->GetClefDisPlace()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFFINGVIS ) ) { AttCleffingVis *att = dynamic_cast(element); + assert( att ); if (att->HasClefColor()) { attributes->push_back(std::make_pair("clefColor", att->StrToStr(att->GetClefColor()))); } @@ -8374,32 +8520,37 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("clefVisible", att->StrToStr(att->GetClefVisible()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CLEFSHAPE ) ) { AttClefshape *att = dynamic_cast(element); + assert( att ); if (att->HasShape()) { attributes->push_back(std::make_pair("shape", att->ClefShapeToStr(att->GetShape()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CODED ) ) { AttCoded *att = dynamic_cast(element); + assert( att ); if (att->HasCode()) { attributes->push_back(std::make_pair("code", att->StrToStr(att->GetCode()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COLOR ) ) { AttColor *att = dynamic_cast(element); + assert( att ); if (att->HasColor()) { attributes->push_back(std::make_pair("color", att->StrToStr(att->GetColor()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COLORATION ) ) { AttColoration *att = dynamic_cast(element); + assert( att ); if (att->HasColored()) { attributes->push_back(std::make_pair("colored", att->BoolToStr(att->GetColored()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COMMON ) ) { AttCommon *att = dynamic_cast(element); + assert( att ); if (att->HasLabel()) { attributes->push_back(std::make_pair("label", att->StrToStr(att->GetLabel()))); } @@ -8410,8 +8561,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("base", att->StrToStr(att->GetBase()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_COORDINATED ) ) { AttCoordinated *att = dynamic_cast(element); + assert( att ); if (att->HasUlx()) { attributes->push_back(std::make_pair("ulxInt", att->IntToStr(att->GetUlx()))); } @@ -8425,32 +8577,36 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("lryInt", att->IntToStr(att->GetLry()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CURVATURE ) ) { AttCurvature *att = dynamic_cast(element); + assert( att ); if (att->HasBezier()) { attributes->push_back(std::make_pair("bezier", att->StrToStr(att->GetBezier()))); } if (att->HasBulge()) { - attributes->push_back(std::make_pair("bulge", att->StrToStr(att->GetBulge()))); + attributes->push_back(std::make_pair("bulge", att->DblToStr(att->GetBulge()))); } if (att->HasCurvedir()) { - attributes->push_back(std::make_pair("curvedir", att->StrToStr(att->GetCurvedir()))); + attributes->push_back(std::make_pair("curvedir", att->CurvedirToStr(att->GetCurvedir()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CURVEREND ) ) { AttCurverend *att = dynamic_cast(element); + assert( att ); if (att->HasRend()) { attributes->push_back(std::make_pair("rend", att->BarRenditionToStr(att->GetRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_CUSTOSLOG ) ) { AttCustosLog *att = dynamic_cast(element); + assert( att ); if (att->HasTarget()) { attributes->push_back(std::make_pair("target", att->StrToStr(att->GetTarget()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DATABLE ) ) { AttDatable *att = dynamic_cast(element); + assert( att ); if (att->HasEnddate()) { attributes->push_back(std::make_pair("enddate", att->StrToStr(att->GetEnddate()))); } @@ -8467,20 +8623,23 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("startdate", att->StrToStr(att->GetStartdate()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DATAPOINTING ) ) { AttDatapointing *att = dynamic_cast(element); + assert( att ); if (att->HasData()) { attributes->push_back(std::make_pair("data", att->StrToStr(att->GetData()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DECLARING ) ) { AttDeclaring *att = dynamic_cast(element); + assert( att ); if (att->HasDecls()) { attributes->push_back(std::make_pair("decls", att->StrToStr(att->GetDecls()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DISTANCES ) ) { AttDistances *att = dynamic_cast(element); + assert( att ); if (att->HasDynamDist()) { attributes->push_back(std::make_pair("dynamDist", att->StrToStr(att->GetDynamDist()))); } @@ -8491,20 +8650,23 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("textDist", att->StrToStr(att->GetTextDist()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DOTLOG ) ) { AttDotLog *att = dynamic_cast(element); + assert( att ); if (att->HasForm()) { attributes->push_back(std::make_pair("form", att->StrToStr(att->GetForm()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONADDITIVE ) ) { AttDurationAdditive *att = dynamic_cast(element); + assert( att ); if (att->HasDur()) { attributes->push_back(std::make_pair("dur", att->DurToStr(att->GetDur()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONDEFAULT ) ) { AttDurationDefault *att = dynamic_cast(element); + assert( att ); if (att->HasDurDefault()) { attributes->push_back(std::make_pair("durDefault", att->StrToStr(att->GetDurDefault()))); } @@ -8515,20 +8677,23 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("numbaseDefaultInt", att->IntToStr(att->GetNumbaseDefault()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONMUSICAL ) ) { AttDurationMusical *att = dynamic_cast(element); + assert( att ); if (att->HasDur()) { attributes->push_back(std::make_pair("dur", att->DurToStr(att->GetDur()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONPERFORMED ) ) { AttDurationPerformed *att = dynamic_cast(element); + assert( att ); if (att->HasDurGes()) { attributes->push_back(std::make_pair("durGes", att->DurToStr(att->GetDurGes()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_DURATIONRATIO ) ) { AttDurationRatio *att = dynamic_cast(element); + assert( att ); if (att->HasNum()) { attributes->push_back(std::make_pair("num", att->IntToStr(att->GetNum()))); } @@ -8536,56 +8701,65 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("numbase", att->IntToStr(att->GetNumbase()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ENCLOSINGCHARS ) ) { AttEnclosingchars *att = dynamic_cast(element); + assert( att ); if (att->HasEnclose()) { attributes->push_back(std::make_pair("enclose", att->StrToStr(att->GetEnclose()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_FERMATAPRESENT ) ) { AttFermatapresent *att = dynamic_cast(element); + assert( att ); if (att->HasFermata()) { attributes->push_back(std::make_pair("fermata", att->PlaceToStr(att->GetFermata()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HANDIDENT ) ) { AttHandident *att = dynamic_cast(element); + assert( att ); if (att->HasHand()) { attributes->push_back(std::make_pair("hand", att->StrToStr(att->GetHand()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_HORIZONTALALIGN ) ) { AttHorizontalalign *att = dynamic_cast(element); + assert( att ); if (att->HasHalign()) { attributes->push_back(std::make_pair("halign", att->StrToStr(att->GetHalign()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INSTRUMENTIDENT ) ) { AttInstrumentident *att = dynamic_cast(element); + assert( att ); if (att->HasInstr()) { attributes->push_back(std::make_pair("instr", att->StrToStr(att->GetInstr()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_INTERNETMEDIA ) ) { AttInternetmedia *att = dynamic_cast(element); + assert( att ); if (att->HasMimetype()) { attributes->push_back(std::make_pair("mimetype", att->StrToStr(att->GetMimetype()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_JOINED ) ) { AttJoined *att = dynamic_cast(element); + assert( att ); if (att->HasJoin()) { attributes->push_back(std::make_pair("join", att->StrToStr(att->GetJoin()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_KEYSIGLOG ) ) { AttKeySigLog *att = dynamic_cast(element); + assert( att ); if (att->HasMode()) { attributes->push_back(std::make_pair("mode", att->StrToStr(att->GetMode()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_KEYSIGDEFAULTLOG ) ) { AttKeySigDefaultLog *att = dynamic_cast(element); + assert( att ); if (att->HasKeyAccid()) { attributes->push_back(std::make_pair("keyAccid", att->AccidentalImplicitToStr(att->GetKeyAccid()))); } @@ -8602,53 +8776,61 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("keySigMixed", att->StrToStr(att->GetKeySigMixed()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_KEYSIGDEFAULTVIS ) ) { AttKeySigDefaultVis *att = dynamic_cast(element); + assert( att ); if (att->HasKeySigShow()) { - attributes->push_back(std::make_pair("keySigShow", att->StrToStr(att->GetKeySigShow()))); + attributes->push_back(std::make_pair("keySigShow", att->BoolToStr(att->GetKeySigShow()))); } if (att->HasKeySigShowchange()) { - attributes->push_back(std::make_pair("keySigShowchange", att->StrToStr(att->GetKeySigShowchange()))); + attributes->push_back(std::make_pair("keySigShowchange", att->BoolToStr(att->GetKeySigShowchange()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LABELSADDL ) ) { AttLabelsAddl *att = dynamic_cast(element); + assert( att ); if (att->HasLabelAbbr()) { attributes->push_back(std::make_pair("labelAbbr", att->StrToStr(att->GetLabelAbbr()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LANG ) ) { AttLang *att = dynamic_cast(element); + assert( att ); if (att->HasLang()) { attributes->push_back(std::make_pair("lang", att->StrToStr(att->GetLang()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LAYERLOG ) ) { AttLayerLog *att = dynamic_cast(element); + assert( att ); if (att->HasDef()) { attributes->push_back(std::make_pair("def", att->StrToStr(att->GetDef()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LAYERIDENT ) ) { AttLayerident *att = dynamic_cast(element); + assert( att ); if (att->HasLayer()) { attributes->push_back(std::make_pair("layer", att->StrToStr(att->GetLayer()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LINELOC ) ) { AttLineloc *att = dynamic_cast(element); + assert( att ); if (att->HasLine()) { attributes->push_back(std::make_pair("line", att->IntToStr(att->GetLine()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LINEREND ) ) { AttLinerend *att = dynamic_cast(element); + assert( att ); if (att->HasRend()) { attributes->push_back(std::make_pair("rend", att->BarRenditionToStr(att->GetRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_LYRICSTYLE ) ) { AttLyricstyle *att = dynamic_cast(element); + assert( att ); if (att->HasLyricAlign()) { attributes->push_back(std::make_pair("lyricAlign", att->StrToStr(att->GetLyricAlign()))); } @@ -8668,8 +8850,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("lyricWeight", att->StrToStr(att->GetLyricWeight()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEASURELOG ) ) { AttMeasureLog *att = dynamic_cast(element); + assert( att ); if (att->HasLeft()) { attributes->push_back(std::make_pair("left", att->BarRenditionToStr(att->GetLeft()))); } @@ -8677,14 +8860,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("right", att->BarRenditionToStr(att->GetRight()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEASUREMENT ) ) { AttMeasurement *att = dynamic_cast(element); + assert( att ); if (att->HasUnit()) { attributes->push_back(std::make_pair("unit", att->IntToStr(att->GetUnit()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEDIABOUNDS ) ) { AttMediabounds *att = dynamic_cast(element); + assert( att ); if (att->HasBegin()) { attributes->push_back(std::make_pair("begin", att->StrToStr(att->GetBegin()))); } @@ -8695,14 +8880,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("betype", att->StrToStr(att->GetBetype()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEDIUM ) ) { AttMedium *att = dynamic_cast(element); + assert( att ); if (att->HasMedium()) { attributes->push_back(std::make_pair("medium", att->StrToStr(att->GetMedium()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MEIVERSION ) ) { AttMeiversion *att = dynamic_cast(element); + assert( att ); if (att->HasMeiversion()) { attributes->push_back(std::make_pair("meiversion", att->StrToStr(att->GetMeiversion()))); } @@ -8710,8 +8897,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("meiversionNum", att->StrToStr(att->GetMeiversionNum()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MENSURLOG ) ) { AttMensurLog *att = dynamic_cast(element); + assert( att ); if (att->HasDot()) { attributes->push_back(std::make_pair("dot", att->BoolToStr(att->GetDot()))); } @@ -8719,8 +8907,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("sign", att->MensurationSignToStr(att->GetSign()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGLOG ) ) { AttMeterSigLog *att = dynamic_cast(element); + assert( att ); if (att->HasCount()) { attributes->push_back(std::make_pair("count", att->IntToStr(att->GetCount()))); } @@ -8731,14 +8920,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("unit", att->IntToStr(att->GetUnit()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGVIS ) ) { AttMeterSigVis *att = dynamic_cast(element); + assert( att ); if (att->HasRend()) { attributes->push_back(std::make_pair("rend", att->BarRenditionToStr(att->GetRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGDEFAULTLOG ) ) { AttMeterSigDefaultLog *att = dynamic_cast(element); + assert( att ); if (att->HasMeterCount()) { attributes->push_back(std::make_pair("meterCount", att->IntToStr(att->GetMeterCount()))); } @@ -8746,8 +8937,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("meterUnit", att->IntToStr(att->GetMeterUnit()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERSIGDEFAULTVIS ) ) { AttMeterSigDefaultVis *att = dynamic_cast(element); + assert( att ); if (att->HasMeterRend()) { attributes->push_back(std::make_pair("meterRend", att->StrToStr(att->GetMeterRend()))); } @@ -8758,14 +8950,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("meterSym", att->MeterSignToStr(att->GetMeterSym()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERCONFORMANCE ) ) { AttMeterconformance *att = dynamic_cast(element); + assert( att ); if (att->HasMetcon()) { attributes->push_back(std::make_pair("metcon", att->StrToStr(att->GetMetcon()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_METERCONFORMANCEBAR ) ) { AttMeterconformanceBar *att = dynamic_cast(element); + assert( att ); if (att->HasMetcon()) { attributes->push_back(std::make_pair("metcon", att->StrToStr(att->GetMetcon()))); } @@ -8773,8 +8967,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("control", att->StrToStr(att->GetControl()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MMTEMPO ) ) { AttMmtempo *att = dynamic_cast(element); + assert( att ); if (att->HasMm()) { attributes->push_back(std::make_pair("mm", att->StrToStr(att->GetMm()))); } @@ -8785,14 +8980,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("mmDots", att->StrToStr(att->GetMmDots()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_MULTINUMMEASURES ) ) { AttMultinummeasures *att = dynamic_cast(element); + assert( att ); if (att->HasMultiNumber()) { - attributes->push_back(std::make_pair("multiNumber", att->StrToStr(att->GetMultiNumber()))); + attributes->push_back(std::make_pair("multiNumber", att->BoolToStr(att->GetMultiNumber()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NAME ) ) { AttName *att = dynamic_cast(element); + assert( att ); if (att->HasNymref()) { attributes->push_back(std::make_pair("nymref", att->StrToStr(att->GetNymref()))); } @@ -8800,8 +8997,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("role", att->StrToStr(att->GetRole()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEGES ) ) { AttNoteGes *att = dynamic_cast(element); + assert( att ); if (att->HasOctGes()) { attributes->push_back(std::make_pair("octGes", att->StrToStr(att->GetOctGes()))); } @@ -8812,26 +9010,30 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("pnum", att->StrToStr(att->GetPnum()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEVIS ) ) { AttNoteVis *att = dynamic_cast(element); + assert( att ); if (att->HasHeadshape()) { attributes->push_back(std::make_pair("headshape", att->StrToStr(att->GetHeadshape()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVE ) ) { AttOctave *att = dynamic_cast(element); + assert( att ); if (att->HasOct()) { attributes->push_back(std::make_pair("oct", att->IntToStr(att->GetOct()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVEDEFAULT ) ) { AttOctavedefault *att = dynamic_cast(element); + assert( att ); if (att->HasOctaveDefault()) { attributes->push_back(std::make_pair("octaveDefault", att->StrToStr(att->GetOctaveDefault()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_OCTAVEDISPLACEMENT ) ) { AttOctavedisplacement *att = dynamic_cast(element); + assert( att ); if (att->HasDis()) { attributes->push_back(std::make_pair("dis", att->OctaveDisToStr(att->GetDis()))); } @@ -8839,38 +9041,44 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("disPlace", att->PlaceToStr(att->GetDisPlace()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_ONELINESTAFF ) ) { AttOnelinestaff *att = dynamic_cast(element); + assert( att ); if (att->HasOntheline()) { attributes->push_back(std::make_pair("ontheline", att->StrToStr(att->GetOntheline()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PADLOG ) ) { AttPadLog *att = dynamic_cast(element); + assert( att ); if (att->HasNum()) { attributes->push_back(std::make_pair("num", att->IntToStr(att->GetNum()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PBVIS ) ) { AttPbVis *att = dynamic_cast(element); + assert( att ); if (att->HasFunc()) { attributes->push_back(std::make_pair("func", att->FuncToStr(att->GetFunc()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PITCH ) ) { AttPitch *att = dynamic_cast(element); + assert( att ); if (att->HasPname()) { attributes->push_back(std::make_pair("pname", att->PitchNameToStr(att->GetPname()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PLACEMENT ) ) { AttPlacement *att = dynamic_cast(element); + assert( att ); if (att->HasPlace()) { - attributes->push_back(std::make_pair("place", att->StrToStr(att->GetPlace()))); + attributes->push_back(std::make_pair("place", att->StaffRelToStr(att->GetPlace()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_PLIST ) ) { AttPlist *att = dynamic_cast(element); + assert( att ); if (att->HasPlist()) { attributes->push_back(std::make_pair("plist", att->StrToStr(att->GetPlist()))); } @@ -8878,8 +9086,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("evaluate", att->StrToStr(att->GetEvaluate()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_POINTING ) ) { AttPointing *att = dynamic_cast(element); + assert( att ); if (att->HasActuate()) { attributes->push_back(std::make_pair("actuate", att->StrToStr(att->GetActuate()))); } @@ -8899,32 +9108,37 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("title", att->StrToStr(att->GetTitle()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_RELATIVESIZE ) ) { AttRelativesize *att = dynamic_cast(element); + assert( att ); if (att->HasSize()) { attributes->push_back(std::make_pair("size", att->StrToStr(att->GetSize()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_RESPONSIBILITY ) ) { AttResponsibility *att = dynamic_cast(element); + assert( att ); if (att->HasResp()) { attributes->push_back(std::make_pair("resp", att->StrToStr(att->GetResp()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SBVIS ) ) { AttSbVis *att = dynamic_cast(element); + assert( att ); if (att->HasRend()) { attributes->push_back(std::make_pair("rend", att->BarRenditionToStr(att->GetRend()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCALABLE ) ) { AttScalable *att = dynamic_cast(element); + assert( att ); if (att->HasScale()) { - attributes->push_back(std::make_pair("scale", att->StrToStr(att->GetScale()))); + attributes->push_back(std::make_pair("scale", att->PercentToStr(att->GetScale()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCOREDEFGES ) ) { AttScoreDefGes *att = dynamic_cast(element); + assert( att ); if (att->HasTunePname()) { attributes->push_back(std::make_pair("tunePname", att->StrToStr(att->GetTunePname()))); } @@ -8935,8 +9149,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("tuneTemper", att->StrToStr(att->GetTuneTemper()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SCOREDEFVIS ) ) { AttScoreDefVis *att = dynamic_cast(element); + assert( att ); if (att->HasEndingRend()) { attributes->push_back(std::make_pair("endingRend", att->StrToStr(att->GetEndingRend()))); } @@ -9001,44 +9216,51 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("vuHeight", att->StrToStr(att->GetVuHeight()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SECTIONVIS ) ) { AttSectionVis *att = dynamic_cast(element); + assert( att ); if (att->HasRestart()) { attributes->push_back(std::make_pair("restart", att->StrToStr(att->GetRestart()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SEQUENCE ) ) { AttSequence *att = dynamic_cast(element); + assert( att ); if (att->HasSeq()) { attributes->push_back(std::make_pair("seqInt", att->IntToStr(att->GetSeq()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SLASHCOUNT ) ) { AttSlashcount *att = dynamic_cast(element); + assert( att ); if (att->HasSlash()) { attributes->push_back(std::make_pair("slash", att->IntToStr(att->GetSlash()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SLURPRESENT ) ) { AttSlurpresent *att = dynamic_cast(element); + assert( att ); if (att->HasSlur()) { attributes->push_back(std::make_pair("slur", att->StrToStr(att->GetSlur()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SPACEVIS ) ) { AttSpaceVis *att = dynamic_cast(element); + assert( att ); if (att->HasCompressable()) { attributes->push_back(std::make_pair("compressable", att->StrToStr(att->GetCompressable()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFLOG ) ) { AttStaffLog *att = dynamic_cast(element); + assert( att ); if (att->HasDef()) { attributes->push_back(std::make_pair("def", att->StrToStr(att->GetDef()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFDEFVIS ) ) { AttStaffDefVis *att = dynamic_cast(element); + assert( att ); if (att->HasGridShow()) { attributes->push_back(std::make_pair("gridShow", att->BoolToStr(att->GetGridShow()))); } @@ -9058,32 +9280,37 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("spacing", att->StrToStr(att->GetSpacing()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFGRPVIS ) ) { AttStaffGrpVis *att = dynamic_cast(element); + assert( att ); if (att->HasBarthru()) { - attributes->push_back(std::make_pair("barthru", att->StrToStr(att->GetBarthru()))); + attributes->push_back(std::make_pair("barthru", att->BoolToStr(att->GetBarthru()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFGROUPINGSYM ) ) { AttStaffgroupingsym *att = dynamic_cast(element); + assert( att ); if (att->HasSymbol()) { - attributes->push_back(std::make_pair("symbol", att->StrToStr(att->GetSymbol()))); + attributes->push_back(std::make_pair("symbol", att->SymbolToStr(att->GetSymbol()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFIDENT ) ) { AttStaffident *att = dynamic_cast(element); + assert( att ); if (att->HasStaff()) { attributes->push_back(std::make_pair("staff", att->IntToStr(att->GetStaff()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFLOC ) ) { AttStaffloc *att = dynamic_cast(element); + assert( att ); if (att->HasLoc()) { attributes->push_back(std::make_pair("loc", att->StrToStr(att->GetLoc()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFLOCPITCHED ) ) { AttStafflocPitched *att = dynamic_cast(element); + assert( att ); if (att->HasPloc()) { attributes->push_back(std::make_pair("ploc", att->PitchNameToStr(att->GetPloc()))); } @@ -9091,20 +9318,23 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("oloc", att->IntToStr(att->GetOloc()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STARTENDID ) ) { AttStartendid *att = dynamic_cast(element); + assert( att ); if (att->HasEndid()) { attributes->push_back(std::make_pair("endid", att->StrToStr(att->GetEndid()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STARTID ) ) { AttStartid *att = dynamic_cast(element); + assert( att ); if (att->HasStartid()) { attributes->push_back(std::make_pair("startid", att->StrToStr(att->GetStartid()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STEMMED ) ) { AttStemmed *att = dynamic_cast(element); + assert( att ); if (att->HasStemDir()) { attributes->push_back(std::make_pair("stemDir", att->StemDirectionToStr(att->GetStemDir()))); } @@ -9121,8 +9351,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("stemY", att->IntToStr(att->GetStemY()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SYLLOG ) ) { AttSylLog *att = dynamic_cast(element); + assert( att ); if (att->HasCon()) { attributes->push_back(std::make_pair("con", att->ConToStr(att->GetCon()))); } @@ -9130,14 +9361,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("wordpos", att->WordPosToStr(att->GetWordpos()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_SYLTEXT ) ) { AttSyltext *att = dynamic_cast(element); + assert( att ); if (att->HasSyl()) { attributes->push_back(std::make_pair("syl", att->StrToStr(att->GetSyl()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TEXTSTYLE ) ) { AttTextstyle *att = dynamic_cast(element); + assert( att ); if (att->HasTextFam()) { attributes->push_back(std::make_pair("textFam", att->StrToStr(att->GetTextFam()))); } @@ -9154,20 +9387,23 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("textWeight", att->StrToStr(att->GetTextWeight()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIEPRESENT ) ) { AttTiepresent *att = dynamic_cast(element); + assert( att ); if (att->HasTie()) { attributes->push_back(std::make_pair("tie", att->TieToStr(att->GetTie()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMESTAMPMUSICAL ) ) { AttTimestampMusical *att = dynamic_cast(element); + assert( att ); if (att->HasTstamp()) { attributes->push_back(std::make_pair("tstamp", att->DblToStr(att->GetTstamp()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMESTAMPPERFORMED ) ) { AttTimestampPerformed *att = dynamic_cast(element); + assert( att ); if (att->HasTstampGes()) { attributes->push_back(std::make_pair("tstampGesInt", att->IntToStr(att->GetTstampGes()))); } @@ -9175,14 +9411,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("tstampReal", att->StrToStr(att->GetTstampReal()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TIMESTAMP2MUSICAL ) ) { AttTimestamp2Musical *att = dynamic_cast(element); + assert( att ); if (att->HasTstamp2()) { attributes->push_back(std::make_pair("tstamp2", att->Tstamp2ToStr(att->GetTstamp2()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TRANSPOSITION ) ) { AttTransposition *att = dynamic_cast(element); + assert( att ); if (att->HasTransDiat()) { attributes->push_back(std::make_pair("transDiatDbl", att->DblToStr(att->GetTransDiat()))); } @@ -9190,14 +9428,16 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("transSemiDbl", att->DblToStr(att->GetTransSemi()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TUPLETPRESENT ) ) { AttTupletpresent *att = dynamic_cast(element); + assert( att ); if (att->HasTuplet()) { attributes->push_back(std::make_pair("tuplet", att->StrToStr(att->GetTuplet()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TYPED ) ) { AttTyped *att = dynamic_cast(element); + assert( att ); if (att->HasType()) { attributes->push_back(std::make_pair("type", att->StrToStr(att->GetType()))); } @@ -9205,8 +9445,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("subtype", att->StrToStr(att->GetSubtype()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_TYPOGRAPHY ) ) { AttTypography *att = dynamic_cast(element); + assert( att ); if (att->HasFontfam()) { attributes->push_back(std::make_pair("fontfam", att->StrToStr(att->GetFontfam()))); } @@ -9223,32 +9464,37 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("fontweight", att->FontweightToStr(att->GetFontweight()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISIBILITY ) ) { AttVisibility *att = dynamic_cast(element); + assert( att ); if (att->HasVisible()) { attributes->push_back(std::make_pair("visible", att->StrToStr(att->GetVisible()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSETHO ) ) { AttVisualoffsetHo *att = dynamic_cast(element); + assert( att ); if (att->HasHo()) { attributes->push_back(std::make_pair("ho", att->StrToStr(att->GetHo()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSETTO ) ) { AttVisualoffsetTo *att = dynamic_cast(element); + assert( att ); if (att->HasTo()) { attributes->push_back(std::make_pair("to", att->StrToStr(att->GetTo()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSETVO ) ) { AttVisualoffsetVo *att = dynamic_cast(element); + assert( att ); if (att->HasVo()) { attributes->push_back(std::make_pair("vo", att->StrToStr(att->GetVo()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSET2HO ) ) { AttVisualoffset2Ho *att = dynamic_cast(element); + assert( att ); if (att->HasStartho()) { attributes->push_back(std::make_pair("startho", att->StrToStr(att->GetStartho()))); } @@ -9256,8 +9502,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("endho", att->StrToStr(att->GetEndho()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSET2TO ) ) { AttVisualoffset2To *att = dynamic_cast(element); + assert( att ); if (att->HasStartto()) { attributes->push_back(std::make_pair("startto", att->StrToStr(att->GetStartto()))); } @@ -9265,8 +9512,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("endto", att->StrToStr(att->GetEndto()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_VISUALOFFSET2VO ) ) { AttVisualoffset2Vo *att = dynamic_cast(element); + assert( att ); if (att->HasStartvo()) { attributes->push_back(std::make_pair("startvo", att->StrToStr(att->GetStartvo()))); } @@ -9274,20 +9522,23 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("endvo", att->StrToStr(att->GetEndvo()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_WHITESPACE ) ) { AttWhitespace *att = dynamic_cast(element); + assert( att ); if (att->HasSpace()) { attributes->push_back(std::make_pair("space", att->StrToStr(att->GetSpace()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_WIDTH ) ) { AttWidth *att = dynamic_cast(element); + assert( att ); if (att->HasWidth()) { attributes->push_back(std::make_pair("width", att->StrToStr(att->GetWidth()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_XY ) ) { AttXy *att = dynamic_cast(element); + assert( att ); if (att->HasX()) { attributes->push_back(std::make_pair("xDbl", att->DblToStr(att->GetX()))); } @@ -9295,8 +9546,9 @@ void Att::GetShared( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("yDbl", att->DblToStr(att->GetY()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_XY2 ) ) { AttXy2 *att = dynamic_cast(element); + assert( att ); if (att->HasX2()) { attributes->push_back(std::make_pair("x2Dbl", att->DblToStr(att->GetX2()))); } diff --git a/libmei/atts_shared.h b/libmei/atts_shared.h index d6aa77368da..56368613edd 100644 --- a/libmei/atts_shared.h +++ b/libmei/atts_shared.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_SHARED_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- @@ -1117,13 +1118,13 @@ class AttCurvature: public Att bool HasBezier( ); // - void SetBulge(std::string bulge_) { m_bulge = bulge_; }; - std::string GetBulge() const { return m_bulge; }; + void SetBulge(double bulge_) { m_bulge = bulge_; }; + double GetBulge() const { return m_bulge; }; bool HasBulge( ); // - void SetCurvedir(std::string curvedir_) { m_curvedir = curvedir_; }; - std::string GetCurvedir() const { return m_curvedir; }; + void SetCurvedir(data_CURVEDIR curvedir_) { m_curvedir = curvedir_; }; + data_CURVEDIR GetCurvedir() const { return m_curvedir; }; bool HasCurvedir( ); ///@} @@ -1140,9 +1141,9 @@ class AttCurvature: public Att * The bulge attribute must contain one or more decimal values expressed in inter- * line units. **/ - std::string m_bulge; + double m_bulge; /** Describes a curve with a generic term indicating the direction of curvature. **/ - std::string m_curvedir; + data_CURVEDIR m_curvedir; /* include */ }; @@ -2145,22 +2146,22 @@ class AttKeySigDefaultVis: public Att * to the default value) **/ ///@{ - void SetKeySigShow(std::string keySigShow_) { m_keySigShow = keySigShow_; }; - std::string GetKeySigShow() const { return m_keySigShow; }; + void SetKeySigShow(data_BOOLEAN keySigShow_) { m_keySigShow = keySigShow_; }; + data_BOOLEAN GetKeySigShow() const { return m_keySigShow; }; bool HasKeySigShow( ); // - void SetKeySigShowchange(std::string keySigShowchange_) { m_keySigShowchange = keySigShowchange_; }; - std::string GetKeySigShowchange() const { return m_keySigShowchange; }; + void SetKeySigShowchange(data_BOOLEAN keySigShowchange_) { m_keySigShowchange = keySigShowchange_; }; + data_BOOLEAN GetKeySigShowchange() const { return m_keySigShowchange; }; bool HasKeySigShowchange( ); ///@} private: /** Indicates whether the key signature should be displayed. **/ - std::string m_keySigShow; + data_BOOLEAN m_keySigShow; /** Determines whether cautionary accidentals should be displayed at a key change. **/ - std::string m_keySigShowchange; + data_BOOLEAN m_keySigShowchange; /* include */ }; @@ -3138,8 +3139,8 @@ class AttMultinummeasures: public Att * to the default value) **/ ///@{ - void SetMultiNumber(std::string multiNumber_) { m_multiNumber = multiNumber_; }; - std::string GetMultiNumber() const { return m_multiNumber; }; + void SetMultiNumber(data_BOOLEAN multiNumber_) { m_multiNumber = multiNumber_; }; + data_BOOLEAN GetMultiNumber() const { return m_multiNumber; }; bool HasMultiNumber( ); ///@} @@ -3149,7 +3150,7 @@ class AttMultinummeasures: public Att * Indicates whether programmatically calculated counts of multiple measures of * rest (mRest) and whole measure repeats (mRpt) in parts should be rendered. **/ - std::string m_multiNumber; + data_BOOLEAN m_multiNumber; /* include */ }; @@ -3604,8 +3605,8 @@ class AttPlacement: public Att * to the default value) **/ ///@{ - void SetPlace(std::string place_) { m_place = place_; }; - std::string GetPlace() const { return m_place; }; + void SetPlace(data_STAFFREL place_) { m_place = place_; }; + data_STAFFREL GetPlace() const { return m_place; }; bool HasPlace( ); ///@} @@ -3615,7 +3616,7 @@ class AttPlacement: public Att * Captures the placement of the item with respect to the staff with which it is * associated. **/ - std::string m_place; + data_STAFFREL m_place; /* include */ }; @@ -3893,15 +3894,15 @@ class AttScalable: public Att * to the default value) **/ ///@{ - void SetScale(std::string scale_) { m_scale = scale_; }; - std::string GetScale() const { return m_scale; }; + void SetScale(data_PERCENT scale_) { m_scale = scale_; }; + data_PERCENT GetScale() const { return m_scale; }; bool HasScale( ); ///@} private: /** Scale factor to be applied to the feature to make it the desired display size. **/ - std::string m_scale; + data_PERCENT m_scale; /* include */ }; @@ -4515,8 +4516,8 @@ class AttStaffGrpVis: public Att * to the default value) **/ ///@{ - void SetBarthru(std::string barthru_) { m_barthru = barthru_; }; - std::string GetBarthru() const { return m_barthru; }; + void SetBarthru(data_BOOLEAN barthru_) { m_barthru = barthru_; }; + data_BOOLEAN GetBarthru() const { return m_barthru; }; bool HasBarthru( ); ///@} @@ -4526,7 +4527,7 @@ class AttStaffGrpVis: public Att * Indicates whether bar lines go across the space between staves (true) or are * only drawn across the lines of each staff (false). **/ - std::string m_barthru; + data_BOOLEAN m_barthru; /* include */ }; @@ -4556,15 +4557,15 @@ class AttStaffgroupingsym: public Att * to the default value) **/ ///@{ - void SetSymbol(std::string symbol_) { m_symbol = symbol_; }; - std::string GetSymbol() const { return m_symbol; }; + void SetSymbol(data_SYMBOL symbol_) { m_symbol = symbol_; }; + data_SYMBOL GetSymbol() const { return m_symbol; }; bool HasSymbol( ); ///@} private: /** Specifies the symbol used to group a set of staves. **/ - std::string m_symbol; + data_SYMBOL m_symbol; /* include */ }; diff --git a/libmei/atts_tablature.cpp b/libmei/atts_tablature.cpp index b41b51beac5..d53cbb0ea0d 100644 --- a/libmei/atts_tablature.cpp +++ b/libmei/atts_tablature.cpp @@ -16,6 +16,10 @@ //---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- + #include "object.h" /* #include_block */ @@ -124,8 +128,9 @@ bool AttStaffDefGesTablature::HasTabStrings( ) /* include */ bool Att::SetTablature( Object *element, std::string attrType, std::string attrValue ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEGESTABLATURE ) ) { AttNoteGesTablature *att = dynamic_cast(element); + assert( att ); if (attrType == "tabFret") { att->SetTabFret(att->StrToStr(attrValue)); return true; @@ -135,8 +140,9 @@ bool Att::SetTablature( Object *element, std::string attrType, std::string attrV return true; } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFDEFGESTABLATURE ) ) { AttStaffDefGesTablature *att = dynamic_cast(element); + assert( att ); if (attrType == "tabStrings") { att->SetTabStrings(att->StrToStr(attrValue)); return true; @@ -147,8 +153,9 @@ bool Att::SetTablature( Object *element, std::string attrType, std::string attrV } void Att::GetTablature( Object *element, ArrayOfStrAttr *attributes ) { - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_NOTEGESTABLATURE ) ) { AttNoteGesTablature *att = dynamic_cast(element); + assert( att ); if (att->HasTabFret()) { attributes->push_back(std::make_pair("tabFret", att->StrToStr(att->GetTabFret()))); } @@ -156,8 +163,9 @@ void Att::GetTablature( Object *element, ArrayOfStrAttr *attributes ) { attributes->push_back(std::make_pair("tabString", att->StrToStr(att->GetTabString()))); } } - if (dynamic_cast(element) ) { + if (element->HasAttClass( ATT_STAFFDEFGESTABLATURE ) ) { AttStaffDefGesTablature *att = dynamic_cast(element); + assert( att ); if (att->HasTabStrings()) { attributes->push_back(std::make_pair("tabStrings", att->StrToStr(att->GetTabStrings()))); } diff --git a/libmei/atts_tablature.h b/libmei/atts_tablature.h index 8e792d822e8..591299c79fa 100644 --- a/libmei/atts_tablature.h +++ b/libmei/atts_tablature.h @@ -16,6 +16,7 @@ #define __VRV_ATTS_TABLATURE_H__ #include "att.h" +#include "att_classes.h" #include "pugixml.hpp" //---------------------------------------------------------------------------- diff --git a/python/setup.py b/python/setup.py index 9e1f708dccc..86b5f285d7b 100755 --- a/python/setup.py +++ b/python/setup.py @@ -13,76 +13,83 @@ verovio_module = Extension('_verovio', - sources=['../src/accid.cpp', - '../src/aligner.cpp', - '../src/att.cpp', - '../src/barline.cpp', - '../src/bboxdevicecontext.cpp', - '../src/beam.cpp', - '../src/chord.cpp', - '../src/clef.cpp', - '../src/custos.cpp', - '../src/devicecontext.cpp', - '../src/doc.cpp', + sources=['../src/accid.cpp', + '../src/aligner.cpp', + '../src/att.cpp', + '../src/barline.cpp', + '../src/bboxdevicecontext.cpp', + '../src/beam.cpp', + '../src/chord.cpp', + '../src/clef.cpp', + '../src/custos.cpp', + '../src/devicecontext.cpp', + '../src/doc.cpp', '../src/dot.cpp', - '../src/drawinglistinterface.cpp', + '../src/drawinginterface.cpp', '../src/durationinterface.cpp', '../src/editorial.cpp', + '../src/floatingelement.cpp', '../src/glyph.cpp', - '../src/io.cpp', - '../src/iodarms.cpp', - '../src/iomei.cpp', - '../src/iopae.cpp', - '../src/iomusxml.cpp', - '../src/keysig.cpp', - '../src/layer.cpp', + '../src/io.cpp', + '../src/iodarms.cpp', + '../src/iomei.cpp', + '../src/iopae.cpp', + '../src/iomusxml.cpp', + '../src/keysig.cpp', + '../src/layer.cpp', '../src/layerelement.cpp', - '../src/mensur.cpp', + '../src/mensur.cpp', '../src/metersig.cpp', '../src/measure.cpp', - '../src/measureelement.cpp', - '../src/mrest.cpp', - '../src/multirest.cpp', - '../src/note.cpp', - '../src/object.cpp', - '../src/page.cpp', - '../src/pitchinterface.cpp', - '../src/positioninterface.cpp', - '../src/view.cpp', - '../src/view_beam.cpp', - '../src/view_element.cpp', - '../src/view_graph.cpp', - '../src/view_mensural.cpp', - '../src/view_page.cpp', - '../src/view_tuplet.cpp', - '../src/rest.cpp', - '../src/scoredef.cpp', + '../src/mrest.cpp', + '../src/multirest.cpp', + '../src/note.cpp', + '../src/object.cpp', + '../src/page.cpp', + '../src/pitchinterface.cpp', + '../src/positioninterface.cpp', + '../src/proport.cpp', + '../src/rest.cpp', + '../src/rpt.cpp', + '../src/scoredef.cpp', + '../src/scoredefinterface.cpp', '../src/slur.cpp', - '../src/space.cpp', + '../src/space.cpp', '../src/staff.cpp', '../src/style.cpp', - '../src/svgdevicecontext.cpp', - '../src/syl.cpp', - '../src/system.cpp', - '../src/tie.cpp', + '../src/svgdevicecontext.cpp', + '../src/syl.cpp', + '../src/system.cpp', + '../src/textdirective.cpp', + '../src/textdirinterface.cpp', + '../src/tie.cpp', '../src/timeinterface.cpp', + '../src/trem.cpp', '../src/toolkit.cpp', - '../src/tuplet.cpp', - '../src/verse.cpp', - '../src/vrv.cpp', - '../src/pugixml.cpp', - '../libmei/atts_shared.cpp', + '../src/tuplet.cpp', + '../src/verse.cpp', + '../src/view.cpp', + '../src/view_beam.cpp', + '../src/view_element.cpp', + '../src/view_floating.cpp', + '../src/view_graph.cpp', + '../src/view_mensural.cpp', + '../src/view_page.cpp', + '../src/view_tuplet.cpp', + '../src/vrv.cpp', + '../src/pugixml.cpp', + '../libmei/atts_shared.cpp', '../libmei/atts_cmn.cpp', - '../libmei/atts_critapp.cpp', - '../libmei/atts_mensural.cpp', - '../libmei/atts_pagebased.cpp', + '../libmei/atts_critapp.cpp', + '../libmei/atts_mensural.cpp', + '../libmei/atts_pagebased.cpp', 'verovio.i'], swig_opts=['-c++'], include_dirs=['/usr/local/include', '../include', '../include/vrv', '../libmei'], extra_compile_args=['-Wno-write-strings', '-Wno-overloaded-virtual', '-Wno-unused-private-field']) setup (name = 'verovio', - version = '0.9.4', + version = '0.9.9', url = "www.verovio.org", description = """A library and toolkit for engraving MEI music notation into SVG""", ext_modules = [verovio_module], diff --git a/src/accid.cpp b/src/accid.cpp index bfd2d87ebe9..80e693ea762 100644 --- a/src/accid.cpp +++ b/src/accid.cpp @@ -23,8 +23,14 @@ namespace vrv { Accid::Accid(): LayerElement("accid-"), PositionInterface(), - AttAccidental() + AttAccidental(), + AttAccidLog() { + RegisterAttClass(ATT_ACCIDENTAL); + RegisterAttClass(ATT_ACCIDLOG); + + RegisterInterface( PositionInterface::GetAttClasses(), PositionInterface::IsInterface() ); + Reset(); } @@ -45,12 +51,12 @@ void Accid::Reset() // Functors methods //---------------------------------------------------------------------------- -int Accid::PreparePointersByLayer( ArrayPtrVoid params ) +int Accid::PreparePointersByLayer( ArrayPtrVoid *params ) { // param 0: the current Note (not used) - //Note **currentNote = static_cast(params[0]); + //Note **currentNote = static_cast((*params).at(0)); - Note *note = dynamic_cast( this->GetFirstParent( &typeid(Note) ) ); + Note *note = dynamic_cast( this->GetFirstParent( NOTE, MAX_ACCID_DEPTH ) ); if ( !note ) { return FUNCTOR_CONTINUE; } diff --git a/src/aligner.cpp b/src/aligner.cpp index 81f9118efb7..3b3f941de58 100644 --- a/src/aligner.cpp +++ b/src/aligner.cpp @@ -15,6 +15,8 @@ //---------------------------------------------------------------------------- +#include "note.h" +#include "style.h" #include "vrv.h" namespace vrv { @@ -52,7 +54,7 @@ StaffAlignment* SystemAligner::GetStaffAlignment( int idx ) if (idx < GetStaffAlignmentCount()) { this->m_children.push_back( m_bottomAlignment ); - return dynamic_cast(m_children[idx]); + return dynamic_cast(m_children.at(idx)); } // check that we are searching for the next one (not gap) assert( idx == GetStaffAlignmentCount() ); @@ -153,7 +155,7 @@ void MeasureAligner::AddAlignment( Alignment *alignment, int idx ) } } -Alignment* MeasureAligner::GetAlignmentAtTime( double time, AlignmentType type ) +Alignment* MeasureAligner::GetAlignmentAtTime( double time, AlignmentType type, bool hasEndAlignment ) { int i; int idx = -1; // the index if we reach the end. @@ -161,21 +163,12 @@ Alignment* MeasureAligner::GetAlignmentAtTime( double time, AlignmentType type ) // First try to see if we already have something at the time position for (i = 0; i < GetAlignmentCount(); i++) { - alignment = dynamic_cast(m_children[i]); + alignment = dynamic_cast(m_children.at(i)); assert( alignment ); double alignment_time = alignment->GetTime(); if ( vrv::AreEqual( alignment_time, time ) ) { - // we found a default alignment, but we are inserting a grace note (another layer) - // we need the grace note to be inserted before so we stop here - // this does not work when we have grace notes simultanously at different voices because - // they will all have their own alignment. We need something more sophisticated that takes - // care of the staff/layer number (or using the layer uuid?) - if ( (alignment->GetType() == ALIGNMENT_DEFAULT) && (type == ALIGNMENT_GRACENOTE) ) { - idx = i; - break; - } - else if ( (alignment->GetType() == type) && (type != ALIGNMENT_GRACENOTE) ) { + if (alignment->GetType() == type) { return alignment; } else if ( alignment->GetType() > type ) { @@ -191,13 +184,14 @@ Alignment* MeasureAligner::GetAlignmentAtTime( double time, AlignmentType type ) } // nothing found if ( idx == -1 ) { - // this is tricky! Because we want m_rightAlignment to always stay at the end, + // this is tricky! Because we want m_rightAlignment to always stay at the end (with hasEndAlignment), // we always to insert _before_ the last one - m_rightAlignment is added in Reset() - idx = GetAlignmentCount() - 1; + if ( hasEndAlignment ) idx = GetAlignmentCount() - 1; + else idx = GetAlignmentCount(); } - Alignment *newAlignement = new Alignment( time, type ); - AddAlignment( newAlignement, idx ); - return newAlignement; + Alignment *newAlignment = new Alignment( time, type ); + AddAlignment( newAlignment, idx ); + return newAlignment; } void MeasureAligner::SetMaxTime( double time ) @@ -206,9 +200,46 @@ void MeasureAligner::SetMaxTime( double time ) m_rightAlignment->SetTime( time ); } } + +//---------------------------------------------------------------------------- +// GraceAligner +//---------------------------------------------------------------------------- + +GraceAligner::GraceAligner(): + MeasureAligner() +{ + m_totalWidth = 0; +} + +GraceAligner::~GraceAligner() +{ + +} + +void GraceAligner::StackNote( Note *note ) +{ + m_noteStack.push_back( note ); +} + +void GraceAligner::AlignStack( ) +{ + int i; + double time = 0.0; + for (i = (int)m_noteStack.size(); i > 0; i--) { + Note *note = dynamic_cast( m_noteStack.at(i-1) ); + assert( note ); + // get the duration of the event + double duration = note->LayerElement::GetAlignmentDuration( NULL, NULL, false ); + // Time goes backward with grace notes + time -= duration; + // Set the hasEndAlignment to false with grace notes because we don't have an end-measure alignment + note->SetGraceAlignment( this->GetAlignmentAtTime( time, ALIGNMENT_DEFAULT, false ) ); + } + m_noteStack.clear(); +} //---------------------------------------------------------------------------- -// Alignement +// Alignment //---------------------------------------------------------------------------- Alignment::Alignment( ): @@ -219,6 +250,7 @@ Alignment::Alignment( ): m_maxWidth = 0; m_time = 0.0; m_type = ALIGNMENT_DEFAULT; + m_graceAligner = NULL; } Alignment::Alignment( double time, AlignmentType type ): @@ -229,10 +261,14 @@ Alignment::Alignment( double time, AlignmentType type ): m_maxWidth = 0; m_time = time; m_type = type; + m_graceAligner = NULL; } Alignment::~Alignment() { + if (m_graceAligner) { + delete m_graceAligner; + } } @@ -243,36 +279,45 @@ void Alignment::SetXRel( int x_rel ) void Alignment::SetXShift( int xShift ) { - if ( xShift > m_xShift ) - { + if ( xShift > m_xShift ) { m_xShift = xShift; } } -void Alignment::SetMaxWidth( int max_width ) +void Alignment::SetMaxWidth( int maxWidth ) { - if ( max_width > m_maxWidth ) - { - m_maxWidth = max_width; + if ( maxWidth > m_maxWidth ) { + m_maxWidth = maxWidth; } } + +GraceAligner *Alignment::GetGraceAligner( ) +{ + if (!m_graceAligner) { + m_graceAligner = new GraceAligner( ); + } + return m_graceAligner; +} //---------------------------------------------------------------------------- // Functors methods //---------------------------------------------------------------------------- -int StaffAlignment::SetAligmentYPos( ArrayPtrVoid params ) +int StaffAlignment::SetAligmentYPos( ArrayPtrVoid *params ) { // param 0: the previous staff height // param 1: the staff margin // param 2: the staff interline sizes (int[2]) // param 3: the functor to be redirected to SystemAligner (unused) - int *previousStaffHeight = static_cast(params[0]); - int *staffMargin = static_cast(params[1]); - int **interlineSizes = static_cast(params[2]); + int *previousStaffHeight = static_cast((*params).at(0)); + int *staffMargin = static_cast((*params).at(1)); + int *interlineSize = static_cast((*params).at(2)); // take into account the number of lyrics - m_yShift -= this->GetVerseCount() * 2 * (*interlineSizes[0]) + (*interlineSizes[0]); + if (this->GetVerseCount() > 0) { + // We need + 1 lyric line space + m_yShift -= (this->GetVerseCount() + 1) * TEMP_STYLE_LYIRC_LINE_SPACE * (*interlineSize / 2) / PARAM_DENOMINATOR; + } int min_shift = (*staffMargin) + (*previousStaffHeight); @@ -281,16 +326,16 @@ int StaffAlignment::SetAligmentYPos( ArrayPtrVoid params ) } // for now always four interlines, eventually should be taken from the staffDef, so should the staff size - (*previousStaffHeight) = 4 * (*interlineSizes)[0]; + (*previousStaffHeight) = 4 * (*interlineSize); return FUNCTOR_CONTINUE; } -int StaffAlignment::IntegrateBoundingBoxYShift( ArrayPtrVoid params ) +int StaffAlignment::IntegrateBoundingBoxYShift( ArrayPtrVoid *params ) { - // param 0: the cumulated shift + // param 0: the accumulated shift // param 1: the functor to be redirected to the SystemAligner (unused) - int *shift = static_cast(params[0]); + int *shift = static_cast((*params).at(0)); // integrates the m_yShift into the m_yRel m_yRel += m_yShift + (*shift); @@ -302,38 +347,80 @@ int StaffAlignment::IntegrateBoundingBoxYShift( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int MeasureAligner::IntegrateBoundingBoxXShift( ArrayPtrVoid params ) +int MeasureAligner::IntegrateBoundingBoxXShift( ArrayPtrVoid *params ) { - // param 0: the cumulated shift - // param 1: the cumulated justifiable shift - // param 2: the functor to be redirected to the MeasureAligner (unused) - int *shift = static_cast(params[0]); - int *justifiable_shift = static_cast(params[1]); + // param 0: the accumulated shift + // param 1: the accumulated justifiable shift + // param 2: the minimum measure with (unused) + // param 3: the functor to be redirected to the MeasureAligner (unused) + int *shift = static_cast((*params).at(0)); + int *justifiable_shift = static_cast((*params).at(1)); // We start a new MeasureAligner - // Reset the cumulated shift to 0; + // Reset the accumulated shift to 0; (*shift) = 0; (*justifiable_shift) = -1; return FUNCTOR_CONTINUE; } + +int Alignment::IntegrateBoundingBoxGraceXShift( ArrayPtrVoid *params ) +{ + if (!m_graceAligner) { + return FUNCTOR_CONTINUE; + } + + int i; + int shift = 0; + for (i = 0; i < (int)m_graceAligner->m_children.size(); i++) { + Alignment *alignment = dynamic_cast(m_graceAligner->m_children.at(i)); + assert( alignment ); + alignment->SetXRel( alignment->GetXShift() + shift ); + shift += alignment->GetXShift(); + } + + // Set the total width by looking at the position and maximum width of the last alignment + if ( m_graceAligner->m_children.empty() ) { + return FUNCTOR_CONTINUE; + } + Alignment *alignment = dynamic_cast(m_graceAligner->m_children.back()); + assert( alignment ); + m_graceAligner->SetWidth( alignment->GetXRel() + alignment->GetMaxWidth() ); + + return FUNCTOR_CONTINUE; +} -int Alignment::IntegrateBoundingBoxXShift( ArrayPtrVoid params ) +int Alignment::IntegrateBoundingBoxXShift( ArrayPtrVoid *params ) { - // param 0: the cumulated shift - // param 1: the cumulated justifiable shift - // param 2: the functor to be redirected to the MeasureAligner (unused) - int *shift = static_cast(params[0]); - int *justifiable_shift = static_cast(params[1]); + // param 0: the accumulated shift + // param 1: the accumulated justifiable shift + // param 2: the minimum measure with + // param 3: the functor to be redirected to the MeasureAligner (unused) + int *shift = static_cast((*params).at(0)); + int *justifiable_shift = static_cast((*params).at(1)); + int *minMeasureWidth = static_cast((*params).at(2)); // integrates the m_xShift into the m_xRel m_xRel += m_xShift + (*shift); // cumulate the shift value and the width (*shift) += m_xShift; - - if ((GetType() > ALIGNMENT_METERSIG_ATTR) && ((*justifiable_shift) < 0)) { - dynamic_cast(m_parent)->SetNonJustifiableMargin(m_xRel); - (*justifiable_shift) = m_xRel; + + if ((GetType() <= ALIGNMENT_METERSIG_ATTR) && ((*justifiable_shift) < 0)) { + MeasureAligner *aligner = dynamic_cast(m_parent); + assert( aligner ); + aligner->SetNonJustifiableMargin(this->m_xRel + this->m_maxWidth); + } + else if ((GetType() > ALIGNMENT_METERSIG_ATTR) && ((*justifiable_shift) < 0)) { + MeasureAligner *aligner = dynamic_cast(m_parent); + assert( aligner ); + (*justifiable_shift) = aligner->GetNonJustifiableMargin(); + } + + if (GetType() == ALIGNMENT_FULLMEASURE2) { + (*minMeasureWidth) *= 2; + } + else if (GetType() == ALIGNMENT_MEASURE_END) { + m_xRel = std::max( m_xRel, (*minMeasureWidth) + (*justifiable_shift) ); } // reset member to 0 @@ -342,14 +429,13 @@ int Alignment::IntegrateBoundingBoxXShift( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int MeasureAligner::SetAligmentXPos( ArrayPtrVoid params ) +int MeasureAligner::SetAligmentXPos( ArrayPtrVoid *params ) { // param 0: the previous time position // param 1: the previous x rel position - // param 2: the minimum measure width (unused) - // param 3: the functor to be redirected to the MeasureAligner (unused) - double *previousTime = static_cast(params[0]); - int *previousXRel = static_cast(params[1]); + // param 2: the functor to be redirected to the MeasureAligner (unused) + double *previousTime = static_cast((*params).at(0)); + int *previousXRel = static_cast((*params).at(1)); // We start a new MeasureAligner // Reset the previous time position and x_rel to 0; @@ -359,48 +445,59 @@ int MeasureAligner::SetAligmentXPos( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Alignment::SetAligmentXPos( ArrayPtrVoid params ) + +/* Compute "ideal" horizontal space to allow for a given time interval. For modern +notation (CMN), this is a function of the interval; for short intervals, it may not +be enough to keep consecutive symbols from overlapping. For mensural notation, ideal +spacing is as tight as possible without overlapping and with just a bit of space +between symbols. */ +int Alignment::HorizontalSpaceForDuration(double intervalTime, bool isMensural) +{ + int intervalXRel = 0; + if (isMensural) { + intervalXRel = 20; // ??EXPERIMENTAL! A very small value => space as tightly as possible + } + else { + intervalXRel = pow( intervalTime, 0.60 ) * 2.5; // 2.5 is an arbitrary value; so is 0.60 + } + return intervalXRel; +} + +int Alignment::SetAligmentXPos( ArrayPtrVoid *params ) { // param 0: the previous time position // param 1: the previous x rel position - // param 2: the minimum measure width - // param 3: the functor to be redirected to the MeasureAligner (unused) - double *previousTime = static_cast(params[0]); - int *previousXRel = static_cast(params[1]); - int *minMeasureWidth = static_cast(params[2]); + // param 2: the functor to be redirected to the MeasureAligner (unused) + double *previousTime = static_cast((*params).at(0)); + int *previousXRel = static_cast((*params).at(1)); int intervalXRel = 0; double intervalTime = (m_time - (*previousTime)); - if ( intervalTime > 0.0 ) { - intervalXRel = pow( intervalTime, 0.60 ) * 2.5; // 2.5 is an abritrary value - } + // HARDCODED parameter for HorizontalSpaceForDuration + if ( intervalTime > 0.0 ) intervalXRel = HorizontalSpaceForDuration(intervalTime, false); m_xRel = (*previousXRel) + (intervalXRel) * DEFINITON_FACTOR; (*previousTime) = m_time; (*previousXRel) = m_xRel; - if (this->GetType() == ALIGNMENT_MEASURE_END) { - m_xRel = std::max( m_xRel, (*minMeasureWidth) ); - } - return FUNCTOR_CONTINUE; } -int MeasureAligner::JustifyX( ArrayPtrVoid params ) +int MeasureAligner::JustifyX( ArrayPtrVoid *params ) { // param 0: the justification ratio // param 1: the justification ratio for the measure (depends on the margin) // param 2: the non justifiable margin // param 3: the system full width (without system margins) (unused) // param 4: the functor to be redirected to the MeasureAligner (unused) - double *ratio =static_cast(params[0]); - double *measureRatio =static_cast(params[1]); - int *margin =static_cast(params[2]); + double *ratio =static_cast((*params).at(0)); + double *measureRatio =static_cast((*params).at(1)); + int *margin =static_cast((*params).at(2)); int width = GetRightAlignment()->GetXRel() + GetRightAlignment()->GetMaxWidth(); // the ratio in the measure has to take into account the non justifiable width - // for element within the margin, we do not move them + // for elements within the margin, we do not move them // for after the margin (right) we have a position that is given by: // (m_xRel - margin) * measureRatio + margin, where measureRatio is given by: // (ratio - 1) * (margin / justifiable) + ratio @@ -412,16 +509,16 @@ int MeasureAligner::JustifyX( ArrayPtrVoid params ) } -int Alignment::JustifyX( ArrayPtrVoid params ) +int Alignment::JustifyX( ArrayPtrVoid *params ) { // param 0: the justification ratio // param 1: the justification ratio for the measure (depends on the margin) // param 2: the non justifiable margin // param 3: the system full width (without system margins) (unused) // param 4: the functor to be redirected to the MeasureAligner (unused) - double *ratio =static_cast(params[0]); - double *measureRatio =static_cast(params[1]); - int *margin =static_cast(params[2]); + double *ratio =static_cast((*params).at(0)); + double *measureRatio =static_cast((*params).at(1)); + int *margin =static_cast((*params).at(2)); if (GetType() == ALIGNMENT_MEASURE_START) { return FUNCTOR_CONTINUE; @@ -432,7 +529,7 @@ int Alignment::JustifyX( ArrayPtrVoid params ) } // the ratio in the measure has to take into account the non justifiable width - // for element within the margin, we do not move them + // for elements within the margin, we do not move them // for after the margin (right) we have a position that is given by: // (m_xRel - margin) * measureRatio + margin, where measureRatio is given by: // (ratio - 1) * (margin / justifiable) + ratio diff --git a/src/att.cpp b/src/att.cpp index 7beab356289..d0b7e7d06ea 100644 --- a/src/att.cpp +++ b/src/att.cpp @@ -84,7 +84,7 @@ std::string Att::AccidentalExplicitToStr(data_ACCIDENTAL_EXPLICIT data) case ACCIDENTAL_EXPLICIT_nu : value = "nu"; break; case ACCIDENTAL_EXPLICIT_nd : value = "nd"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown accidental explicit '%d'", data); value = ""; break; } @@ -111,7 +111,7 @@ data_ACCIDENTAL_EXPLICIT Att::StrToAccidentalExplicit(std::string value) else if (value == "nu") return ACCIDENTAL_EXPLICIT_nu; else if (value == "nd") return ACCIDENTAL_EXPLICIT_nd; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported accidental explicit '%s'", value.c_str() ); } return ACCIDENTAL_EXPLICIT_NONE; } @@ -131,7 +131,7 @@ std::string Att::AccidentalImplicitToStr(data_ACCIDENTAL_IMPLICIT data) case ACCIDENTAL_IMPLICIT_fu : value = "fu"; break; case ACCIDENTAL_IMPLICIT_fd : value = "fd"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown accidental implicit '%d'", data); value = ""; break; } @@ -150,7 +150,7 @@ data_ACCIDENTAL_IMPLICIT Att::StrToAccidentalImplicit(std::string value) else if (value == "fu") return ACCIDENTAL_IMPLICIT_fu; else if (value == "fd") return ACCIDENTAL_IMPLICIT_fd; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported accidental implicit '%s'", value.c_str() ); } return ACCIDENTAL_IMPLICIT_NONE; } @@ -172,7 +172,7 @@ std::string Att::BarRenditionToStr(data_BARRENDITION data) case BARRENDITION_rptend : value = "rptend"; break; case BARRENDITION_single : value = "single"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown bar rendition '%d'", data); value = ""; break; } @@ -193,10 +193,45 @@ data_BARRENDITION Att::StrToBarRendition(std::string value) else if (value == "rptend") return BARRENDITION_rptend; else if (value == "single") return BARRENDITION_single; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported bar rendition '%s'", value.c_str() ); } return BARRENDITION_NONE; } + +std::string Att::BeatrptRendToStr(data_BEATRPT_REND data) +{ + std::string value; + switch(data) + { + case BEATRPT_REND_4 : value = "4"; break; + case BEATRPT_REND_8 : value = "8"; break; + case BEATRPT_REND_16 : value = "16"; break; + case BEATRPT_REND_32 : value = "32"; break; + case BEATRPT_REND_64 : value = "64"; break; + case BEATRPT_REND_128 : value = "128"; break; + case BEATRPT_REND_mixed : value = "mixed"; break; + default: + LogWarning("Unknown beatrpt rend '%d'", data); + value = ""; + break; + } + return value; +} + +data_BEATRPT_REND Att::StrToBeatrptRend(std::string value) +{ + if (value == "4") return BEATRPT_REND_4; + else if (value == "8") return BEATRPT_REND_8; + else if (value == "16") return BEATRPT_REND_16; + else if (value == "32") return BEATRPT_REND_32; + else if (value == "64") return BEATRPT_REND_64; + else if (value == "128") return BEATRPT_REND_128; + else if (value == "mixed") return BEATRPT_REND_mixed; + else { + LogWarning("Unsupported beatrpt rend '%s'", value.c_str() ); + } + return BEATRPT_REND_NONE; +} std::string Att::BoolToStr(data_BOOLEAN data) { @@ -206,12 +241,11 @@ std::string Att::BoolToStr(data_BOOLEAN data) case BOOLEAN_true : value = "true"; break; case BOOLEAN_false : value = "false"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown bool '%d'", data); value = ""; break; } return value; - } data_BOOLEAN Att::StrToBool(std::string value) @@ -219,7 +253,7 @@ data_BOOLEAN Att::StrToBool(std::string value) if (value == "true") return BOOLEAN_true; else if (value == "false") return BOOLEAN_false; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported bool '%s'", value.c_str() ); } return BOOLEAN_NONE; } @@ -252,7 +286,7 @@ data_CLEFSHAPE Att::StrToClefShape( std::string value ) else if ( value == "perc" ) data = CLEFSHAPE_perc; else { - LogWarning("Unsupported clef with @shape '%s'", value.c_str()); + LogWarning("Unsupported clef shape '%s'", value.c_str()); } return data; } @@ -271,7 +305,7 @@ std::string Att::ConToStr(data_CON data) case CON_i : value = "i"; break; case CON_b : value = "b"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown con '%d'", data); value = ""; break; } @@ -289,11 +323,36 @@ data_CON Att::StrToCon(std::string value) else if (value == "i") return CON_i; else if (value == "b") return CON_b; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported con '%s'", value.c_str() ); } return CON_NONE; } +std::string Att::CurvedirToStr(data_CURVEDIR data) +{ + std::string value; + switch(data) + { + case CURVEDIR_above : value = "above"; break; + case CURVEDIR_below: value = "below"; break; + default: + LogWarning("Unknown curvedir '%d'", data); + value = ""; + break; + } + return value; +} + +data_CURVEDIR Att::StrToCurvedir(std::string value) +{ + if (value == "above") return CURVEDIR_above; + else if (value == "below") return CURVEDIR_below; + else { + LogWarning("Unsupported curvedir '%s'", value.c_str() ); + } + return CURVEDIR_NONE; +} + std::string Att::DurToStr(data_DURATION data) { std::string value; @@ -317,7 +376,7 @@ std::string Att::DurToStr(data_DURATION data) else if (data == DURATION_128) value = "128"; else if (data == DURATION_256) value = "256"; else { - LogWarning("Unknown duration '%d'", data); + LogWarning("Unknown dur '%d'", data); value = "4"; } return value; @@ -347,10 +406,10 @@ data_DURATION Att::StrToDur(std::string value) else if (value == "256") dur = DURATION_256; else { if ((value.length() > 0) && (value[value.length()-1] == 'p')) { - LogWarning("PPQ duration dur_s are not supported"); + //LogWarning("PPQ duration dur_s are not supported"); // remove it for now } else { - LogWarning("Unknown @dur dur '%s'", value.c_str()); + LogWarning("Unknown dur '%s'", value.c_str()); } dur = DURATION_NONE; } @@ -366,7 +425,7 @@ std::string Att::FontstyleToStr(data_FONTSTYLE data) case FONTSTYLE_normal : value = "normal"; break; case FONTSTYLE_oblique : value = "oblique"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown fontstyle '%d'", data); value = ""; break; } @@ -379,7 +438,7 @@ data_FONTSTYLE Att::StrToFontstyle(std::string value) else if (value == "normal") return FONTSTYLE_normal; else if (value == "oblique") return FONTSTYLE_oblique; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported fontstyle '%s'", value.c_str() ); } return FONTSTYLE_NONE; } @@ -392,7 +451,7 @@ std::string Att::FontweightToStr(data_FONTWEIGHT data) case FONTWEIGHT_bold : value = "bold"; break; case FONTWEIGHT_normal : value = "normal"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown fontweight '%d'", data); value = ""; break; } @@ -404,7 +463,7 @@ data_FONTWEIGHT Att::StrToFontweight(std::string value) if (value == "bold") return FONTWEIGHT_bold; else if (value == "normal") return FONTWEIGHT_normal; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported fontweight '%s'", value.c_str() ); } return FONTWEIGHT_NONE; } @@ -417,7 +476,7 @@ std::string Att::FuncToStr(data_FUNC data) case FUNC_caution : value = "caution"; break; // case FUNC_edit : value = "edit"; break; // default: - LogWarning("Unknown Func '%d'", data); + LogWarning("Unknown func '%d'", data); value = ""; break; } @@ -429,11 +488,38 @@ data_FUNC Att::StrToFunc(std::string value) if (value == "caution") return FUNC_caution; // else if (value == "edit") return FUNC_edit; // else { - LogWarning("Unknown Func '%s'", value.c_str() ); + LogWarning("Unknown func '%s'", value.c_str() ); } return FUNC_NONE; } +std::string Att::GraceToStr(data_GRACE data) +{ + std::string value; + switch(data) + { + case GRACE_acc : value = "acc"; break; + case GRACE_unacc : value = "unacc"; break; + case GRACE_unknown : value = "unknown"; break; + default: + LogWarning("Unknown grace '%d'", data); + value = ""; + break; + } + return value; +} + +data_GRACE Att::StrToGrace(std::string value) +{ + if (value == "acc") return GRACE_acc; + else if (value == "unacc") return GRACE_unacc; + else if (value == "unknown") return GRACE_unknown; + else { + LogWarning("Unsupported grace '%s'", value.c_str() ); + } + return GRACE_NONE; +} + std::string Att::KeySignatureToStr(data_KEYSIGNATURE data) { std::string value; @@ -456,7 +542,7 @@ std::string Att::KeySignatureToStr(data_KEYSIGNATURE data) case KEYSIGNATURE_7s : value = "7s"; break; case KEYSIGNATURE_mixed : value = "mixed"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown key signature '%d'", data); value = ""; break; } @@ -482,7 +568,7 @@ data_KEYSIGNATURE Att::StrToKeySignature(std::string value) else if (value == "7s") return KEYSIGNATURE_7s; else if (value == "mixed") return KEYSIGNATURE_mixed; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported key signature '%s'", value.c_str() ); } return KEYSIGNATURE_NONE; } @@ -498,7 +584,7 @@ std::string Att::LayerschemeToStr(data_LAYERSCHEME data) case LAYERSCHEME_3o : value = "3o"; break; case LAYERSCHEME_3f : value = "3f"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown layerscheme '%d'", data); value = ""; break; } @@ -513,7 +599,7 @@ data_LAYERSCHEME Att::StrToLayerscheme(std::string value) else if (value == "3o") return LAYERSCHEME_3o; else if (value == "3f") return LAYERSCHEME_3f; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported layerscheme '%s'", value.c_str() ); } return LAYERSCHEME_NONE; } @@ -526,7 +612,7 @@ std::string Att::LigatureToStr(data_LIGATURE data) case LIGATURE_recta : value = "recta"; break; case LIGATURE_obliqua : value = "obliqua"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown ligature '%d'", data); value = ""; break; } @@ -538,7 +624,7 @@ data_LIGATURE Att::StrToLigature(std::string value) if (value == "recta") return LIGATURE_recta; else if (value == "obliqua") return LIGATURE_obliqua; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported ligature '%s'", value.c_str() ); } return LIGATURE_NONE; } @@ -577,7 +663,7 @@ std::string Att::MeterSignToStr(data_METERSIGN data) case METERSIGN_common : value = "common"; break; case METERSIGN_cut : value = "cut"; break; default: - LogWarning("Unknown meterSig sym '%d'", data); + LogWarning("Unknown meter sign '%d'", data); value = ""; break; } @@ -641,7 +727,7 @@ std::string Att::ModusmaiorToStr(data_MODUSMAIOR data) case MODUSMAIOR_2 : value = "2"; break; case MODUSMAIOR_3 : value = "3"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown modusmaior '%d'", data); value = ""; break; } @@ -653,7 +739,7 @@ data_MODUSMAIOR Att::StrToModusmaior(std::string value) if (value == "2") return MODUSMAIOR_2; else if (value == "3") return MODUSMAIOR_3; else { - LogWarning("Unsupported mode '%s'", value.c_str() ); + LogWarning("Unsupported modusmaior '%s'", value.c_str() ); } // default return MODUSMAIOR_NONE; @@ -667,7 +753,7 @@ std::string Att::ModusminorToStr(data_MODUSMINOR data) case MODUSMINOR_2 : value = "2"; break; case MODUSMINOR_3 : value = "3"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown modusmaior '%d'", data); value = ""; break; } @@ -679,12 +765,57 @@ data_MODUSMINOR Att::StrToModusminor(std::string value) if (value == "2") return MODUSMINOR_2; else if (value == "3") return MODUSMINOR_3; else { - LogWarning("Unsupported mode '%s'", value.c_str() ); + LogWarning("Unsupported modusmaior '%s'", value.c_str() ); } // default return MODUSMINOR_NONE; } +std::string Att::NumformatToStr(data_NUMFORMAT data) +{ + std::string value; + switch(data) + { + case NUMFORMAT_count : value = "count"; break; + case NUMFORMAT_ratio : value = "ratio"; break; + default: + LogWarning("Unknown numformat '%d'", data); + value = ""; + break; + } + return value; +} + +data_NUMFORMAT Att::StrToNumformat(std::string value) +{ + if (value == "count") return NUMFORMAT_count; + else if (value == "ratio") return NUMFORMAT_ratio; + else { + LogWarning("Unsupported numformat '%s'", value.c_str() ); + } + // default + return NUMFORMAT_NONE; +} + +std::string Att::PercentToStr( data_PERCENT data) +{ + return StringFormat("%d%%", data); +} + +data_PERCENT Att::StrToPercent(std::string value) +{ + int percent = atoi( std::string( value.begin(), value.end() - 1 ).c_str() ); + if (percent > 1000) { + LogWarning("Percent cannot be greater than 1000%"); + return 100; + } + else if (percent < 1) { + LogWarning("Percent has to be greater than 0%"); + return 100; + } + return percent; +} + std::string Att::OctaveDisToStr( data_OCTAVE_DIS data ) { std::string value; @@ -722,7 +853,7 @@ std::string Att::OrientationToStr(data_ORIENTATION data) case ORIENTATION_90CW : value = "90CW"; break; case ORIENTATION_90CCW : value = "90CCW"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown orientation '%d'", data); value = ""; break; } @@ -735,7 +866,7 @@ data_ORIENTATION Att::StrToOrientation(std::string value) else if (value == "90CW") return ORIENTATION_90CW; else if (value == "90CCW") return ORIENTATION_90CCW; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported orientation '%s'", value.c_str() ); } return ORIENTATION_NONE; } @@ -753,7 +884,7 @@ std::string Att::PitchNameToStr(data_PITCHNAME data) case PITCHNAME_a : value = "a"; break; case PITCHNAME_b : value = "b"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown pitch name '%d'", data); value = ""; break; } @@ -810,7 +941,7 @@ std::string Att::ProlatioToStr(data_PROLATIO data) case PROLATIO_2 : value = "2"; break; case PROLATIO_3 : value = "3"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown prolatio '%d'", data); value = ""; break; } @@ -822,12 +953,41 @@ data_PROLATIO Att::StrToProlatio(std::string value) if (value == "2") return PROLATIO_2; else if (value == "3") return PROLATIO_3; else { - LogWarning("Unsupported mode '%s'", value.c_str() ); + LogWarning("Unsupported prolatio '%s'", value.c_str() ); } // default return PROLATIO_NONE; } +std::string Att::StaffRelToStr( data_STAFFREL data ) +{ + std::string value; + switch(data) + { + case STAFFREL_above : value = "above"; break; + case STAFFREL_below : value = "below"; break; + case STAFFREL_within : value = "within"; break; + default: + LogWarning("Unknown staff rel '%d'", data); + value = ""; + break; + } + return value; +} + +data_STAFFREL Att::StrToStaffRel(std::string value) +{ + if (value == "below") return STAFFREL_below; + else if (value == "above") return STAFFREL_above; + else if (value == "within") return STAFFREL_within; + else { + LogWarning("Unsupported staff rel '%s'", value.c_str() ); + } + // default + return STAFFREL_NONE; +} + + std::string Att::StemDirectionToStr(data_STEMDIRECTION data) { std::string value; @@ -836,7 +996,7 @@ std::string Att::StemDirectionToStr(data_STEMDIRECTION data) case STEMDIRECTION_up : value = "up"; break; case STEMDIRECTION_down : value = "down"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown stem direction '%d'", data); value = ""; break; } @@ -848,7 +1008,7 @@ data_STEMDIRECTION Att::StrToStemDirection(std::string value) if (value == "up") return STEMDIRECTION_up; else if (value == "down") return STEMDIRECTION_down; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported stem direction '%s'", value.c_str() ); } return STEMDIRECTION_NONE; } @@ -862,7 +1022,7 @@ std::string Att::StemPositionToStr(data_STEMPOSITION data) case STEMPOSITION_right : value = "right"; break; case STEMPOSITION_center : value = "center"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown stem position '%d'", data); value = ""; break; } @@ -875,11 +1035,38 @@ data_STEMPOSITION Att::StrToStemPosition(std::string value) else if (value == "right") return STEMPOSITION_right; else if (value == "center") return STEMPOSITION_center; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported stem position '%s'", value.c_str() ); } return STEMPOSITION_NONE; } +std::string Att::SymbolToStr(data_SYMBOL data) +{ + std::string value; + switch(data) + { + case SYMBOL_brace : value = "brace"; break; + case SYMBOL_bracket: value = "bracket"; break; + case SYMBOL_line: value = "line"; break; + default: + LogWarning("Unknown symbol '%d'", data); + value = ""; + break; + } + return value; +} + +data_SYMBOL Att::StrToSymbol(std::string value) +{ + if (value == "brace") return SYMBOL_brace; + else if (value == "bracket") return SYMBOL_bracket; + else if (value == "line") return SYMBOL_line; + else { + LogWarning("Unsupported symbol '%s'", value.c_str() ); + } + return SYMBOL_NONE; +} + std::string Att::TieToStr(data_TIE data) { std::string value; @@ -889,13 +1076,24 @@ std::string Att::TieToStr(data_TIE data) case TIE_m : value = "m"; break; case TIE_t : value = "t"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown tie '%d'", data); value = ""; break; } return value; } +data_TIE Att::StrToTie(std::string value) +{ + if (value == "i") return TIE_i; + else if (value == "m") return TIE_m; + else if (value == "t") return TIE_t; + else { + LogWarning("Unsupported tie '%s'", value.c_str() ); + } + return TIE_NONE; +} + std::string Att::TempusToStr(data_TEMPUS data) { std::string value; @@ -904,7 +1102,7 @@ std::string Att::TempusToStr(data_TEMPUS data) case TEMPUS_2 : value = "2"; break; case TEMPUS_3 : value = "3"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown tempus '%d'", data); value = ""; break; } @@ -916,23 +1114,12 @@ data_TEMPUS Att::StrToTempus(std::string value) if (value == "2") return TEMPUS_2; else if (value == "3") return TEMPUS_3; else { - LogWarning("Unsupported mode '%s'", value.c_str() ); + LogWarning("Unsupported tempus '%s'", value.c_str() ); } // default return TEMPUS_NONE; } -data_TIE Att::StrToTie(std::string value) -{ - if (value == "i") return TIE_i; - else if (value == "m") return TIE_m; - else if (value == "t") return TIE_t; - else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); - } - return TIE_NONE; -} - std::string Att::Tstamp2ToStr(typedef_TSTAMP2 data) { return "0m0.0"; @@ -952,7 +1139,7 @@ std::string Att::WordPosToStr(data_WORDPOS data) case WORDPOS_m : value = "m"; break; case WORDPOS_t : value = "t"; break; default: - LogWarning("Unknown mode '%d'", data); + LogWarning("Unknown word pos '%d'", data); value = ""; break; } @@ -965,7 +1152,7 @@ data_WORDPOS Att::StrToWordPos(std::string value) else if (value == "m") return WORDPOS_m; else if (value == "t") return WORDPOS_t; else { - LogWarning("Unsupported pitch name '%s'", value.c_str() ); + LogWarning("Unsupported word pos '%s'", value.c_str() ); } return WORDPOS_NONE; } @@ -976,7 +1163,7 @@ data_WORDPOS Att::StrToWordPos(std::string value) bool AttComparison::operator()(Object *object) { - if (typeid(*object) == *m_elementType) { + if ( object->Is() == m_classId ) { return true; } return false; @@ -984,7 +1171,7 @@ bool AttComparison::operator()(Object *object) bool AttComparison::MatchesType(Object *object) { - if (typeid(*object) == *m_elementType) { + if ( object->Is() == m_classId ) { return true; } return false; diff --git a/src/barline.cpp b/src/barline.cpp index e633cf18c31..e283c984472 100644 --- a/src/barline.cpp +++ b/src/barline.cpp @@ -18,9 +18,8 @@ Barline::Barline(): LayerElement("bline-"), AttBarLineLog() { + RegisterAttClass(ATT_BARLINELOG); Reset(); - m_partialBarline = false; // this was used unitialized - m_onStaffOnly = false; // is this good? } Barline::~Barline() @@ -42,13 +41,12 @@ bool Barline::HasRepetitionDots() } //---------------------------------------------------------------------------- -// Barline +// BarlineAttr //---------------------------------------------------------------------------- BarlineAttr::BarlineAttr(): Barline() { - } BarlineAttr::~BarlineAttr() diff --git a/src/bboxdevicecontext.cpp b/src/bboxdevicecontext.cpp index efab3566dc1..b77f07249b2 100644 --- a/src/bboxdevicecontext.cpp +++ b/src/bboxdevicecontext.cpp @@ -33,9 +33,7 @@ static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } BBoxDeviceContext::BBoxDeviceContext ( View *view, int width, int height): DeviceContext() -{ - m_correctMusicAscent = false; // do not correct the ascent in the music font - +{ m_view = view; m_width = width; m_height = height; @@ -311,11 +309,12 @@ void BBoxDeviceContext::DrawText(const std::string& text, const std::wstring wte int w, h; GetTextExtent(wtext, &w, &h); m_textWidth += w; + m_textHeight = std::max( m_textHeight, h ); // very approximative, we should use GetTextExtend once implemented //m_textWidth += length * m_fontStack.top()->GetPointSize() / 7; // ignore y bounding boxes for text //m_textHeight = m_fontStack.top()->GetPointSize(); - UpdateBB( m_textX, m_textY, m_textX + m_textWidth, m_textY + m_textHeight); + UpdateBB( m_textX, m_textY, m_textX + m_textWidth, m_textY - m_textHeight); } @@ -369,8 +368,7 @@ void BBoxDeviceContext::UpdateBB(int x1, int y1, int x2, int y2) } // the array should not be empty - assert( !m_objects.empty() ); // Array cannot be empty - + assert( !m_objects.empty() ); // we need to store logical coordinates in the objects, we need to convert them back (this is why we need a View object) (m_objects.back())->UpdateSelfBB( m_view->ToLogicalX(x1), m_view->ToLogicalY(y1), m_view->ToLogicalX(x2), m_view->ToLogicalY(y2) ); @@ -378,7 +376,7 @@ void BBoxDeviceContext::UpdateBB(int x1, int y1, int x2, int y2) int i; // Stretch the content BB of the other objects for (i = 0; i < (int)m_objects.size(); i++) { - (m_objects[i])->UpdateContentBB( m_view->ToLogicalX(x1), m_view->ToLogicalY(y1), m_view->ToLogicalX(x2), m_view->ToLogicalY(y2) ); + (m_objects.at(i))->UpdateContentBB( m_view->ToLogicalX(x1), m_view->ToLogicalY(y1), m_view->ToLogicalX(x2), m_view->ToLogicalY(y2) ); } } diff --git a/src/beam.cpp b/src/beam.cpp index 5bfb7d686a1..281e2dace49 100644 --- a/src/beam.cpp +++ b/src/beam.cpp @@ -10,6 +10,10 @@ //---------------------------------------------------------------------------- +#include "assert.h" + +//---------------------------------------------------------------------------- + #include "note.h" namespace vrv { @@ -29,6 +33,7 @@ Beam::Beam(): Beam::~Beam() { + ClearCoords(); } void Beam::Reset() @@ -52,12 +57,14 @@ void Beam::FilterList( ListOfObjects *childList ) ListOfObjects::iterator iter = childList->begin(); while ( iter != childList->end()) { - LayerElement *currentElement = dynamic_cast(*iter); - if ( !currentElement ) { + if ( !(*iter)->IsLayerElement() ) { // remove anything that is not an LayerElement (e.g. Verse, Syl, etc) - iter = childList->erase( iter ); + iter = childList->erase( iter ); + continue; } - else if ( !currentElement->HasDurationInterface() ) + LayerElement *currentElement = dynamic_cast(*iter); + assert( currentElement ); + if ( !currentElement->HasInterface(INTERFACE_DURATION) ) { // remove anything that has not a DurationInterface iter = childList->erase( iter ); @@ -70,14 +77,14 @@ void Beam::FilterList( ListOfObjects *childList ) // and the note is cueSize // assume all the beam is of grace notes if (childList->begin() == iter) { - if (n->m_cueSize) + if (n->HasGrace()) firstNoteGrace = true; } // if the first note in beam was NOT a grace // we have grace notes embedded in a beam // drop them - if ( !firstNoteGrace && n->m_cueSize == true) + if ( !firstNoteGrace && n->HasGrace() == true) iter = childList->erase( iter ); else iter++; @@ -91,10 +98,32 @@ void Beam::FilterList( ListOfObjects *childList ) InitCoords( childList ); } - + +bool Beam::IsFirstInBeam(LayerElement *element) +{ + this->GetList(this); + int position = this->GetListIndex(element); + // This method should be called only if the note is part of a beam + assert( position != -1 ); + // this is this first one + if (position == 0) return true; + return false; +} + +bool Beam::IsLastInBeam(LayerElement *element) +{ + int size = (int)this->GetList(this)->size(); + int position = this->GetListIndex(element); + // This method should be called only if the note is part of a beam + assert( position != -1 ); + // this is the last one + if (position == (size - 1)) return true; + return false; +} + void Beam::InitCoords( ListOfObjects *childList ) { - this->ClearCoords(); + ClearCoords(); m_beamElementCoords.reserve( childList->size() ); int i; for (i = 0; i < childList->size(); i++ ) { diff --git a/src/chord.cpp b/src/chord.cpp index db22fb71cc7..dc91a5c8490 100644 --- a/src/chord.cpp +++ b/src/chord.cpp @@ -23,16 +23,21 @@ namespace vrv { //---------------------------------------------------------------------------- Chord::Chord( ): -LayerElement("chord-"), ObjectListInterface(), DurationInterface(), + LayerElement("chord-"), ObjectListInterface(), DurationInterface(), AttCommon(), AttStemmed(), AttTiepresent() { + RegisterAttClass(ATT_COMMON); + RegisterAttClass(ATT_STEMMED); + RegisterAttClass(ATT_TIEPRESENT); + + RegisterInterface( DurationInterface::GetAttClasses(), DurationInterface::IsInterface() ); + Reset(); + m_drawingStemDir = STEMDIRECTION_NONE; m_drawingLedgerLines.clear(); - - //test[NULL][0][0] = 0; } Chord::~Chord() @@ -55,19 +60,17 @@ void Chord::ClearClusters() std::list::iterator iter; for (iter = m_clusters.begin(); iter != m_clusters.end(); ++iter) { - ChordCluster *cluster = dynamic_cast(*iter); - for (std::vector::iterator clIter = cluster->begin(); clIter != cluster->end(); ++clIter) + for (std::vector::iterator clIter = (*iter)->begin(); clIter != (*iter)->end(); ++clIter) { - Note *note = dynamic_cast(*clIter); - note->m_cluster = NULL; - note->m_clusterPosition = 0; + (*clIter)->m_cluster = NULL; + (*clIter)->m_clusterPosition = 0; } delete *iter; } m_clusters.clear(); } -void Chord::AddLayerElement(vrv::LayerElement *element) +void Chord::AddLayerElement(LayerElement *element) { assert( dynamic_cast(element) ); element->SetParent( this ); @@ -79,6 +82,7 @@ bool compare_pitch (Object *first, Object *second) { Note *n1 = dynamic_cast(first); Note *n2 = dynamic_cast(second); + assert( n1 && n2 ); return ( n1->GetDiatonicPitch() < n2->GetDiatonicPitch() ); } @@ -88,26 +92,19 @@ void Chord::FilterList( ListOfObjects *childList ) ListOfObjects::iterator iter = childList->begin(); while ( iter != childList->end()) { - LayerElement *currentElement = dynamic_cast(*iter); - if ( !currentElement ) { + if ( !(*iter)->IsLayerElement() ) { // remove anything that is not an LayerElement iter = childList->erase( iter ); + continue; } - else if ( !currentElement->HasDurationInterface() ) - { + LayerElement *currentElement = dynamic_cast(*iter); + assert( currentElement ); + if ( !currentElement->HasInterface(INTERFACE_DURATION) ) { iter = childList->erase( iter ); } - else /*if ( dynamic_cast(currentElement)) - { - Object* object = currentElement->GetFirstChild(&typeid(Note)); - if (dynamic_cast(object)) - { - iter++; - } - } - else */{ + else { Note *n = dynamic_cast(currentElement); - + if (n) { iter++; } else { @@ -124,6 +121,7 @@ void Chord::FilterList( ListOfObjects *childList ) this->ClearClusters(); Note *curNote, *lastNote = dynamic_cast(*iter); + assert( lastNote ); int curPitch, lastPitch = lastNote->GetDiatonicPitch(); ChordCluster* curCluster = NULL; @@ -131,6 +129,7 @@ void Chord::FilterList( ListOfObjects *childList ) while ( iter != childList->end()) { curNote = dynamic_cast(*iter); + assert( curNote ); curPitch = curNote->GetDiatonicPitch(); if (curPitch - lastPitch == 1) { @@ -160,12 +159,25 @@ void Chord::ResetAccidList() ListOfObjects* childList = this->GetList(this); //make sure it's initialized for (ListOfObjects::reverse_iterator it = childList->rbegin(); it != childList->rend(); it++) { Note *note = dynamic_cast(*it); + assert( note ); if (note->m_drawingAccid != NULL) { m_accidList.push_back(note); } } } - + +int Chord::PositionInChord(Note *note) +{ + int size = (int)this->GetList(this)->size(); + int position = this->GetListIndex(note); + assert( position != -1 ); + // this is the middle (only if odd) + if ((size % 2) && (position == (size - 1 ) / 2)) return 0; + if (position < (size / 2)) return -1; + return 1; +} + + /** * Creates a 2D grid of width (# of accidentals + 1) * 4 and of height (highest accid - lowest accid) / (half a drawing unit) */ @@ -237,11 +249,11 @@ void Chord::GetYExtremes(int *yMax, int *yMin) // Functors methods //---------------------------------------------------------------------------- -int Chord::PrepareTieAttr( ArrayPtrVoid params ) +int Chord::PrepareTieAttr( ArrayPtrVoid *params ) { // param 0: std::vector* that holds the current notes with open ties (unused) // param 1: Chord** currentChord for the current chord if in a chord - Chord **currentChord = static_cast(params[1]); + Chord **currentChord = static_cast((*params).at(1)); assert(!(*currentChord)); (*currentChord) = this; @@ -249,11 +261,11 @@ int Chord::PrepareTieAttr( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Chord::PrepareTieAttrEnd( ArrayPtrVoid params ) +int Chord::PrepareTieAttrEnd( ArrayPtrVoid *params ) { // param 0: std::vector* that holds the current notes with open ties (unused) // param 1: Chord** currentChord for the current chord if in a chord - Chord **currentChord = static_cast(params[1]); + Chord **currentChord = static_cast((*params).at(1)); assert((*currentChord)); (*currentChord) = NULL; diff --git a/src/clef.cpp b/src/clef.cpp index 3290542938d..d187f5313ef 100644 --- a/src/clef.cpp +++ b/src/clef.cpp @@ -7,6 +7,7 @@ #include "clef.h" +#include "scoredefinterface.h" namespace vrv { @@ -20,18 +21,27 @@ Clef::Clef(): AttLineloc(), AttOctavedisplacement() { - Reset(); + Init(); } -Clef::Clef( ClefAttr *clefAttr ): +Clef::Clef( ScoreDefInterface *clefAttr ): LayerElement("clef-") { - Clef(); + Init(); + this->SetShape(clefAttr->GetClefShape()); this->SetLine(clefAttr->GetClefLine()); this->SetDis(clefAttr->GetClefDis()); this->SetDisPlace(clefAttr->GetClefDisPlace()); } + +void Clef::Init() +{ + RegisterAttClass(ATT_CLEFSHAPE); + RegisterAttClass(ATT_LINELOC); + RegisterAttClass(ATT_OCTAVEDISPLACEMENT); + Reset(); +} Clef::~Clef() { @@ -72,28 +82,5 @@ int Clef::GetClefOffset () } return offset; } - - -//---------------------------------------------------------------------------- -// ClefAttr -//---------------------------------------------------------------------------- - -ClefAttr::ClefAttr(): - Object(), - AttCleffingLog() -{ - Reset(); -} - - -ClefAttr::~ClefAttr() -{ -} - -void ClefAttr::Reset() -{ - Object::Reset(); - ResetCleffingLog(); -} } // namespace vrv diff --git a/src/custos.cpp b/src/custos.cpp index 2863bfaf2ec..69a5bc36a99 100644 --- a/src/custos.cpp +++ b/src/custos.cpp @@ -18,6 +18,8 @@ namespace vrv { Custos::Custos(): LayerElement("custos-"), PositionInterface() { + RegisterInterface( PositionInterface::GetAttClasses(), PositionInterface::IsInterface() ); + Reset(); } diff --git a/src/doc.cpp b/src/doc.cpp index 43df030cdb2..45a3b999f9c 100644 --- a/src/doc.cpp +++ b/src/doc.cpp @@ -27,10 +27,10 @@ #include "multirest.h" #include "note.h" #include "page.h" +#include "rpt.h" #include "slur.h" #include "smufl.h" #include "staff.h" -#include "style.h" #include "syl.h" #include "system.h" #include "verse.h" @@ -76,6 +76,8 @@ void Doc::Reset( DocType type ) m_scoreDef.Reset(); + m_drawingSmuflFontSize = 0; + m_drawingLyricFontSize = 0; m_drawingLyricFont.SetFaceName("Garamond"); } @@ -97,7 +99,7 @@ void Doc::PrepareDrawing() if (m_drawingPreparationDone) { Functor resetDrawing( &Object::ResetDarwing ); - this->Process( &resetDrawing, params ); + this->Process( &resetDrawing, ¶ms ); } // Try to match all spanning elements (slur, tie, etc) by processing backward @@ -106,7 +108,7 @@ void Doc::PrepareDrawing() params.push_back( &timeSpanningElements ); params.push_back( &fillList ); Functor prepareTimeSpanning( &Object::PrepareTimeSpanning ); - this->Process( &prepareTimeSpanning, params, NULL, NULL, UNLIMITED_DEPTH, BACKWARD ); + this->Process( &prepareTimeSpanning, ¶ms, NULL, NULL, UNLIMITED_DEPTH, BACKWARD ); // First we tried backward because nomrally the spanning elements are at the end of // the measure. However, in some case, one (or both) end points will appear afterwards @@ -115,7 +117,7 @@ void Doc::PrepareDrawing() // but this time without filling the list (that is only will the remaining elements) if ( !timeSpanningElements.empty() ) { fillList = false; - this->Process( &prepareTimeSpanning, params ); + this->Process( &prepareTimeSpanning, ¶ms ); } // If some are still there, then it is probably an issue in the encoding @@ -137,7 +139,7 @@ void Doc::PrepareDrawing() // We first fill a tree of int with [staff/layer] and [staff/layer/verse] numbers (@n) to be process //LogElapsedTimeStart( ); Functor prepareProcessingLists( &Object::PrepareProcessingLists ); - this->Process( &prepareProcessingLists, params ); + this->Process( &prepareProcessingLists, ¶ms ); // The tree is used to process each staff/layer/verse separatly // For this, we use a array of AttCommmonNComparison that looks for each object if it is of the type @@ -156,13 +158,11 @@ void Doc::PrepareDrawing() for (layers = staves->second.child.begin(); layers != staves->second.child.end(); ++layers) { filters.clear(); // Create ad comparison object for each type / @n - AttCommonNComparison matchStaff( &typeid(Staff), staves->first ); - AttCommonNComparison matchLayer( &typeid(Layer), layers->first ); + AttCommonNComparison matchStaff( STAFF, staves->first ); + AttCommonNComparison matchLayer( LAYER, layers->first ); filters.push_back( &matchStaff ); filters.push_back( &matchLayer ); - // The first pass set m_drawingFirstNote and m_drawingLastNote for each syl - // m_drawingLastNote is set only if the syl has a forward connector currentChord = NULL; currentNotes.clear(); ArrayPtrVoid paramsTieAttr; @@ -170,7 +170,7 @@ void Doc::PrepareDrawing() paramsTieAttr.push_back( ¤tChord ); Functor prepareTieAttr( &Object::PrepareTieAttr ); Functor prepareTieAttrEnd( &Object::PrepareTieAttrEnd ); - this->Process( &prepareTieAttr, paramsTieAttr, &prepareTieAttrEnd, &filters ); + this->Process( &prepareTieAttr, ¶msTieAttr, &prepareTieAttrEnd, &filters ); // After having processed one layer, we check if we have open ties - if yes, we // must reset them and they will be ignored. @@ -189,15 +189,15 @@ void Doc::PrepareDrawing() for (layers = staves->second.child.begin(); layers != staves->second.child.end(); ++layers) { filters.clear(); // Create ad comparison object for each type / @n - AttCommonNComparison matchStaff( &typeid(Staff), staves->first ); - AttCommonNComparison matchLayer( &typeid(Layer), layers->first ); + AttCommonNComparison matchStaff( STAFF, staves->first ); + AttCommonNComparison matchLayer( LAYER, layers->first ); filters.push_back( &matchStaff ); filters.push_back( &matchLayer ); ArrayPtrVoid paramsPointers; paramsPointers.push_back( ¤tNote ); Functor preparePointersByLayer( &Object::PreparePointersByLayer ); - this->Process( &preparePointersByLayer, paramsPointers, NULL, &filters ); + this->Process( &preparePointersByLayer, ¶msPointers, NULL, &filters ); } } @@ -211,9 +211,9 @@ void Doc::PrepareDrawing() //std::cout << staves->first << " => " << layers->first << " => " << verses->first << '\n'; filters.clear(); // Create ad comparison object for each type / @n - AttCommonNComparison matchStaff( &typeid(Staff), staves->first ); - AttCommonNComparison matchLayer( &typeid(Layer), layers->first ); - AttCommonNComparison matchVerse( &typeid(Verse), verses->first ); + AttCommonNComparison matchStaff( STAFF, staves->first ); + AttCommonNComparison matchLayer( LAYER, layers->first ); + AttCommonNComparison matchVerse( VERSE, verses->first ); filters.push_back( &matchStaff ); filters.push_back( &matchLayer ); filters.push_back( &matchVerse ); @@ -229,7 +229,7 @@ void Doc::PrepareDrawing() paramsLyrics.push_back( &lastButOneNote ); Functor prepareLyrics( &Object::PrepareLyrics ); Functor prepareLyricsEnd( &Object::PrepareLyricsEnd ); - this->Process( &prepareLyrics, paramsLyrics, &prepareLyricsEnd, &filters ); + this->Process( &prepareLyrics, ¶msLyrics, &prepareLyricsEnd, &filters ); } } } @@ -241,13 +241,39 @@ void Doc::PrepareDrawing() timeSpanningElements.clear(); params.push_back( &timeSpanningElements ); Functor fillStaffCurrentTimeSpanning( &Object::FillStaffCurrentTimeSpanning ); - this->Process( &fillStaffCurrentTimeSpanning, params ); + this->Process( &fillStaffCurrentTimeSpanning, ¶ms ); // Something must be wrong in the encoding because a TimeSpanningInterface was left open if ( !timeSpanningElements.empty() ) { LogDebug("%d time spanning elements could not be set as running", timeSpanningElements.size() ); } + // Process by staff for matching mRpt elements and setting the drawing number + MRpt *currentMRpt; + data_BOOLEAN multiNumber; + for (staves = layerTree.child.begin(); staves != layerTree.child.end(); ++staves) { + for (layers = staves->second.child.begin(); layers != staves->second.child.end(); ++layers) { + filters.clear(); + // Create ad comparison object for each type / @n + AttCommonNComparison matchStaff( STAFF, staves->first ); + AttCommonNComparison matchLayer( LAYER, layers->first ); + filters.push_back( &matchStaff ); + filters.push_back( &matchLayer ); + + // The first pass set m_drawingFirstNote and m_drawingLastNote for each syl + // m_drawingLastNote is set only if the syl has a forward connector + currentMRpt = NULL; + // We set multiNumber to NONE for indicated we need to look at the staffDef when reaching the first staff + multiNumber = BOOLEAN_NONE; + ArrayPtrVoid paramsRptAttr; + paramsRptAttr.push_back(¤tMRpt); + paramsRptAttr.push_back(&multiNumber); + paramsRptAttr.push_back(&m_scoreDef); + Functor prepareRpt( &Object::PrepareRpt ); + this->Process( &prepareRpt, ¶msRptAttr, NULL, &filters ); + } + } + /* // Alternate solution with StaffN_LayerN_VerseN_t StaffN_LayerN_VerseN_t::iterator staves; @@ -293,8 +319,12 @@ void Doc::SetCurrentScoreDef( bool force ) params.push_back( &staffDef ); Functor setCurrentScoreDef( &Object::SetCurrentScoreDef ); + // First process the current scoreDef in order to fill the staffDef with + // the appropriate drawing values + currentScoreDef.Process( &setCurrentScoreDef, ¶ms ); + //LogElapsedTimeStart( ); - this->Process( &setCurrentScoreDef, params ); + this->Process( &setCurrentScoreDef, ¶ms ); //LogElapsedTimeEnd ( "Setting scoreDefs" ); m_currentScoreDefDone = true; @@ -323,11 +353,9 @@ void Doc::CastOff( ) params.push_back( &shift ); params.push_back( &systemFullWidth ); Functor castOffSystems( &Object::CastOffSystems ); - contentSystem->Process( &castOffSystems, params ); + contentSystem->Process( &castOffSystems, ¶ms ); delete contentSystem; - //LogDebug("Layout: %d systems", contentPage->GetSystemCount()); - // Reset the scoreDef at the beginning of each system this->SetCurrentScoreDef( true ); contentPage->LayOutVertically( ); @@ -347,7 +375,7 @@ void Doc::CastOff( ) params.push_back( &shift ); params.push_back( &pageFullHeight ); Functor castOffPages( &Object::CastOffPages ); - contentPage->Process( &castOffPages, params ); + contentPage->Process( &castOffPages, ¶ms ); delete contentPage; //LogDebug("Layout: %d pages", this->GetChildCount()); @@ -368,7 +396,7 @@ void Doc::UnCastOff( ) params.push_back( contentSystem ); Functor unCastOff( &Object::UnCastOff ); - this->Process( &unCastOff, params ); + this->Process( &unCastOff, ¶ms ); this->ClearChildren(); @@ -392,31 +420,154 @@ int Doc::GetPageCount( ) return GetChildCount() ; } +int Doc::GetGlyphHeight( wchar_t smuflCode, int staffSize, bool graceSize ) +{ + int x, y, w, h; + Glyph *glyph; + glyph = Resources::GetGlyph( smuflCode ); + assert( glyph ); + glyph->GetBoundingBox( &x, &y, &w, &h ); + h = h * m_drawingSmuflFontSize / glyph->GetUnitsPerEm(); + if ( graceSize ) h = h * this->m_style->m_graceNum / this->m_style->m_graceDen; + h = h * staffSize / 100; + return h; +} + +int Doc::GetGlyphWidth( wchar_t smuflCode, int staffSize, bool graceSize ) +{ + int x, y, w, h; + Glyph *glyph; + glyph = Resources::GetGlyph( smuflCode ); + assert( glyph ); + glyph->GetBoundingBox( &x, &y, &w, &h ); + w = w * m_drawingSmuflFontSize / glyph->GetUnitsPerEm(); + if ( graceSize ) w = w * this->m_style->m_graceNum / this->m_style->m_graceDen; + w = w * staffSize / 100; + return w; +} + +int Doc::GetDrawingUnit( int staffSize ) +{ + return m_drawingUnit * staffSize / 100; +} + +int Doc::GetDrawingDoubleUnit( int staffSize ) +{ + return m_drawingDoubleUnit * staffSize / 100; +} + +int Doc::GetDrawingStaffSize( int staffSize ) +{ + return m_drawingStaffSize * staffSize / 100; + +} + +int Doc::GetDrawingOctaveSize( int staffSize ) +{ + return m_drawingOctaveSize * staffSize / 100; +} + +int Doc::GetDrawingBrevisWidth( int staffSize ) +{ + return m_drawingBrevisWidth * staffSize / 100; +} + +int Doc::GetDrawingBarLineWidth( int staffSize ) +{ + return m_style->m_barLineWidth * staffSize / 100; +} -short Doc::GetLeftMargin( const std::type_info *elementType ) +int Doc::GetDrawingStaffLineWidth( int staffSize ) { + return m_style->m_staffLineWidth * staffSize / 100; +} - if (typeid(Barline) == *elementType) return 5; - else if (typeid(Chord) == *elementType) return 10; - else if (typeid(Clef) == *elementType) return -20; - else if (typeid(MRest) == *elementType) return 30; - else if (typeid(Note) == *elementType) return 10; - return 0; +int Doc::GetDrawingStemWidth( int staffSize ) +{ + return m_style->m_stemWidth * staffSize / 100; +} +int Doc::GetDrawingBeamWidth( int staffSize, bool graceSize ) +{ + int value = m_drawingBeamWidth * staffSize / 100; + if ( graceSize ) value = value * this->m_style->m_graceNum / this->m_style->m_graceDen; + return value; } -short Doc::GetRightMargin( const std::type_info *elementType ) +int Doc::GetDrawingBeamWhiteWidth( int staffSize, bool graceSize ) { - if (typeid(Clef) == *elementType) return 30; - else if (typeid(KeySig) == *elementType) return 30; - else if (typeid(Mensur) == *elementType) return 30; - else if (typeid(MeterSig) == *elementType) return 30; - else if (typeid(Barline) == *elementType) return 30; - else if (typeid(BarlineAttr) == *elementType) return 0; - else if (typeid(MRest) == *elementType) return 30; - else if (typeid(MultiRest) == *elementType) return 30; - //else if (typeid(Note) == *elementType) return 10; - return 10; + int value = m_drawingBeamWhiteWidth * staffSize / 100; + if ( graceSize ) value = value * this->m_style->m_graceNum / this->m_style->m_graceDen; + return value; +} + +int Doc::GetDrawingLedgerLineLength( int staffSize, bool graceSize ) +{ + int value = m_drawingLedgerLine * staffSize / 100; + if ( graceSize ) value = value * this->m_style->m_graceNum / this->m_style->m_graceDen; + return value; +} + +int Doc::GetGraceSize(int value) +{ + return value * this->m_style->m_graceNum / this->m_style->m_graceDen; +} + +FontInfo *Doc::GetDrawingSmuflFont( int staffSize, bool graceSize ) +{ + int value = m_drawingSmuflFontSize * staffSize / 100; + if ( graceSize ) value = value * this->m_style->m_graceNum / this->m_style->m_graceDen; + m_drawingSmuflFont.SetPointSize( value ); + return &m_drawingSmuflFont; +} + +FontInfo *Doc::GetDrawingLyricFont( int staffSize ) +{ + m_drawingLyricFont.SetPointSize( m_drawingLyricFontSize * staffSize / 100 ); + return &m_drawingLyricFont; +} + +char Doc::GetLeftMargin( const ClassId classId ) +{ + if (classId == BARLINE) return m_style->m_leftMarginBarline; + else if (classId == BARLINE_ATTR) return m_style->m_leftMarginBarlineAttr; + else if (classId == BEATRPT) return m_style->m_leftMarginBeatRpt; + else if (classId == CHORD) return m_style->m_leftMarginChord; + else if (classId == CLEF) return m_style->m_leftMarginClef; + else if (classId == KEYSIG) return m_style->m_leftMarginKeySig; + else if (classId == MENSUR) return m_style->m_leftMarginMensur; + else if (classId == METERSIG) return m_style->m_leftMarginMeterSig; + else if (classId == MREST) return m_style->m_leftMarginMRest; + else if (classId == MRPT2) return m_style->m_leftMarginMRpt2; + else if (classId == MULTIREST) return m_style->m_leftMarginMultiRest; + else if (classId == MULTIRPT) return m_style->m_leftMarginMultiRpt; + else if (classId == NOTE) return m_style->m_leftMarginNote; + else if (classId == REST) return m_style->m_leftMarginRest; + return m_style->m_leftMarginDefault; +} + +char Doc::GetRightMargin( const ClassId classId ) +{ + if (classId == BARLINE) return m_style->m_rightMarginBarline; + else if (classId == BARLINE_ATTR) return m_style->m_rightMarginBarlineAttr; + else if (classId == BEATRPT) return m_style->m_rightMarginBeatRpt; + else if (classId == CHORD) return m_style->m_rightMarginChord; + else if (classId == CLEF) return m_style->m_rightMarginClef; + else if (classId == KEYSIG) return m_style->m_rightMarginKeySig; + else if (classId == MENSUR) return m_style->m_rightMarginMensur; + else if (classId == METERSIG) return m_style->m_rightMarginMeterSig; + else if (classId == MREST) return m_style->m_rightMarginMRest; + else if (classId == MRPT2) return m_style->m_rightMarginMRpt2; + else if (classId == MULTIREST) return m_style->m_rightMarginMultiRest; + else if (classId == MULTIRPT) return m_style->m_rightMarginMultiRpt; + else if (classId == NOTE) return m_style->m_rightMarginNote; + else if (classId == REST) return m_style->m_rightMarginRest; + return m_style->m_rightMarginDefault; +} + +char Doc::GetLeftPosition( ) +{ + return m_style->m_leftPosition; } void Doc:: SetPageHeight( int pageHeight ) @@ -467,9 +618,10 @@ Page *Doc::SetDrawingPage( int pageIdx ) return m_drawingPage; } m_drawingPage = dynamic_cast(this->GetChild( pageIdx ) ); - assert( m_drawingPage ); + int glyph_size; + // we use the page members only if set (!= -1) if ( m_drawingPage->m_pageHeight != -1 ) { @@ -515,94 +667,31 @@ Page *Doc::SetDrawingPage( int pageIdx ) m_drawingBeamMaxSlope /= 100; m_drawingBeamMinSlope /= 100; - m_drawingSmallStaffRatio[0] = this->m_style->m_smallStaffNum; - m_drawingSmallStaffRatio[1] = this->m_style->m_smallStaffDen; - m_drawingGraceRatio[0] = this->m_style->m_graceNum; - m_drawingGraceRatio[1] = this->m_style->m_graceDen; - // half of the space between two lines - m_drawingUnit[0] = m_style->m_unit; - // same for small staves - m_drawingUnit[1] = (m_drawingUnit[0] * m_drawingSmallStaffRatio[0]) / m_drawingSmallStaffRatio[1]; + m_drawingUnit = m_style->m_unit; // space between two lines - m_drawingDoubleUnit[0] = m_drawingUnit[0] * 2; - // same for small staves - m_drawingDoubleUnit[1] = m_drawingUnit[1] * 2; + m_drawingDoubleUnit = m_drawingUnit * 2; // staff (with five lines) - m_drawingStaffSize[0] = m_drawingDoubleUnit[0] * 4; - m_drawingStaffSize[1] = m_drawingDoubleUnit[1] * 4; - // - m_drawingOctaveSize[0] = m_drawingUnit[0] * 7; - m_drawingOctaveSize[1] = m_drawingUnit[1] * 7; + m_drawingStaffSize = m_drawingDoubleUnit * 4; + // octave height + m_drawingOctaveSize = m_drawingUnit * 7; + // measure minimal width + m_drawingMinMeasureWidth = m_drawingUnit * m_style->m_minMeasureWidth / PARAM_DENOMINATOR ; // values for beams - m_drawingBeamWidth[0] = this->m_style->m_unit; - m_drawingBeamWhiteWidth[0] = this->m_style->m_unit / 2; - m_drawingBeamWidth[1] = (m_drawingBeamWidth[0] * m_drawingSmallStaffRatio[0]) / m_drawingSmallStaffRatio[1]; - m_drawingBeamWhiteWidth[1] = (m_drawingBeamWhiteWidth[0] * m_drawingSmallStaffRatio[0]) / m_drawingSmallStaffRatio[1]; - - m_drawingFontHeight = CalcMusicFontSize(); - - /* - m_drawingFontHeightAscent[0][0] = floor(LEIPZIG_ASCENT * (double)m_drawingFontHeight / LEIPZIG_UNITS_PER_EM); - m_drawingFontHeightAscent[0][1] = (m_drawingFontHeightAscent[0][0] * m_drawingGraceRatio[0]) / m_drawingGraceRatio[1]; - m_drawingFontHeightAscent[1][0] = (m_drawingFontHeightAscent[0][0] * m_drawingSmallStaffRatio[0]) / m_drawingSmallStaffRatio[1]; - m_drawingFontHeightAscent[1][1] = (m_drawingFontHeightAscent[1][0] * m_drawingGraceRatio[0]) / m_drawingGraceRatio[1]; - */ - - m_drawingSmuflFonts[0][0].SetPointSize( m_drawingFontHeight ); - m_drawingSmuflFonts[0][1].SetPointSize( (m_drawingFontHeight * m_drawingGraceRatio[0]) / m_drawingGraceRatio[1] ); - m_drawingSmuflFonts[1][0].SetPointSize( (m_drawingFontHeight * m_drawingSmallStaffRatio[0]) / m_drawingSmallStaffRatio[1] ); - m_drawingSmuflFonts[1][1].SetPointSize( ( (m_drawingFontHeight * m_drawingSmallStaffRatio[0]) / m_drawingSmallStaffRatio[1] * m_drawingGraceRatio[0]) / m_drawingGraceRatio[1] ); - - m_drawingLyricFonts[0] = m_drawingLyricFont; - m_drawingLyricFonts[1] = m_drawingLyricFont; - m_drawingLyricFonts[0].SetPointSize( m_drawingUnit[0] * m_style->m_lyricSize / PARAM_DENOMINATOR ); - m_drawingLyricFonts[1].SetPointSize( m_drawingUnit[1] * m_style->m_lyricSize / PARAM_DENOMINATOR ); - - m_drawingMinMeasureWidth = m_drawingUnit[0] * m_style->m_minMeasureWidth / PARAM_DENOMINATOR ; - - float glyph_size; - Glyph *glyph; - int x, y, w, h; - glyph = Resources::GetGlyph(SMUFL_E0A3_noteheadHalf); - assert( glyph ); - glyph->GetBoundingBox( &x, &y, &w, &h ); + m_drawingBeamWidth = this->m_style->m_unit; + m_drawingBeamWhiteWidth = this->m_style->m_unit / 2; - glyph_size = round((double)w * (double)m_drawingFontHeight / (double)glyph->GetUnitsPerEm()); - m_drawingNoteRadius[0][0] = ceil(glyph_size / 2); - m_drawingNoteRadius[0][1] = (m_drawingNoteRadius[0][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; - m_drawingNoteRadius[1][0] = (m_drawingNoteRadius[0][0] * m_drawingSmallStaffRatio[0])/m_drawingSmallStaffRatio[1]; - m_drawingNoteRadius[1][1] = (m_drawingNoteRadius[1][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; - - m_drawingLedgerLine[0][0] = (int)(glyph_size * .72); - m_drawingLedgerLine[0][1] = (m_drawingLedgerLine[0][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; - m_drawingLedgerLine[1][0] = (m_drawingLedgerLine[0][0] * m_drawingSmallStaffRatio[0])/m_drawingSmallStaffRatio[1]; - m_drawingLedgerLine[1][1] = (m_drawingLedgerLine[1][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; + // values for fonts + m_drawingSmuflFontSize = CalcMusicFontSize(); + m_drawingLyricFontSize = m_drawingUnit * m_style->m_lyricSize / PARAM_DENOMINATOR; + + glyph_size = GetGlyphWidth(SMUFL_E0A3_noteheadHalf, 100, 0); + m_drawingLedgerLine = glyph_size * 72 / 100; - glyph = Resources::GetGlyph(SMUFL_E0A2_noteheadWhole); - assert( glyph ); - glyph->GetBoundingBox( &x, &y, &w, &h ); - glyph_size = round((double)w * (double)m_drawingFontHeight / (double)glyph->GetUnitsPerEm()); - m_drawingLedgerLine[0][2] = (int)(glyph_size * .66); - m_drawingLedgerLine[1][2] = (m_drawingLedgerLine[0][2] * m_drawingSmallStaffRatio[0]) /m_drawingSmallStaffRatio[1]; - - m_drawingBrevisWidth[0] = (int)((glyph_size * 0.8) / 2); - m_drawingBrevisWidth[1] = (m_drawingBrevisWidth[0] * m_drawingSmallStaffRatio[0]) /m_drawingSmallStaffRatio[1]; - - glyph = Resources::GetGlyph(SMUFL_E262_accidentalSharp); - assert( glyph ); - glyph->GetBoundingBox( &x, &y, &w, &h ); - glyph_size = round((double)w * (double)m_drawingFontHeight / (double)glyph->GetUnitsPerEm()); - m_drawingAccidWidth[0][0] = glyph_size; - m_drawingAccidWidth[0][1] = (m_drawingAccidWidth[0][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; - m_drawingAccidWidth[1][0] = (m_drawingAccidWidth[0][0] * m_drawingSmallStaffRatio[0]) /m_drawingSmallStaffRatio[1]; - m_drawingAccidWidth[1][1] = (m_drawingAccidWidth[1][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; - glyph_size = round((double)h * (double)m_drawingFontHeight / (double)glyph->GetUnitsPerEm()); - m_drawingAccidHeight[0][0] = glyph_size; - m_drawingAccidHeight[0][1] = (m_drawingAccidHeight[0][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; - m_drawingAccidHeight[1][0] = (m_drawingAccidHeight[0][0] * m_drawingSmallStaffRatio[0]) /m_drawingSmallStaffRatio[1]; - m_drawingAccidHeight[1][1] = (m_drawingAccidHeight[1][0] * m_drawingGraceRatio[0])/m_drawingGraceRatio[1]; + glyph_size = GetGlyphWidth(SMUFL_E0A2_noteheadWhole, 100, 0); + + m_drawingBrevisWidth = (int)((glyph_size * 0.8) / 2); return m_drawingPage; } @@ -631,12 +720,12 @@ int Doc::GetAdjustedDrawingPageWidth() // Doc functors methods //---------------------------------------------------------------------------- -int Doc::PrepareLyricsEnd( ArrayPtrVoid params ) +int Doc::PrepareLyricsEnd( ArrayPtrVoid *params ) { // param 0: the current Syl // param 1: the last Note - Syl **currentSyl = static_cast(params[0]); - Note **lastNote = static_cast(params[1]); + Syl **currentSyl = static_cast((*params).at(0)); + Note **lastNote = static_cast((*params).at(1)); if ( (*currentSyl) && (*lastNote) ) { (*currentSyl)->SetEnd(*lastNote); diff --git a/src/dot.cpp b/src/dot.cpp index ca6bab286fa..945a6d18137 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -24,6 +24,8 @@ namespace vrv { Dot::Dot(): LayerElement("dot-"), PositionInterface() { + RegisterInterface( PositionInterface::GetAttClasses(), PositionInterface::IsInterface() ); + Reset(); } @@ -42,17 +44,17 @@ void Dot::Reset() // Functors methods //---------------------------------------------------------------------------- -int Dot::PreparePointersByLayer( ArrayPtrVoid params ) +int Dot::PreparePointersByLayer( ArrayPtrVoid *params ) { // param 0: the current Note - Note **currentNote = static_cast(params[0]); + Note **currentNote = static_cast((*params).at(0)); m_drawingNote = (*currentNote); return FUNCTOR_CONTINUE; } -int Dot::ResetDarwing( ArrayPtrVoid params ) +int Dot::ResetDarwing( ArrayPtrVoid *params ) { this->m_drawingNote = NULL; return FUNCTOR_CONTINUE; diff --git a/src/drawinginterface.cpp b/src/drawinginterface.cpp new file mode 100644 index 00000000000..7bde16d591f --- /dev/null +++ b/src/drawinginterface.cpp @@ -0,0 +1,178 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: drawinginterface.cpp +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "drawinginterface.h" + +//---------------------------------------------------------------------------- + +#include "clef.h" +#include "keysig.h" +#include "layerelement.h" +#include "mensur.h" +#include "metersig.h" + +namespace vrv { + +//---------------------------------------------------------------------------- +// DrawingListInterface +//---------------------------------------------------------------------------- + +DrawingListInterface::DrawingListInterface() +{ + Reset(); +} + + +DrawingListInterface::~DrawingListInterface() +{ +} + + +void DrawingListInterface::Reset() +{ + m_drawingList.clear(); +} + + + +void DrawingListInterface::AddToDrawingList( DocObject *object ) +{ + m_drawingList.push_back( object ); + m_drawingList.sort(); + m_drawingList.unique(); +} + +ListOfObjects *DrawingListInterface::GetDrawingList( ) +{ + return &m_drawingList; +} + +void DrawingListInterface::ResetDrawingList( ) +{ + m_drawingList.clear(); +} + +//---------------------------------------------------------------------------- +// StaffDefDrawingInterface +//---------------------------------------------------------------------------- + +StaffDefDrawingInterface::StaffDefDrawingInterface() +{ + // owned pointers need to be set to NULL; + m_currentClef = NULL; + m_currentKeySig = NULL; + m_currentMensur = NULL; + m_currentMeterSig = NULL; + Reset(); +} + +StaffDefDrawingInterface::~StaffDefDrawingInterface() +{ + Reset(); +} + +void StaffDefDrawingInterface::Reset() +{ + if (m_currentClef) { + delete m_currentClef; + m_currentClef = NULL; + } + if (m_currentKeySig) { + delete m_currentKeySig; + m_currentKeySig = NULL; + } + if (m_currentMensur) { + delete m_currentMensur; + m_currentMensur = NULL; + } + if (m_currentMeterSig) { + delete m_currentMeterSig; + m_currentMeterSig = NULL; + } + m_drawClef = false; + m_drawKeySig = false; + m_drawKeySigCancellation = false; + m_drawMensur = false; + m_drawMeterSig = false; +} + +void StaffDefDrawingInterface::SetCurrentClef( Clef *clef ) +{ + if (clef) { + if (m_currentClef) delete m_currentClef; + m_currentClef = clef; + m_currentClef->SetScoreOrStaffDefAttr(true); + } +} + +void StaffDefDrawingInterface::SetCurrentKeySig( KeySig *keySig ) +{ + if (keySig) { + if (m_currentKeySig) { + keySig->m_drawingCancelAccidCount = m_currentKeySig->GetAlterationNumber(); + keySig->m_drawingCancelAccidType = m_currentKeySig->GetAlterationType(); + delete m_currentKeySig; + } + m_currentKeySig = keySig; + m_currentKeySig->SetScoreOrStaffDefAttr(true); + } +} + +void StaffDefDrawingInterface::SetCurrentMensur( Mensur *mensur ) +{ + if (mensur) { + if (m_currentMensur) delete m_currentMensur; + m_currentMensur = mensur; + m_currentMensur->SetScoreOrStaffDefAttr(true); + } +} + +void StaffDefDrawingInterface::SetCurrentMeterSig( MeterSig *meterSig ) +{ + if (meterSig) { + if (m_currentMeterSig) delete m_currentMeterSig; + m_currentMeterSig = meterSig; + m_currentMeterSig->SetScoreOrStaffDefAttr(true); + } +} + +StaffDefDrawingInterface::StaffDefDrawingInterface( const StaffDefDrawingInterface& interface ) +{ + m_currentClef = NULL; + m_currentKeySig = NULL; + m_currentMensur = NULL; + m_currentMeterSig = NULL; + Reset(); +} + +StaffDefDrawingInterface& StaffDefDrawingInterface::operator=( const StaffDefDrawingInterface& interface ) +{ + if ( this != &interface ) // not self assignement + { + if (m_currentClef) { + delete m_currentClef; + m_currentClef = NULL; + } + if (m_currentKeySig) { + delete m_currentKeySig; + m_currentKeySig = NULL; + } + if (m_currentMensur) { + delete m_currentMensur; + m_currentMensur = NULL; + } + if (m_currentMeterSig) { + delete m_currentMeterSig; + m_currentMeterSig = NULL; + } + Reset(); + } + return *this; +} + +} // namespace vrv diff --git a/src/drawinglistinterface.cpp b/src/drawinglistinterface.cpp deleted file mode 100644 index 0cdfeb806ee..00000000000 --- a/src/drawinglistinterface.cpp +++ /dev/null @@ -1,59 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: drawinglistinterface.cpp -// Author: Laurent Pugin -// Created: 2015 -// Copyright (c) Authors and others. All rights reserved. -///////////////////////////////////////////////////////////////////////////// - - -#include "drawinglistinterface.h" - -//---------------------------------------------------------------------------- - -#include "layerelement.h" - -namespace vrv { - -//---------------------------------------------------------------------------- -// DrawingListInterface -//---------------------------------------------------------------------------- - -DrawingListInterface::DrawingListInterface() -{ - Reset(); -} - - -DrawingListInterface::~DrawingListInterface() -{ -} - - -void DrawingListInterface::Reset() -{ - m_drawingList.clear(); -} - - - -void DrawingListInterface::AddToDrawingList( DocObject *object ) -{ - m_drawingList.push_back( object ); - m_drawingList.sort(); - m_drawingList.unique(); -} - -ListOfObjects *DrawingListInterface::GetDrawingList( ) -{ - return &m_drawingList; -} - -void DrawingListInterface::ResetDrawingList( ) -{ - m_drawingList.clear(); -} - - - - -} // namespace vrv diff --git a/src/durationinterface.cpp b/src/durationinterface.cpp index 5abe3cf4736..7a7b6ab3ca4 100644 --- a/src/durationinterface.cpp +++ b/src/durationinterface.cpp @@ -27,7 +27,7 @@ namespace vrv { // DurationInterface //---------------------------------------------------------------------------- -DurationInterface::DurationInterface(): +DurationInterface::DurationInterface(): Interface(), AttAugmentdots(), AttBeamsecondary(), AttDurationMusical(), @@ -36,6 +36,13 @@ DurationInterface::DurationInterface(): AttFermatapresent(), AttStaffident() { + RegisterInterfaceAttClass(ATT_AUGMENTDOTS); + RegisterInterfaceAttClass(ATT_BEAMSECONDARY); + RegisterInterfaceAttClass(ATT_DURATIONMUSICAL); + RegisterInterfaceAttClass(ATT_DURATIONPERFORMED); + RegisterInterfaceAttClass(ATT_DURATIONRATIO); + RegisterInterfaceAttClass(ATT_FERMATAPRESENT); + RegisterInterfaceAttClass(ATT_STAFFIDENT); Reset(); } @@ -104,7 +111,7 @@ double DurationInterface::GetAlignmentMensuralDuration( int num, int numbase, Me bool DurationInterface::IsInBeam( Object *noteOrRest ) { - Beam *beam = dynamic_cast( noteOrRest->GetFirstParent( &typeid(Beam), MAX_BEAM_DEPTH ) ); + Object *beam = noteOrRest->GetFirstParent( BEAM, MAX_BEAM_DEPTH ); if ( !beam ) { return false; } @@ -113,7 +120,7 @@ bool DurationInterface::IsInBeam( Object *noteOrRest ) bool DurationInterface::IsFirstInBeam( Object *noteOrRest ) { - Beam *beam = dynamic_cast( noteOrRest->GetFirstParent( &typeid(Beam), MAX_BEAM_DEPTH ) ); + Beam *beam = dynamic_cast( noteOrRest->GetFirstParent( BEAM, MAX_BEAM_DEPTH ) ); if ( !beam ) { return false; } @@ -127,7 +134,7 @@ bool DurationInterface::IsFirstInBeam( Object *noteOrRest ) bool DurationInterface::IsLastInBeam( Object *noteOrRest ) { - Beam *beam = dynamic_cast( noteOrRest->GetFirstParent( &typeid(Beam), MAX_BEAM_DEPTH ) ); + Beam *beam = dynamic_cast( noteOrRest->GetFirstParent( BEAM, MAX_BEAM_DEPTH ) ); if ( !beam ) { return false; } diff --git a/src/editorial.cpp b/src/editorial.cpp index 82836ffa5fd..aec177a4de2 100644 --- a/src/editorial.cpp +++ b/src/editorial.cpp @@ -13,6 +13,7 @@ //---------------------------------------------------------------------------- +#include "floatingelement.h" #include "layer.h" #include "measure.h" #include "scoredef.h" @@ -27,20 +28,24 @@ namespace vrv { //---------------------------------------------------------------------------- EditorialElement::EditorialElement(): - DocObject("ee-") + DocObject("ee-"), + AttCommon() { + RegisterAttClass(ATT_COMMON); Reset(); } EditorialElement::EditorialElement(std::string classid): - DocObject(classid) + DocObject(classid), + AttCommon() { + RegisterAttClass(ATT_COMMON); Reset(); } void EditorialElement::Reset() { - Object::Reset(); + DocObject::Reset(); ResetCommon(); m_visibility = Visible; } @@ -49,6 +54,14 @@ EditorialElement::~EditorialElement() { } + +void EditorialElement::AddFloatingElement( FloatingElement *child ) +{ + child->SetParent( this ); + m_children.push_back( child ); + Modify(); + +} void EditorialElement::AddLayer( Layer *child ) { @@ -81,12 +94,12 @@ void EditorialElement::AddScoreDef( ScoreDef *child ) Modify(); } -void EditorialElement::AddMeasureElement( MeasureElement *child ) +void EditorialElement::AddStaff( Staff *child ) { child->SetParent( this ); m_children.push_back( child ); Modify(); - if ( dynamic_cast(child) && dynamic_cast(child)->GetN() < 1 ) { + if ( child->GetN() < 1 ) { LogError("Staff without @n is not supported within editorial markup element"); } } @@ -126,8 +139,7 @@ App::App( EditorialLevel level ): void App::Reset() { - Object::Reset(); - ResetCommon(); + EditorialElement::Reset(); } App::~App() @@ -137,7 +149,6 @@ App::~App() void App::AddLemOrRdg(EditorialElement *child) { assert( dynamic_cast(child) || dynamic_cast(child) ); - child->SetParent( this ); m_children.push_back(child); Modify(); @@ -148,8 +159,10 @@ void App::AddLemOrRdg(EditorialElement *child) //---------------------------------------------------------------------------- Lem::Lem( ): - EditorialElement("lem-") + EditorialElement("lem-"), + AttSource() { + RegisterAttClass(ATT_SOURCE); Reset(); } @@ -160,6 +173,7 @@ Lem::~Lem() void Lem::Reset() { EditorialElement::Reset(); + ResetSource(); } //---------------------------------------------------------------------------- @@ -167,8 +181,10 @@ void Lem::Reset() //---------------------------------------------------------------------------- Rdg::Rdg( ): - EditorialElement("rdg-") + EditorialElement("rdg-"), + AttSource() { + RegisterAttClass(ATT_SOURCE); Reset(); } @@ -179,6 +195,29 @@ Rdg::~Rdg() void Rdg::Reset() { EditorialElement::Reset(); + ResetSource(); +} + +//---------------------------------------------------------------------------- +// Supplied +//---------------------------------------------------------------------------- + +Supplied::Supplied( ): + EditorialElement("supplied-"), + AttSource() +{ + RegisterAttClass(ATT_SOURCE); + Reset(); +} + +Supplied::~Supplied() +{ +} + +void Supplied::Reset() +{ + EditorialElement::Reset(); + ResetSource(); } //---------------------------------------------------------------------------- @@ -190,6 +229,8 @@ Annot::Annot( ): AttPlist(), AttSource() { + RegisterAttClass( ATT_PLIST ); + RegisterAttClass( ATT_SOURCE ); Reset(); } @@ -208,15 +249,15 @@ void Annot::Reset() // EditorialElement functor methods //---------------------------------------------------------------------------- -int EditorialElement::CastOffSystems( ArrayPtrVoid params ) +int EditorialElement::CastOffSystems( ArrayPtrVoid *params ) { // param 0: a pointer to the system we are taking the content from // param 1: a pointer the page we are adding system to (unused) // param 2: a pointer to the current system // param 3: the cummulated shift (m_drawingXRel of the first measure of the current system) (unused) // param 4: the system width (unused) - System *contentSystem = static_cast(params[0]); - System **currentSystem = static_cast(params[2]); + System *contentSystem = static_cast((*params).at(0)); + System **currentSystem = static_cast((*params).at(2)); // Since the functor returns FUNCTOR_SIBLINGS we should never go lower than the system children assert( dynamic_cast(this->m_parent)); @@ -226,6 +267,7 @@ int EditorialElement::CastOffSystems( ArrayPtrVoid params ) // from the content System because this screws up the iterator. Relinquish gives up // the ownership of the Measure - the contentSystem will be deleted afterwards. EditorialElement *editorialElement = dynamic_cast( contentSystem->Relinquish( this->GetIdx()) ); + assert( editorialElement ); (*currentSystem)->AddEditorialElement( editorialElement ); return FUNCTOR_SIBLINGS; diff --git a/src/floatingelement.cpp b/src/floatingelement.cpp new file mode 100644 index 00000000000..d017485241d --- /dev/null +++ b/src/floatingelement.cpp @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: floatingelement.cpp +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "floatingelement.h" +#include "timeinterface.h" + +//---------------------------------------------------------------------------- + +#include + +//---------------------------------------------------------------------------- + +namespace vrv { + + +//---------------------------------------------------------------------------- +// FloatingElement +//---------------------------------------------------------------------------- + +FloatingElement::FloatingElement(): + DocObject("me") +{ + Reset(); +} + +FloatingElement::FloatingElement(std::string classid): + DocObject(classid) +{ + Reset(); +} + +FloatingElement::~FloatingElement() +{ + +} + +void FloatingElement::Reset() +{ + DocObject::Reset(); +} + +//---------------------------------------------------------------------------- +// FloatingElement functor methods +//---------------------------------------------------------------------------- + +int FloatingElement::PrepareTimeSpanning( ArrayPtrVoid *params ) +{ + // Pass it to the pseudo functor of the interface + if (this->HasInterface(INTERFACE_TIME_SPANNING)) { + TimeSpanningInterface *interface = dynamic_cast(this); + assert( interface ); + return interface->InterfacePrepareTimeSpanning(params, this); + } + return FUNCTOR_CONTINUE; +} + +int FloatingElement::FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ) +{ + // Pass it to the pseudo functor of the interface + if (this->HasInterface(INTERFACE_TIME_SPANNING)) { + TimeSpanningInterface *interface = dynamic_cast(this); + assert( interface ); + return interface->InterfaceFillStaffCurrentTimeSpanning(params, this); + } + return FUNCTOR_CONTINUE; +} + +int FloatingElement::ResetDarwing( ArrayPtrVoid *params ) +{ + // Pass it to the pseudo functor of the interface + if (this->HasInterface(INTERFACE_TIME_SPANNING)) { + TimeSpanningInterface *interface = dynamic_cast(this); + assert( interface ); + return interface->InterfaceResetDrawing(params, this); + } + return FUNCTOR_CONTINUE; +}; + +} // namespace vrv diff --git a/src/io.cpp b/src/io.cpp index a73c04fd2b5..cdb7ba0f615 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -21,14 +21,14 @@ namespace vrv { FileOutputStream::FileOutputStream( Doc *doc, std::string filename ) : std::ofstream( filename.c_str() ) { - assert(doc); // Document cannot be NULL" + assert(doc); m_doc = doc; } FileOutputStream::FileOutputStream( Doc *doc ) : std::ofstream( ) { - assert(doc); // Document cannot be NULL" + assert(doc); m_doc = doc; } @@ -48,7 +48,7 @@ FileOutputStream::~FileOutputStream() FileInputStream::FileInputStream( Doc *doc, std::string filename ) : std::ifstream( filename.c_str() ) { - assert(doc); // Document cannot be NULL" + assert(doc); m_doc = doc; Init(); @@ -58,7 +58,7 @@ FileInputStream::FileInputStream( Doc *doc, std::string filename ) : FileInputStream::FileInputStream( Doc *doc ) : std::ifstream( ) { - assert(doc); // Document cannot be NULL" + assert(doc); m_doc = doc; Init(); } diff --git a/src/iodarms.cpp b/src/iodarms.cpp index ea1c6f709b8..b61603149ca 100644 --- a/src/iodarms.cpp +++ b/src/iodarms.cpp @@ -409,7 +409,7 @@ bool DarmsInput::ImportString(std::string data_str) { m_current_tie = NULL; m_staff->AddLayer(m_layer); - m_measure->AddMeasureElement( m_staff ); + m_measure->AddStaff( m_staff ); system->AddMeasure( m_measure ); // do this the C style, char by char diff --git a/src/iomei.cpp b/src/iomei.cpp index d9b62f66980..04becf40643 100644 --- a/src/iomei.cpp +++ b/src/iomei.cpp @@ -30,13 +30,17 @@ #include "multirest.h" #include "note.h" #include "page.h" +#include "proport.h" #include "rest.h" +#include "rpt.h" #include "slur.h" #include "space.h" #include "staff.h" #include "syl.h" #include "system.h" +#include "textdirective.h" #include "tie.h" +#include "trem.h" #include "tuplet.h" #include "verse.h" #include "vrv.h" @@ -78,7 +82,7 @@ bool MeiOutput::ExportFile( ) LogError("Page %d does not exist", m_page ); return false; } - Page *page = dynamic_cast(m_doc->m_children[m_page]); + Page *page = dynamic_cast(m_doc->m_children.at(m_page)); assert( page ); if (m_scoreBasedMEI) { m_currentNode = meiDoc.append_child("score"); @@ -119,151 +123,179 @@ std::string MeiOutput::GetOutput( int page ) bool MeiOutput::WriteObject( Object *object ) { // Containers and scoreDef related - if (dynamic_cast(object)) { + if (object->Is() == DOC) { WriteMeiDoc( dynamic_cast(object) ); m_nodeStack.push_back(m_currentNode); return true; } - if (dynamic_cast(object)) { + if (object->Is() == PAGE) { if (!m_scoreBasedMEI) { m_currentNode = m_currentNode.append_child("page"); WriteMeiPage( m_currentNode, dynamic_cast(object) ); } // Here we could add a element } - else if (dynamic_cast(object)) { + else if (object->Is() == SYSTEM) { if (!m_scoreBasedMEI) { m_currentNode = m_currentNode.append_child("system"); WriteMeiSystem( m_currentNode, dynamic_cast(object) ); } // Here we could add a element (but not for the first system of the page?) } - else if (dynamic_cast(object)) { + else if (object->Is() == SCOREDEF) { m_currentNode = m_currentNode.append_child("scoreDef"); WriteMeiScoreDef( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == STAFFGRP) { m_currentNode = m_currentNode.append_child("staffGrp"); WriteMeiStaffGrp( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == STAFFDEF) { m_currentNode = m_currentNode.append_child("staffDef"); WriteMeiStaffDef( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == MEASURE) { m_currentNode = m_currentNode.append_child("measure"); WriteMeiMeasure( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == STAFF) { m_currentNode = m_currentNode.append_child("staff"); WriteMeiStaff( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == LAYER) { m_currentNode = m_currentNode.append_child("layer"); WriteMeiLayer( m_currentNode, dynamic_cast(object) ); } // Measure elements - else if (dynamic_cast(object)) { + else if (object->Is() == SLUR) { m_currentNode = m_currentNode.append_child("slur"); WriteMeiSlur( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == TEMPO) { + m_currentNode = m_currentNode.append_child("tempo"); + WriteMeiTempo( m_currentNode, dynamic_cast(object) ); + } + else if (object->Is() == TIE) { m_currentNode = m_currentNode.append_child("tie"); WriteMeiTie( m_currentNode, dynamic_cast(object) ); } // Layer elements - else if (dynamic_cast(object)) { + else if (object->Is() == ACCID) { m_currentNode = m_currentNode.append_child("accid"); WriteMeiAccid( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == BARLINE) { m_currentNode = m_currentNode.append_child( "barLine" ); WriteMeiBarline( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == BEAM) { m_currentNode = m_currentNode.append_child("beam"); WriteMeiBeam( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == BEATRPT) { + m_currentNode = m_currentNode.append_child("beatRpt"); + WriteMeiBeatRpt( m_currentNode, dynamic_cast(object) ); + } + else if (object->Is() == CHORD) { m_currentNode = m_currentNode.append_child( "chord" ); WriteMeiChord( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == CLEF) { m_currentNode = m_currentNode.append_child("clef"); WriteMeiClef( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == CUSTOS) { m_currentNode = m_currentNode.append_child( "custos" ); WriteMeiCustos( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == DOT) { m_currentNode = m_currentNode.append_child( "dot" ); WriteMeiDot( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == KEYSIG) { m_currentNode = m_currentNode.append_child("keySig"); WriteMeiKeySig( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == MENSUR) { m_currentNode = m_currentNode.append_child("mensur"); WriteMeiMensur( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == METERSIG) { m_currentNode = m_currentNode.append_child("meterSig"); WriteMeiMeterSig( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == MREST) { m_currentNode = m_currentNode.append_child("mRest"); WriteMeiMRest( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == MRPT) { + m_currentNode = m_currentNode.append_child("mRpt"); + WriteMeiMRpt( m_currentNode, dynamic_cast(object) ); + } + else if (object->Is() == MRPT2) { + m_currentNode = m_currentNode.append_child("mRpt2"); + WriteMeiMRpt2( m_currentNode, dynamic_cast(object) ); + } + else if (object->Is() == MULTIREST) { m_currentNode = m_currentNode.append_child("multiRest"); WriteMeiMultiRest( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == MULTIRPT) { + m_currentNode = m_currentNode.append_child("multiRpt"); + WriteMeiMultiRpt( m_currentNode, dynamic_cast(object) ); + } + else if (object->Is() == NOTE) { m_currentNode = m_currentNode.append_child("note"); WriteMeiNote( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == PROPORT) { + m_currentNode = m_currentNode.append_child("proport"); + WriteMeiProport( m_currentNode, dynamic_cast(object) ); + } + else if (object->Is() == REST) { m_currentNode = m_currentNode.append_child("rest"); WriteMeiRest( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == SPACE) { m_currentNode = m_currentNode.append_child("space"); WriteMeiSpace( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == TUPLET) { m_currentNode = m_currentNode.append_child("tuplet"); WriteMeiTuplet( m_currentNode, dynamic_cast(object) ); } // others - else if (dynamic_cast(object)) { + else if (object->Is() == VERSE) { m_currentNode = m_currentNode.append_child("verse"); WriteMeiVerse( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == SYL) { m_currentNode = m_currentNode.append_child("syl"); WriteMeiSyl( m_currentNode, dynamic_cast(object) ); } // Editorial markup - else if (dynamic_cast(object)) { + else if (object->Is() == APP) { m_currentNode = m_currentNode.append_child("app"); WriteMeiApp( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == LEM) { m_currentNode = m_currentNode.append_child("lem"); WriteMeiLem( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == RDG) { m_currentNode = m_currentNode.append_child("rdg"); WriteMeiRdg( m_currentNode, dynamic_cast(object) ); } - else if (dynamic_cast(object)) { + else if (object->Is() == SUPPLIED) { + m_currentNode = m_currentNode.append_child("supplied"); + WriteMeiSupplied( m_currentNode, dynamic_cast(object) ); + } + else if (object->Is() == ANNOT) { m_currentNode = m_currentNode.append_child("annot"); WriteMeiAnnot( m_currentNode, dynamic_cast(object) ); } @@ -298,6 +330,7 @@ std::string MeiOutput::UuidToMeiStr( Object *element ) bool MeiOutput::WriteMeiDoc( Doc *doc ) { + assert( doc ); assert( !m_mei.empty() ); // ---- header ---- @@ -351,6 +384,8 @@ bool MeiOutput::WriteMeiDoc( Doc *doc ) bool MeiOutput::WriteMeiPage( pugi::xml_node currentNode, Page *page ) { + assert( page ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( page ).c_str(); // size and margins but only if any - we rely on page.height only to check this if ( page->m_pageHeight != -1 ) { @@ -368,6 +403,8 @@ bool MeiOutput::WriteMeiPage( pugi::xml_node currentNode, Page *page ) bool MeiOutput::WriteMeiSystem( pugi::xml_node currentNode, System *system ) { + assert( system ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( system ).c_str(); // margins currentNode.append_attribute( "system.leftmar" ) = StringFormat( "%d", system->m_systemLeftMar ).c_str(); @@ -382,74 +419,52 @@ bool MeiOutput::WriteMeiSystem( pugi::xml_node currentNode, System *system ) bool MeiOutput::WriteMeiScoreDef( pugi::xml_node currentNode, ScoreDef *scoreDef ) { + assert( scoreDef ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( scoreDef ).c_str(); - if (scoreDef->GetClefAttr()) { - scoreDef->GetClefAttr()->WriteCleffingLog(currentNode); - } - if (scoreDef->GetKeySigAttr()) { - scoreDef->GetKeySigAttr()->WriteKeySigDefaultLog(currentNode); - } - if ( scoreDef->GetMensurAttr() ) { - scoreDef->GetMensurAttr()->WriteMensuralLog(currentNode); - scoreDef->GetMensurAttr()->WriteMensuralShared(currentNode); - } - if ( scoreDef->GetMeterSigAttr() ) { - scoreDef->GetMeterSigAttr()->WriteMeterSigDefaultLog(currentNode); - scoreDef->GetMeterSigAttr()->WriteMeterSigDefaultVis(currentNode); - } + + WriteScoreDefInterface(currentNode, scoreDef); - // this needs to be fixed return true; } bool MeiOutput::WriteMeiStaffGrp( pugi::xml_node currentNode, StaffGrp *staffGrp ) { + assert( staffGrp ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( staffGrp ).c_str(); - if ( staffGrp->GetSymbol() != STAFFGRP_NONE ) { - currentNode.append_attribute( "symbol" ) = StaffGrpSymbolToStr( staffGrp->GetSymbol() ).c_str(); - } - if ( staffGrp->GetBarthru() ) { - currentNode.append_attribute( "barthru" ) = BoolToStr( staffGrp->GetBarthru() ).c_str(); - } + + staffGrp->WriteCommon(currentNode); + staffGrp->WriteLabelsAddl(currentNode); + staffGrp->WriteStaffgroupingsym(currentNode); + staffGrp->WriteStaffGrpVis(currentNode); return true; } bool MeiOutput::WriteMeiStaffDef( pugi::xml_node currentNode, StaffDef *staffDef ) { + assert( staffDef ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( staffDef ).c_str(); staffDef->WriteCommon(currentNode); staffDef->WriteLabelsAddl(currentNode); + staffDef->WriteScalable(currentNode); staffDef->WriteStaffDefVis(currentNode); - if (staffDef->GetClefAttr()) { - staffDef->GetClefAttr()->WriteCleffingLog(currentNode); - } - if (staffDef->GetKeySigAttr()) { - staffDef->GetKeySigAttr()->WriteKeySigDefaultLog(currentNode); - } - if ( staffDef->GetMensurAttr() ) { - staffDef->GetMensurAttr()->WriteMensuralLog(currentNode); - staffDef->GetMensurAttr()->WriteMensuralShared(currentNode); - } - if ( staffDef->GetMeterSigAttr() ) { - staffDef->GetMeterSigAttr()->WriteMeterSigDefaultLog(currentNode); - staffDef->GetMeterSigAttr()->WriteMeterSigDefaultVis(currentNode); - } + WriteScoreDefInterface(currentNode, staffDef); return true; } bool MeiOutput::WriteMeiMeasure( pugi::xml_node currentNode, Measure *measure ) { + assert( measure ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( measure ).c_str(); measure->WriteCommon(currentNode); - - // here we transfer the barLine object values to @left and @right - measure->SetLeft( measure->GetLeftBarlineType() ); - measure->SetRight( measure->GetRightBarlineType() ); measure->WriteMeasureLog(currentNode); return true; @@ -457,6 +472,8 @@ bool MeiOutput::WriteMeiMeasure( pugi::xml_node currentNode, Measure *measure ) void MeiOutput::WriteMeiTie( pugi::xml_node currentNode, Tie *tie ) { + assert( tie ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( tie ).c_str(); WriteTimeSpanningInterface(currentNode, tie); @@ -466,8 +483,12 @@ void MeiOutput::WriteMeiTie( pugi::xml_node currentNode, Tie *tie ) void MeiOutput::WriteMeiSlur( pugi::xml_node currentNode, Slur *slur ) { + assert( slur ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( slur ).c_str(); + slur->WriteCurvature(currentNode); + WriteTimeSpanningInterface(currentNode, slur); return; @@ -475,6 +496,8 @@ void MeiOutput::WriteMeiSlur( pugi::xml_node currentNode, Slur *slur ) bool MeiOutput::WriteMeiStaff( pugi::xml_node currentNode, Staff *staff ) { + assert( staff ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( staff ).c_str(); staff->WriteCommon(currentNode); @@ -492,6 +515,8 @@ bool MeiOutput::WriteMeiStaff( pugi::xml_node currentNode, Staff *staff ) bool MeiOutput::WriteMeiLayer( pugi::xml_node currentNode, Layer *layer ) { + assert( layer ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( layer ).c_str(); layer->WriteCommon(currentNode); @@ -501,6 +526,8 @@ bool MeiOutput::WriteMeiLayer( pugi::xml_node currentNode, Layer *layer ) void MeiOutput::WriteLayerElement( pugi::xml_node currentNode, LayerElement *element ) { + assert( element ); + this->WriteSameAsAttr( currentNode, element ); currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( element ).c_str(); @@ -512,6 +539,8 @@ void MeiOutput::WriteLayerElement( pugi::xml_node currentNode, LayerElement *ele void MeiOutput::WriteMeiAccid( pugi::xml_node currentNode, Accid *accid ) { + assert( accid ); + WriteLayerElement( currentNode, accid ); WritePositionInterface(currentNode, accid); accid->WriteAccidental(currentNode); @@ -520,6 +549,8 @@ void MeiOutput::WriteMeiAccid( pugi::xml_node currentNode, Accid *accid ) void MeiOutput::WriteMeiBarline( pugi::xml_node currentNode, Barline *barLine ) { + assert( barLine ); + WriteLayerElement( currentNode, barLine ); barLine->WriteBarLineLog(currentNode); return; @@ -528,27 +559,37 @@ void MeiOutput::WriteMeiBarline( pugi::xml_node currentNode, Barline *barLine ) void MeiOutput::WriteMeiBeam( pugi::xml_node currentNode, Beam *beam ) { + assert( beam ); + WriteLayerElement( currentNode, beam ); return; } + +void MeiOutput::WriteMeiBeatRpt( pugi::xml_node currentNode, BeatRpt *beatRpt ) +{ + assert( beatRpt ); + + WriteLayerElement( currentNode, beatRpt ); + beatRpt->WriteBeatRptVis(currentNode); +} void MeiOutput::WriteMeiChord( pugi::xml_node currentNode, Chord *chord ) { + assert( chord ); + WriteLayerElement( currentNode, chord ); WriteDurationInterface( currentNode, chord); chord->WriteCommon(currentNode); chord->WriteStemmed(currentNode); chord->WriteTiepresent(currentNode); - - if ( chord->m_cueSize ) { - currentNode.append_attribute( "grace" ) = "unknown"; - } - + return; } void MeiOutput::WriteMeiClef( pugi::xml_node currentNode, Clef *clef ) { + assert( clef ); + WriteLayerElement( currentNode, clef ); clef->WriteClefshape(currentNode); clef->WriteLineloc(currentNode); @@ -558,18 +599,24 @@ void MeiOutput::WriteMeiClef( pugi::xml_node currentNode, Clef *clef ) void MeiOutput::WriteMeiCustos( pugi::xml_node currentNode, Custos *custos ) { + assert( custos ); + WriteLayerElement( currentNode, custos ); WritePositionInterface(currentNode, custos); } void MeiOutput::WriteMeiDot( pugi::xml_node currentNode, Dot *dot ) { + assert( dot ); + WriteLayerElement( currentNode, dot ); WritePositionInterface(currentNode, dot); } void MeiOutput::WriteMeiKeySig( pugi::xml_node currentNode, KeySig *keySig ) { + assert( keySig ); + WriteLayerElement( currentNode, keySig ); keySig->WriteAccidental(currentNode); keySig->WritePitch(currentNode); @@ -578,6 +625,8 @@ void MeiOutput::WriteMeiKeySig( pugi::xml_node currentNode, KeySig *keySig ) void MeiOutput::WriteMeiMensur( pugi::xml_node currentNode, Mensur *mensur ) { + assert( mensur ); + WriteLayerElement( currentNode, mensur ); mensur->WriteDurationRatio(currentNode); mensur->WriteMensuralShared(currentNode); @@ -589,6 +638,8 @@ void MeiOutput::WriteMeiMensur( pugi::xml_node currentNode, Mensur *mensur ) void MeiOutput::WriteMeiMeterSig( pugi::xml_node currentNode, MeterSig *meterSig ) { + assert( meterSig ); + WriteLayerElement( currentNode, meterSig ); meterSig->WriteMeterSigLog(currentNode); return; @@ -597,43 +648,80 @@ void MeiOutput::WriteMeiMeterSig( pugi::xml_node currentNode, MeterSig *meterSig void MeiOutput::WriteMeiMRest( pugi::xml_node currentNode, MRest *mRest ) { + assert( mRest ); + WriteLayerElement( currentNode, mRest ); return; } + +void MeiOutput::WriteMeiMRpt( pugi::xml_node currentNode, MRpt *mRpt ) +{ + assert( mRpt ); + + WriteLayerElement( currentNode, mRpt ); +} + + void MeiOutput::WriteMeiMRpt2( pugi::xml_node currentNode, MRpt2 *mRpt2 ) + { + assert( mRpt2 ); + + WriteLayerElement( currentNode, mRpt2 ); + } void MeiOutput::WriteMeiMultiRest( pugi::xml_node currentNode, MultiRest *multiRest ) { + assert( multiRest ); + WriteLayerElement( currentNode, multiRest ); multiRest->WriteNumbered(currentNode); return; } +void MeiOutput::WriteMeiMultiRpt( pugi::xml_node currentNode, MultiRpt *multiRpt ) +{ + assert( multiRpt ); + + WriteLayerElement( currentNode, multiRpt ); + multiRpt->WriteNumbered(currentNode); +} + void MeiOutput::WriteMeiNote( pugi::xml_node currentNode, Note *note ) { + assert( note ); + WriteLayerElement( currentNode, note ); WriteDurationInterface(currentNode, note); WritePitchInterface(currentNode, note); note->WriteColoration(currentNode); + note->WriteGraced(currentNode); note->WriteNoteLogMensural(currentNode); note->WriteStemmed(currentNode); note->WriteTiepresent(currentNode); - if ( note->m_cueSize ) { - currentNode.append_attribute( "grace" ) = "unknown"; - } return; } void MeiOutput::WriteMeiRest( pugi::xml_node currentNode, Rest *rest ) { + assert( rest ); + WriteLayerElement( currentNode, rest ); WriteDurationInterface(currentNode, rest); WritePositionInterface(currentNode, rest); return; } + +void MeiOutput::WriteMeiProport( pugi::xml_node currentNode, Proport *proport ) +{ + WriteLayerElement( currentNode, proport ); + //meterSig->WriteMeterSigLog(currentNode); + return; +} void MeiOutput::WriteMeiSpace( pugi::xml_node currentNode, Space *space ) { + assert( space ); + WriteLayerElement( currentNode, space ); WriteDurationInterface(currentNode, space); return; @@ -641,14 +729,20 @@ void MeiOutput::WriteMeiSpace( pugi::xml_node currentNode, Space *space ) void MeiOutput::WriteMeiTuplet( pugi::xml_node currentNode, Tuplet *tuplet ) { + assert( tuplet ); + WriteLayerElement( currentNode, tuplet ); tuplet->WriteDurationRatio( currentNode ); + tuplet->WriteNumberplacement( currentNode ); + tuplet->WriteTupletVis( currentNode ); return; } void MeiOutput::WriteMeiVerse( pugi::xml_node currentNode, Verse *verse ) { + assert( verse ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( verse ).c_str(); verse->WriteCommon( currentNode ); return; @@ -656,15 +750,29 @@ void MeiOutput::WriteMeiVerse( pugi::xml_node currentNode, Verse *verse ) void MeiOutput::WriteMeiSyl( pugi::xml_node currentNode, Syl *syl ) { + assert( syl ); + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( syl ).c_str(); syl->WriteTypography( currentNode ); syl->WriteSylLog( currentNode ); WriteText( currentNode, syl ); return; } + +void MeiOutput::WriteMeiTempo( pugi::xml_node currentNode, Tempo *tempo ) +{ + assert( tempo ); + + currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( tempo ).c_str(); + WriteTextDirInterface( currentNode, tempo); + WriteText( currentNode, tempo ); + return; +} void MeiOutput::WriteDurationInterface(pugi::xml_node element, vrv::DurationInterface *interface) { + assert( interface ); + interface->WriteAugmentdots(element); interface->WriteBeamsecondary(element); interface->WriteDurationMusical(element); @@ -674,20 +782,49 @@ void MeiOutput::WriteDurationInterface(pugi::xml_node element, vrv::DurationInte interface->WriteStaffident(element); } -void MeiOutput::WritePitchInterface(pugi::xml_node element, vrv::PitchInterface *interface) +void MeiOutput::WritePitchInterface(pugi::xml_node element, PitchInterface *interface) { + assert( interface ); + interface->WriteAccidental(element); interface->WriteOctave(element); interface->WritePitch(element); } -void MeiOutput::WritePositionInterface(pugi::xml_node element, vrv::PositionInterface *interface) +void MeiOutput::WritePositionInterface(pugi::xml_node element, PositionInterface *interface) { + assert( interface ); + interface->WriteStafflocPitched(element); } -void MeiOutput::WriteTimeSpanningInterface(pugi::xml_node element, vrv::TimeSpanningInterface *interface) +void MeiOutput::WriteScoreDefInterface(pugi::xml_node element, ScoreDefInterface *interface) +{ + assert( interface ); + + interface->WriteCleffingLog(element); + interface->WriteKeySigDefaultLog(element); + interface->WriteKeySigDefaultVis(element); + interface->WriteMensuralLog(element); + interface->WriteMensuralShared(element); + interface->WriteMeterSigDefaultLog(element); + interface->WriteMeterSigDefaultVis(element); + interface->WriteMultinummeasures(element); +} + +void MeiOutput::WriteTextDirInterface(pugi::xml_node element, TextDirInterface *interface) +{ + assert( interface ); + + interface->WriteCommon(element); + interface->WritePlacement(element); + interface->WriteStaffident(element); +} + +void MeiOutput::WriteTimeSpanningInterface(pugi::xml_node element, TimeSpanningInterface *interface) { + assert( interface ); + interface->WriteStartendid(element); interface->WriteStartid(element); } @@ -699,7 +836,7 @@ void MeiOutput::WriteSameAsAttr(pugi::xml_node element, Object *object) } } -void MeiOutput::WriteUnsupportedAttr(pugi::xml_node element, vrv::Object *object) +void MeiOutput::WriteUnsupportedAttr(pugi::xml_node element, Object *object) { ArrayOfStrAttr::iterator iter; for (iter = object->m_unsupported.begin(); iter != object->m_unsupported.end(); iter++) { @@ -717,6 +854,8 @@ void MeiOutput::WriteText( pugi::xml_node element, Object *object ) void MeiOutput::WriteEditorialElement( pugi::xml_node currentNode, EditorialElement *element ) { + assert( element ); + this->WriteSameAsAttr( currentNode, element ); currentNode.append_attribute( "xml:id" ) = UuidToMeiStr( element ).c_str(); element->WriteCommon( currentNode ); @@ -724,24 +863,43 @@ void MeiOutput::WriteEditorialElement( pugi::xml_node currentNode, EditorialElem bool MeiOutput::WriteMeiApp( pugi::xml_node currentNode, App *app ) { + assert( app ); + WriteEditorialElement(currentNode, app); return true; }; bool MeiOutput::WriteMeiLem( pugi::xml_node currentNode, Lem *lem ) { + assert( lem ); + WriteEditorialElement(currentNode, lem); + lem->WriteSource( currentNode ); return true; }; bool MeiOutput::WriteMeiRdg( pugi::xml_node currentNode, Rdg *rdg ) { + assert( rdg ); + WriteEditorialElement(currentNode, rdg); + rdg->WriteSource( currentNode ); + return true; +}; + +bool MeiOutput::WriteMeiSupplied( pugi::xml_node currentNode, Supplied *supplied ) +{ + assert( supplied ); + + WriteEditorialElement(currentNode, supplied); + supplied->WriteSource( currentNode ); return true; }; bool MeiOutput::WriteMeiAnnot( pugi::xml_node currentNode, Annot *annot ) { + assert( annot ); + WriteEditorialElement(currentNode, annot); annot->WritePlist(currentNode); annot->WriteSource(currentNode); @@ -753,12 +911,6 @@ bool MeiOutput::WriteMeiAnnot( pugi::xml_node currentNode, Annot *annot ) return true; }; - -std::string MeiOutput::BoolToStr(bool value) -{ - if (value) return "true"; - return "false"; -} std::string MeiOutput::DocTypeToStr(DocType type) { @@ -776,21 +928,6 @@ std::string MeiOutput::DocTypeToStr(DocType type) return value; } -std::string MeiOutput::StaffGrpSymbolToStr(StaffGrpSymbol symbol) -{ - std::string value; - switch(symbol) - { case STAFFGRP_LINE : value = "line"; break; - case STAFFGRP_BRACE : value = "brace"; break; - case STAFFGRP_BRACKET : value = "bracket"; break; - default: - LogWarning("Unknown staffGrp @symbol '%d'", symbol); - value = "line"; - break; - } - return value; -} - //---------------------------------------------------------------------------- // MeiInput //---------------------------------------------------------------------------- @@ -799,7 +936,6 @@ MeiInput::MeiInput( Doc *doc, std::string filename ) : FileInputStream( doc ) { m_filename = filename; - m_doc->m_fname = GetFilename( filename ); m_page = NULL; m_system = NULL; // @@ -844,27 +980,32 @@ bool MeiInput::ImportString( const std::string mei ) } } -bool MeiInput::IsAllowed(std::string element, vrv::Object *filterParent) +bool MeiInput::IsAllowed(std::string element, Object *filterParent) { if (!filterParent) { return true; } - const std::type_info *elementType = &typeid(*filterParent); + // editorial if ( element == "app" ) { return true; } - if ( element == "annot" ) { + else if ( element == "annot" ) { return true; } - else if (*elementType == typeid(Note)) + else if ( element == "supplied" ) { + return true; + } + // filter for notes + else if (filterParent->Is() == NOTE) { if ( element == "accid" ) return true; else if ( element == "syl" ) return true; else if ( element == "verse" ) return true; else return false; } - else if (*elementType == typeid(Verse)) + // filter for Verse + else if (filterParent->Is() == VERSE) { if ( element == "syl" ) return true; else return false; @@ -1030,8 +1171,10 @@ bool MeiInput::ReadMeiSystem( Object *parent, pugi::xml_node system ) } // This could me moved to an AddSystem method for consistency with AddLayerElement - if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddSystem( vrvSystem ); + if ( parent->Is() == PAGE ) { + Page *page = dynamic_cast( parent ); + assert( page ); + page->AddSystem( vrvSystem ); } ReadMeiSystemChildren(vrvSystem, system); @@ -1048,7 +1191,18 @@ bool MeiInput::ReadMeiSystemChildren( Object *parent, pugi::xml_node parentNode Measure *unmeasured = NULL; for( current = parentNode.first_child( ); current; current = current.next_sibling( ) ) { if (!success) break; - if ( std::string( current.name() ) == "scoreDef" ) { + // editorial + else if ( std::string( current.name() ) == "app" ) { + success = ReadMeiApp( parent, current, EDITORIAL_SYSTEM ); + } + else if ( std::string( current.name() ) == "annot" ) { + success = ReadMeiAnnot( parent, current ); + } + else if ( std::string( current.name() ) == "supplied" ) { + success = ReadMeiSupplied( parent, current, EDITORIAL_SYSTEM ); + } + // content + else if ( std::string( current.name() ) == "scoreDef" ) { // we should not have scoredef with unmeasured within a system... (?) assert(!unmeasured); ReadMeiScoreDef( parent, current ); @@ -1056,9 +1210,11 @@ bool MeiInput::ReadMeiSystemChildren( Object *parent, pugi::xml_node parentNode // unmeasured music else if ( parentNode.child( "staff" ) ) { if (!unmeasured) { - if ( dynamic_cast( parent ) ) { + if ( parent->Is() == SYSTEM ) { + System *system = dynamic_cast( parent ); + assert( system ); unmeasured = new Measure( false ); - dynamic_cast( parent )->AddMeasure(unmeasured); + system->AddMeasure(unmeasured); } else { LogError( "Unmeasured music within editorial markup is currently not supported" ); @@ -1070,7 +1226,7 @@ bool MeiInput::ReadMeiSystemChildren( Object *parent, pugi::xml_node parentNode else if ( parentNode.child( "measure" ) ) { // we should not mix measured and unmeasured within a system... assert(!unmeasured); - if ( dynamic_cast( parent ) ) { + if ( parent->IsEditorialElement() ) { if ( !m_ignoreLayoutInformation ) { LogError( "Cannot have within editorial markup unless layout information \ is ignored and continous layout is chosen (try with --no-layout)" ); @@ -1083,12 +1239,6 @@ bool MeiInput::ReadMeiSystemChildren( Object *parent, pugi::xml_node parentNode } success = ReadMeiMeasure(parent, current); } - else if ( std::string( current.name() ) == "app" ) { - success = ReadMeiApp( parent, current, EDITORIAL_SYSTEM ); - } - else if ( std::string( current.name() ) == "annot" ) { - success = ReadMeiAnnot( parent, current ); - } else { LogWarning("Unsupported '<%s>' within ", current.name() ); } @@ -1110,24 +1260,7 @@ bool MeiInput::ReadMeiScoreDef( Object *parent, pugi::xml_node scoreDef ) } SetMeiUuid(scoreDef, vrvScoreDef); - ClefAttr clefAttr; - if ( clefAttr.ReadCleffingLog( scoreDef ) ) { - vrvScoreDef->ReplaceClef( &clefAttr ); - } - KeySigAttr keySigAttr; - if ( keySigAttr.ReadKeySigDefaultLog( scoreDef ) ) { - vrvScoreDef->ReplaceKeySig( &keySigAttr ); - } - MeterSigAttr meterSig; - if ( meterSig.ReadMeterSigDefaultLog( scoreDef ) || meterSig.ReadMeterSigDefaultVis( scoreDef ) ) { - meterSig.ReadMeterSigDefaultVis( scoreDef ); // not great, but we need to do it in case we have both and the first one succeeded - vrvScoreDef->ReplaceMeterSig( &meterSig ); - } - MensurAttr mensur; - if ( mensur.ReadMensuralLog( scoreDef ) || mensur.ReadMensuralShared( scoreDef ) ) { - mensur.ReadMensuralShared( scoreDef ); // not great, but we need to do it in case we have both and the first one succeeded - vrvScoreDef->ReplaceMensur( &mensur ); - } + ReadScoreDefInterface(scoreDef, vrvScoreDef); AddScoreDef(parent, vrvScoreDef); @@ -1142,12 +1275,17 @@ bool MeiInput::ReadMeiScoreDefChildren( Object *parent, pugi::xml_node parentNod pugi::xml_node current; for( current = parentNode.first_child( ); current; current = current.next_sibling( ) ) { if (!success) break; + // editorial if ( std::string( current.name() ) == "app" ) { success = ReadMeiApp( parent, current, EDITORIAL_SCOREDEF); } - if ( std::string( current.name() ) == "annot" ) { + else if ( std::string( current.name() ) == "annot" ) { success = ReadMeiAnnot( parent, current ); } + else if ( std::string( current.name() ) == "supplied" ) { + success = ReadMeiSupplied( parent, current, EDITORIAL_SCOREDEF ); + } + // content else if ( std::string( current.name() ) == "staffGrp" ) { success = ReadMeiStaffGrp( parent, current ); } @@ -1166,12 +1304,10 @@ bool MeiInput::ReadMeiStaffGrp( Object *parent, pugi::xml_node staffGrp ) StaffGrp *vrvStaffGrp = new StaffGrp( ); SetMeiUuid( staffGrp, vrvStaffGrp ); - if ( staffGrp.attribute( "symbol" ) ) { - vrvStaffGrp->SetSymbol( StrToStaffGrpSymbol( staffGrp.attribute( "symbol" ).value() ) ); - } - if ( staffGrp.attribute( "barthru" ) ) { - vrvStaffGrp->SetBarthru( StrToBool( staffGrp.attribute( "barthru" ).value() ) ); - } + vrvStaffGrp->ReadCommon(staffGrp); + vrvStaffGrp->ReadLabelsAddl(staffGrp); + vrvStaffGrp->ReadStaffGrpVis(staffGrp); + vrvStaffGrp->ReadStaffgroupingsym(staffGrp); AddStaffGrp(parent, vrvStaffGrp); @@ -1186,12 +1322,17 @@ bool MeiInput::ReadMeiStaffGrpChildren( Object *parent, pugi::xml_node parentNod pugi::xml_node current; for( current = parentNode.first_child( ); current; current = current.next_sibling( ) ) { if (!success) break; + // editorial if ( std::string( current.name() ) == "app" ) { success = ReadMeiApp( parent, current, EDITORIAL_STAFFGRP ); } - if ( std::string( current.name() ) == "annot" ) { + else if ( std::string( current.name() ) == "annot" ) { success = ReadMeiAnnot( parent, current ); } + else if ( std::string( current.name() ) == "supplied" ) { + success = ReadMeiSupplied( parent, current, EDITORIAL_STAFFGRP ); + } + // content else if ( std::string( current.name() ) == "staffGrp" ) { success = ReadMeiStaffGrp( parent, current); } @@ -1215,37 +1356,25 @@ bool MeiInput::ReadMeiStaffDef( Object *parent, pugi::xml_node staffDef ) vrvStaffDef->ReadCommon(staffDef); vrvStaffDef->ReadLabelsAddl(staffDef); + vrvStaffDef->ReadScalable(staffDef); vrvStaffDef->ReadStaffDefVis(staffDef); if ( !vrvStaffDef->HasN() ) { LogWarning("No @n on might yield unpredictable results"); } - ClefAttr clefAttr; - if ( clefAttr.ReadCleffingLog( staffDef ) ) { - vrvStaffDef->ReplaceClef( &clefAttr ); - } - KeySigAttr keySigAttr; - if ( keySigAttr.ReadKeySigDefaultLog( staffDef ) ) { - vrvStaffDef->ReplaceKeySig( &keySigAttr ); - } - MeterSigAttr meterSig; - if ( meterSig.ReadMeterSigDefaultLog( staffDef ) || meterSig.ReadMeterSigDefaultVis( staffDef ) ) { - meterSig.ReadMeterSigDefaultVis( staffDef ); // not great, but we need to do it in case we have both and the first one succeeded - vrvStaffDef->ReplaceMeterSig( &meterSig ); - } - MensurAttr mensur; - if ( mensur.ReadMensuralLog( staffDef ) || mensur.ReadMensuralShared( staffDef ) ) { - mensur.ReadMensuralShared( staffDef ); // not great, but we need to do it in case we have both and the first one succeeded - vrvStaffDef->ReplaceMensur( &mensur ); - } + ReadScoreDefInterface(staffDef, vrvStaffDef); // This could me moved to an AddMeasure method for consistency with AddLayerElement - if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddStaffDef(vrvStaffDef); + if ( parent->Is() == STAFFGRP ) { + StaffGrp *staffGrp = dynamic_cast( parent ); + assert( staffGrp ); + staffGrp->AddStaffDef(vrvStaffDef); } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddStaffDef(vrvStaffDef); + else if ( parent->IsEditorialElement() ) { + EditorialElement *element = dynamic_cast( parent ); + assert( element ); + element->AddStaffDef(vrvStaffDef); } return true; @@ -1259,16 +1388,16 @@ bool MeiInput::ReadMeiMeasure( Object *parent, pugi::xml_node measure ) vrvMeasure->ReadCommon(measure); vrvMeasure->ReadMeasureLog(measure); - // here we transfer the @left and @right values to the barLine objects - vrvMeasure->SetLeftBarlineType( vrvMeasure->GetLeft() ); - vrvMeasure->SetRightBarlineType( vrvMeasure->GetRight() ); - // This could me moved to an AddMeasure method for consistency with AddLayerElement - if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddMeasure(vrvMeasure); + if ( parent->Is() == SYSTEM ) { + System *system = dynamic_cast( parent ); + assert( system ); + system->AddMeasure(vrvMeasure); } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddMeasure(vrvMeasure); + else if ( parent->IsEditorialElement() ) { + EditorialElement *element = dynamic_cast( parent ); + assert( element ); + element->AddMeasure(vrvMeasure); } return ReadMeiMeasureChildren(vrvMeasure, measure); @@ -1282,25 +1411,33 @@ bool MeiInput::ReadMeiMeasureChildren( Object *parent, pugi::xml_node parentNode pugi::xml_node current; for( current = parentNode.first_child( ); current; current = current.next_sibling( ) ) { if (!success) break; + // editorial if ( std::string( current.name() ) == "app" ) { success = ReadMeiApp( parent, current, EDITORIAL_MEASURE); } - if ( std::string( current.name() ) == "annot" ) { + else if ( std::string( current.name() ) == "annot" ) { success = ReadMeiAnnot( parent, current ); } + else if ( std::string( current.name() ) == "supplied" ) { + success = ReadMeiSupplied( parent, current, EDITORIAL_MEASURE ); + } + // content else if ( std::string( current.name() ) == "staff" ) { success = ReadMeiStaff( parent, current ); } - else if ( std::string( current.name() ) == "tupletSpan" ) { - if (!ReadTupletSpanAsTuplet( dynamic_cast( parent ), current )) { - LogWarning( " not readable as and ignored" ); - } + else if ( std::string( current.name() ) == "slur" ) { + success = ReadMeiSlur( parent, current ); + } + else if ( std::string( current.name() ) == "tempo" ) { + success = ReadMeiTempo( parent, current ); } else if ( std::string( current.name() ) == "tie" ) { success = ReadMeiTie( parent, current ); } - else if ( std::string( current.name() ) == "slur" ) { - success = ReadMeiSlur( parent, current ); + else if ( std::string( current.name() ) == "tupletSpan" ) { + if (!ReadTupletSpanAsTuplet( dynamic_cast( parent ), current )) { + LogWarning( " not readable as and ignored" ); + } } else { LogWarning("Unsupported '<%s>' within ", current.name() ); @@ -1315,9 +1452,10 @@ bool MeiInput::ReadMeiTie( Object *parent, pugi::xml_node tie ) Tie *vrvTie = new Tie(); SetMeiUuid(tie, vrvTie); + vrvTie->ReadCurvature(tie); ReadTimeSpanningInterface(tie, vrvTie); - AddMeasureElement(parent, vrvTie); + AddFloatingElement(parent, vrvTie); return true; } @@ -1327,9 +1465,10 @@ bool MeiInput::ReadMeiSlur( Object *parent, pugi::xml_node slur ) Slur *vrvSlur = new Slur(); SetMeiUuid(slur, vrvSlur); + vrvSlur->ReadCurvature(slur); ReadTimeSpanningInterface(slur, vrvSlur); - AddMeasureElement(parent, vrvSlur); + AddFloatingElement(parent, vrvSlur); return true; } @@ -1353,7 +1492,17 @@ bool MeiInput::ReadMeiStaff( Object *parent, pugi::xml_node staff ) LogWarning("No @n on might yield unpredictable results"); } - AddMeasureElement(parent, vrvStaff); + // This could me moved to an AddLayer method for consistency with AddLayerElement + if ( parent->Is() == MEASURE ) { + Measure *measure = dynamic_cast( parent ); + assert( measure ); + measure->AddStaff( vrvStaff ); + } + else if ( parent->IsEditorialElement() ) { + EditorialElement *element = dynamic_cast( parent ); + assert( element ); + element->AddStaff( vrvStaff ); + } return ReadMeiStaffChildren( vrvStaff, staff ); } @@ -1367,12 +1516,17 @@ bool MeiInput::ReadMeiStaffChildren( Object *parent, pugi::xml_node parentNode ) pugi::xml_node current; for( current = parentNode.first_child( ); current; current = current.next_sibling( ) ) { if (!success) break; + // editorial if ( std::string( current.name() ) == "app" ) { success = ReadMeiApp( parent, current, EDITORIAL_STAFF); } - if ( std::string( current.name() ) == "annot" ) { + else if ( std::string( current.name() ) == "annot" ) { success = ReadMeiAnnot( parent, current ); } + else if ( std::string( current.name() ) == "supplied" ) { + success = ReadMeiSupplied( parent, current, EDITORIAL_STAFF ); + } + //content else if ( std::string( current.name() ) == "layer" ) { success = ReadMeiLayer( parent, current); } @@ -1396,11 +1550,15 @@ bool MeiInput::ReadMeiLayer( Object *parent, pugi::xml_node layer ) } // This could me moved to an AddLayer method for consistency with AddLayerElement - if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayer( vrvLayer ); + if ( parent->Is() == STAFF ) { + Staff *staff = dynamic_cast( parent ); + assert( staff ); + staff->AddLayer( vrvLayer ); } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayer( vrvLayer ); + else if ( parent->IsEditorialElement() ) { + EditorialElement *element = dynamic_cast( parent ); + assert( element ); + element->AddLayer( vrvLayer ); } return ReadMeiLayerChildren( vrvLayer, layer ); @@ -1435,6 +1593,9 @@ bool MeiInput::ReadMeiLayerChildren( Object *parent, pugi::xml_node parentNode, else if ( elementName == "beam" ) { success = ReadMeiBeam( parent, xmlElement); } + else if ( elementName == "beatRpt" ) { + success = ReadMeiBeatRpt( parent, xmlElement); + } else if ( elementName == "chord" ) { success = ReadMeiChord( parent, xmlElement); } @@ -1465,12 +1626,27 @@ bool MeiInput::ReadMeiLayerChildren( Object *parent, pugi::xml_node parentNode, else if ( elementName == "mRest" ) { success = ReadMeiMRest( parent, xmlElement ); } + else if ( elementName == "mRpt" ) { + success = ReadMeiMRpt( parent, xmlElement ); + } + else if ( elementName == "mRpt2" ) { + success = ReadMeiMRpt2( parent, xmlElement ); + } else if ( elementName == "multiRest" ) { success = ReadMeiMultiRest( parent, xmlElement ); } + else if ( elementName == "multiRpt" ) { + success = ReadMeiMultiRpt( parent, xmlElement ); + } + else if ( elementName == "proport" ) { + success = ReadMeiProport( parent, xmlElement ); + } else if ( elementName == "space" ) { success = ReadMeiSpace( parent, xmlElement ); } + else if ( elementName == "supplied" ) { + success = ReadMeiSupplied( parent, xmlElement, EDITORIAL_LAYER, filter ); + } else if ( elementName == "syl" ) { success = ReadMeiSyl( parent, xmlElement ); } @@ -1542,6 +1718,16 @@ bool MeiInput::ReadMeiBeam( Object *parent, pugi::xml_node beam ) return true; } +bool MeiInput::ReadMeiBeatRpt( Object *parent, pugi::xml_node beatRpt ) +{ + BeatRpt *vrvBeatRpt = new BeatRpt(); + ReadLayerElement(beatRpt, vrvBeatRpt); + vrvBeatRpt->ReadBeatRptVis(beatRpt); + + AddLayerElement(parent, vrvBeatRpt); + return true; +} + bool MeiInput::ReadMeiChord( Object *parent, pugi::xml_node chord) { Chord *vrvChord = new Chord(); @@ -1552,10 +1738,6 @@ bool MeiInput::ReadMeiChord( Object *parent, pugi::xml_node chord) vrvChord->ReadStemmed(chord); vrvChord->ReadTiepresent(chord); - if ( chord.attribute( "grace" ) ) { - vrvChord->m_cueSize = true; - } - AddLayerElement(parent, vrvChord); return ReadMeiLayerChildren(vrvChord, chord); } @@ -1648,10 +1830,28 @@ bool MeiInput::ReadMeiMRest( Object *parent, pugi::xml_node mRest ) AddLayerElement(parent, vrvMRest); return true; } + +bool MeiInput::ReadMeiMRpt( Object *parent, pugi::xml_node mRpt ) +{ + MRpt *vrvMRpt = new MRpt(); + ReadLayerElement(mRpt, vrvMRpt); + + AddLayerElement(parent, vrvMRpt); + return true; +} +bool MeiInput::ReadMeiMRpt2( Object *parent, pugi::xml_node mRpt2 ) +{ + MRpt2 *vrvMRpt2 = new MRpt2(); + ReadLayerElement(mRpt2, vrvMRpt2); + + AddLayerElement(parent, vrvMRpt2); + return true; +} + bool MeiInput::ReadMeiMultiRest( Object *parent, pugi::xml_node multiRest ) { - MultiRest *vrvMultiRest = new MultiRest( 1 ); + MultiRest *vrvMultiRest = new MultiRest( ); ReadLayerElement(multiRest, vrvMultiRest); vrvMultiRest->ReadNumbered(multiRest); @@ -1660,6 +1860,16 @@ bool MeiInput::ReadMeiMultiRest( Object *parent, pugi::xml_node multiRest ) return true; } +bool MeiInput::ReadMeiMultiRpt( Object *parent, pugi::xml_node multiRpt ) +{ + MultiRpt *vrvMultiRpt = new MultiRpt(); + ReadLayerElement(multiRpt, vrvMultiRpt); + vrvMultiRpt->ReadNumbered(multiRpt); + + AddLayerElement(parent, vrvMultiRpt); + return true; +} + bool MeiInput::ReadMeiNote( Object *parent, pugi::xml_node note ) { Note *vrvNote = new Note(); @@ -1668,15 +1878,11 @@ bool MeiInput::ReadMeiNote( Object *parent, pugi::xml_node note ) ReadDurationInterface(note, vrvNote); ReadPitchInterface(note, vrvNote); vrvNote->ReadColoration(note); + vrvNote->ReadGraced(note); vrvNote->ReadNoteLogMensural(note); vrvNote->ReadStemmed(note); vrvNote->ReadTiepresent(note); - // grace - if ( note.attribute( "grace" ) ) { - vrvNote->m_cueSize = true; // - } - AddLayerElement(parent, vrvNote); // We can drop this once we allow and child @@ -1702,6 +1908,18 @@ bool MeiInput::ReadMeiRest( Object *parent, pugi::xml_node rest ) return true; } +bool MeiInput::ReadMeiProport( Object *parent, pugi::xml_node proport ) +{ + Proport *vrvProport = new Proport(); + ReadLayerElement(proport, vrvProport); + + //vrvMeterSig->ReadMeterSigLog(meterSig); + vrvProport->ReadDurationRatio( proport ); + + AddLayerElement(parent, vrvProport); + return true; +} + bool MeiInput::ReadMeiSpace( Object *parent, pugi::xml_node space ) { Space *vrvSpace = new Space(); @@ -1733,6 +1951,8 @@ bool MeiInput::ReadMeiTuplet( Object *parent, pugi::xml_node tuplet ) // Read in the numerator and denominator properties vrvTuplet->ReadDurationRatio(tuplet); + vrvTuplet->ReadNumberplacement(tuplet); + vrvTuplet->ReadTupletVis(tuplet); AddLayerElement(parent, vrvTuplet); @@ -1756,6 +1976,19 @@ bool MeiInput::ReadMeiVerse(Object *parent, pugi::xml_node verse) return ReadMeiLayerChildren(vrvVerse, verse, vrvVerse); } + +bool MeiInput::ReadMeiTempo(Object *parent, pugi::xml_node tempo) +{ + Tempo *vrvTempo = new Tempo(); + SetMeiUuid(tempo, vrvTempo); + + ReadTextDirInterface(tempo, vrvTempo); + ReadText( tempo, vrvTempo ); + + AddFloatingElement(parent, vrvTempo); + + return true; +} bool MeiInput::ReadDurationInterface(pugi::xml_node element, DurationInterface *interface) { @@ -1783,6 +2016,27 @@ bool MeiInput::ReadPositionInterface(pugi::xml_node element, PositionInterface * return true; } +bool MeiInput::ReadScoreDefInterface(pugi::xml_node element, ScoreDefInterface *interface) +{ + interface->ReadCleffingLog(element); + interface->ReadKeySigDefaultLog(element); + interface->ReadKeySigDefaultVis(element); + interface->ReadMensuralLog(element); + interface->ReadMensuralShared(element); + interface->ReadMeterSigDefaultLog(element); + interface->ReadMeterSigDefaultVis(element); + interface->ReadMultinummeasures(element); + return true; +} + +bool MeiInput::ReadTextDirInterface(pugi::xml_node element, TextDirInterface *interface) +{ + interface->ReadCommon(element); + interface->ReadPlacement(element); + interface->ReadStaffident(element); + return true; +} + bool MeiInput::ReadTimeSpanningInterface(pugi::xml_node element, TimeSpanningInterface *interface) { interface->ReadStartendid(element); @@ -1865,10 +2119,10 @@ bool MeiInput::ReadMeiAppChildren( Object *parent, pugi::xml_node parentNode, Ed for( current = parentNode.first_child( ); current; current = current.next_sibling( ) ) { if (!success) break; if ( std::string( current.name() ) == "lem" ) { - success = ReadMeiLemOrRdg( parent, current, level, filter); + success = ReadMeiLem( parent, current, level, filter); } else if ( std::string( current.name() ) == "rdg" ) { - success = ReadMeiLemOrRdg( parent, current, level, filter); + success = ReadMeiRdg( parent, current, level, filter); } else { LogWarning("Unsupported '<%s>' within ", current.name() ); @@ -1898,41 +2152,70 @@ bool MeiInput::ReadMeiAppChildren( Object *parent, pugi::xml_node parentNode, Ed return success; } -bool MeiInput::ReadMeiLemOrRdg( Object *parent, pugi::xml_node lemOrRdg, EditorialLevel level, Object *filter ) +bool MeiInput::ReadMeiLem( Object *parent, pugi::xml_node lem, EditorialLevel level, Object *filter ) +{ + assert( dynamic_cast( parent ) ); + + Lem *vrvLem = new Lem(); + // By default make them all hidden. MeiInput::ReadMeiAppChildren will make one visible. + vrvLem->m_visibility = Hidden; + + ReadEditorialElement( lem, vrvLem ); + vrvLem->ReadSource( lem ); + + dynamic_cast( parent )->AddLemOrRdg( vrvLem ); + + return ReadMeiEditorialChildren(vrvLem, lem, level, filter); +} +bool MeiInput::ReadMeiRdg( Object *parent, pugi::xml_node rdg, EditorialLevel level, Object *filter ) { assert( dynamic_cast( parent ) ); - EditorialElement *vrvLemOrRdg; - if ( std::string( lemOrRdg.name() ) == "lem" ) { - vrvLemOrRdg = new Lem(); - } - else { - vrvLemOrRdg = new Rdg(); - } + Rdg *vrvRdg = new Rdg(); // By default make them all hidden. MeiInput::ReadMeiAppChildren will make one visible. - vrvLemOrRdg->m_visibility = Hidden; + vrvRdg->m_visibility = Hidden; + + ReadEditorialElement( rdg, vrvRdg ); + vrvRdg->ReadSource( rdg ); + + dynamic_cast( parent )->AddLemOrRdg(vrvRdg); + + return ReadMeiEditorialChildren(vrvRdg, rdg, level, filter); +} + +bool MeiInput::ReadMeiSupplied( Object *parent, pugi::xml_node supplied, EditorialLevel level, Object *filter ) +{ + Supplied *vrvSupplied = new Supplied();; - ReadEditorialElement( lemOrRdg, vrvLemOrRdg ); - dynamic_cast( parent )->AddLemOrRdg(vrvLemOrRdg); + ReadEditorialElement( supplied, vrvSupplied ); + vrvSupplied->ReadSource( supplied ); + parent->AddEditorialElement(vrvSupplied); + + return ReadMeiEditorialChildren(vrvSupplied, supplied, level, filter); +} + +bool MeiInput::ReadMeiEditorialChildren( Object *parent, pugi::xml_node parentNode, EditorialLevel level, Object *filter ) +{ + assert( dynamic_cast( parent ) ); if (level == EDITORIAL_SYSTEM) { - return ReadMeiSystemChildren(vrvLemOrRdg, lemOrRdg); + return ReadMeiSystemChildren(parent, parentNode); } else if (level == EDITORIAL_SCOREDEF) { - return ReadMeiScoreDefChildren(vrvLemOrRdg, lemOrRdg); + return ReadMeiScoreDefChildren(parent, parentNode); } else if (level == EDITORIAL_STAFFGRP) { - return ReadMeiStaffGrpChildren(vrvLemOrRdg, lemOrRdg); + return ReadMeiStaffGrpChildren(parent, parentNode); } else if (level == EDITORIAL_MEASURE) { - return ReadMeiMeasureChildren(vrvLemOrRdg, lemOrRdg); + return ReadMeiMeasureChildren(parent, parentNode); } else if (level == EDITORIAL_STAFF) { - return ReadMeiStaffChildren(vrvLemOrRdg, lemOrRdg); + return ReadMeiStaffChildren(parent, parentNode); } else if (level == EDITORIAL_LAYER) { - return ReadMeiLayerChildren(vrvLemOrRdg, lemOrRdg, filter); + return ReadMeiLayerChildren(parent, parentNode, filter); } else { return false; @@ -1964,11 +2247,15 @@ void MeiInput::AddScoreDef(Object *parent, ScoreDef *scoreDef) if (!m_hasScoreDef) { m_hasScoreDef = true; } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddScoreDef( scoreDef ); + else if ( parent->IsEditorialElement() ) { + EditorialElement *element = dynamic_cast( parent ); + assert( element ); + element->AddScoreDef( scoreDef ); } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddScoreDef( scoreDef ); + else if ( parent->Is() == SYSTEM ) { + System *system = dynamic_cast( parent ); + assert( system ); + system->AddScoreDef( scoreDef ); } else { LogWarning("'%s' not supported within '%s'", scoreDef->GetClassName().c_str(), parent->GetClassName().c_str() ); @@ -1976,15 +2263,17 @@ void MeiInput::AddScoreDef(Object *parent, ScoreDef *scoreDef) } } -void MeiInput::AddStaffGrp(Object *parent, StaffGrp *staffGrp) +void MeiInput::AddStaffGrp(Object *parent, StaffGrp *staffGrp ) { - if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddStaffGrp( staffGrp ); + if ( parent->IsEditorialElement() ) { + EditorialElement *element = dynamic_cast( parent ); + assert( element ); + element->AddStaffGrp( staffGrp ); } - else if ( dynamic_cast( parent ) ) { + else if ( parent->Is() == SCOREDEF ) { dynamic_cast( parent )->AddStaffGrp( staffGrp ); } - else if ( dynamic_cast( parent ) ) { + else if ( parent->Is() == STAFFGRP ) { dynamic_cast( parent )->AddStaffGrp( staffGrp ); } else { @@ -1995,26 +2284,40 @@ void MeiInput::AddStaffGrp(Object *parent, StaffGrp *staffGrp) void MeiInput::AddLayerElement( Object *parent, LayerElement *element ) { - if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayerElement( element ); - } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayerElement( element ); - } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayerElement( element ); - } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayerElement( element ); - } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayerElement( element ); - } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayerElement( element ); - } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddLayerElement( element ); + if ( parent->IsEditorialElement() ) { + EditorialElement *editorialElement = dynamic_cast( parent ); + assert( editorialElement ); + editorialElement->AddLayerElement( element ); + } + else if ( parent->Is() == LAYER ) { + Layer *layer = dynamic_cast( parent ); + assert( layer ); + layer->AddLayerElement( element ); + } + else if ( parent->Is() == CHORD ) { + Chord *chord = dynamic_cast( parent ); + assert( chord ); + chord->AddLayerElement( element ); + } + else if ( parent->Is() == NOTE ) { + Note *note = dynamic_cast( parent ); + assert( note ); + note->AddLayerElement( element ); + } + else if ( parent->Is() == BEAM ) { + Beam * beam = dynamic_cast( parent ); + assert( beam ); + beam->AddLayerElement( element ); + } + else if ( parent->Is() == TUPLET ) { + Tuplet *tuplet = dynamic_cast( parent ); + assert( tuplet ); + tuplet->AddLayerElement( element ); + } + else if ( parent->Is() == VERSE ) { + Verse *verse = dynamic_cast( parent ); + assert( verse ); + verse->AddLayerElement( element ); } else { LogWarning("'%s' not supported within '%s'", element->GetClassName().c_str(), parent->GetClassName().c_str() ); @@ -2022,13 +2325,17 @@ void MeiInput::AddLayerElement( Object *parent, LayerElement *element ) } } -void MeiInput::AddMeasureElement(Object *parent, MeasureElement *element) +void MeiInput::AddFloatingElement(Object *parent, FloatingElement *element) { - if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddMeasureElement( element ); + if ( parent->IsEditorialElement() ) { + EditorialElement *editorialElement = dynamic_cast( parent ); + assert( editorialElement ); + editorialElement->AddFloatingElement( element ); } - else if ( dynamic_cast( parent ) ) { - dynamic_cast( parent )->AddMeasureElement( element ); + else if ( parent->Is() == MEASURE ) { + Measure *measure = dynamic_cast( parent ); + assert( measure ); + measure->AddFloatingElement( element ); } else { LogWarning("'%s' not supported within '%s'", element->GetClassName().c_str(), parent->GetClassName().c_str() ); @@ -2039,12 +2346,17 @@ void MeiInput::AddMeasureElement(Object *parent, MeasureElement *element) bool MeiInput::ReadScoreBasedMei( pugi::xml_node element ) { bool success = true; + // editorial if ( (std::string( element.name() ) == "app") ) { success = ReadMeiApp( m_system, element, EDITORIAL_SYSTEM ); } - if ( (std::string( element.name() ) == "annot") ) { + else if ( (std::string( element.name() ) == "annot") ) { success = ReadMeiAnnot( m_system, element ); } + else if ( (std::string( element.name() ) == "supplied") ) { + success = ReadMeiSupplied( m_system, element, EDITORIAL_SYSTEM ); + } + // content else if ( std::string( element.name() ) == "measure" ) { // This is the call that will put us back on the page-based reading loop success = ReadMeiMeasure( m_system, element ); @@ -2121,7 +2433,6 @@ bool MeiInput::ReadTupletSpanAsTuplet( Measure *measure, pugi::xml_node tupletSp if ( tupletSpan.attribute( "startid" ) ) { std::string refId = ExtractUuidFragment( tupletSpan.attribute( "startid" ).value() ); start = dynamic_cast( measure->FindChildByUuid( refId ) ); - if (!start) { LogWarning( "Element with @startid '%s' not found when trying to read the ", refId.c_str() ); } @@ -2130,7 +2441,6 @@ bool MeiInput::ReadTupletSpanAsTuplet( Measure *measure, pugi::xml_node tupletSp if ( tupletSpan.attribute( "endid" ) ) { std::string refId = ExtractUuidFragment( tupletSpan.attribute( "endid" ).value() ); end = dynamic_cast( measure->FindChildByUuid( refId ) ); - if (!end) { LogWarning( "Element with @endid '%s' not found when trying to read the ", refId.c_str() ); } @@ -2140,8 +2450,8 @@ bool MeiInput::ReadTupletSpanAsTuplet( Measure *measure, pugi::xml_node tupletSp return false; } - LayerElement *startChild = dynamic_cast( start->GetLastParentNot( &typeid(Layer) ) ); - LayerElement *endChild = dynamic_cast( end->GetLastParentNot( &typeid(Layer) ) ); + LayerElement *startChild = dynamic_cast( start->GetLastParentNot( LAYER ) ); + LayerElement *endChild = dynamic_cast( end->GetLastParentNot( LAYER ) ); if ( !startChild || !endChild || (startChild->m_parent != endChild->m_parent) ) { LogWarning( "Start and end elements for '%s' not in the same layer", tuplet->GetUuid().c_str() ); @@ -2150,13 +2460,15 @@ bool MeiInput::ReadTupletSpanAsTuplet( Measure *measure, pugi::xml_node tupletSp } Layer *parentLayer = dynamic_cast( startChild->m_parent ); + assert( parentLayer ); int startIdx = startChild->GetIdx(); int endIdx = endChild->GetIdx(); //LogDebug("%d %d %s!", startIdx, endIdx, start->GetUuid().c_str()); int i; for (i = endIdx; i >= startIdx; i--) { - tuplet->AddLayerElement( dynamic_cast( parentLayer->DetachChild(i) ) ); + LayerElement *element = dynamic_cast( parentLayer->DetachChild(i) ); + if (element) tuplet->AddLayerElement( element ); } tuplet->SetParent( parentLayer ); parentLayer->InsertChild( tuplet, startIdx ); @@ -2173,12 +2485,6 @@ void MeiInput::SetMeiUuid( pugi::xml_node element, Object *object ) object->SetUuid( element.attribute( "xml:id" ).value() ); element.remove_attribute("xml:id"); } - -bool MeiInput::StrToBool(std::string value) -{ - if (value == "false") return false; - return true; -} DocType MeiInput::StrToDocType(std::string type) { @@ -2191,18 +2497,6 @@ DocType MeiInput::StrToDocType(std::string type) // default return Raw; } - -StaffGrpSymbol MeiInput::StrToStaffGrpSymbol(std::string symbol) -{ - if (symbol == "line") return STAFFGRP_LINE; - else if (symbol == "brace") return STAFFGRP_BRACE; - else if (symbol == "bracket") return STAFFGRP_BRACKET; - else { - LogWarning("Unknown staffGrp @symbol '%s'", symbol.c_str() ); - } - // default - return STAFFGRP_LINE; -} std::string MeiInput::ExtractUuidFragment(std::string refUuid) { diff --git a/src/iomusxml.cpp b/src/iomusxml.cpp index d1d948121bb..436ac0096f0 100644 --- a/src/iomusxml.cpp +++ b/src/iomusxml.cpp @@ -292,7 +292,7 @@ void XMLOutput::WriteKey(LayerElement *element) { // Convert the number of alterations to string std::stringstream n_alter; - if (key->GetAlteration() == ACCID_FLAT) + if (key->GetAlterationType() == ACCIDENTAL_EXPLICIT_f) // flats are negative numbers n_alter << -key->GetAlterationNumber(); else @@ -528,7 +528,7 @@ void XMLOutput::WriteNoteOrRest(LayerElement *element) { } else if (dynamic_cast(element)) { - Rest *r = dynamic_cast(element); + //Rest *r = dynamic_cast(element); // rests just link a item //pugi::xml_node rest = note.append_child("rest"); @@ -536,10 +536,10 @@ void XMLOutput::WriteNoteOrRest(LayerElement *element) { // handle multi measure rest // break from the generation of this element - if (r->GetActualDur() == VALSilSpec) { - WriteMultiMeasureRest(r); - return; - } + //if (r->GetActualDur() == VALSilSpec) { + // WriteMultiMeasureRest(r); + // return; + //} } // put the duration diff --git a/src/iopae.cpp b/src/iopae.cpp index 696e8bfa09a..3e76d7e6d4b 100644 --- a/src/iopae.cpp +++ b/src/iopae.cpp @@ -10,6 +10,7 @@ //---------------------------------------------------------------------------- +#include #include //---------------------------------------------------------------------------- @@ -32,8 +33,9 @@ //---------------------------------------------------------------------------- - +#ifndef NO_PAE_SUPPORT #include +#endif namespace vrv { @@ -83,24 +85,31 @@ PaeInput::~PaeInput() bool PaeInput::ImportFile() { - +#ifndef NO_PAE_SUPPORT std::ifstream infile; infile.open(m_filename.c_str()); - parsePlainAndEasy(infile); - return true; +#else + LogError("Plain and Easy import is not supported in the build."); + return false; +#endif } bool PaeInput::ImportString(std::string pae) { - +#ifndef NO_PAE_SUPPORT std::istringstream in_stream(pae); - parsePlainAndEasy(in_stream); - return true; +#else + LogError("Plain and Easy import is not support in the build."); + return false; +#endif + } + +#ifndef NO_PAE_SUPPORT ////////////////////////////// // @@ -361,7 +370,7 @@ void PaeInput::parsePlainAndEasy(std::istream &infile) { m_layer->SetN( 1 ); m_staff->AddLayer(m_layer); - m_measure->AddMeasureElement( m_staff ); + m_measure->AddStaff( m_staff ); system->AddMeasure( m_measure ); MeasureObject obj = *it; @@ -375,12 +384,10 @@ void PaeInput::parsePlainAndEasy(std::istream &infile) { staffDef->SetN( 1 ); staffDef->SetLines(5); if (staffDefClef) { - ClefAttr clefAttr; - clefAttr.SetClefShape(staffDefClef->GetShape()); - clefAttr.SetClefLine(staffDefClef->GetLine()); - clefAttr.SetClefDis(staffDefClef->GetDis()); - clefAttr.SetClefDisPlace(staffDefClef->GetDisPlace()); - staffDef->ReplaceClef( &clefAttr ); + staffDef->SetClefShape(staffDefClef->GetShape()); + staffDef->SetClefLine(staffDefClef->GetLine()); + staffDef->SetClefDis(staffDefClef->GetDis()); + staffDef->SetClefDisPlace(staffDefClef->GetDisPlace()); delete staffDefClef; } staffGrp->AddStaffDef( staffDef ); @@ -760,7 +767,6 @@ int PaeInput::getTimeInfo( const char* incipit, MeterSig *meter, int index) { } else if ( is_one_number == 0) { int beats = atoi(timesig_str); meter->SetCount(beats); - meter->SetUnit(1); } else if (strcmp(timesig_str, "c") == 0) { // C meter->SetSym(METERSIGN_common); @@ -957,8 +963,10 @@ int PaeInput::getKeyInfo(const char *incipit, KeySig *key, int index ) { bool end_of_keysig = false; while ((i < length) && (!end_of_keysig)) { switch (incipit[i]) { - case 'b': key->SetAlteration(ACCID_FLAT); break; - case 'x': key->SetAlteration(ACCID_SHARP); break; + case 'b': key->SetAlterationType(ACCIDENTAL_EXPLICIT_f); break; + case 'x': key->SetAlterationType(ACCIDENTAL_EXPLICIT_s); break; + case 'n': key->SetAlterationType(ACCIDENTAL_EXPLICIT_n); break; + case '[': break; case 'F': case 'C': case 'G': @@ -974,7 +982,9 @@ int PaeInput::getKeyInfo(const char *incipit, KeySig *key, int index ) { i++; } - key->SetAlterationNumber(alt_nr); + if (key->GetAlterationType() != ACCIDENTAL_EXPLICIT_n) { + key->SetAlterationNumber(alt_nr); + } key->ConvertToMei(); @@ -1176,13 +1186,19 @@ void PaeInput::parseNote(NoteObject note) { // Acciaccaturas are similar but do not get beamed (do they) // this case is simpler. NOTE a note can not be acciacctura AND appoggiatura // Acciaccatura rests do not exist - if (note.acciaccatura && dynamic_cast(element)) { - element->m_cueSize = true; - dynamic_cast(element)->m_acciaccatura = true; + if (note.acciaccatura && (element->Is() == NOTE) ) { + Note *note = dynamic_cast(element); + assert( note ); + note->SetDur(DURATION_8); + note->SetGrace(GRACE_acc); + note->SetStemDir(STEMDIRECTION_up); } - if (note.appoggiatura > 0) { - element->m_cueSize = true; + if ( (note.appoggiatura > 0) && (element->Is() == NOTE) ) { + Note *note = dynamic_cast(element); + assert( note ); + note->SetGrace(GRACE_unacc); + note->SetStemDir(STEMDIRECTION_up); } if (note.beam == BEAM_INITIAL) { @@ -1230,11 +1246,15 @@ void PaeInput::addLayerElement(LayerElement *element) { if (m_nested_objects.size() > 0) { LayerElement *bottom = m_nested_objects.back(); - if ( dynamic_cast( bottom ) ) { - ((Beam*)bottom)->AddLayerElement( element ); + if ( bottom->Is() == BEAM ) { + Beam *beam = dynamic_cast( bottom ); + assert( beam ); + beam->AddLayerElement( element ); } - else if ( dynamic_cast( bottom ) ) { - ((Tuplet*)bottom)->AddLayerElement( element ); + else if ( bottom->Is() == TUPLET ) { + Tuplet *tuplet = dynamic_cast( bottom ); + assert( tuplet ); + tuplet->AddLayerElement( element ); } } else { @@ -1325,4 +1345,6 @@ void PaeInput::getAtRecordKeyValue(char *key, char* value, } } +#endif // NO_PAE_SUPPORT + } // namespace vrv diff --git a/src/keysig.cpp b/src/keysig.cpp index 737da8930c3..943ed7dda49 100644 --- a/src/keysig.cpp +++ b/src/keysig.cpp @@ -7,6 +7,7 @@ #include "keysig.h" +#include "scoredefinterface.h" //---------------------------------------------------------------------------- @@ -16,9 +17,9 @@ namespace vrv { //---------------------------------------------------------------------------- -// KeySig +// Static members with some default values //---------------------------------------------------------------------------- - + data_PITCHNAME KeySig::flats[] = {PITCHNAME_b, PITCHNAME_e, PITCHNAME_a, PITCHNAME_d, PITCHNAME_g, PITCHNAME_c, PITCHNAME_f}; data_PITCHNAME KeySig::sharps[] = {PITCHNAME_f, PITCHNAME_c, PITCHNAME_g, PITCHNAME_d, PITCHNAME_a, PITCHNAME_e, PITCHNAME_b}; @@ -49,28 +50,36 @@ int KeySig::octave_map[2][9][7] = { }, }; +//---------------------------------------------------------------------------- +// KeySig +//---------------------------------------------------------------------------- + KeySig::KeySig(): - LayerElement("ksig-") + LayerElement("ksig-"), + AttAccidental(), + AttPitch() { - Reset(); + Init(); } -KeySig::KeySig(int num_alter, char alter): +KeySig::KeySig(int alterationNumber, data_ACCIDENTAL_EXPLICIT alterationType): LayerElement("ksig-"), AttAccidental(), AttPitch() { - Reset(); - m_num_alter = num_alter; - m_alteration = alter; + Init(); + + m_alterationNumber = alterationNumber; + m_alterationType = alterationType; } -KeySig::KeySig( KeySigAttr *keySigAttr ): +KeySig::KeySig( ScoreDefInterface *keySigAttr ): LayerElement("ksig-"), AttAccidental(), AttPitch() { - Reset(); + Init(); + char key = keySigAttr->GetKeySig() - KEYSIGNATURE_0; /* see data_KEYSIGNATURE order; key will be: 0 for KEYSIGNATURE_0 @@ -85,12 +94,26 @@ KeySig::KeySig( KeySigAttr *keySigAttr ): return; } if (key > 0) { - m_alteration = ACCID_SHARP; + m_alterationType = ACCIDENTAL_EXPLICIT_s; } else if (key < 0) { - m_alteration = ACCID_FLAT; + m_alterationType = ACCIDENTAL_EXPLICIT_f; + } + m_alterationNumber = abs(key); + + if ( keySigAttr->GetKeySigShow() == BOOLEAN_false ) { + m_drawingShow = false; + } + if ( keySigAttr->GetKeySigShowchange() == BOOLEAN_true ) { + m_drawingShowchange = true; } - m_num_alter = abs(key); +} + +void KeySig::Init() +{ + RegisterAttClass(ATT_ACCIDENTAL); + RegisterAttClass(ATT_PITCH); + Reset(); } KeySig::~KeySig() @@ -102,8 +125,14 @@ void KeySig::Reset() LayerElement::Reset(); ResetAccidental(); ResetPitch(); - m_num_alter = 0; - m_alteration = ACCID_NATURAL; + m_alterationNumber = 0; + m_alterationType = ACCIDENTAL_EXPLICIT_n; + + // key change drawing values + m_drawingCancelAccidType = ACCIDENTAL_EXPLICIT_n; + m_drawingCancelAccidCount = 0; + m_drawingShow = true; + m_drawingShowchange = false; } @@ -111,20 +140,20 @@ void KeySig::ConvertToInternal( ) { int i; if (this->GetAccid() == ACCIDENTAL_EXPLICIT_s) { - m_alteration = ACCID_SHARP; + m_alterationType = ACCIDENTAL_EXPLICIT_s; for (i = 0;i < 7; i++) { if (KeySig::sharps[i] == this->GetPname()) { - m_num_alter = i + 1; + m_alterationNumber = i + 1; break; } } } else if (this->GetAccid() == ACCIDENTAL_EXPLICIT_f) { - m_alteration = ACCID_FLAT; + m_alterationType = ACCIDENTAL_EXPLICIT_f; for (i = 0;i < 7; i++) { if (KeySig::flats[i] == this->GetPname()) { - m_num_alter = i + 1; + m_alterationNumber = i + 1; break; } } @@ -134,39 +163,42 @@ void KeySig::ConvertToInternal( ) void KeySig::ConvertToMei() { - if ((m_num_alter < 1) || (m_num_alter > 7)) return; + if ((m_alterationNumber < 1) || (m_alterationNumber > 7)) return; - if (m_alteration == ACCID_SHARP) { + if (m_alterationType == ACCIDENTAL_EXPLICIT_s) { this->SetAccid( ACCIDENTAL_EXPLICIT_s); - this->SetPname(KeySig::sharps[m_num_alter - 1]); + this->SetPname(KeySig::sharps[m_alterationNumber - 1]); } - else if (m_alteration == ACCID_FLAT) { + else if (m_alterationType == ACCIDENTAL_EXPLICIT_f) { this->SetAccid( ACCIDENTAL_EXPLICIT_f); - this->SetPname(KeySig::flats[m_num_alter - 1]); + this->SetPname(KeySig::flats[m_alterationNumber - 1]); } else return; } + +//---------------------------------------------------------------------------- +// Static methods +//---------------------------------------------------------------------------- -unsigned char KeySig::GetAlterationAt(int pos) { + +data_PITCHNAME KeySig::GetAlterationAt(data_ACCIDENTAL_EXPLICIT alterationType, int pos) +{ data_PITCHNAME *alteration_set; - if (pos > 6) - return 0; + if (pos > 6) return PITCHNAME_c; - if (m_alteration == ACCID_FLAT) - alteration_set = flats; - else - alteration_set = sharps; + if (alterationType == ACCIDENTAL_EXPLICIT_f) alteration_set = flats; + else alteration_set = sharps; return alteration_set[pos]; } -int KeySig::GetOctave(unsigned char pitch, int clefId) { +int KeySig::GetOctave(data_ACCIDENTAL_EXPLICIT alterationType, data_PITCHNAME pitch, int clefId) +{ int alter_set = 0; // flats int key_set = 0; - if (m_alteration == ACCID_SHARP) - alter_set = 1; + if (alterationType == ACCIDENTAL_EXPLICIT_s) alter_set = 1; switch (clefId) { case G2: key_set = 0; break; @@ -188,27 +220,4 @@ int KeySig::GetOctave(unsigned char pitch, int clefId) { return octave_map[alter_set][key_set][pitch - 1] + OCTAVE_OFFSET; } - -//---------------------------------------------------------------------------- -// KeySigAttr -//---------------------------------------------------------------------------- - -KeySigAttr::KeySigAttr(): - Object(), - AttKeySigDefaultLog() -{ - Reset(); -} - - -KeySigAttr::~KeySigAttr() -{ -} - -void KeySigAttr::Reset() -{ - Object::Reset(); - ResetKeySigDefaultLog(); -} - } // namespace vrv \ No newline at end of file diff --git a/src/layer.cpp b/src/layer.cpp index 3a3f36908a3..1a012f94bc8 100644 --- a/src/layer.cpp +++ b/src/layer.cpp @@ -21,6 +21,7 @@ #include "mensur.h" #include "metersig.h" #include "note.h" +#include "rpt.h" #include "staff.h" #include "vrv.h" @@ -31,60 +32,25 @@ namespace vrv { //---------------------------------------------------------------------------- Layer::Layer( ): - DocObject("layer-"), DrawingListInterface(), ObjectListInterface(), + DocObject("layer-"), DrawingListInterface(), ObjectListInterface(), StaffDefDrawingInterface(), AttCommon() { - // own pointers need to be initialized before Reset() - m_currentClef = NULL; - m_currentKeySig = NULL; - m_currentMensur = NULL; - m_currentMeterSig = NULL; + RegisterAttClass(ATT_COMMON); + Reset(); } Layer::~Layer() { - if (m_currentClef) { - delete m_currentClef; - } - if (m_currentKeySig) { - delete m_currentKeySig; - } - if (m_currentMensur) { - delete m_currentMensur; - } - if (m_currentMeterSig) { - delete m_currentMeterSig; - } } void Layer::Reset() { DocObject::Reset(); DrawingListInterface::Reset(); + StaffDefDrawingInterface::Reset(); ResetCommon(); - - if (m_currentClef) { - delete m_currentClef; - } - if (m_currentKeySig) { - delete m_currentKeySig; - } - if (m_currentMensur) { - delete m_currentMensur; - } - if (m_currentMeterSig) { - delete m_currentMeterSig; - } - // Have at least a clef by default - m_currentClef = new Clef(); - m_currentKeySig = NULL; - m_currentMensur = NULL; - m_currentMeterSig = NULL; - m_drawClef = false; - m_drawKeySig = false; - m_drawMensur = false; - m_drawMeterSig = false; + m_drawingStemDir = STEMDIRECTION_NONE; } @@ -121,175 +87,74 @@ LayerElement *Layer::GetAtPos( int x ) } return element; } - -void Layer::SetCurrentClef( Clef *clef ) -{ - if (clef) { - if (m_currentClef) delete m_currentClef; - m_currentClef = clef; - } -} - -void Layer::SetCurrentKeySig( KeySig *keySig ) -{ - if (keySig) { - if (m_currentKeySig) delete m_currentKeySig; - m_currentKeySig = keySig; - } -} -void Layer::SetCurrentMensur( Mensur *mensur ) +void Layer::SetDrawingAndCurrentValues( StaffDef *currentStaffDef ) { - if (mensur) { - if (m_currentMensur) delete m_currentMensur; - m_currentMensur = mensur; - } -} - -void Layer::SetCurrentMeterSig( MeterSig *meterSig ) -{ - if (meterSig) { - if (m_currentMeterSig) delete m_currentMeterSig; - m_currentMeterSig = meterSig; - } -} - -LayerElement *Layer::Insert( LayerElement *element, int x ) -{ - if ( !element ) { - return NULL; + if (!currentStaffDef) { + LogDebug("staffDef not found"); + return; } - LayerElement *insertElement = element->GetChildCopy(); - - // First we find the element after which we are inserting the element - // If not, it will be NULL - // We are also updating the section and measure ( TODO, not necessary for now ) - int idx = 0; - LayerElement *next = dynamic_cast( this->GetFirst() ); - while ( next && (next->GetDrawingX() < x) ) - { - idx++; - // update section and measure if necessary (no section breaks and measure breaks for now) - next = dynamic_cast( this->GetNext( ) ); - if ( !next ) { - break; - } - } - - // Insert in the logical tree - this works only for facsimile (transcription) encoding - insertElement->m_xAbs = x; - AddLayerElement( insertElement, idx ); + // Remove any previous value in the Layer + this->StaffDefDrawingInterface::Reset(); - Refresh(); - // - return insertElement; -} - - -void Layer::Insert( LayerElement *layerElement, LayerElement *before ) -{ - int idx = 0; - if ( before ) { - idx = this->GetChildIndex( before ); - } - AddLayerElement( layerElement , idx ); -} - -void Layer::SetDrawingAndCurrentValues( ScoreDef *currentScoreDef, StaffDef *currentStaffDef ) -{ - if (!currentStaffDef || !currentScoreDef) { - LogDebug("scoreDef and/or staffDef not found"); - return; + // Special case with C-major / A-minor key signature (0) : if key cancellation is false, we are at the beginning + // of a new system, and hence we should not draw it. Maybe this can be improved? + bool drawKeySig = currentStaffDef->DrawKeySig(); + if (currentStaffDef->GetCurrentKeySig() && (currentStaffDef->GetCurrentKeySig()->GetAlterationNumber() == 0)) { + if (currentStaffDef->DrawKeySigCancellation() == false) { + drawKeySig = false; + } } this->SetDrawClef( currentStaffDef->DrawClef() ); - this->SetDrawKeySig( currentStaffDef->DrawKeySig() ); + this->SetDrawKeySig( drawKeySig ); // see above this->SetDrawMensur( currentStaffDef->DrawMensur() ); this->SetDrawMeterSig( currentStaffDef->DrawMeterSig() ); + this->SetDrawKeySigCancellation( currentStaffDef->DrawKeySigCancellation() ); // Don't draw on the next one currentStaffDef->SetDrawClef( false ); currentStaffDef->SetDrawKeySig( false ); currentStaffDef->SetDrawMensur( false ); currentStaffDef->SetDrawMeterSig( false ); + currentStaffDef->SetDrawKeySigCancellation( false ); - if ( currentStaffDef->GetClef() ) { - this->SetCurrentClef( currentStaffDef->GetClefCopy() ); + if ( currentStaffDef->GetCurrentClef() ) { + this->SetCurrentClef(new Clef(*currentStaffDef->GetCurrentClef())); } - else { - this->SetCurrentClef( currentScoreDef->GetClefCopy() ); + if ( currentStaffDef->GetCurrentKeySig() ) { + this->SetCurrentKeySig(new KeySig(*currentStaffDef->GetCurrentKeySig())); } - - if ( currentStaffDef->GetKeySig() ) { - this->SetCurrentKeySig( currentStaffDef->GetKeySigCopy() ); + if ( currentStaffDef->GetCurrentMensur() ) { + this->SetCurrentMensur(new Mensur(*currentStaffDef->GetCurrentMensur())); } - else { - this->SetCurrentKeySig( currentScoreDef->GetKeySigCopy() ); - } - - if ( currentStaffDef->GetMensur() ) { - this->SetCurrentMensur( currentStaffDef->GetMensurCopy() ); - } - else { - this->SetCurrentMensur( currentScoreDef->GetMensurCopy() ); - } - - if ( currentStaffDef->GetMeterSig() ) { - this->SetCurrentMeterSig( currentStaffDef->GetMeterSigCopy() ); - } - else { - this->SetCurrentMeterSig( currentScoreDef->GetMeterSigCopy() ); + if ( currentStaffDef->GetCurrentMeterSig() ) { + this->SetCurrentMeterSig(new MeterSig(*currentStaffDef->GetCurrentMeterSig())); } } - -void Layer::Delete( LayerElement *element ) -{ - if ( !element ) { - return; - } - - bool is_clef = false; - - if ( element->IsClef() ) { - is_clef = true; - //m_r->OnBeginEditionClef(); - } - - - int pos = GetChildIndex( element ); - RemoveChildAt( pos ); - Modify(); - - if ( is_clef ) - { - //m_r->OnEndEditionClef(); - } - - Refresh(); -} - - Clef* Layer::GetClef( LayerElement *test ) { Object *testObject = test; if (!test) { - return m_currentClef; + return GetCurrentClef(); } //make sure list is set ResetList(this); - if ( !test->IsClef() ) + if ( test->Is() != CLEF ) { - testObject = GetListFirstBackward(testObject, &typeid(Clef)); + testObject = GetListFirstBackward(testObject, CLEF ); } - if ( dynamic_cast(testObject) ) { - return dynamic_cast(testObject); + if ( testObject && testObject->Is() == CLEF ) { + Clef *clef = dynamic_cast(testObject); + assert( clef ); + return clef; } - return m_currentClef; + return GetCurrentClef(); } int Layer::GetClefOffset( LayerElement *test ) @@ -299,84 +164,20 @@ int Layer::GetClefOffset( LayerElement *test ) return clef->GetClefOffset(); } - -void Layer::RemoveClefAndCustos() -{ - Clef *currentClef = NULL; - - int i; - int elementCount = this->GetElementCount(); - for (i = 0; i < elementCount; i++) - { - LayerElement *element = dynamic_cast( m_children[i] ); - if ( element && element->IsClef() ) { - Clef *clef = dynamic_cast( m_children[i] ); - // we remove the clef because it is the same as the previous one - if ( currentClef && ((*currentClef) == (*clef)) ) { - // check if it is a F clef with a Longa before - LayerElement *previous = dynamic_cast(m_children[i - 1]); - if ( (i > 0) && previous && previous->IsNote() ) - { - Note *note = dynamic_cast(m_children[i - 1]); - if ( note && (note->GetActualDur() == DUR_LG) ) - { - bool removeLonga = false; - // we check only for the pitch, not the octave, but should be enough - if ( (clef->GetClefId() == F3) && ( note->GetPname() == PITCHNAME_g ) ) - removeLonga = true; - else if ( (clef->GetClefId() == F4) && ( note->GetPname() == PITCHNAME_b ) ) - removeLonga = true; - else if ( (clef->GetClefId() == F5) && ( note->GetPname() == PITCHNAME_d ) ) - removeLonga = true; - if ( removeLonga ) { - this->Delete( note ); - elementCount--; - i--; - } - } - } - this->Delete( clef ); - elementCount--; - // now remove alterations (keys) - for (; i < elementCount; i++) { - Accid *accid = dynamic_cast(m_children[i]); - if ( accid ) { - this->Delete( accid ); - elementCount--; - i--; - } - else - break; - } - i--; - - } - else { - currentClef = clef; - } - } - else if ( element && element->IsCustos( ) ) { - Custos *custos = dynamic_cast( m_children[i] ); - this->Delete( custos ); - elementCount--; - i--; - } - } -} - //---------------------------------------------------------------------------- // Layer functor methods //---------------------------------------------------------------------------- -int Layer::AlignHorizontally( ArrayPtrVoid params ) +int Layer::AlignHorizontally( ArrayPtrVoid *params ) { // param 0: the measureAligner (unused) // param 1: the time // param 2: the current Mensur - double *time = static_cast(params[1]); - Mensur **currentMensur = static_cast(params[2]); - MeterSig **currentMeterSig = static_cast(params[3]); + // param 3: the current MeterSig + double *time = static_cast((*params).at(1)); + Mensur **currentMensur = static_cast((*params).at(2)); + MeterSig **currentMeterSig = static_cast((*params).at(3)); // we need to call it because we are overriding Object::AlignHorizontally this->ResetHorizontalAlignment(); @@ -384,41 +185,60 @@ int Layer::AlignHorizontally( ArrayPtrVoid params ) // we are starting a new layer, reset the time; (*time) = 0.0; - (*currentMensur) = m_currentMensur; - (*currentMeterSig) = m_currentMeterSig; + (*currentMensur) = GetCurrentMensur(); + (*currentMeterSig) = GetCurrentMeterSig(); - if ( m_drawClef && m_currentClef ) { - m_currentClef->AlignHorizontally( params ); + if ( DrawClef() && GetCurrentClef() ) { + GetCurrentClef()->AlignHorizontally( params ); } - if ( m_drawKeySig && m_currentKeySig ) { - m_currentKeySig->AlignHorizontally( params ); + if ( DrawKeySig() && GetCurrentKeySig() ) { + GetCurrentKeySig()->AlignHorizontally( params ); } - if ( m_drawMensur && m_currentMensur) { - m_currentMensur->AlignHorizontally( params ); + if ( DrawMensur() && GetCurrentMensur() ) { + GetCurrentMensur()->AlignHorizontally( params ); } - if ( m_drawMeterSig && m_currentMeterSig ) { - m_currentMeterSig->AlignHorizontally( params ); + if ( DrawMeterSig() && GetCurrentMeterSig() ) { + GetCurrentMeterSig()->AlignHorizontally( params ); } return FUNCTOR_CONTINUE; } -int Layer::PrepareProcessingLists( ArrayPtrVoid params ) +int Layer::AlignHorizontallyEnd( ArrayPtrVoid *params ) +{ + // param 0: the measureAligner + // param 1: the time (unused) + // param 2: the current Mensur (unused) + // param 3: the current MeterSig (unused) + MeasureAligner **measureAligner = static_cast((*params).at(0)); + + int i; + for(i = 0; i < (int)(*measureAligner)->m_children.size(); i++) { + Alignment *alignment = dynamic_cast((*measureAligner)->m_children.at(i)); + if (alignment && alignment->HasGraceAligner()) { + alignment->GetGraceAligner()->AlignStack(); + } + } + + return FUNCTOR_CONTINUE; +} + +int Layer::PrepareProcessingLists( ArrayPtrVoid *params ) { // param 0: the IntTree* for staff/layer/verse (unused) // param 1: the IntTree* for staff/layer - IntTree *tree = static_cast(params[1]); + IntTree *tree = static_cast((*params).at(1)); // Alternate solution with StaffN_LayerN_VerseN_t - //StaffN_LayerN_VerseN_t *tree = static_cast(params[0]); + //StaffN_LayerN_VerseN_t *tree = static_cast((*params).at(0)); - Staff *staff = dynamic_cast( this->GetFirstParent( &typeid( Staff ) ) ); + Staff *staff = dynamic_cast( this->GetFirstParent( STAFF ) ); assert( staff ); tree->child[ staff->GetN() ].child[ this->GetN() ]; return FUNCTOR_CONTINUE; } -int Layer::SetDrawingXY( ArrayPtrVoid params ) +int Layer::SetDrawingXY( ArrayPtrVoid *params ) { // param 0: a pointer doc (unused) // param 1: a pointer to the current system (unused) @@ -427,9 +247,9 @@ int Layer::SetDrawingXY( ArrayPtrVoid params ) // param 4: a pointer to the current layer // param 5: a pointer to the view (unused) // param 6: a bool indicating if we are processing layer elements or not - Measure **currentMeasure = static_cast(params[2]); - Layer **currentLayer = static_cast(params[4]); - bool *processLayerElements = static_cast(params[6]); + Measure **currentMeasure = static_cast((*params).at(2)); + Layer **currentLayer = static_cast((*params).at(4)); + bool *processLayerElements = static_cast((*params).at(6)); (*currentLayer) = this; @@ -454,5 +274,19 @@ int Layer::SetDrawingXY( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } + +int Layer::PrepareRpt( ArrayPtrVoid *params ) +{ + // param 0: a pointer to the current MRpt pointer + // param 1: a pointer to the data_BOOLEAN indicating if multiNumber (unused) + // param 2: a pointer to the doc scoreDef (unused) + MRpt **currentMRpt = static_cast((*params).at(0)); + + // If we have encountered a mRpt before and there is none is this layer, reset it to NULL + if ((*currentMRpt) && !this->FindChildByType(MRPT)) { + (*currentMRpt) = NULL; + } + return FUNCTOR_CONTINUE; +} } // namespace vrv diff --git a/src/layerelement.cpp b/src/layerelement.cpp index e60d4ba289a..063820b1024 100644 --- a/src/layerelement.cpp +++ b/src/layerelement.cpp @@ -32,6 +32,7 @@ #include "multirest.h" #include "note.h" #include "rest.h" +#include "rpt.h" #include "space.h" #include "staff.h" #include "syl.h" @@ -64,8 +65,6 @@ void LayerElement::Reset() { DocObject::Reset(); - m_cueSize = false; - m_xAbs = VRV_UNSET; m_drawingX = 0; m_drawingY = 0; @@ -85,179 +84,62 @@ LayerElement& LayerElement::operator=( const LayerElement& element ) { if ( this != &element ) // not self assignement { - // is this necessary? - m_cueSize = element.m_cueSize; // pointers have to be NULL m_parent = NULL; m_alignment = NULL; } return *this; } - - -LayerElement *LayerElement::GetChildCopy( bool newUuid ) -{ - - // Is there another way to do this in C++ ? - // Yes, change this to the Object::Clone method - however, newUuid will not be possible in this way - LayerElement *element = NULL; - - if ( this->IsAccid() ) - element = new Accid( *(Accid*)this ); - else if ( this->IsBarline() ) - element = new Barline( *(Barline*)this ); - else if (this->IsClef() ) - element = new Clef( *(Clef*)this ); - else if (this->IsCustos() ) - element = new Custos( *(Custos*)this ); - else if (this->IsDot() ) - element = new Dot( *(Dot*)this ); - else if (this->IsMensur() ) - element = new Mensur( *(Mensur*)this ); - else if (this->IsNote() ) - element = new Note( *(Note*)this ); - else if (this->IsRest() ) - element = new Rest( *(Rest*)this ); - else { - LogDebug( "Missing %s", this->GetClassName().c_str() ); - assert( false ); // Copy of this type unimplemented - return NULL; - } - - element->m_parent = NULL; - - if ( !newUuid ) { - element->SetUuid( this->GetUuid() ); - } - else { - element->ResetUuid( ); - } - - return element; -} void LayerElement::ResetHorizontalAlignment() { m_drawingX = 0; -} - -bool LayerElement::IsAccid( ) -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsBarline() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsBeam() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsChord() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsClef() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsCustos( ) -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsDot( ) -{ - return (dynamic_cast(this)); -} - -bool LayerElement::HasDurationInterface() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsKeySig() -{ - return (dynamic_cast(this)); -} - - -bool LayerElement::IsMRest() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsMultiRest() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsMensur() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsMeterSig() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsNote() -{ - return (dynamic_cast(this)); + m_alignment = NULL; + if (this->Is() == NOTE) { + Note *note = dynamic_cast(this); + assert( note ); + note->ResetGraceAlignment(); + } } bool LayerElement::IsGraceNote() { Note *note = dynamic_cast(this); - return (note && note->m_cueSize); -} - -bool LayerElement::HasPitchInterface() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::HasPositionInterface() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsRest() -{ - return (dynamic_cast(this)); + return (note && note->HasGrace()); } -bool LayerElement::IsSyl() +Beam* LayerElement::IsInBeam() { - return (dynamic_cast(this)); + if ((this->Is() != NOTE) || (this->Is() == CHORD)) return NULL; + return dynamic_cast(this->GetFirstParent( BEAM, MAX_BEAM_DEPTH) ); } -bool LayerElement::IsTie() +data_STEMDIRECTION LayerElement::GetDrawingStemDir() { - return (dynamic_cast(this)); -} - -bool LayerElement::IsTuplet() -{ - return (dynamic_cast(this)); -} - -bool LayerElement::IsSpace() -{ - return (dynamic_cast(this)); + if (this->Is() == NOTE) { + Note *note = dynamic_cast(this); + assert( note ); + return note->GetDrawingStemDir(); + } + if (this->Is() == CHORD) { + Chord *chord = dynamic_cast(this); + assert( chord ); + return chord->GetDrawingStemDir(); + } + return STEMDIRECTION_NONE; } - -bool LayerElement::IsVerse() + +bool LayerElement::IsCueSize() { - return (dynamic_cast(this)); + if ( this->Is() == NOTE ) { + Note *note = dynamic_cast(this); + assert( note ); + return ( note->HasGrace() ); + } + Note *note = dynamic_cast(this->GetFirstParent( NOTE, MAX_ACCID_DEPTH ) ); + return ( note && ( note->HasGrace() ) ); } - + void LayerElement::AdjustPname( int *pname, int *oct ) { if ((*pname) < PITCHNAME_c) @@ -275,24 +157,32 @@ void LayerElement::AdjustPname( int *pname, int *oct ) } } -double LayerElement::GetAlignmentDuration( Mensur *mensur, MeterSig *meterSig ) +double LayerElement::GetAlignmentDuration( Mensur *mensur, MeterSig *meterSig, bool notGraceOnly ) { - if ( this->IsGraceNote() ) { + if ( this->IsGraceNote() && notGraceOnly ) { return 0.0; } - if ( HasDurationInterface() ) { - Tuplet *tuplet = dynamic_cast( this->GetFirstParent( &typeid(Tuplet), MAX_TUPLET_DEPTH ) ); + if ( this->HasInterface(INTERFACE_DURATION) ) { int num = 1; int numbase = 1; + Tuplet *tuplet = dynamic_cast( this->GetFirstParent( TUPLET, MAX_TUPLET_DEPTH ) ); if ( tuplet ) { num = tuplet->GetNum(); numbase = tuplet->GetNumbase(); } DurationInterface *duration = dynamic_cast(this); + assert( duration ); if (duration->IsMensural()) return duration->GetAlignmentMensuralDuration( num, numbase, mensur ); else return duration->GetAlignmentDuration( num, numbase ); } + else if (this->Is() == BEATRPT) { + BeatRpt *beatRpt = dynamic_cast(this); + assert(beatRpt); + int meterUnit = 4; + if (meterSig) meterSig->GetUnit(); + return beatRpt->GetAlignmentDuration(meterUnit); + } else { return 0.0; } @@ -310,22 +200,22 @@ int LayerElement::GetXRel() // LayerElement functors methods //---------------------------------------------------------------------------- -int LayerElement::AlignHorizontally( ArrayPtrVoid params ) +int LayerElement::AlignHorizontally( ArrayPtrVoid *params ) { // param 0: the measureAligner // param 1: the time // param 2: the current Mensur // param 3: the current MeterSig (unused) - MeasureAligner **measureAligner = static_cast(params[0]); - double *time = static_cast(params[1]); - Mensur **currentMensur = static_cast(params[2]); - MeterSig **currentMeterSig = static_cast(params[3]); + MeasureAligner **measureAligner = static_cast((*params).at(0)); + double *time = static_cast((*params).at(1)); + Mensur **currentMensur = static_cast((*params).at(2)); + MeterSig **currentMeterSig = static_cast((*params).at(3)); // we need to call it because we are overriding Object::AlignHorizontally this->ResetHorizontalAlignment(); - Chord* chordParent = dynamic_cast(this->GetFirstParent( &typeid( Chord ), MAX_CHORD_DEPTH)); + Chord* chordParent = dynamic_cast(this->GetFirstParent( CHORD, MAX_CHORD_DEPTH)); if( chordParent ) { m_alignment = chordParent->GetAlignment(); @@ -333,10 +223,10 @@ int LayerElement::AlignHorizontally( ArrayPtrVoid params ) } AlignmentType type = ALIGNMENT_DEFAULT; - if ( this->IsBarline() ) { + if (this->Is() == BARLINE) { type = ALIGNMENT_BARLINE; } - else if ( this->IsClef() ) { + else if ( this->Is() == CLEF ) { if ( this->GetScoreOrStaffDefAttr() ) { type = ALIGNMENT_CLEF_ATTR; } @@ -344,7 +234,7 @@ int LayerElement::AlignHorizontally( ArrayPtrVoid params ) type = ALIGNMENT_CLEF; } } - else if ( this->IsKeySig() ) { + else if (this->Is() == KEYSIG) { if ( this->GetScoreOrStaffDefAttr() ) { type = ALIGNMENT_KEYSIG_ATTR; } @@ -352,36 +242,41 @@ int LayerElement::AlignHorizontally( ArrayPtrVoid params ) type = ALIGNMENT_KEYSIG; } } - else if ( this->IsMensur() ) { + else if (this->Is() == MENSUR) { if ( this->GetScoreOrStaffDefAttr() ) { type = ALIGNMENT_MENSUR_ATTR; } else { // replace the current mensur (*currentMensur) = dynamic_cast(this); + assert( *currentMensur ); type = ALIGNMENT_MENSUR; } } - else if ( this->IsMeterSig() ) { + else if (this->Is() == METERSIG) { if ( this->GetScoreOrStaffDefAttr() ) { type = ALIGNMENT_METERSIG_ATTR; } else { // replace the current meter signature (*currentMeterSig) = dynamic_cast(this); + assert( *currentMeterSig ); type = ALIGNMENT_METERSIG; } } - else if ( this->IsMultiRest() || this->IsMRest() ) { - type = ALIGNMENT_MULTIREST; + else if ( (this->Is() == MULTIREST) || (this->Is() == MREST) || (this->Is() == MRPT) ) { + type = ALIGNMENT_FULLMEASURE; + } + else if ( (this->Is() == MRPT2) || (this->Is() == MULTIRPT) ) { + type = ALIGNMENT_FULLMEASURE2; } else if ( this->IsGraceNote() ) { type = ALIGNMENT_GRACENOTE; } - else if ( this->IsBeam() || this->IsTuplet() || this->IsVerse() || this->IsSyl() ) { + else if ((this->Is() == BEAM)|| (this->Is() == TUPLET) || (this->Is() == VERSE) || (this->Is() == SYL) ) { type = ALIGNMENT_CONTAINER; } - else if ( this->IsDot() ) { + else if (this->Is() == DOT) { type = ALIGNMENT_DOT; } @@ -392,6 +287,11 @@ int LayerElement::AlignHorizontally( ArrayPtrVoid params ) m_alignment = (*measureAligner)->GetAlignmentAtTime( *time, type ); + if ( this->IsGraceNote() ) { + GraceAligner *graceAligner = m_alignment->GetGraceAligner(); + graceAligner->StackNote( dynamic_cast(this) ); + } + //LogDebug("Time %f - %s", (*time), this->GetClassName().c_str() ); // increase the time position @@ -401,11 +301,11 @@ int LayerElement::AlignHorizontally( ArrayPtrVoid params ) } -int LayerElement::PrepareTimeSpanning( ArrayPtrVoid params ) +int LayerElement::PrepareTimeSpanning( ArrayPtrVoid *params ) { // param 0: std::vector* that holds the current elements to match // param 1: bool* fillList for indicating whether the elements have to be stack or not (unused) - std::vector *elements = static_cast*>(params[0]); + std::vector *elements = static_cast*>((*params).at(0)); std::vector::iterator iter = elements->begin(); while ( iter != elements->end()) { @@ -422,7 +322,7 @@ int LayerElement::PrepareTimeSpanning( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int LayerElement::SetDrawingXY( ArrayPtrVoid params ) +int LayerElement::SetDrawingXY( ArrayPtrVoid *params ) { // param 0: a pointer doc // param 1: a pointer to the current system (unused) @@ -431,12 +331,12 @@ int LayerElement::SetDrawingXY( ArrayPtrVoid params ) // param 4: a pointer to the current layer // param 5: a pointer to the view // param 6: a bool indicating if we are processing layer elements or not - Doc *doc = static_cast(params[0]); - Measure **currentMeasure = static_cast(params[2]); - Staff **currentStaff = static_cast(params[3]); - Layer **currentLayer = static_cast(params[4]); - View *view = static_cast(params[5]); - bool *processLayerElements = static_cast(params[6]); + Doc *doc = static_cast((*params).at(0)); + Measure **currentMeasure = static_cast((*params).at(2)); + Staff **currentStaff = static_cast((*params).at(3)); + Layer **currentLayer = static_cast((*params).at(4)); + View *view = static_cast((*params).at(5)); + bool *processLayerElements = static_cast((*params).at(6)); // First pass, only set the X position if ((*processLayerElements)==false) { @@ -446,6 +346,12 @@ int LayerElement::SetDrawingXY( ArrayPtrVoid params ) if ( this->m_xAbs == VRV_UNSET ) { assert( doc->GetType() == Raw ); this->SetDrawingX( this->GetXRel() + (*currentMeasure)->GetDrawingX() ); + // Grace notes, also take into account the GraceAlignment + Note *note = dynamic_cast(this); + if (note && note->HasGraceAlignment() ) { + this->SetDrawingX( this->GetDrawingX() - note->GetAlignment()->GetGraceAligner()->GetWidth() + + note->GetGraceAlignment()->GetXRel() ); + } } else { @@ -461,7 +367,7 @@ int LayerElement::SetDrawingXY( ArrayPtrVoid params ) // If we have one, make is available in m_crossStaff DurationInterface *durElement = dynamic_cast(this); if ( durElement && durElement->HasStaff()) { - AttCommonNComparison comparisonFirst( &typeid(Staff), durElement->GetStaff() ); + AttCommonNComparison comparisonFirst( STAFF, durElement->GetStaff() ); m_crossStaff = dynamic_cast((*currentMeasure)->FindChildByAttComparison(&comparisonFirst, 1)); if (m_crossStaff) { if (m_crossStaff == (*currentStaff)) LogWarning("The cross staff reference '%d' for element '%s' seems to be identical to the parent staff", durElement->GetStaff(), this->GetUuid().c_str()); @@ -469,7 +375,7 @@ int LayerElement::SetDrawingXY( ArrayPtrVoid params ) int layerN = (*currentLayer)->GetN(); // When we will have allowed @layer in , we will have to do: // int layerN = durElement->HasLayer() ? durElement->GetLayer() : (*currentLayer)->GetN(); - AttCommonNComparison comparisonFirstLayer( &typeid(Layer), layerN ); + AttCommonNComparison comparisonFirstLayer( LAYER, layerN ); m_crossLayer = dynamic_cast(m_crossStaff->FindChildByAttComparison(&comparisonFirstLayer, 1)); if (m_crossLayer) { // Now we need to yet the element at the same position in the cross-staff layer of getting the right clef @@ -502,14 +408,15 @@ int LayerElement::SetDrawingXY( ArrayPtrVoid params ) } // Finally, adjust Y for notes and rests - if (dynamic_cast(this)) + if (this->Is() == NOTE) { Note *note = dynamic_cast(this); + assert( note ); this->SetDrawingY( this->GetDrawingY() + view->CalculatePitchPosY( staffY, note->GetPname(), layerY->GetClefOffset( layerElementY ), note->GetOct() ) ); } - else if (dynamic_cast(this)) { + else if (this->Is() == REST) { Rest *rest = dynamic_cast(this); - + assert( rest ); // Automatically calculate rest position, if so requested if (rest->GetPloc() == PITCHNAME_NONE) { this->SetDrawingY( this->GetDrawingY() + view->CalculateRestPosY( staffY, rest->GetActualDur()) ); @@ -521,4 +428,23 @@ int LayerElement::SetDrawingXY( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } +int LayerElement::TimeSpanningLayerElements( ArrayPtrVoid *params ) +{ + // param 0: a pointer to the vector of LayerElement pointer to fill + // param 1: the minimum position + // param 2: the maximum position + std::vector *spanningContent = static_cast*>((*params).at(0)); + int *min_pos = static_cast((*params).at(1)); + int *max_pos = static_cast((*params).at(2)); + + if (this->GetDrawingX() >= (*min_pos) && this->GetDrawingX() <= (*max_pos)) { + if (this->Is() == NOTE) spanningContent->push_back(this); + } + else if (this->GetDrawingX() > (*max_pos) ) { + return FUNCTOR_STOP; + } + + return FUNCTOR_CONTINUE; +} + } // namespace vrv diff --git a/src/measure.cpp b/src/measure.cpp index 5f0de63a476..adfd8281ab4 100644 --- a/src/measure.cpp +++ b/src/measure.cpp @@ -16,6 +16,7 @@ //---------------------------------------------------------------------------- #include "doc.h" +#include "floatingelement.h" #include "page.h" #include "staff.h" #include "system.h" @@ -31,7 +32,9 @@ Measure::Measure( bool measureMusic, int logMeasureNb ): DocObject("measure-"), AttCommon(), AttMeasureLog() -{ +{ + RegisterAttClass(ATT_COMMON); + RegisterAttClass(ATT_MEASURELOG); m_measuredMusic = measureMusic; // We set parent to it because we want to access the parent doc from the aligners // See Object::SetParentDoc() @@ -64,19 +67,34 @@ void Measure::Reset() } } -void Measure::AddMeasureElement( MeasureElement *element ) +void Measure::AddFloatingElement( FloatingElement *element ) { element->SetParent( this ); m_children.push_back( element ); - Staff *staff = dynamic_cast(element); - if ( staff && (staff->GetN() < 1) ) { + if (element->Is() == STAFF) { + Staff *staff = dynamic_cast(element); + assert( staff ); + if ( staff->GetN() < 1) { + // This is not 100% safe if we have a and with more than + // one staff as a previous child. + staff->SetN( this->GetChildCount() ); + } + } +} + +void Measure::AddStaff( Staff *staff ) +{ + staff->SetParent( this ); + m_children.push_back( staff ); + + if ( staff->GetN() < 1) { // This is not 100% safe if we have a and with more than // one staff as a previous child. staff->SetN( this->GetChildCount() ); } } - + void Measure::ResetHorizontalAlignment() { m_drawingXRel = 0; @@ -118,13 +136,13 @@ int Measure::GetWidth() // Measure functor methods //---------------------------------------------------------------------------- -int Measure::AlignHorizontally( ArrayPtrVoid params ) +int Measure::AlignHorizontally( ArrayPtrVoid *params ) { // param 0: the measureAligner // param 1: the time (unused) // param 2: the current Mensur (unused) // param 3: the current MeterSig (unused) - MeasureAligner **measureAligner = static_cast(params[0]); + MeasureAligner **measureAligner = static_cast((*params).at(0)); // we need to call it because we are overriding Object::AlignHorizontally this->ResetHorizontalAlignment(); @@ -132,6 +150,10 @@ int Measure::AlignHorizontally( ArrayPtrVoid params ) // clear the content of the measureAligner m_measureAligner.Reset(); + // here we transfer the @left and @right values to the barLine objects + this->SetLeftBarlineType( this->GetLeft() ); + this->SetRightBarlineType( this->GetRight() ); + // point to it (*measureAligner) = &m_measureAligner; @@ -151,11 +173,11 @@ int Measure::AlignHorizontally( ArrayPtrVoid params ) } -int Measure::AlignVertically( ArrayPtrVoid params ) +int Measure::AlignVertically( ArrayPtrVoid *params ) { // param 0: the systemAligner (unused) // param 1: the staffNb - int *staffNb = static_cast(params[1]); + int *staffNb = static_cast((*params).at(1)); // we need to call it because we are overriding Object::AlignVertically this->ResetVerticalAlignment(); @@ -166,40 +188,50 @@ int Measure::AlignVertically( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Measure::IntegrateBoundingBoxXShift( ArrayPtrVoid params ) +int Measure::IntegrateBoundingBoxGraceXShift( ArrayPtrVoid *params ) +{ + // param 0: the functor to be redirected to Aligner + Functor *integrateBoundingBoxGraceXShift = static_cast((*params).at(0)); + + m_measureAligner.Process( integrateBoundingBoxGraceXShift, params ); + + return FUNCTOR_SIBLINGS; +} + +int Measure::IntegrateBoundingBoxXShift( ArrayPtrVoid *params ) { // param 0: the cumulated shift (unused) // param 1: the cumulated justifiable shift (unused) - // param 2: the functor to be redirected to Aligner - Functor *integrateBoundingBoxShift = static_cast(params[2]); + // param 2: the minimum measure with (unused) + // param 3: the functor to be redirected to Aligner + Functor *integrateBoundingBoxShift = static_cast((*params).at(3)); m_measureAligner.Process( integrateBoundingBoxShift, params ); return FUNCTOR_SIBLINGS; } -int Measure::SetAligmentXPos( ArrayPtrVoid params ) +int Measure::SetAligmentXPos( ArrayPtrVoid *params ) { // param 0: the previous time position (unused) // param 1: the previous x rel position (unused) - // param 2: the minimum measure width (unused) - // param 3: the functor to be redirected to Aligner - Functor *setAligmnentPosX = static_cast(params[3]); + // param 2: the functor to be redirected to Aligner + Functor *setAligmnentPosX = static_cast((*params).at(2)); m_measureAligner.Process( setAligmnentPosX, params); return FUNCTOR_SIBLINGS; } -int Measure::JustifyX( ArrayPtrVoid params ) +int Measure::JustifyX( ArrayPtrVoid *params ) { // param 0: the justification ratio // param 1: the justification ratio for the measure (depends on the margin) (unused) // param 2: the non justifiable margin (unused) // param 3: the system full width (without system margins) (unused) // param 4: the functor to be redirected to the MeasureAligner - double *ratio = static_cast(params[0]); - Functor *justifyX = static_cast(params[4]); + double *ratio = static_cast((*params).at(0)); + Functor *justifyX = static_cast((*params).at(4)); this->m_drawingXRel = ceil((*ratio) * (double)this->m_drawingXRel); @@ -209,10 +241,10 @@ int Measure::JustifyX( ArrayPtrVoid params ) } -int Measure::AlignMeasures( ArrayPtrVoid params ) +int Measure::AlignMeasures( ArrayPtrVoid *params ) { // param 0: the cumulated shift - int *shift = static_cast(params[0]); + int *shift = static_cast((*params).at(0)); this->m_drawingXRel = (*shift); @@ -229,18 +261,18 @@ int Measure::AlignMeasures( ArrayPtrVoid params ) return FUNCTOR_SIBLINGS; } -int Measure::CastOffSystems( ArrayPtrVoid params ) +int Measure::CastOffSystems( ArrayPtrVoid *params ) { // param 0: a pointer to the system we are taking the content from // param 1: a pointer the page we are adding system to // param 2: a pointer to the current system // param 3: the cummulated shift (m_drawingXRel of the first measure of the current system) // param 4: the system width - System *contentSystem = static_cast(params[0]); - Page *page = static_cast(params[1]); - System **currentSystem = static_cast(params[2]); - int *shift = static_cast(params[3]); - int *systemWidth = static_cast(params[4]); + System *contentSystem = static_cast((*params).at(0)); + Page *page = static_cast((*params).at(1)); + System **currentSystem = static_cast((*params).at(2)); + int *shift = static_cast((*params).at(3)); + int *systemWidth = static_cast((*params).at(4)); if ( ( (*currentSystem)->GetChildCount() > 0 ) && ( this->m_drawingXRel + this->GetWidth() - (*shift) > (*systemWidth) ) ) { (*currentSystem) = new System(); @@ -253,12 +285,13 @@ int Measure::CastOffSystems( ArrayPtrVoid params ) // from the content System because this screws up the iterator. Relinquish gives up // the ownership of the Measure - the contentSystem will be deleted afterwards. Measure *measure = dynamic_cast( contentSystem->Relinquish( this->GetIdx()) ); + assert( measure ); (*currentSystem)->AddMeasure( measure ); return FUNCTOR_SIBLINGS; } -int Measure::SetDrawingXY( ArrayPtrVoid params ) +int Measure::SetDrawingXY( ArrayPtrVoid *params ) { // param 0: a pointer doc // param 1: a pointer to the current system @@ -267,10 +300,10 @@ int Measure::SetDrawingXY( ArrayPtrVoid params ) // param 4: a pointer to the current layer (unused) // param 5: a pointer to the view (unused) // param 6: a bool indicating if we are processing layer elements or not - Doc *doc = static_cast(params[0]); - System **currentSystem = static_cast(params[1]); - Measure **currentMeasure = static_cast(params[2]); - bool *processLayerElements = static_cast(params[6]); + Doc *doc = static_cast((*params).at(0)); + System **currentSystem = static_cast((*params).at(1)); + Measure **currentMeasure = static_cast((*params).at(2)); + bool *processLayerElements = static_cast((*params).at(6)); (*currentMeasure) = this; diff --git a/src/mensur.cpp b/src/mensur.cpp index 596e0dff45c..49bbe1ebd92 100644 --- a/src/mensur.cpp +++ b/src/mensur.cpp @@ -7,6 +7,7 @@ #include "mensur.h" +#include "scoredefinterface.h" namespace vrv { @@ -25,13 +26,14 @@ Mensur::Mensur(): AttMensurVis(), AttSlashcount() { - Reset(); + Init(); } -Mensur::Mensur( MensurAttr *mensurAttr ): +Mensur::Mensur( ScoreDefInterface *mensurAttr ): LayerElement("mensur-") { - Mensur(); + Init(); + this->SetDot(mensurAttr->GetMensurDot()); this->SetSign(mensurAttr->GetMensurSign()); this->SetSlash(mensurAttr->GetMensurSlash()); @@ -46,6 +48,16 @@ Mensur::Mensur( MensurAttr *mensurAttr ): // It is unclear why we don't have mensur.num and mensur.numbase attributes // in att.mensura.default.log - ask Perry... } + +void Mensur::Init() +{ + RegisterAttClass(ATT_DURATIONRATIO); + RegisterAttClass(ATT_MENSURALSHARED); + RegisterAttClass(ATT_MENSURLOG); + RegisterAttClass(ATT_METERSIGVIS); + RegisterAttClass(ATT_SLASHCOUNT); + Reset(); +} Mensur::~Mensur() { @@ -61,28 +73,4 @@ void Mensur::Reset() ResetSlashcount(); } -//---------------------------------------------------------------------------- -// MensurAttr -//---------------------------------------------------------------------------- - -MensurAttr::MensurAttr(): - Object(), - AttMensuralShared(), - AttMensuralLog() -{ - Reset(); -} - - -MensurAttr::~MensurAttr() -{ -} - -void MensurAttr::Reset() -{ - Object::Reset(); - ResetMensuralShared(); - ResetMensuralLog(); -} - } // namespace vrv \ No newline at end of file diff --git a/src/metersig.cpp b/src/metersig.cpp index f07aa7c4209..b595c955cac 100644 --- a/src/metersig.cpp +++ b/src/metersig.cpp @@ -7,6 +7,7 @@ #include "metersig.h" +#include "scoredefinterface.h" namespace vrv { @@ -18,19 +19,25 @@ MeterSig::MeterSig(): LayerElement("msig-"), AttMeterSigLog() { - Reset(); + Init(); } -MeterSig::MeterSig( MeterSigAttr *meterSigAttr ): +MeterSig::MeterSig( ScoreDefInterface *meterSigAttr ): LayerElement("msig-"), AttMeterSigLog() { - Reset(); + Init(); + this->SetCount(meterSigAttr->GetMeterCount()); this->SetSym(meterSigAttr->GetMeterSym()); this->SetUnit(meterSigAttr->GetMeterUnit()); } - + +void MeterSig::Init() +{ + RegisterAttClass(ATT_METERSIGLOG); + Reset(); +} MeterSig::~MeterSig() { @@ -42,28 +49,4 @@ void MeterSig::Reset() ResetMeterSigLog(); } -//---------------------------------------------------------------------------- -// MeterSigAttr -//---------------------------------------------------------------------------- - -MeterSigAttr::MeterSigAttr(): - Object(), - AttMeterSigDefaultLog(), - AttMeterSigDefaultVis() -{ - Reset(); -} - - -MeterSigAttr::~MeterSigAttr() -{ -} - -void MeterSigAttr::Reset() -{ - Object::Reset(); - ResetMeterSigDefaultLog(); - ResetMeterSigDefaultVis(); -} - } // namespace vrv diff --git a/src/multirest.cpp b/src/multirest.cpp index 04c834388ac..d4742ae4cfc 100644 --- a/src/multirest.cpp +++ b/src/multirest.cpp @@ -18,16 +18,10 @@ MultiRest::MultiRest(): LayerElement("multirest-"), AttNumbered() { + RegisterAttClass(ATT_NUMBERED); Reset(); } -MultiRest::MultiRest(int number): - LayerElement("multirest-") -{ - Reset(); -} - - MultiRest::~MultiRest() { } diff --git a/src/note.cpp b/src/note.cpp index a31e743bb5a..b8455e70cbd 100644 --- a/src/note.cpp +++ b/src/note.cpp @@ -29,13 +29,24 @@ namespace vrv { Note::Note(): LayerElement("note-"), DurationInterface(), PitchInterface(), AttColoration(), + AttGraced(), AttNoteLogMensural(), AttStemmed(), AttTiepresent() { + RegisterAttClass(ATT_COLORATION); + RegisterAttClass(ATT_GRACED); + RegisterAttClass(ATT_NOTELOGMENSURAL); + RegisterAttClass(ATT_STEMMED); + RegisterAttClass(ATT_TIEPRESENT); + + RegisterInterface( DurationInterface::GetAttClasses(), DurationInterface::IsInterface() ); + RegisterInterface( PitchInterface::GetAttClasses(), PitchInterface::IsInterface() ); + m_drawingTieAttr = NULL; m_drawingAccid = NULL; m_isDrawingAccidAttr = false; + Reset(); } @@ -60,12 +71,12 @@ void Note::Reset() PitchInterface::Reset(); ResetColoration(); + ResetGraced(); ResetNoteLogMensural(); ResetStemmed(); ResetTiepresent(); // TO BE REMOVED - m_acciaccatura = false; m_embellishment = EMB_NONE; // tie pointers ResetDrawingTieAttr(); @@ -76,6 +87,7 @@ void Note::Reset() d_stemLen = 0; m_clusterPosition = 0; m_cluster = NULL; + m_graceAlignment = NULL; } void Note::AddLayerElement(vrv::LayerElement *element) @@ -88,6 +100,18 @@ void Note::AddLayerElement(vrv::LayerElement *element) Modify(); } +Alignment* Note::GetGraceAlignment( ) +{ + assert(m_graceAlignment); + return m_graceAlignment; +} + +void Note::SetGraceAlignment( Alignment *graceAlignment ) +{ + assert(!m_graceAlignment && graceAlignment); + m_graceAlignment = graceAlignment; +} + void Note::SetDrawingTieAttr( ) { assert(!this->m_drawingTieAttr); @@ -118,18 +142,16 @@ void Note::ResetDrawingAccid( ) Chord* Note::IsChordTone() { - return dynamic_cast(this->GetFirstParent( &typeid( Chord ), MAX_CHORD_DEPTH)); + return dynamic_cast(this->GetFirstParent( CHORD, MAX_CHORD_DEPTH) ); } int Note::GetDrawingDur( ) { - Chord* chordParent = dynamic_cast(this->GetFirstParent( &typeid( Chord ), MAX_CHORD_DEPTH)); - if( chordParent ) - { + Chord* chordParent = dynamic_cast(this->GetFirstParent( CHORD, MAX_CHORD_DEPTH)); + if( chordParent ) { return chordParent->GetActualDur(); } - else - { + else { return GetActualDur(); } } @@ -141,26 +163,18 @@ bool Note::IsClusterExtreme() if (this == cluster->at(cluster->size() - 1)) return true; else return false; } - -bool Note::HasDrawingStemDir() -{ - return (this->GetDrawingStemDir() != STEMDIRECTION_NONE); -} - -data_STEMDIRECTION Note::GetDrawingStemDir() + +data_STEMDIRECTION Note::CalcDrawingStemDir() { - Chord* chordParent = dynamic_cast(this->GetFirstParent( &typeid( Chord ), MAX_CHORD_DEPTH)); - Beam* beamParent = dynamic_cast(this->GetFirstParent( &typeid( Beam ), MAX_BEAM_DEPTH)); - if( chordParent ) - { + Chord* chordParent = dynamic_cast(this->GetFirstParent( CHORD, MAX_CHORD_DEPTH)); + Beam* beamParent = dynamic_cast(this->GetFirstParent( BEAM, MAX_BEAM_DEPTH)); + if( chordParent ) { return chordParent->GetDrawingStemDir(); } - else if( beamParent ) - { + else if( beamParent ) { return beamParent->GetDrawingStemDir(); } - else - { + else { return this->GetStemDir(); } } @@ -169,15 +183,16 @@ data_STEMDIRECTION Note::GetDrawingStemDir() // Functors methods //---------------------------------------------------------------------------- -int Note::PrepareTieAttr( ArrayPtrVoid params ) +int Note::PrepareTieAttr( ArrayPtrVoid *params ) { // param 0: std::vector* that holds the current notes with open ties // param 1: Chord** currentChord for the current chord if in a chord - std::vector *currentNotes = static_cast*>(params[0]); - Chord **currentChord = static_cast(params[1]); + std::vector *currentNotes = static_cast*>((*params).at(0)); + Chord **currentChord = static_cast((*params).at(1)); AttTiepresent *check = this; - if ((*currentChord)) { + // Use the parent chord if there is no @tie on the note + if (!this->HasTie() && (*currentChord)) { check = (*currentChord); } assert(check); @@ -211,7 +226,7 @@ int Note::PrepareTieAttr( ArrayPtrVoid params ) } -int Note::FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) +int Note::FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ) { // Pass it to the pseudo functor of the interface if (this->m_drawingTieAttr) { @@ -220,13 +235,13 @@ int Note::FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Note::PrepareLyrics( ArrayPtrVoid params ) +int Note::PrepareLyrics( ArrayPtrVoid *params ) { // param 0: the current Syl (unused) // param 1: the last Note // param 2: the last but one Note - Note **lastNote = static_cast(params[1]); - Note **lastButOneNote = static_cast(params[2]); + Note **lastNote = static_cast((*params).at(1)); + Note **lastButOneNote = static_cast((*params).at(2)); (*lastButOneNote) = (*lastNote); (*lastNote) = this; @@ -234,20 +249,20 @@ int Note::PrepareLyrics( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Note::PreparePointersByLayer( ArrayPtrVoid params ) +int Note::PreparePointersByLayer( ArrayPtrVoid *params ) { // param 0: the current Note - Note **currentNote = static_cast(params[0]); + Note **currentNote = static_cast((*params).at(0)); this->ResetDrawingAccid(); - if (this->GetAccid() != ACCIDENTAL_EXPLICIT_NONE) - { + if (this->GetAccid() != ACCIDENTAL_EXPLICIT_NONE) { this->m_isDrawingAccidAttr = true; this->m_drawingAccid = new Accid(); this->m_drawingAccid->SetOloc(this->GetOct()); this->m_drawingAccid->SetPloc(this->GetPname()); this->m_drawingAccid->SetAccid(this->GetAccid()); - this->m_drawingAccid->m_cueSize = this->m_cueSize; + // We need to set the drawing cue size since there will be no access to the note + this->m_drawingAccid->m_drawingCueSize = this->HasGrace(); } (*currentNote) = this; @@ -255,7 +270,7 @@ int Note::PreparePointersByLayer( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Note::ResetDarwing( ArrayPtrVoid params ) +int Note::ResetDarwing( ArrayPtrVoid *params ) { this->ResetDrawingTieAttr(); return FUNCTOR_CONTINUE; diff --git a/src/object.cpp b/src/object.cpp index 86477d69dfd..eb336829dd1 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -63,7 +63,7 @@ Object::Object( const Object& object ) int i; for (i = 0; i < (int)object.m_children.size(); i++) { - Object *current = object.m_children[i]; + Object *current = object.m_children.at(i); Object* copy = current->Clone(); copy->Modify(); copy->SetParent( this ); @@ -84,7 +84,7 @@ Object& Object::operator=( const Object& object ) int i; for (i = 0; i < (int)object.m_children.size(); i++) { - Object *current = object.m_children[i]; + Object *current = object.m_children.at(i); Object* copy = current->Clone(); copy->Modify(); copy->SetParent( this ); @@ -107,6 +107,19 @@ void Object::Init(std::string classid) m_classid = classid; this->GenerateUuid(); } + +ClassId Object::Is() +{ + // we should always have the method overwritten + assert( false ); + return OBJECT; +}; + +void Object::RegisterInterface( std::vector *attClasses, InterfaceId interfaceId ) +{ + m_attClasses.insert(m_attClasses.end(), attClasses->begin(), attClasses->end()); + m_interfaces.push_back(interfaceId); +} void Object::MoveChildren( Object *object ) { @@ -121,7 +134,7 @@ void Object::MoveChildren( Object *object ) for (i = 0; i < (int)object->m_children.size(); i++) { this->m_children.push_back( object->Relinquish(i) ); - object->m_children[i]->m_parent = this; + object->m_children.at(i)->m_parent = this; } } @@ -145,9 +158,9 @@ void Object::ClearChildren() } -int Object::GetChildCount( const std::type_info *elementType ) +int Object::GetChildCount( const ClassId classId ) { - return (int)count_if (m_children.begin(), m_children.end(), ObjectComparison( elementType )); + return (int)count_if (m_children.begin(), m_children.end(), ObjectComparison( classId )); } int Object::GetAttributes(ArrayOfStrAttr *attributes) @@ -175,9 +188,9 @@ bool Object::HasAttribute( std::string attribute, std::string value ) } -Object* Object::GetFirst( const std::type_info *elementType ) +Object* Object::GetFirst( const ClassId classId ) { - m_iteratorElementType = elementType; + m_iteratorElementType = classId; m_iteratorEnd = m_children.end(); m_iteratorCurrent = std::find_if(m_children.begin(), m_iteratorEnd, ObjectComparison( m_iteratorElementType ) ); return (m_iteratorCurrent == m_iteratorEnd) ? NULL : *m_iteratorCurrent; @@ -216,7 +229,7 @@ Object *Object::DetachChild( int idx ) if ( idx >= (int)m_children.size() ) { return NULL; } - Object *child = m_children[idx]; + Object *child = m_children.at(idx); child->m_parent = NULL; ArrayOfObjects::iterator iter = m_children.begin(); m_children.erase( iter+(idx) ); @@ -229,7 +242,7 @@ Object *Object::Relinquish( int idx ) if ( idx >= (int)m_children.size() ) { return NULL; } - Object *child = m_children[idx]; + Object *child = m_children.at(idx); child->m_parent = NULL; return child; } @@ -241,13 +254,13 @@ Object *Object::FindChildByUuid( std::string uuid, int deepness, bool direction ArrayPtrVoid params; params.push_back( &uuid ); params.push_back( &element ); - this->Process( &findByUuid, params, NULL, NULL, deepness, direction ); + this->Process( &findByUuid, ¶ms, NULL, NULL, deepness, direction ); return element; } -Object *Object::FindChildByType(const std::type_info *elementType, int deepness, bool direction ) +Object *Object::FindChildByType( ClassId classId, int deepness, bool direction ) { - AttComparison attComparison( elementType ); + AttComparison attComparison( classId ); return FindChildByAttComparison( &attComparison, deepness, direction ); } @@ -258,7 +271,7 @@ Object *Object::FindChildByAttComparison( AttComparison *attComparison, int deep ArrayPtrVoid params; params.push_back( attComparison ); params.push_back( &element ); - this->Process( &findByAttComparison, params, NULL, NULL, deepness, direction ); + this->Process( &findByAttComparison, ¶ms, NULL, NULL, deepness, direction ); return element; } @@ -267,7 +280,7 @@ Object* Object::GetChild( int idx ) if ( (idx < 0) || (idx >= (int)m_children.size()) ) { return NULL; } - return m_children[idx]; + return m_children.at(idx); } void Object::RemoveChildAt( int idx ) @@ -275,12 +288,13 @@ void Object::RemoveChildAt( int idx ) if ( idx >= (int)m_children.size() ) { return; } - delete m_children[idx]; + delete m_children.at(idx); ArrayOfObjects::iterator iter = m_children.begin(); m_children.erase( iter+(idx) ); } -void Object::GenerateUuid() { +void Object::GenerateUuid() +{ int nr = std::rand(); char str[17]; // I do not want to use a stream to do this! @@ -317,16 +331,6 @@ void Object::AddEditorialElement( EditorialElement *child ) Modify(); } -bool Object::operator==( Object& other ) -{ - // This should never happen. - // The comparison is performed in the CmpFile::Align method. - // We expect to compare only Note, Rest, etc object for which we have an overwritten method - LogError( "Missing comparison operator for '%s'", this->GetClassName().c_str() ); - assert( false ); - return false; -} - int Object::GetChildIndex( const Object *child ) { ArrayOfObjects::iterator iter; @@ -355,7 +359,7 @@ void Object::FillFlatList( ListOfObjects *flatList ) Functor addToFlatList( &Object::AddLayerElementToFlatList ); ArrayPtrVoid params; params.push_back ( &flatList ); - this->Process( &addToFlatList, params ); + this->Process( &addToFlatList, ¶ms ); /* // For debuging ListOfObjects::iterator iter; @@ -381,43 +385,44 @@ void Object::AddSameAs( std::string id, std::string filename ) m_sameAs += sameAs; } -Object *Object::GetFirstParent( const std::type_info *elementType, int maxSteps ) +Object *Object::GetFirstParent( const ClassId classId, int maxSteps ) { if ( (maxSteps == 0) || !m_parent ) { return NULL; } - if ( typeid(*m_parent) == *elementType ) { + if ( m_parent->Is() == classId ) { return m_parent; } else { - return ( m_parent->GetFirstParent( elementType, maxSteps - 1 ) ); + return ( m_parent->GetFirstParent( classId, maxSteps - 1 ) ); } } -Object *Object::GetLastParentNot( const std::type_info *elementType, int maxSteps ) +Object *Object::GetLastParentNot( const ClassId classId, int maxSteps ) { if ( (maxSteps == 0) || !m_parent ) { return NULL; } - if ( typeid(*m_parent) == *elementType ) { + if ( m_parent->Is() == classId ) { return this; } else { - return ( m_parent->GetLastParentNot( elementType, maxSteps - 1 ) ); + return ( m_parent->GetLastParentNot( classId, maxSteps - 1 ) ); } } -Object *Object::GetFirstChild( const std::type_info *elementType ) +Object *Object::GetFirstChild( const ClassId classId ) { ArrayOfObjects::iterator iter; int i; for (iter = m_children.begin(), i = 0; iter != m_children.end(); ++iter, i++) { - if ( typeid(**iter) == *elementType ) + Object *o = *iter; + if ( o->Is() == classId ) { return *iter; } @@ -425,7 +430,7 @@ Object *Object::GetFirstChild( const std::type_info *elementType ) return NULL; } -Object *Object::GetNextSibling( const std::type_info *elementType ) +Object *Object::GetNextSibling( const ClassId classId ) { if (!m_parent) { return NULL; @@ -444,10 +449,10 @@ Object *Object::GetNextSibling( const std::type_info *elementType ) else if (!foundCurrent) { continue; } - if ( !elementType ) { + if ( classId == UNSPECIFIED ) { return *iter; } - if ( typeid(**iter) == *elementType ) + if ( (*iter)->Is() == classId ) { return *iter; } @@ -455,7 +460,7 @@ Object *Object::GetNextSibling( const std::type_info *elementType ) return NULL; } -Object *Object::GetPreviousSibling( const std::type_info *elementType ) +Object *Object::GetPreviousSibling( const ClassId classId ) { if (!m_parent) { return NULL; @@ -474,10 +479,10 @@ Object *Object::GetPreviousSibling( const std::type_info *elementType ) else if (!foundCurrent) { continue; } - if ( !elementType ) { + if ( classId == UNSPECIFIED ) { return *iter; } - if ( typeid(**iter) == *elementType ) + if ( (*iter)->Is() == classId ) { return *iter; } @@ -511,15 +516,18 @@ bool Object::GetSameAs( std::string *id, std::string *filename, int idx ) return false; } -void Object::Process(Functor *functor, ArrayPtrVoid params, Functor *endFunctor, ArrayOfAttComparisons *filters, int deepness, bool direction ) +void Object::Process(Functor *functor, ArrayPtrVoid *params, Functor *endFunctor, ArrayOfAttComparisons *filters, int deepness, bool direction ) { if (functor->m_returnCode == FUNCTOR_STOP) { return; } - EditorialElement *editorialElement = dynamic_cast(this); - if (functor->m_visibleOnly && editorialElement && ( editorialElement->m_visibility == Hidden ) ) { - return; + if (functor->m_visibleOnly && this->IsEditorialElement()) { + EditorialElement *editorialElement = dynamic_cast(this); + assert( editorialElement ); + if ( editorialElement->m_visibility == Hidden ) { + return; + } } functor->Call( this, params ); @@ -529,8 +537,7 @@ void Object::Process(Functor *functor, ArrayPtrVoid params, Functor *endFunctor, functor->m_returnCode = FUNCTOR_CONTINUE; return; } - - else if (dynamic_cast(this)) { + else if (this->IsEditorialElement()) { // since editorial object do not count, we re-increase the deepness limit deepness++; } @@ -560,7 +567,8 @@ void Object::Process(Functor *functor, ArrayPtrVoid params, Functor *endFunctor, for (attComparisonIter = filters->begin(); attComparisonIter != filters->end(); attComparisonIter++) { // if yes, we will use it (*attComparisonIter) for evaluating if the object matches // the attribute (see below) - if ((*attComparisonIter)->GetType() == &typeid(**iter)) { + Object *o = *iter; + if (o->Is() == (*attComparisonIter)->GetType() ) { hasAttComparison = true; break; } @@ -597,7 +605,7 @@ int Object::Save( FileOutputStream *output ) // Special case where we want to process all objects save.m_visibleOnly = false; Functor saveEnd( &Object::SaveEnd ); - this->Process( &save, params, &saveEnd ); + this->Process( &save, ¶ms, &saveEnd ); return true; } @@ -627,15 +635,6 @@ DocObject::~DocObject() { } -void DocObject::Refresh() -{ - // if we have a parent DocObject, propagate it - if ( dynamic_cast(m_parent) ) { - ((DocObject*)m_parent)->Refresh(); - } -} - - void DocObject::UpdateContentBB( int x1, int y1, int x2, int y2) { //LogDebug("CB Was: %i %i %i %i", m_contentBB_x1, m_contentBB_y1, m_contentBB_x2 ,m_contentBB_y2); @@ -694,12 +693,30 @@ void DocObject::ResetBB() m_selfBB_y1 = 0xFFFFFFF; m_selfBB_x2 = -0xFFFFFFF; m_selfBB_y2 = -0xFFFFFFF; - //m_drawingX = 0; - //m_drawingY = 0; m_updatedBB = false; } +void DocObject::SetEmptyBB() +{ + m_contentBB_x1 = 0; + m_contentBB_y1 = 0; + m_contentBB_x2 = 0; + m_contentBB_y2 = 0; + m_selfBB_x1 = 0; + m_selfBB_y1 = 0; + m_selfBB_x2 = 0; + m_selfBB_y2 = 0; + + m_updatedBB = true; +} + + +bool DocObject::HasEmptyBB() +{ + return ( m_updatedBB && (m_contentBB_x1 == 0) && (m_contentBB_y1 == 0) && (m_contentBB_x2 == 0) && (m_contentBB_y2 == 0) ); +} + bool DocObject::HasContentBB() { return ( (m_contentBB_x1 != 0xFFFF) && (m_contentBB_y1 != 0xFFFF) && (m_contentBB_x2 != -0xFFFF) && (m_contentBB_y2 != -0xFFFF) ); @@ -766,20 +783,20 @@ int ObjectListInterface::GetListIndex( const Object *listElement ) } -Object* ObjectListInterface::GetListFirst(const Object *startFrom, const std::type_info *elementType) +Object* ObjectListInterface::GetListFirst(const Object *startFrom, const ClassId classId) { ListOfObjects::iterator it = m_list.begin(); std::advance(it, GetListIndex(startFrom)); - it = std::find_if(it, m_list.end(), ObjectComparison( elementType ) ); + it = std::find_if(it, m_list.end(), ObjectComparison( classId ) ); return (it == m_list.end()) ? NULL : *it; } -Object* ObjectListInterface::GetListFirstBackward(Object *startFrom, const std::type_info *elementType) +Object* ObjectListInterface::GetListFirstBackward(Object *startFrom, const ClassId classId) { ListOfObjects::iterator it = m_list.begin(); std::advance(it, GetListIndex(startFrom)); ListOfObjects::reverse_iterator rit(it); - rit = std::find_if(rit, m_list.rend(), ObjectComparison( elementType ) ); + rit = std::find_if(rit, m_list.rend(), ObjectComparison( classId ) ); return (rit == m_list.rend()) ? NULL : *rit; } @@ -832,14 +849,14 @@ Functor::Functor( ) obj_fpt = NULL; } -Functor::Functor( int(Object::*_obj_fpt)( ArrayPtrVoid )) +Functor::Functor( int(Object::*_obj_fpt)( ArrayPtrVoid* )) { m_returnCode = FUNCTOR_CONTINUE; m_visibleOnly = true; obj_fpt = _obj_fpt; } -void Functor::Call( Object *ptr, ArrayPtrVoid params ) +void Functor::Call( Object *ptr, ArrayPtrVoid *params ) { // we should have return codes (not just bool) for avoiding to go further down the tree in some cases m_returnCode = (*ptr.*obj_fpt)( params ); @@ -849,22 +866,22 @@ void Functor::Call( Object *ptr, ArrayPtrVoid params ) // Object functor methods //---------------------------------------------------------------------------- -int Object::AddLayerElementToFlatList( ArrayPtrVoid params ) +int Object::AddLayerElementToFlatList( ArrayPtrVoid *params ) { // param 0: the ListOfObjects - ListOfObjects **list = static_cast(params[0]); + ListOfObjects **list = static_cast((*params).at(0)); //if ( dynamic_cast(this ) ) { (*list)->push_back( this ); //} return FUNCTOR_CONTINUE; } -int Object::FindByUuid( ArrayPtrVoid params ) +int Object::FindByUuid( ArrayPtrVoid *params ) { // param 0: the uuid we are looking for // param 1: the pointer to pointer to the Object - std::string *uuid = static_cast(params[0]); - Object **element = static_cast(params[1]); + std::string *uuid = static_cast((*params).at(0)); + Object **element = static_cast((*params).at(1)); if ( (*element) ) { // this should not happen, but just in case @@ -880,12 +897,12 @@ int Object::FindByUuid( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Object::FindByAttComparison( ArrayPtrVoid params ) +int Object::FindByAttComparison( ArrayPtrVoid *params ) { // param 0: the type we are looking for // param 1: the pointer to pointer to the Object - AttComparison *test = static_cast(params[0]); - Object **element = static_cast(params[1]); + AttComparison *test = static_cast((*params).at(0)); + Object **element = static_cast((*params).at(1)); if ( (*element) ) { // this should not happen, but just in case @@ -903,24 +920,27 @@ int Object::FindByAttComparison( ArrayPtrVoid params ) } -int Object::SetCurrentScoreDef( ArrayPtrVoid params ) +int Object::SetCurrentScoreDef( ArrayPtrVoid *params ) { // param 0: the current scoreDef - ScoreDef *currentScoreDef = static_cast(params[0]); - StaffDef **currentStaffDef = static_cast(params[1]); + ScoreDef *currentScoreDef = static_cast((*params).at(0)); + StaffDef **currentStaffDef = static_cast((*params).at(1)); assert( currentScoreDef ); // starting a new page - Page *page = dynamic_cast(this); - if ( page ) { + if (this->Is() == PAGE) { + // The keySig cancellation is set to false, which means that a scoreDef change has to occur + // after a page break if right at the begining. This is the same for systems below + Page *page = dynamic_cast(this); + assert( page ); if ( page->m_parent->GetChildIndex( page ) == 0 ) { - currentScoreDef->SetRedrawFlags( true, true, true, true ); + currentScoreDef->SetRedrawFlags( true, true, true, true, false ); currentScoreDef->SetDrawLabels( true ); } else { - currentScoreDef->SetRedrawFlags( true, true, false, false ); + currentScoreDef->SetRedrawFlags( true, true, false, false, false ); currentScoreDef->SetDrawLabels( false ); } page->m_drawingScoreDef = *currentScoreDef; @@ -928,72 +948,41 @@ int Object::SetCurrentScoreDef( ArrayPtrVoid params ) } // starting a new system - System *system = dynamic_cast(this); - if ( system ) { - currentScoreDef->SetRedrawFlags( true, true, false, false ); + if (this->Is() == SYSTEM) { + System *system = dynamic_cast(this); + assert( system ); + currentScoreDef->SetRedrawFlags( true, true, false, false, false ); return FUNCTOR_CONTINUE; } // starting a new scoreDef - ScoreDef *scoreDef= dynamic_cast(this); - if ( scoreDef ) { - bool drawClef = false; - bool drawKeySig = false; - bool drawMensur = false; - bool drawMeterSig = false; - if (scoreDef->GetClef()) { - currentScoreDef->ReplaceClef(scoreDef->GetClef()); - drawClef = true; - } - if (scoreDef->GetKeySig()) { - currentScoreDef->ReplaceKeySig(scoreDef->GetKeySig()); - drawKeySig = true; - } - if (scoreDef->GetMensur()) { - currentScoreDef->ReplaceMensur(scoreDef->GetMensur()); - drawMensur = true; - } - if (scoreDef->GetMeterSig()) { - currentScoreDef->ReplaceMeterSig(scoreDef->GetMeterSig()); - drawMeterSig = true; - } + if (this->Is() == SCOREDEF) { + ScoreDef *scoreDef= dynamic_cast(this); + assert( scoreDef ); // Replace the current scoreDef with the new one, including its content (staffDef) - currentScoreDef->Replace(scoreDef); - currentScoreDef->SetRedrawFlags( drawClef, drawKeySig, drawMensur, drawMeterSig ); + currentScoreDef->ReplaceDrawingValues(scoreDef); return FUNCTOR_CONTINUE; } - // starting a new staffDef - // Because staffDef have to be included in a scoreDef, a new staffDef was already - // replaced by the new scoreDef (see above). Here we only need to reset the drawing flags - StaffDef *staffDef= dynamic_cast(this); - if ( staffDef ) { - StaffDef *tmpStaffDef = currentScoreDef->GetStaffDef( staffDef->GetN() ); - if (staffDef->GetClef()) { - tmpStaffDef->SetDrawClef( true ); - } - if (staffDef->GetKeySig()) { - tmpStaffDef->SetDrawKeySig( true ); - } - if (staffDef->GetMensur()) { - tmpStaffDef->SetDrawMensur( true ); - } - if (staffDef->GetMeterSig()) { - tmpStaffDef->SetDrawMeterSig( true ); - } + if (this->Is() == STAFFDEF) { + StaffDef *staffDef= dynamic_cast(this); + assert( staffDef ); + currentScoreDef->ReplaceDrawingValues(staffDef); } // starting a new staff - Staff *staff = dynamic_cast(this); - if ( staff ) { + if (this->Is() == STAFF) { + Staff *staff = dynamic_cast(this); + assert( staff ); (*currentStaffDef) = currentScoreDef->GetStaffDef( staff->GetN() ); return FUNCTOR_CONTINUE; } // starting a new layer - Layer *layer = dynamic_cast(this); - if ( layer ) { + if (this->Is() == LAYER) { + Layer *layer = dynamic_cast(this); + assert( layer ); // setting the layer stem direction. Alternatively, this could be done in // View::DrawLayer. If this (and other things) is kept here, renaming the method to something more // generic (PrepareDrawing?) might be a good idea... @@ -1005,30 +994,32 @@ int Object::SetCurrentScoreDef( ArrayPtrVoid params ) layer->SetDrawingStemDir(STEMDIRECTION_down); } } - layer->SetDrawingAndCurrentValues( currentScoreDef, (*currentStaffDef) ); + layer->SetDrawingAndCurrentValues( (*currentStaffDef) ); return FUNCTOR_CONTINUE; } // starting a new clef - Clef *clef = dynamic_cast(this); - if ( clef ) { + if (this->Is() == CLEF) { + Clef *clef = dynamic_cast(this); + assert( clef ); assert( *currentStaffDef ); - (*currentStaffDef)->ReplaceClef( clef ); + (*currentStaffDef)->SetCurrentClef( new Clef( *clef ) ); return FUNCTOR_CONTINUE; } // starting a new keysig - KeySig *keysig = dynamic_cast(this); - if ( keysig ) { + if (this->Is() == KEYSIG) { + KeySig *keysig = dynamic_cast(this); + assert( keysig ); assert( *currentStaffDef ); - (*currentStaffDef)->ReplaceKeySig( keysig ); + (*currentStaffDef)->SetCurrentKeySig( new KeySig( *keysig ) ); return FUNCTOR_CONTINUE; } return FUNCTOR_CONTINUE; } -int Object::AlignHorizontally( ArrayPtrVoid params ) +int Object::AlignHorizontally( ArrayPtrVoid *params ) { // param 0: the measureAligner (unused) // param 1: the time (unused) @@ -1042,7 +1033,7 @@ int Object::AlignHorizontally( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Object::AlignVertically( ArrayPtrVoid params ) +int Object::AlignVertically( ArrayPtrVoid *params ) { // param 0: the systemAligner (unused) // param 1: the staffNb (unused @@ -1053,19 +1044,77 @@ int Object::AlignVertically( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } + +int Object::SetBoundingBoxGraceXShift( ArrayPtrVoid *params ) +{ + // param 0: the minimu position (i.e., the width of the previous element) + // param 1: the Doc + int *min_pos = static_cast((*params).at(0)); + Doc *doc = static_cast((*params).at(1)); + + // starting an new layer + if (this->Is() == LAYER) { + (*min_pos) = 0; + return FUNCTOR_CONTINUE; + } + + if (this->Is() != NOTE) { + return FUNCTOR_CONTINUE; + } + + Note *note = dynamic_cast(this); + assert( note ); + + if (!note->IsGraceNote()) { + (*min_pos) = 0; + return FUNCTOR_CONTINUE; + } + + // we should have processed aligned before + assert( note->GetGraceAlignment() ); + + // the negative offset it the part of the bounding box that overflows on the left + // |____x_____| + // ---- = negative offset + int negative_offset = - (note->m_contentBB_x1) + (doc->GetLeftMargin(NOTE) * doc->GetDrawingUnit(100) / PARAM_DENOMINATOR); -int Object::SetBoundingBoxXShift( ArrayPtrVoid params ) + if ( (*min_pos) > 0 ) { + //(*min_pos) += (doc->GetLeftMargin(&typeid(*note)) * doc->GetDrawingUnit(100) / PARAM_DENOMINATOR); + } + + // this should never happen (but can with glyphs not exactly registered at position x=0 in the SMuFL font used + if ( negative_offset < 0 ) negative_offset = 0; + + // check if the element overlaps with the preceeding one given by (*min_pos) + int overlap = (*min_pos) - note->GetGraceAlignment()->GetXRel() + negative_offset; + + if ( (note->GetGraceAlignment()->GetXRel() - negative_offset) < (*min_pos) ) { + note->GetGraceAlignment()->SetXShift( overlap ); + } + + // the next minimal position if given by the right side of the bounding box + the spacing of the element + (*min_pos) = note->GetGraceAlignment()->GetXRel() + note->m_contentBB_x2 + doc->GetRightMargin(NOTE) * doc->GetDrawingUnit(100) / PARAM_DENOMINATOR; + //(*min_pos) = note->GetGraceAlignment()->GetXRel() + note->m_contentBB_x2; + //note->GetGraceAlignment()->SetMaxWidth( note->m_contentBB_x2 + doc->GetRightMargin(&typeid(*note)) * doc->GetDrawingUnit(100) / PARAM_DENOMINATOR ); + note->GetGraceAlignment()->SetMaxWidth( note->m_contentBB_x2 ); + + return FUNCTOR_CONTINUE; +} + + +int Object::SetBoundingBoxXShift( ArrayPtrVoid *params ) { // param 0: the minimu position (i.e., the width of the previous element) // param 1: the maximum width in the current measure // param 2: the Doc - int *min_pos = static_cast(params[0]); - int *measure_width = static_cast(params[1]); - Doc *doc = static_cast(params[2]); + int *min_pos = static_cast((*params).at(0)); + int *measure_width = static_cast((*params).at(1)); + Doc *doc = static_cast((*params).at(2)); // starting a new measure - Measure *current_measure = dynamic_cast(this); - if ( current_measure ) { + if (this->Is() == MEASURE) { + Measure *current_measure = dynamic_cast(this); + assert( current_measure ); // we reset the measure width and the minimum position (*measure_width) = 0; (*min_pos) = 0; @@ -1076,10 +1125,10 @@ int Object::SetBoundingBoxXShift( ArrayPtrVoid params ) } // starting an new layer - Layer *current_layer = dynamic_cast(this); - if ( current_layer ) { - // reset it as the minimum position to the step (HARDCODED) - (*min_pos) = 30 * doc->m_drawingUnit[0] / 10; + if (this->Is() == LAYER) { + Layer *current_layer = dynamic_cast(this); + assert( current_layer ); + (*min_pos) = doc->GetLeftPosition() * doc->GetDrawingUnit(100) / PARAM_DENOMINATOR; // set scoreDef attr if (current_layer->GetDrawingClef()) { current_layer->GetDrawingClef()->SetBoundingBoxXShift( params ); @@ -1096,91 +1145,91 @@ int Object::SetBoundingBoxXShift( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } - LayerElement *current = dynamic_cast(this); - if ( !current ) { + if (!this->IsLayerElement()) { return FUNCTOR_CONTINUE; } + LayerElement *current = dynamic_cast(this); + assert( current ); + // we should have processed aligned before assert( current->GetAlignment() ); - - if ( !current->HasUpdatedBB() ) { - // if nothing was drawn, do not take it into account - return FUNCTOR_CONTINUE; - } - if ( current->IsBeam() ) { + if ( !current->HasToBeAligned() ) { + // if nothing to do with this type of account return FUNCTOR_CONTINUE; } - if ( current->IsNote() ) { - Chord* chordParent = dynamic_cast(current->GetFirstParent( &typeid( Chord ), MAX_CHORD_DEPTH)); - if( chordParent ) { - return FUNCTOR_CONTINUE; - } - } - - if ( current->IsTie() ) { + if ( !current->HasUpdatedBB() ) { + // if nothing was drawn, do not take it into account + assert( false ); // quite drastic but this should never happen. If nothing has to be drawn then the BB should be set to empty with DocObject::SetEmptyBB() return FUNCTOR_CONTINUE; } - if ( current->IsTuplet() ) { + if ( (current->Is() == NOTE) && current->GetFirstParent( CHORD, MAX_CHORD_DEPTH ) ) { return FUNCTOR_CONTINUE; } - if ( current->IsVerse() || current->IsSyl() ) { + if ( (current->Is() == ACCID) && current->GetFirstParent( NOTE, MAX_ACCID_DEPTH ) ) { return FUNCTOR_CONTINUE; } // the negative offset it the part of the bounding box that overflows on the left // |____x_____| // ---- = negative offset - //int negative_offset = current->GetAlignment()->GetXRel() - current->m_contentBB_x1; - int negative_offset = - (current->m_contentBB_x1) + (doc->GetLeftMargin(&typeid(*current)) * doc->m_drawingUnit[0] / PARAM_DENOMINATOR); + int negative_offset = - (current->m_contentBB_x1); + if (!current->IsGraceNote()) negative_offset += (doc->GetLeftMargin( current->Is() ) * doc->GetDrawingUnit(100) / PARAM_DENOMINATOR); // this should never happen (but can with glyphs not exactly registered at position x=0 in the SMuFL font used - if ( negative_offset < 0 ) { - //LogDebug("%s negative offset %d;", current->GetClassName().c_str(), negative_offset ); - negative_offset = 0; + if ( negative_offset < 0 ) negative_offset = 0; + + // with a grace note, also take into account the full with of the group given by the GraceAligner + if (current->GetAlignment()->HasGraceAligner()) { + negative_offset += current->GetAlignment()->GetGraceAligner()->GetWidth(); } - if ( current->IsMRest() ) { - // With MRest, the only thing we want to do it keep their with as possible measure with (if only MRest in all staves/layers) - int width = current->m_contentBB_x2 + doc->GetRightMargin(&typeid(*current)) * doc->m_drawingUnit[0] / PARAM_DENOMINATOR + negative_offset ; - // Keep it if more than the current measure width - (*measure_width) = std::max( (*measure_width), width ); - (*min_pos) = 0; - return FUNCTOR_CONTINUE; + int currentX = current->GetAlignment()->GetXRel(); + // with grace note, take into account the position of the note in the grace group + if (current->IsGraceNote()) { + Note *note = dynamic_cast(current); + currentX += note->GetGraceAlignment()->GetXRel(); } // check if the element overlaps with the preceeding one given by (*min_pos) - int overlap = 0; - overlap = (*min_pos) - current->GetAlignment()->GetXRel() + negative_offset; - if ( (current->GetAlignment()->GetXRel() - negative_offset) < (*min_pos) ) { - overlap = (*min_pos) - current->GetAlignment()->GetXRel() + negative_offset; - // shift the current element + int overlap = (*min_pos) - currentX + negative_offset; + + if ( (currentX - negative_offset) < (*min_pos) ) { current->GetAlignment()->SetXShift( overlap ); } - //LogDebug("%s min_pos %d; negative offset %d; drawXRel %d; overlap %d; m_drawingX %d", current->GetClassName().c_str(), (*min_pos), negative_offset, current->GetAlignment()->GetXRel(), overlap, current->GetDrawingX() ); - + // do not ajust the min pos and the max width since this is already handled by + // the GraceAligner + if ( current->IsGraceNote() ) { + (*min_pos) = current->GetAlignment()->GetXRel(); + current->GetAlignment()->SetMaxWidth( 0 ); + return FUNCTOR_CONTINUE; + } + // the next minimal position if given by the right side of the bounding box + the spacing of the element - (*min_pos) = current->GetAlignment()->GetXRel() + current->m_contentBB_x2 + doc->GetRightMargin(&typeid(*current)) * doc->m_drawingUnit[0] / PARAM_DENOMINATOR; - current->GetAlignment()->SetMaxWidth( current->m_contentBB_x2 + doc->GetRightMargin(&typeid(*current)) * doc->m_drawingUnit[0] / PARAM_DENOMINATOR ); + int width = current->m_contentBB_x2; + if (!current->HasEmptyBB()) width += doc->GetRightMargin( current->Is() ) * doc->GetDrawingUnit(100) / PARAM_DENOMINATOR; + (*min_pos) = current->GetAlignment()->GetXRel() + width; + current->GetAlignment()->SetMaxWidth( width ); return FUNCTOR_CONTINUE; } -int Object::SetBoundingBoxXShiftEnd( ArrayPtrVoid params ) +int Object::SetBoundingBoxXShiftEnd( ArrayPtrVoid *params ) { // param 0: the minimu position (i.e., the width of the previous element) // param 1: the maximum width in the current measure - int *min_pos = static_cast(params[0]); - int *measure_width = static_cast(params[1]); + int *min_pos = static_cast((*params).at(0)); + int *measure_width = static_cast((*params).at(1)); // ending a measure - Measure *current_measure = dynamic_cast(this); - if ( current_measure ) { + if (this->Is() == MEASURE) { + Measure *current_measure = dynamic_cast(this); + assert( current_measure ); // as minimum position of the barLine use the measure width (*min_pos) = (*measure_width); if (current_measure->GetRightBarlineType() != BARRENDITION_NONE) { @@ -1190,8 +1239,9 @@ int Object::SetBoundingBoxXShiftEnd( ArrayPtrVoid params ) } // ending a layer - Layer *current_layer = dynamic_cast(this); - if ( current_layer ) { + if (this->Is() == LAYER) { + Layer *current_layer = dynamic_cast(this); + assert( current_layer ); // mininimum position is the with the layer // we keep it if is higher than what we had so far // this will be used for shifting the right barLine @@ -1202,16 +1252,17 @@ int Object::SetBoundingBoxXShiftEnd( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Object::SetBoundingBoxYShift( ArrayPtrVoid params ) +int Object::SetBoundingBoxYShift( ArrayPtrVoid *params ) { // param 0: the position of the previous staff // param 1: the maximum height in the current system - int *min_pos = static_cast(params[0]); - int *system_height = static_cast(params[1]); + int *min_pos = static_cast((*params).at(0)); + int *system_height = static_cast((*params).at(1)); // starting a new system - System *current_system = dynamic_cast(this); - if ( current_system ) { + if (this->Is() == SYSTEM) { + System *current_system = dynamic_cast(this); + assert( current_system ); // we reset the system height (*system_height) = 0; (*min_pos) = 0; @@ -1219,18 +1270,19 @@ int Object::SetBoundingBoxYShift( ArrayPtrVoid params ) } // starting a new measure - Measure *current_measure = dynamic_cast(this); - if ( current_measure ) { + if (this->Is() == MEASURE) { (*min_pos) = 0; return FUNCTOR_CONTINUE; } // starting a new staff - Staff *current = dynamic_cast(this); - if ( !current ) { + if (this->Is() != STAFF) { return FUNCTOR_CONTINUE; } + Staff *current = dynamic_cast(this); + assert( current ); + // at this stage we assume we have instanciated the alignment pointer assert( current->GetAlignment() ); @@ -1259,16 +1311,17 @@ int Object::SetBoundingBoxYShift( ArrayPtrVoid params ) return FUNCTOR_SIBLINGS; } -int Object::SetBoundingBoxYShiftEnd( ArrayPtrVoid params ) +int Object::SetBoundingBoxYShiftEnd( ArrayPtrVoid *params ) { // param 0: the position of the previous staff // param 1: the maximum height in the current system - int *min_pos = static_cast(params[0]); - int *system_height = static_cast(params[1]); + int *min_pos = static_cast((*params).at(0)); + int *system_height = static_cast((*params).at(1)); // ending a measure - Measure *current_measure = dynamic_cast(this); - if ( current_measure ) { + if (this->Is() == MEASURE) { + Measure *current_measure = dynamic_cast(this); + assert( current_measure ); // mininimum position is the height for the last (previous) staff // we keep it if it is higher than what we had so far (*system_height) = std::min( (*system_height), (*min_pos) ); @@ -1280,10 +1333,10 @@ int Object::SetBoundingBoxYShiftEnd( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Object::Save( ArrayPtrVoid params ) +int Object::Save( ArrayPtrVoid *params ) { // param 0: output stream - FileOutputStream *output = static_cast(params[0]); + FileOutputStream *output = static_cast((*params).at(0)); if (!output->WriteObject( this )) { return FUNCTOR_STOP; } @@ -1291,10 +1344,10 @@ int Object::Save( ArrayPtrVoid params ) } -int Object::SaveEnd( ArrayPtrVoid params ) +int Object::SaveEnd( ArrayPtrVoid *params ) { // param 0: output stream - FileOutputStream *output = static_cast(params[0]); + FileOutputStream *output = static_cast((*params).at(0)); if (!output->WriteObjectEnd( this )) { return FUNCTOR_STOP; } diff --git a/src/page.cpp b/src/page.cpp index a692a7375ec..b66c94cc6c9 100644 --- a/src/page.cpp +++ b/src/page.cpp @@ -73,27 +73,6 @@ int Page::GetStaffPosOnPage( Staff *staff ) return 0; } -System *Page::GetAtPos( int y ) -{ - - //y -= ( SYSTEM_OFFSET / 2 ); // SYSTEM_OFFSET used to be 190 - System *system = dynamic_cast( this->GetFirst( &typeid(System) ) ); - if ( !system ) - return NULL; - - System *next = NULL; - while ( (next = dynamic_cast( this->GetNext() ) ) ) - { - if ( (int)next->m_yAbs < y ) - { - return system; - } - system = next; - } - - return system; -} - void Page::LayOut( bool force ) { if ( m_layoutDone && !force ) { @@ -109,11 +88,8 @@ void Page::LayOut( bool force ) void Page::LayOutHorizontally( ) { - if (!dynamic_cast(m_parent)) { - assert( false ); - return; - } Doc *doc = dynamic_cast(m_parent); + assert( doc ); // Doc::SetDrawingPage should have been called before // Make sure we have the correct page @@ -133,21 +109,20 @@ void Page::LayOutHorizontally( ) params.push_back( ¤tMensur ); params.push_back( ¤tMeterSig ); Functor alignHorizontally( &Object::AlignHorizontally ); - this->Process( &alignHorizontally, params ); + Functor alignHorizontallyEnd( &Object::AlignHorizontallyEnd ); + this->Process( &alignHorizontally, ¶ms, &alignHorizontallyEnd ); // Set the X position of each Alignment // Does a duration-based non linear spacing looking at the duration space between two Alignment objects params.clear(); double previousTime = 0.0; int previousXRel = 0; - int minMeasureWidth = doc->m_drawingMinMeasureWidth; params.push_back( &previousTime ); params.push_back( &previousXRel ); - params.push_back( &minMeasureWidth ); Functor setAlignmentX( &Object::SetAligmentXPos ); // Special case: because we redirect the functor, pass is a parameter to itself (!) params.push_back( &setAlignmentX ); - this->Process( &setAlignmentX, params ); + this->Process( &setAlignmentX, ¶ms ); // Render it for filling the bounding boxing View view; @@ -156,6 +131,23 @@ void Page::LayOutHorizontally( ) // Do not do the layout in this view - otherwise we will loop... view.SetPage( this->GetIdx(), false ); view.DrawCurrentPage( &bb_dc, false ); + + // Adjust the X shift of the Alignment looking at the bounding boxes + // Look at each LayerElement and changes the m_xShift if the bouding box is overlapping + params.clear(); + int grace_min_pos = 0; + params.push_back( &grace_min_pos ); + params.push_back( doc ); + Functor setBoundingBoxGraceXShift( &Object::SetBoundingBoxGraceXShift ); + this->Process( &setBoundingBoxGraceXShift, ¶ms ); + + // Integrate the X bounding box shift of the elements + // Once the m_xShift have been calculated, move all positions accordingly + params.clear(); + Functor integrateBoundingBoxGraceXShift( &Object::IntegrateBoundingBoxGraceXShift ); + // special case: because we redirect the functor, pass is a parameter to itself (!) + params.push_back( &integrateBoundingBoxGraceXShift ); + this->Process( &integrateBoundingBoxGraceXShift, ¶ms ); // Adjust the X shift of the Alignment looking at the bounding boxes // Look at each LayerElement and changes the m_xShift if the bouding box is overlapping @@ -167,19 +159,21 @@ void Page::LayOutHorizontally( ) params.push_back( doc ); Functor setBoundingBoxXShift( &Object::SetBoundingBoxXShift ); Functor setBoundingBoxXShiftEnd( &Object::SetBoundingBoxXShiftEnd ); - this->Process( &setBoundingBoxXShift, params, &setBoundingBoxXShiftEnd ); + this->Process( &setBoundingBoxXShift, ¶ms, &setBoundingBoxXShiftEnd ); // Integrate the X bounding box shift of the elements // Once the m_xShift have been calculated, move all positions accordingly params.clear(); int shift = 0; int justifiable_shift = 0; + int minMeasureWidth = doc->m_drawingMinMeasureWidth; params.push_back( &shift ); params.push_back( &justifiable_shift ); + params.push_back( &minMeasureWidth ); Functor integrateBoundingBoxXShift( &Object::IntegrateBoundingBoxXShift ); // special case: because we redirect the functor, pass is a parameter to itself (!) params.push_back( &integrateBoundingBoxXShift ); - this->Process( &integrateBoundingBoxXShift, params ); + this->Process( &integrateBoundingBoxXShift, ¶ms ); // Adjust measure X position params.clear(); @@ -187,16 +181,13 @@ void Page::LayOutHorizontally( ) params.push_back( &shift ); Functor alignMeasures( &Object::AlignMeasures ); Functor alignMeasuresEnd( &Object::AlignMeasuresEnd ); - this->Process( &alignMeasures, params, &alignMeasuresEnd ); + this->Process( &alignMeasures, ¶ms, &alignMeasuresEnd ); } void Page::LayOutVertically( ) { - if (!dynamic_cast(m_parent)) { - assert( false ); - return; - } Doc *doc = dynamic_cast(m_parent); + assert( doc ); // Doc::SetDrawingPage should have been called before // Make sure we have the correct page @@ -212,7 +203,7 @@ void Page::LayOutVertically( ) params.push_back( &systemAlignerPtr ); params.push_back( &staffNb ); Functor alignVertically( &Object::AlignVertically ); - this->Process( &alignVertically, params ); + this->Process( &alignVertically, ¶ms ); // Render it for filling the bounding boxing View view; @@ -231,21 +222,21 @@ void Page::LayOutVertically( ) params.push_back( &system_height ); Functor setBoundingBoxYShift( &Object::SetBoundingBoxYShift ); Functor setBoundingBoxYShiftEnd( &Object::SetBoundingBoxYShiftEnd ); - this->Process( &setBoundingBoxYShift, params, &setBoundingBoxYShiftEnd ); + this->Process( &setBoundingBoxYShift, ¶ms, &setBoundingBoxYShiftEnd ); // Set the Y position of each StaffAlignment // Adjusts the Y shift for making sure there is a minimal space (staffMargin) between each staff params.clear(); int previousStaffHeight = 0; // 0 for the first staff, reset for each system (see System::SetAlignmentYPos) - int staffMargin = doc->GetSpacingStaff() * doc->m_drawingDoubleUnit[0]; // the minimal space we want to have between each staff - int* interlineSizes = doc->m_drawingDoubleUnit; // the interline sizes to be used for calculating the (previous) staff height + int staffMargin = doc->GetSpacingStaff() * doc->GetDrawingDoubleUnit( 100 ); // the minimal space we want to have between each staff + int interlineSize = doc->GetDrawingDoubleUnit( 100 ); // the interline sizes to be used for calculating the (previous) staff height params.push_back( &previousStaffHeight ); params.push_back( &staffMargin ); - params.push_back( &interlineSizes ); + params.push_back( &interlineSize ); Functor setAlignmentY( &Object::SetAligmentYPos ); // special case: because we redirect the functor, pass is a parameter to itself (!) params.push_back( &setAlignmentY ); - this->Process( &setAlignmentY, params ); + this->Process( &setAlignmentY, ¶ms ); // Integrate the Y shift of the staves // Once the m_yShift have been calculated, move all positions accordingly @@ -255,26 +246,23 @@ void Page::LayOutVertically( ) Functor integrateBoundingBoxYShift( &Object::IntegrateBoundingBoxYShift ); // special case: because we redirect the functor, pass is a parameter to itself (!) params.push_back( &integrateBoundingBoxYShift ); - this->Process( &integrateBoundingBoxYShift, params ); + this->Process( &integrateBoundingBoxYShift, ¶ms ); // Adjust system Y position params.clear(); shift = doc->m_drawingPageHeight - doc->m_drawingPageTopMar; - int systemMargin = doc->GetSpacingSystem() * doc->m_drawingDoubleUnit[0]; + int systemMargin = doc->GetSpacingSystem() * doc->GetDrawingDoubleUnit( 100 ); params.push_back( &shift ); params.push_back( &systemMargin ); Functor alignSystems( &Object::AlignSystems ); Functor alignSystemsEnd( &Object::AlignSystemsEnd ); - this->Process( &alignSystems, params, &alignSystemsEnd ); + this->Process( &alignSystems, ¶ms, &alignSystemsEnd ); } void Page::JustifyHorizontally( ) { - if (!dynamic_cast(m_parent)) { - assert( false ); - return; - } Doc *doc = dynamic_cast(m_parent); + assert( doc ); if (!doc->GetJustificationX()) { return; @@ -299,16 +287,13 @@ void Page::JustifyHorizontally( ) Functor justifyX( &Object::JustifyX ); // special case: because we redirect the functor, pass is a parameter to itself (!) params.push_back( &justifyX ); - this->Process( &justifyX, params ); + this->Process( &justifyX, ¶ms ); } int Page::GetContentHeight( ) { - if (!dynamic_cast(m_parent)) { - assert( false ); - return 0; - } Doc *doc = dynamic_cast(m_parent); + assert( doc ); // Doc::SetDrawingPage should have been called before // Make sure we have the correct page @@ -324,12 +309,8 @@ int Page::GetContentHeight( ) int Page::GetContentWidth( ) { - if (!dynamic_cast(m_parent)) { - assert( false ); - return 0; - } - Doc *doc = NULL; - doc = dynamic_cast(m_parent); + Doc *doc = dynamic_cast(m_parent); + assert( doc ); // Doc::SetDrawingPage should have been called before // Make sure we have the correct page diff --git a/src/pitchinterface.cpp b/src/pitchinterface.cpp index a614b3da7c4..8008c1aa1a6 100644 --- a/src/pitchinterface.cpp +++ b/src/pitchinterface.cpp @@ -22,12 +22,15 @@ namespace vrv { // PitchInterface //---------------------------------------------------------------------------- -PitchInterface::PitchInterface(): +PitchInterface::PitchInterface(): Interface(), AttAccidental(), AttOctave(), AttPitch() { + RegisterInterfaceAttClass(ATT_ACCIDENTAL); + RegisterInterfaceAttClass(ATT_OCTAVE); + RegisterInterfaceAttClass(ATT_PITCH); Reset(); } diff --git a/src/positioninterface.cpp b/src/positioninterface.cpp index 0ea791fd76d..61fb342e9f8 100644 --- a/src/positioninterface.cpp +++ b/src/positioninterface.cpp @@ -17,9 +17,10 @@ namespace vrv { // PositionInterface //---------------------------------------------------------------------------- -PositionInterface::PositionInterface(): +PositionInterface::PositionInterface(): Interface(), AttStafflocPitched() { + RegisterInterfaceAttClass(ATT_STAFFLOCPITCHED); Reset(); } diff --git a/src/proport.cpp b/src/proport.cpp new file mode 100755 index 00000000000..8a2775c800f --- /dev/null +++ b/src/proport.cpp @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: proport.cpp +// Author: Donald Byrd +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "proport.h" + +namespace vrv { + +//---------------------------------------------------------------------------- +// Proport +//---------------------------------------------------------------------------- + +Proport::Proport(): + LayerElement("prop-"), + AttDurationRatio() +{ + RegisterAttClass(ATT_DURATIONRATIO); + Reset(); +} + +Proport::~Proport() +{ +} + +void Proport::Reset() +{ + LayerElement::Reset(); + ResetDurationRatio(); +} + +} // namespace vrv diff --git a/src/rest.cpp b/src/rest.cpp index e028891467f..6dbffc8fde5 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -17,6 +17,9 @@ namespace vrv { Rest::Rest(): LayerElement("rest-"), DurationInterface(), PositionInterface() { + RegisterInterface( DurationInterface::GetAttClasses(), DurationInterface::IsInterface() ); + RegisterInterface( PositionInterface::GetAttClasses(), PositionInterface::IsInterface() ); + Reset(); } diff --git a/src/rpt.cpp b/src/rpt.cpp new file mode 100644 index 00000000000..d1bfbaa99fd --- /dev/null +++ b/src/rpt.cpp @@ -0,0 +1,139 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: rpt.cpp +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "rpt.h" + +//---------------------------------------------------------------------------- + +#include +#include + +namespace vrv { + + +//---------------------------------------------------------------------------- +// BeatRpt +//---------------------------------------------------------------------------- + +BeatRpt::BeatRpt( ): + LayerElement("beatrpt-"), + AttBeatRptVis() +{ + RegisterAttClass(ATT_BEATRPTVIS); + Reset(); +} + +BeatRpt::~BeatRpt() +{ +} + +void BeatRpt::Reset() +{ + LayerElement::Reset(); + ResetBeatRptVis(); +} + +double BeatRpt::GetAlignmentDuration( int meterUnit ) +{ + return DUR_MAX / meterUnit; +} + +//---------------------------------------------------------------------------- +// MRpt +//---------------------------------------------------------------------------- + +MRpt::MRpt( ): + LayerElement("mrpt-") +{ + Reset(); +} + +MRpt::~MRpt() +{ +} + +void MRpt::Reset() +{ + LayerElement::Reset(); + + m_drawingMeasureCount = 0; +} + + +//---------------------------------------------------------------------------- +// MRpt2 +//---------------------------------------------------------------------------- + +MRpt2::MRpt2( ): + LayerElement("mrpt2-") +{ + Reset(); +} + +MRpt2::~MRpt2() +{ +} + +void MRpt2::Reset() +{ + LayerElement::Reset(); +} + + +//---------------------------------------------------------------------------- +// MultiRpt +//---------------------------------------------------------------------------- + +MultiRpt::MultiRpt( ): + LayerElement("multirpt-"), + AttNumbered() +{ + RegisterAttClass(ATT_NUMBERED); + Reset(); +} + +MultiRpt::~MultiRpt() +{ +} + +void MultiRpt::Reset() +{ + LayerElement::Reset(); + ResetNumbered(); +} + +//---------------------------------------------------------------------------- +// MRpt functor methods +//---------------------------------------------------------------------------- + +int MRpt::PrepareRpt( ArrayPtrVoid *params ) +{ + // param 0: a pointer to the current MRpt pointer + // param 1: a pointer to the data_BOOLEAN indicating if multiNumber + // param 2: a pointer to the doc scoreDef (unused) + MRpt **currentMRpt = static_cast((*params).at(0)); + data_BOOLEAN *multiNumber = static_cast((*params).at(1)); + + // If multiNumber is not true, nothing needs to be done + if ((*multiNumber) != BOOLEAN_true) { + return FUNCTOR_CONTINUE; + } + + // If this is the first one, number has to be 2 + if ((*currentMRpt) == NULL) { + this->m_drawingMeasureCount = 2; + } + // Otherwise increment it + else { + this->m_drawingMeasureCount = (*currentMRpt)->m_drawingMeasureCount + 1; + } + (*currentMRpt) = this; + return FUNCTOR_CONTINUE; +} + +} // namespace vrv diff --git a/src/scoredef.cpp b/src/scoredef.cpp index 2b67fac0365..aa2ddf25914 100644 --- a/src/scoredef.cpp +++ b/src/scoredef.cpp @@ -19,262 +19,171 @@ #include "mensur.h" #include "metersig.h" #include "system.h" +#include "vrv.h" namespace vrv { //---------------------------------------------------------------------------- -// ScoreOrStaffDefAttrInterface +// ScoreDefElement //---------------------------------------------------------------------------- -ScoreOrStaffDefAttrInterface::ScoreOrStaffDefAttrInterface() +ScoreDefElement::ScoreDefElement(std::string classid): + Object(classid), + ScoreDefInterface() { - // owned pointers need to be set to NULL; - m_clef = NULL; - m_keySig = NULL; - m_mensur = NULL; - m_meterSig = NULL; + RegisterInterface(ScoreDefInterface::GetAttClasses(), ScoreDefInterface::IsInterface()); + Reset(); } -ScoreOrStaffDefAttrInterface::~ScoreOrStaffDefAttrInterface() +ScoreDefElement::~ScoreDefElement() { - if (m_clef) { - delete m_clef; - } - if (m_keySig) { - delete m_keySig; - } - if (m_mensur) { - delete m_mensur; - } - if (m_meterSig) { - delete m_meterSig; - } } -void ScoreOrStaffDefAttrInterface::Reset() +void ScoreDefElement::Reset() { - if (m_clef) { - delete m_clef; - m_clef = NULL; - } - if (m_keySig) { - delete m_keySig; - m_keySig = NULL; - } - if (m_mensur) { - delete m_mensur; - m_mensur = NULL; - } - if (m_meterSig) { - delete m_meterSig; - m_meterSig = NULL; - } + Object::Reset(); + ScoreDefInterface::Reset(); } - -ScoreOrStaffDefAttrInterface::ScoreOrStaffDefAttrInterface( const ScoreOrStaffDefAttrInterface& interface ) + +bool ScoreDefElement::HasClefInfo() { - m_clef = NULL; - m_keySig = NULL; - m_mensur = NULL; - m_meterSig = NULL; - this->ReplaceClef( interface.m_clef ); - this->ReplaceKeySig( interface.m_keySig ); - this->ReplaceMensur( interface.m_mensur ); - this->ReplaceMeterSig( interface.m_meterSig ); + if (this->HasClefAttrInfo()) return true; + return (this->HasClefElementInfo()); } -ScoreOrStaffDefAttrInterface& ScoreOrStaffDefAttrInterface::operator=( const ScoreOrStaffDefAttrInterface& interface ) +bool ScoreDefElement::HasKeySigInfo() { - if ( this != &interface ) // not self assignement - { - if (m_clef) { - delete m_clef; - m_clef = NULL; - } - if (m_keySig) { - delete m_keySig; - m_keySig = NULL; - } - if (m_mensur) { - delete m_mensur; - m_mensur = NULL; - } - if (m_meterSig) { - delete m_meterSig; - m_meterSig = NULL; - } - this->ReplaceClef( interface.m_clef ); - this->ReplaceKeySig( interface.m_keySig ); - this->ReplaceMensur( interface.m_mensur ); - this->ReplaceMeterSig( interface.m_meterSig ); - } - return *this; -} - -void ScoreOrStaffDefAttrInterface::ReplaceClef( Object *newClef ) -{ - if ( newClef ) { - assert( dynamic_cast(newClef) || dynamic_cast(newClef) ); - if (m_clef) { - delete m_clef; - } - m_clef = newClef->Clone(); - } + if (this->HasKeySigAttrInfo()) return true; + return (this->HasKeySigElementInfo()); } -void ScoreOrStaffDefAttrInterface::ReplaceKeySig( Object *newKeySig ) +bool ScoreDefElement::HasMensurInfo() { - if ( newKeySig ) { - assert( dynamic_cast(newKeySig) || dynamic_cast(newKeySig) ); - if (m_keySig) { - delete m_keySig; - } - m_keySig = newKeySig->Clone(); - } + if (this->HasMensurAttrInfo()) return true; + return (this->HasMensurElementInfo()); } -void ScoreOrStaffDefAttrInterface::ReplaceMensur( Object *newMensur ) +bool ScoreDefElement::HasMeterSigInfo() { - if ( newMensur ) { - assert( dynamic_cast(newMensur) || dynamic_cast(newMensur) ); - if (m_mensur) { - delete m_mensur; - } - m_mensur = newMensur->Clone(); - } + if (this->HasMeterSigAttrInfo()) return true; + return (this->HasMeterSigElementInfo()); } + +bool ScoreDefElement::HasClefAttrInfo() +{ + // We need at least a @clef.shape and a @clef.line ? + return (this->HasClefShape() && this->HasClefLine()); -void ScoreOrStaffDefAttrInterface::ReplaceMeterSig( Object *newMeterSig ) + // Eventually we can look a child clef element + // We would probably need to take into account app and rdg? + return false; +} + +bool ScoreDefElement::HasKeySigAttrInfo() { - if ( newMeterSig ) { - assert( dynamic_cast(newMeterSig) || dynamic_cast(newMeterSig) ); - if (m_meterSig) { - delete m_meterSig; - } - m_meterSig = newMeterSig->Clone(); - } + return (this->HasKeySig()); +} + +bool ScoreDefElement::HasMensurAttrInfo() +{ + // What is the minimum we need? Checking only some for now. Need clarification + return (this->HasProlatio() || this->HasTempus() || this->HasProportNum() || this->HasProportNumbase()); +} + +bool ScoreDefElement::HasMeterSigAttrInfo() +{ + return ( this->HasMeterCount() || this->HasMeterSym() || this->HasMeterUnit()); +} + +bool ScoreDefElement::HasClefElementInfo() +{ + // Eventually we can look a child clef element + // We would probably need to take into account app and rdg? + return false; +} + +bool ScoreDefElement::HasKeySigElementInfo() +{ + return false; +} + +bool ScoreDefElement::HasMensurElementInfo() +{ + return false; +} + +bool ScoreDefElement::HasMeterSigElementInfo() +{ + return false; } -Clef *ScoreOrStaffDefAttrInterface::GetClefCopy() const +Clef *ScoreDefElement::GetClefCopy() { - // we should not call it without having checked if a clef is set - if (!m_clef) return NULL; Clef *copy = NULL; - Clef *current_clef = dynamic_cast(m_clef); - if (current_clef) { - copy = new Clef(*current_clef); + if (this->HasClefAttrInfo()) { + copy = new Clef( this ); } - else { - ClefAttr *current_attr = dynamic_cast(m_clef); - copy = new Clef(current_attr); + else if (this->HasClefElementInfo()) { + // Eventually return a copy of the child element; } + // Always check if HasClefInfo() is true before asking for a copy assert(copy); copy->SetScoreOrStaffDefAttr(true); return copy; } -KeySig *ScoreOrStaffDefAttrInterface::GetKeySigCopy() const +KeySig *ScoreDefElement::GetKeySigCopy() { - // we should not call it without having checked if a keysig is set - if (!m_keySig) return NULL; KeySig *copy = NULL; - KeySig *current_keySig = dynamic_cast(m_keySig); - if (current_keySig) { - copy = new KeySig(*current_keySig); + if (this->HasKeySigAttrInfo()) { + copy = new KeySig(this); } else { - KeySigAttr *current_attr = dynamic_cast(m_keySig); - copy = new KeySig(current_attr); + // Eventually return a copy of the child element; } + // Always check if HasKeySigInfo() is true before asking for a copy assert(copy); copy->SetScoreOrStaffDefAttr(true); return copy; } -Mensur *ScoreOrStaffDefAttrInterface::GetMensurCopy() const +Mensur *ScoreDefElement::GetMensurCopy() { - // we should not call it without having checked if a mensur is set - if (!m_mensur) return NULL; Mensur *copy = NULL; - Mensur *current_mensur = dynamic_cast(m_mensur); - if (current_mensur) { - copy = new Mensur(*current_mensur); + if (this->HasMensurAttrInfo()) { + copy = new Mensur(this); } else { - MensurAttr *current_attr = dynamic_cast(m_mensur); - copy = new Mensur(current_attr); + // Eventually return a copy of the child element; } + // Always check if HasMensurInfo() is true before asking for a copy assert(copy); copy->SetScoreOrStaffDefAttr(true); return copy; } -MeterSig *ScoreOrStaffDefAttrInterface::GetMeterSigCopy() const +MeterSig *ScoreDefElement::GetMeterSigCopy() { - // we should not call it without having checked if a meterSig is set - if (!m_meterSig) return NULL; MeterSig *copy = NULL; - MeterSig *current_meterSig = dynamic_cast(m_meterSig); - if (current_meterSig) { - copy = new MeterSig(*current_meterSig); + if (this->HasMeterSigAttrInfo()) { + copy = new MeterSig(this); } else { - MeterSigAttr *current_attr = dynamic_cast(m_meterSig); - copy = new MeterSig(current_attr); + // Eventually return a copy of the child element; } + // Always check if HasMeterSigInfo() is true before asking for a copy assert(copy); copy->SetScoreOrStaffDefAttr(true); return copy; } -Clef *ScoreOrStaffDefAttrInterface::GetClefElement() const -{ - return dynamic_cast(m_clef); -} - -KeySig *ScoreOrStaffDefAttrInterface::GetKeySigElement() const -{ - return dynamic_cast(m_keySig); -} - -Mensur *ScoreOrStaffDefAttrInterface::GetMensurElement() const -{ - return dynamic_cast(m_mensur); -} - -MeterSig *ScoreOrStaffDefAttrInterface::GetMeterSigElement() const -{ - return dynamic_cast(m_meterSig); -} - -ClefAttr *ScoreOrStaffDefAttrInterface::GetClefAttr() const -{ - return dynamic_cast(m_clef); -} - -KeySigAttr *ScoreOrStaffDefAttrInterface::GetKeySigAttr() const -{ - return dynamic_cast(m_keySig); -} - -MensurAttr *ScoreOrStaffDefAttrInterface::GetMensurAttr() const -{ - return dynamic_cast(m_mensur); -} - -MeterSigAttr *ScoreOrStaffDefAttrInterface::GetMeterSigAttr() const -{ - return dynamic_cast(m_meterSig); -} - - //---------------------------------------------------------------------------- // ScoreDef //---------------------------------------------------------------------------- ScoreDef::ScoreDef() : - Object("scoredef-"), ScoreOrStaffDefAttrInterface(), ObjectListInterface() + ScoreDefElement("scoredef-"), ObjectListInterface() { Reset(); } @@ -285,8 +194,7 @@ ScoreDef::~ScoreDef() void ScoreDef::Reset() { - Object::Reset(); - ScoreOrStaffDefAttrInterface::Reset(); + ScoreDefElement::Reset(); m_drawLabels = false; } @@ -298,34 +206,87 @@ void ScoreDef::AddStaffGrp( StaffGrp *staffGrp ) Modify(); } -void ScoreDef::Replace( ScoreDef *newScoreDef ) +void ScoreDef::ReplaceDrawingValues( ScoreDef *newScoreDef ) { - ReplaceClef( newScoreDef->m_clef ); - ReplaceKeySig( newScoreDef->m_keySig ); - ReplaceMensur( newScoreDef->m_mensur ); - ReplaceMeterSig( newScoreDef->m_meterSig ); + assert(newScoreDef); + + bool drawClef = false; + bool drawKeySig = false; + bool drawMensur = false; + bool drawMeterSig = false; + Clef *clef = NULL; + KeySig *keySig = NULL; + Mensur *mensur = NULL; + MeterSig *meterSig = NULL; + if (newScoreDef->HasClefInfo()) { + drawClef = true; + clef = newScoreDef->GetClefCopy(); + } + if (newScoreDef->HasKeySigInfo()) { + drawKeySig = true; + keySig = newScoreDef->GetKeySigCopy(); + } + if (newScoreDef->HasMensurInfo()) { + drawMensur = true; + mensur = newScoreDef->GetMensurCopy(); + } + if (newScoreDef->HasMeterSigInfo()) { + drawMeterSig = true; + meterSig = newScoreDef->GetMeterSigCopy(); + } + ArrayPtrVoid params; - params.push_back( this ); - Functor replaceStaffDefsInScoreDef( &Object::ReplaceStaffDefsInScoreDef ); - newScoreDef->Process( &replaceStaffDefsInScoreDef, params ); + params.push_back( clef ); + params.push_back( keySig ); + params.push_back( mensur ); + params.push_back( meterSig ); + Functor replaceDrawingValuesInScoreDef( &Object::ReplaceDrawingValuesInStaffDef ); + this->Process( &replaceDrawingValuesInScoreDef, ¶ms ); + + if (clef) delete clef; + if (keySig) delete keySig; + if (mensur) delete mensur; + if (meterSig) delete meterSig; + + // The keySig cancellation flag is the same as keySig because we draw cancellation with new key sig + this->SetRedrawFlags( drawClef, drawKeySig, drawMensur, drawMeterSig, drawKeySig ); + } -void ScoreDef::Replace( StaffDef *newStaffDef ) +void ScoreDef::ReplaceDrawingValues( StaffDef *newStaffDef ) { + assert(newStaffDef); + // first find the staffDef with the same @n StaffDef *staffDef = this->GetStaffDef( newStaffDef->GetN() ); // if found, replace attributes if (staffDef) { - staffDef->ReplaceClef( newStaffDef->GetClef() ); - staffDef->ReplaceKeySig( newStaffDef->GetKeySig() ); - staffDef->ReplaceMensur( newStaffDef->GetMensur() ); - staffDef->ReplaceMeterSig( newStaffDef->GetMeterSig() ); + if (newStaffDef->HasClefInfo()) { + staffDef->SetDrawClef(true); + staffDef->SetCurrentClef( newStaffDef->GetClefCopy() ); + } + if (newStaffDef->HasKeySigInfo()) { + staffDef->SetDrawKeySig(true); + staffDef->SetDrawKeySigCancellation(true); + staffDef->SetCurrentKeySig( newStaffDef->GetKeySigCopy() ); + } + if (newStaffDef->HasMensurInfo()) { + staffDef->SetDrawMensur(true); + staffDef->SetCurrentMensur(newStaffDef->GetMensurCopy()); + } + if (newStaffDef->HasMeterSigInfo()) { + staffDef->SetDrawMeterSig(true); + staffDef->SetCurrentMeterSig(newStaffDef->GetMeterSigCopy()); + } // copy other attributes if present if ( newStaffDef->HasLabel() ) staffDef->SetLabel( newStaffDef->GetLabel() ); if ( newStaffDef->HasLabelAbbr() ) staffDef->SetLabelAbbr( newStaffDef->GetLabelAbbr() ); } + else { + LogWarning("StaffDef with xml:id '%s' could not be found", newStaffDef->GetUuid().c_str()); + } } void ScoreDef::FilterList( ListOfObjects *childList ) @@ -365,24 +326,32 @@ StaffDef *ScoreDef::GetStaffDef( int n ) } -void ScoreDef::SetRedrawFlags( bool clef, bool keysig, bool mensur, bool meterSig ) +void ScoreDef::SetRedrawFlags( bool clef, bool keySig, bool mensur, bool meterSig, bool keySigCancellation ) { ArrayPtrVoid params; params.push_back( &clef ); - params.push_back( &keysig ); + params.push_back( &keySig ); params.push_back( &mensur ); params.push_back( &meterSig ); + params.push_back( &keySigCancellation ); Functor setStaffDefDraw( &Object::SetStaffDefRedrawFlags ); - this->Process( &setStaffDefDraw, params ); + this->Process( &setStaffDefDraw, ¶ms ); } //---------------------------------------------------------------------------- // StaffGrp //---------------------------------------------------------------------------- -StaffGrp::StaffGrp() : - Object(), ObjectListInterface() +StaffGrp::StaffGrp() : Object(), ObjectListInterface(), + AttCommon(), + AttLabelsAddl(), + AttStaffgroupingsym(), + AttStaffGrpVis() { + RegisterAttClass(ATT_COMMON); + RegisterAttClass(ATT_LABELSADDL); + RegisterAttClass(ATT_STAFFGROUPINGSYM); + RegisterAttClass(ATT_STAFFGRPVIS); Reset(); } @@ -393,8 +362,10 @@ StaffGrp::~StaffGrp() void StaffGrp::Reset() { Object::Reset(); - m_symbol = STAFFGRP_NONE; - m_barthru = false; + ResetCommon(); + ResetLabelsAddl(); + ResetStaffgroupingsym(); + ResetStaffGrpVis(); } void StaffGrp::AddStaffDef( StaffDef *staffDef ) @@ -432,11 +403,16 @@ void StaffGrp::FilterList( ListOfObjects *childList ) //---------------------------------------------------------------------------- StaffDef::StaffDef() : - Object(), ScoreOrStaffDefAttrInterface(), + ScoreDefElement("staffdef-"), AttCommon(), AttLabelsAddl(), + AttScalable(), AttStaffDefVis() { + RegisterAttClass(ATT_COMMON); + RegisterAttClass(ATT_LABELSADDL); + RegisterAttClass(ATT_SCALABLE); + RegisterAttClass(ATT_STAFFDEFVIS); Reset(); } @@ -446,15 +422,11 @@ StaffDef::~StaffDef() void StaffDef::Reset() { - Object::Reset(); - ScoreOrStaffDefAttrInterface::Reset(); + ScoreDefElement::Reset(); ResetCommon(); ResetLabelsAddl(); + ResetScalable(); ResetStaffDefVis(); - m_drawClef = false; - m_drawKeySig = false; - m_drawMensur = false; - m_drawMeterSig = false; } @@ -462,15 +434,15 @@ void StaffDef::Reset() // ScoreDef functor methods //---------------------------------------------------------------------------- -int ScoreDef::CastOffSystems( ArrayPtrVoid params ) +int ScoreDef::CastOffSystems( ArrayPtrVoid *params ) { // param 0: a pointer to the system we are taking the content from // param 1: a pointer the page we are adding system to (unused) // param 2: a pointer to the current system // param 3: the cummulated shift (m_drawingXRel of the first measure of the current system) (unused) // param 4: the system width (unused) - System *contentSystem = static_cast(params[0]); - System **currentSystem = static_cast(params[2]); + System *contentSystem = static_cast((*params).at(0)); + System **currentSystem = static_cast((*params).at(2)); // Since the functor returns FUNCTOR_SIBLINGS we should never go lower than the system children assert( dynamic_cast(this->m_parent)); @@ -489,26 +461,45 @@ int ScoreDef::CastOffSystems( ArrayPtrVoid params ) // StaffDef functor methods //---------------------------------------------------------------------------- -int StaffDef::ReplaceStaffDefsInScoreDef( ArrayPtrVoid params ) +int StaffDef::ReplaceDrawingValuesInStaffDef( ArrayPtrVoid *params ) { - // param 0: the scoreDef - ScoreDef *scoreDef = static_cast(params[0]); + // param 0: Clef pointer (NULL if none) + // param 1: KeySig pointer (NULL if none) + // param 2: Mensur pointer (NULL if none) + // param 3: MeterSig pointer (NULL if none) + Clef *clef = static_cast((*params).at(0)); + KeySig *keySig = static_cast((*params).at(1)); + Mensur *mensur = static_cast((*params).at(2)); + MeterSig *meterSig = static_cast((*params).at(3)); - scoreDef->Replace( this ); + if (clef) { + this->SetCurrentClef(new Clef(*clef)); + } + if (keySig) { + this->SetCurrentKeySig(new KeySig(*keySig)); + } + if (mensur) { + this->SetCurrentMensur(new Mensur(*mensur)); + } + if (meterSig) { + this->SetCurrentMeterSig(new MeterSig(*meterSig)); + } return FUNCTOR_CONTINUE; } -int StaffDef::SetStaffDefRedrawFlags( ArrayPtrVoid params ) +int StaffDef::SetStaffDefRedrawFlags( ArrayPtrVoid *params ) { // param 0: bool clef flag // param 1: bool keysig flag // param 2: bool mensur flag // param 3: bool meterSig flag - bool *clef = static_cast(params[0]); - bool *keysig = static_cast(params[1]); - bool *mensur = static_cast(params[2]); - bool *meterSig = static_cast(params[3]); + // param 4: bool keySig cancellation flag + bool *clef = static_cast((*params).at(0)); + bool *keysig = static_cast((*params).at(1)); + bool *mensur = static_cast((*params).at(2)); + bool *meterSig = static_cast((*params).at(3)); + bool *keySigCancellation = static_cast((*params).at(4)); if ( (*clef) ) { this->SetDrawClef( true ); @@ -522,6 +513,9 @@ int StaffDef::SetStaffDefRedrawFlags( ArrayPtrVoid params ) if ( (*meterSig) ) { this->SetDrawMeterSig( true ); } + if ( (*keySigCancellation) ) { + this->SetDrawKeySigCancellation( true ); + } return FUNCTOR_CONTINUE; } diff --git a/src/scoredefinterface.cpp b/src/scoredefinterface.cpp new file mode 100644 index 00000000000..8fc03483591 --- /dev/null +++ b/src/scoredefinterface.cpp @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: scoredefinterface.cpp +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "scoredefinterface.h" + +//---------------------------------------------------------------------------- + +#include + +//---------------------------------------------------------------------------- + +#include "layerelement.h" +#include "staff.h" +#include "vrv.h" + +namespace vrv { + + +//---------------------------------------------------------------------------- +// ScoreDefInterface +//---------------------------------------------------------------------------- + +ScoreDefInterface::ScoreDefInterface(): Interface(), + AttCleffingLog(), + AttKeySigDefaultLog(), + AttKeySigDefaultVis(), + AttMensuralShared(), + AttMensuralLog(), + AttMeterSigDefaultLog(), + AttMeterSigDefaultVis(), + AttMultinummeasures() +{ + RegisterInterfaceAttClass(ATT_CLEFFINGLOG); + RegisterInterfaceAttClass(ATT_KEYSIGDEFAULTLOG); + RegisterInterfaceAttClass(ATT_KEYSIGDEFAULTVIS); + RegisterInterfaceAttClass(ATT_MENSURALLOG); + RegisterInterfaceAttClass(ATT_MENSURALSHARED); + RegisterInterfaceAttClass(ATT_METERSIGDEFAULTLOG); + RegisterInterfaceAttClass(ATT_METERSIGDEFAULTVIS); + RegisterInterfaceAttClass(ATT_MULTINUMMEASURES); + Reset(); +} + +ScoreDefInterface::~ScoreDefInterface() +{ +} + +void ScoreDefInterface::Reset() +{ + ResetCleffingLog(); + ResetKeySigDefaultLog(); + ResetKeySigDefaultVis(); + ResetMensuralLog(); + ResetMensuralShared(); + ResetMeterSigDefaultLog(); + ResetMeterSigDefaultVis(); + ResetMultinummeasures(); +} + +} // namespace vrv diff --git a/src/slur.cpp b/src/slur.cpp index e09b47b88a5..50764eebdf9 100644 --- a/src/slur.cpp +++ b/src/slur.cpp @@ -21,8 +21,13 @@ namespace vrv { //---------------------------------------------------------------------------- Slur::Slur(): - MeasureElement("slur-"), TimeSpanningInterface() + FloatingElement("slur-"), TimeSpanningInterface(), + AttCurvature() { + RegisterAttClass(ATT_CURVATURE); + + RegisterInterface( TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface() ); + Reset(); } @@ -33,30 +38,10 @@ Slur::~Slur() void Slur::Reset() { - MeasureElement::Reset(); + FloatingElement::Reset(); TimeSpanningInterface::Reset(); -} - -//---------------------------------------------------------------------------- -// Slur functor methods -//---------------------------------------------------------------------------- - -int Slur::PrepareTimeSpanning( ArrayPtrVoid params ) -{ - // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::PrepareTimeSpanning(params, this); -} -int Slur::FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) -{ - // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::FillStaffCurrentTimeSpanning(params, this); + ResetCurvature(); } -int Slur::ResetDarwing( ArrayPtrVoid params ) -{ - // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::ResetDrawing(params, this); -}; - } // namespace vrv diff --git a/src/space.cpp b/src/space.cpp index dcb0241dc26..d7d7a635cb3 100644 --- a/src/space.cpp +++ b/src/space.cpp @@ -17,6 +17,8 @@ namespace vrv { Space::Space( ): LayerElement("space-"), DurationInterface() { + RegisterInterface( DurationInterface::GetAttClasses(), DurationInterface::IsInterface() ); + Reset(); } diff --git a/src/staff.cpp b/src/staff.cpp index f0f899efd3f..7d8eb1394a4 100644 --- a/src/staff.cpp +++ b/src/staff.cpp @@ -28,9 +28,10 @@ namespace vrv { //---------------------------------------------------------------------------- Staff::Staff( int n ): - MeasureElement("staff-"), + DocObject("staff-"), AttCommon() { + RegisterAttClass(ATT_COMMON); Reset(); SetN(n); } @@ -42,12 +43,12 @@ Staff::~Staff() void Staff::Reset() { - MeasureElement::Reset(); + DocObject::Reset(); ResetCommon(); notAnc = false; // LP we want modern notation :)) grise = false; invisible = false; - staffSize = 0; + m_drawingStaffSize = 100; m_drawingLines = 5; m_yAbs = VRV_UNSET; m_drawingY = 0; @@ -75,14 +76,14 @@ void Staff::ResetVerticalAlignment() m_drawingY = 0; } -bool Staff::GetPosOnPage( ArrayPtrVoid params ) +bool Staff::GetPosOnPage( ArrayPtrVoid *params ) { // param 0: the Staff we are looking for // param 1: the position on the page (int) // param 2; the success flag (bool) - Staff *staff = static_cast(params[0]); - int *position = static_cast(params[1]); - bool *success = static_cast(params[2]); + Staff *staff = static_cast((*params).at(0)); + int *position = static_cast((*params).at(1)); + bool *success = static_cast((*params).at(2)); if ( (*success) ) { return true; @@ -110,12 +111,12 @@ int Staff::GetYRel() //---------------------------------------------------------------------------- -int Staff::AlignVertically( ArrayPtrVoid params ) +int Staff::AlignVertically( ArrayPtrVoid *params ) { // param 0: the systemAligner // param 1: the staffNb - SystemAligner **systemAligner = static_cast(params[0]); - int *staffNb = static_cast(params[1]); + SystemAligner **systemAligner = static_cast((*params).at(0)); + int *staffNb = static_cast((*params).at(1)); // we need to call it because we are overriding Object::AlignVertically this->ResetVerticalAlignment(); @@ -134,16 +135,16 @@ int Staff::AlignVertically( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Staff::FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) +int Staff::FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ) { // param 0: the current Syl - std::vector *elements = static_cast*>(params[0]); + std::vector *elements = static_cast*>((*params).at(0)); std::vector::iterator iter = elements->begin(); while ( iter != elements->end()) { TimeSpanningInterface *interface = dynamic_cast(*iter); assert(interface); - Staff *endParent = dynamic_cast(interface->GetEnd()->GetFirstParent( &typeid(Staff) ) ); + Staff *endParent = dynamic_cast(interface->GetEnd()->GetFirstParent( STAFF ) ); assert( endParent ); // Because we are not processing following staff @n, we need to check it here. // this might cause problem with cross-staves slurs if the end is on a lower staff than the start: @@ -163,18 +164,18 @@ int Staff::FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Staff::FillStaffCurrentLyrics( ArrayPtrVoid params ) +int Staff::FillStaffCurrentLyrics( ArrayPtrVoid *params ) { // param 0: the current Syl // param 1: the last Note - Syl **currentSyl = static_cast(params[0]); + Syl **currentSyl = static_cast((*params).at(0)); if ((*currentSyl)) { // We have a running syl started in a previous measure this->m_timeSpanningElements.push_back((*currentSyl)); if ((*currentSyl)->GetEnd()) { // Look if the syl ends in this measure - if not, add it - if ((*currentSyl)->GetEnd()->GetFirstParent( &typeid(Staff) ) == this ) { + if ((*currentSyl)->GetEnd()->GetFirstParent( STAFF ) == this ) { (*currentSyl) = NULL; } } @@ -183,7 +184,7 @@ int Staff::FillStaffCurrentLyrics( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Staff::ResetDarwing( ArrayPtrVoid params ) +int Staff::ResetDarwing( ArrayPtrVoid *params ) { // Pass it to the pseudo functor of the interface this->m_timeSpanningElements.clear(); @@ -191,7 +192,7 @@ int Staff::ResetDarwing( ArrayPtrVoid params ) }; -int Staff::SetDrawingXY( ArrayPtrVoid params ) +int Staff::SetDrawingXY( ArrayPtrVoid *params ) { // param 0: a pointer doc // param 1: a pointer to the current system @@ -200,10 +201,10 @@ int Staff::SetDrawingXY( ArrayPtrVoid params ) // param 4: a pointer to the current layer (unused) // param 5: a pointer to the view (unused) // param 6: a bool indicating if we are processing layer elements or not - Doc *doc = static_cast(params[0]); - System **currentSystem = static_cast(params[1]); - Staff **currentStaff = static_cast(params[3]); - bool *processLayerElements = static_cast(params[6]); + Doc *doc = static_cast((*params).at(0)); + System **currentSystem = static_cast((*params).at(1)); + Staff **currentStaff = static_cast((*params).at(3)); + bool *processLayerElements = static_cast((*params).at(6)); (*currentStaff) = this; @@ -225,5 +226,31 @@ int Staff::SetDrawingXY( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } + +int Staff::PrepareRpt( ArrayPtrVoid *params ) +{ + // param 0: a pointer to the current MRpt pointer (unused) + // param 1: a pointer to the data_BOOLEAN indicating if multiNumber + // param 2: a pointer to the doc scoreDef + data_BOOLEAN *multiNumber = static_cast((*params).at(1)); + ScoreDef *scoreDef = static_cast((*params).at(2)); + + // If multiNumber is set, we already know that nothing needs to be done + // Futhermore, if @multi.number is false, the functor should have stop (see below) + if ((*multiNumber) != BOOLEAN_NONE) { + return FUNCTOR_CONTINUE; + } + + // This is happening only for the first staff element of the staff @n + if (StaffDef *staffDef = scoreDef->GetStaffDef( this->GetN() ) ) { + if ((staffDef->HasMultiNumber()) && (staffDef->GetMultiNumber() == BOOLEAN_false)) { + // Set it just in case, but stopping the functor should do it for this staff @n + (*multiNumber) = BOOLEAN_false; + return FUNCTOR_STOP; + } + } + (*multiNumber) = BOOLEAN_true; + return FUNCTOR_CONTINUE; +} } // namespace vrv diff --git a/src/style.cpp b/src/style.cpp index a00159feafa..c7ea4c1f1bf 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -22,7 +22,7 @@ Style::Style() m_unit = DEFAULT_UNIT * DEFINITON_FACTOR; m_landscape = false; - m_barlineWidth = (unsigned short)(DEFAULT_BARLINE_WITDH * DEFINITON_FACTOR); + m_barLineWidth = (unsigned short)(DEFAULT_BARLINE_WITDH * DEFINITON_FACTOR); m_staffLineWidth = (unsigned short)(DEFAULT_STAFFLINE_WITDH * DEFINITON_FACTOR); m_stemWidth = (unsigned short)(DEFAULT_STEM_WITDH * DEFINITON_FACTOR); @@ -34,13 +34,10 @@ Style::Style() m_beamMinSlope = 0; /** - * We should probably keep graceNum and Den for cue sized notes. - * smallStaffNum and Den should be replaced for a more MEI way (percentage?) + * graceNum and Den for cue sized notes. */ - m_smallStaffNum = 4; - m_smallStaffDen = 5; - m_graceNum = 3; - m_graceDen = 4; + m_graceNum = 5; + m_graceDen = 7; m_pageHeight = DEFAULT_PAGE_HEIGHT * DEFINITON_FACTOR; m_pageWidth = DEFAULT_PAGE_WIDTH * DEFINITON_FACTOR; @@ -53,6 +50,51 @@ Style::Style() m_lyricSize = DEFAULT_LYRIC_SIZE * PARAM_DENOMINATOR; m_minMeasureWidth = (short)(DEFAULT_MEASURE_WIDTH * PARAM_DENOMINATOR); + + /** ties and slurs */ + m_tieThickness = DEFAULT_TIE_THICKNESS * PARAM_DENOMINATOR; + m_minSlurHeight = DEFAULT_MIN_SLUR_HEIGHT * PARAM_DENOMINATOR; + m_maxSlurHeight = DEFAULT_MAX_SLUR_HEIGHT * PARAM_DENOMINATOR;; + m_slurThickness = DEFAULT_SLUR_THICKNESS * PARAM_DENOMINATOR; + + /** The left spacing */ + m_leftPosition = DEFAULT_LEFT_POSITION * DEFINITON_FACTOR; + + /** The layout left margin by element */ + m_leftMarginBarline = DEFAULT_LEFT_MARGIN_BARLINE * DEFINITON_FACTOR; + m_leftMarginBarlineAttr = DEFAULT_LEFT_MARGIN_BARLINE_ATTR * DEFINITON_FACTOR; + m_leftMarginBeatRpt = DEFAULT_LEFT_MARGIN_BEATRPT * DEFINITON_FACTOR; + m_leftMarginChord = DEFAULT_LEFT_MARGIN_CHORD * DEFINITON_FACTOR; + m_leftMarginClef = DEFAULT_LEFT_MARGIN_CLEF * DEFINITON_FACTOR; + m_leftMarginKeySig = DEFAULT_LEFT_MARGIN_KEYSIG * DEFINITON_FACTOR; + m_leftMarginMensur = DEFAULT_LEFT_MARGIN_MENSUR * DEFINITON_FACTOR; + m_leftMarginMeterSig = DEFAULT_LEFT_MARGIN_METERSIG * DEFINITON_FACTOR; + m_leftMarginMRest = DEFAULT_LEFT_MARGIN_MREST * DEFINITON_FACTOR; + m_leftMarginMRpt2 = DEFAULT_LEFT_MARGIN_MRPT2 * DEFINITON_FACTOR; + m_leftMarginMultiRest = DEFAULT_LEFT_MARGIN_MULTIREST * DEFINITON_FACTOR; + m_leftMarginMultiRpt = DEFAULT_LEFT_MARGIN_MULTIRPT * DEFINITON_FACTOR; + m_leftMarginNote = DEFAULT_LEFT_MARGIN_NOTE * DEFINITON_FACTOR; + m_leftMarginRest = DEFAULT_LEFT_MARGIN_REST * DEFINITON_FACTOR; + /** The default left margin */ + m_leftMarginDefault = DEFAULT_LEFT_MARGIN_DEFAULT * DEFINITON_FACTOR; + + /** The layout right margin by element */ + m_rightMarginBarline = DEFAULT_RIGHT_MARGIN_BARLINE * DEFINITON_FACTOR; + m_rightMarginBarlineAttr = DEFAULT_RIGHT_MARGIN_BARLINE_ATTR * DEFINITON_FACTOR; + m_rightMarginBeatRpt = DEFAULT_RIGHT_MARGIN_BEATRPT * DEFINITON_FACTOR; + m_rightMarginChord = DEFAULT_RIGHT_MARGIN_CHORD * DEFINITON_FACTOR; + m_rightMarginClef = DEFAULT_RIGHT_MARGIN_CLEF * DEFINITON_FACTOR; + m_rightMarginKeySig = DEFAULT_RIGHT_MARGIN_KEYSIG * DEFINITON_FACTOR; + m_rightMarginMensur = DEFAULT_RIGHT_MARGIN_MENSUR * DEFINITON_FACTOR; + m_rightMarginMeterSig = DEFAULT_RIGHT_MARGIN_METERSIG * DEFINITON_FACTOR; + m_rightMarginMRest = DEFAULT_RIGHT_MARGIN_MREST * DEFINITON_FACTOR; + m_rightMarginMRpt2 = DEFAULT_RIGHT_MARGIN_MRPT2 * DEFINITON_FACTOR; + m_rightMarginMultiRest = DEFAULT_RIGHT_MARGIN_MULTIREST * DEFINITON_FACTOR; + m_rightMarginMultiRpt = DEFAULT_RIGHT_MARGIN_MULTIRPT * DEFINITON_FACTOR; + m_rightMarginNote = DEFAULT_RIGHT_MARGIN_NOTE * DEFINITON_FACTOR; + m_rightMarginRest = DEFAULT_RIGHT_MARGIN_REST * DEFINITON_FACTOR; + /** The default right margin */ + m_rightMarginDefault = DEFAULT_RIGHT_MARGIN_DEFAULT * DEFINITON_FACTOR; } Style::~Style() diff --git a/src/svgdevicecontext.cpp b/src/svgdevicecontext.cpp index 082292ec008..743ecbc01ba 100644 --- a/src/svgdevicecontext.cpp +++ b/src/svgdevicecontext.cpp @@ -17,6 +17,7 @@ #include "doc.h" #include "glyph.h" +#include "layerelement.h" #include "view.h" #include "vrv.h" @@ -40,9 +41,6 @@ static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } SvgDeviceContext::SvgDeviceContext(int width, int height): DeviceContext() { - - m_correctMusicAscent = false; // do not correct the ascent in the music font - m_width = width; m_height = height; @@ -194,6 +192,7 @@ void SvgDeviceContext::EndGraphic(DocObject *object, View *view ) view->ToDeviceContextY( object->GetDrawingY() + object->m_selfBB_y2 ) - view->ToDeviceContextY( object->GetDrawingY() + object->m_selfBB_y1 )); } + EndGraphic( object, NULL ); SetPen( AxBLUE, 10, AxDOT_DASH ); @@ -205,6 +204,7 @@ void SvgDeviceContext::EndGraphic(DocObject *object, View *view ) view->ToDeviceContextX( object->GetDrawingX() + object->m_contentBB_x1 ), view->ToDeviceContextY( object->GetDrawingY() + object->m_contentBB_y2 ) - view->ToDeviceContextY( object->GetDrawingY() + object->m_contentBB_y1 )); + this->DrawRectangle( view->ToDeviceContextX( object->GetDrawingX() ), view->ToDeviceContextY( object->GetDrawingY() ), 5, 300); } EndGraphic( object, NULL ); @@ -457,6 +457,7 @@ void SvgDeviceContext::DrawRoundedRectangle(int x, int y, int width, int height, rectChild.append_attribute( "height" ) = height; rectChild.append_attribute( "rx" ) = radius; rectChild.append_attribute( "style") = StringFormat("stroke-width: %d;", m_penStack.top().GetWidth()).c_str(); + //rectChild.append_attribute( "fill-opacity" ) = "0.0"; // for empty rectangles with bounding boxes } void SvgDeviceContext::StartText(int x, int y, char alignement) diff --git a/src/syl.cpp b/src/syl.cpp index a9dc1123501..ee2d2739b42 100644 --- a/src/syl.cpp +++ b/src/syl.cpp @@ -28,6 +28,11 @@ Syl::Syl(): AttTypography(), AttSylLog() { + RegisterAttClass(ATT_TYPOGRAPHY); + RegisterAttClass(ATT_SYLLOG); + + RegisterInterface( TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface() ); + Reset(); } @@ -49,21 +54,21 @@ void Syl::Reset() // Functors methods //---------------------------------------------------------------------------- -int Syl::PrepareLyrics( ArrayPtrVoid params ) +int Syl::PrepareLyrics( ArrayPtrVoid *params ) { // param 0: the current Syl // param 1: the last Note // param 2: the last but one Note - Syl **currentSyl = static_cast(params[0]); - Note **lastNote = static_cast(params[1]); - Note **lastButOneNote = static_cast(params[2]); + Syl **currentSyl = static_cast((*params).at(0)); + Note **lastNote = static_cast((*params).at(1)); + Note **lastButOneNote = static_cast((*params).at(2)); - Verse *verse = dynamic_cast( this->GetFirstParent( &typeid(Verse), MAX_NOTE_DEPTH ) ); + Verse *verse = dynamic_cast( this->GetFirstParent( VERSE, MAX_NOTE_DEPTH ) ); if ( verse ) { m_drawingVerse = std::max(verse->GetN(), 1); } - this->SetStart( dynamic_cast( this->GetFirstParent( &typeid(Note), MAX_NOTE_DEPTH ) ) ); + this->SetStart( dynamic_cast( this->GetFirstParent( NOTE, MAX_NOTE_DEPTH ) ) ); // At this stage currentSyl is actually the previous one that is ending here if ((*currentSyl)) { @@ -93,16 +98,16 @@ int Syl::PrepareLyrics( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Syl::FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) +int Syl::FillStaffCurrentTimeSpanning( ArrayPtrVoid *params ) { // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::FillStaffCurrentTimeSpanning(params, this); + return TimeSpanningInterface::InterfaceFillStaffCurrentTimeSpanning(params, this); } -int Syl::ResetDarwing( ArrayPtrVoid params ) +int Syl::ResetDarwing( ArrayPtrVoid *params ) { // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::ResetDrawing(params, this); + return TimeSpanningInterface::InterfaceResetDrawing(params, this); }; } // namespace vrv diff --git a/src/system.cpp b/src/system.cpp index 7c4de215319..399b520405e 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -86,25 +86,6 @@ void System::ResetVerticalAlignment() m_drawingYRel = 0; m_drawingY = 0; } - -Measure *System::GetAtPos( int x ) -{ - Measure *measure = dynamic_cast( this->GetFirst( &typeid(Measure) ) ); - if ( !measure ) - return NULL; - - Measure *next = NULL; - while ( (next = dynamic_cast( this->GetNext() ) ) ) - { - if ( (int)measure->GetDrawingX() < x ) - { - return measure; - } - measure = next; - } - - return measure; -} int System::GetHeight() { @@ -125,11 +106,11 @@ void System::SetDrawingLabelsWidth( int width ) // System functor methods //---------------------------------------------------------------------------- -int System::AlignVertically( ArrayPtrVoid params ) +int System::AlignVertically( ArrayPtrVoid *params ) { // param 0: the systemAligner // param 1: the staffNb (unused) - SystemAligner **systemAligner = static_cast(params[0]); + SystemAligner **systemAligner = static_cast((*params).at(0)); // we need to call it because we are overriding Object::AlignVertically this->ResetVerticalAlignment(); @@ -143,14 +124,14 @@ int System::AlignVertically( ArrayPtrVoid params ) } -int System::SetAligmentYPos( ArrayPtrVoid params ) +int System::SetAligmentYPos( ArrayPtrVoid *params ) { // param 0: the previous staff height // param 1: the staff margin (unused) // param 2: the staff interline sizes (int[2]) (unused) // param 2: the functor to be redirected to SystemAligner - int *previousStaffHeight = static_cast(params[0]); - Functor *setAligmnentPosY = static_cast(params[3]); + int *previousStaffHeight = static_cast((*params).at(0)); + Functor *setAligmnentPosY = static_cast((*params).at(3)); (*previousStaffHeight) = 0; @@ -160,12 +141,12 @@ int System::SetAligmentYPos( ArrayPtrVoid params ) } -int System::IntegrateBoundingBoxYShift( ArrayPtrVoid params ) +int System::IntegrateBoundingBoxYShift( ArrayPtrVoid *params ) { // param 0: the cumulated shift // param 1: the functor to be redirected to SystemAligner - int *shift = static_cast(params[0]); - Functor *integrateBoundingBoxYShift = static_cast(params[1]); + int *shift = static_cast((*params).at(0)); + Functor *integrateBoundingBoxYShift = static_cast((*params).at(1)); (*shift) = 0; m_systemAligner.Process( integrateBoundingBoxYShift, params); @@ -173,10 +154,10 @@ int System::IntegrateBoundingBoxYShift( ArrayPtrVoid params ) return FUNCTOR_SIBLINGS; } -int System::AlignMeasures( ArrayPtrVoid params ) +int System::AlignMeasures( ArrayPtrVoid *params ) { // param 0: the cumulated shift - int *shift = static_cast(params[0]); + int *shift = static_cast((*params).at(0)); m_drawingXRel = this->m_systemLeftMar + this->GetDrawingLabelsWidth(); (*shift) = 0; @@ -184,22 +165,22 @@ int System::AlignMeasures( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int System::AlignMeasuresEnd( ArrayPtrVoid params ) +int System::AlignMeasuresEnd( ArrayPtrVoid *params ) { // param 0: the cumulated shift - int *shift = static_cast(params[0]); + int *shift = static_cast((*params).at(0)); m_drawingTotalWidth = (*shift) + this->GetDrawingLabelsWidth(); return FUNCTOR_CONTINUE; } -int System::AlignSystems( ArrayPtrVoid params ) +int System::AlignSystems( ArrayPtrVoid *params ) { // param 0: the cumulated shift // param 1: the system margin - int *shift = static_cast(params[0]); - int *systemMargin = static_cast(params[1]); + int *shift = static_cast((*params).at(0)); + int *systemMargin = static_cast((*params).at(1)); this->m_drawingYRel = (*shift); @@ -211,24 +192,26 @@ int System::AlignSystems( ArrayPtrVoid params ) } -int System::JustifyX( ArrayPtrVoid params ) +int System::JustifyX( ArrayPtrVoid *params ) { // param 0: the justification ratio // param 1: the justification ratio for the measure (depends on the margin) (unused) // param 2: the non justifiable margin (unused) // param 3: the system full width (without system margins) // param 4: the functor to be redirected to the MeasureAligner - double *ratio = static_cast(params[0]); - int *systemFullWidth = static_cast(params[3]); + double *ratio = static_cast((*params).at(0)); + int *systemFullWidth = static_cast((*params).at(3)); assert( m_parent ); assert( m_parent->m_parent ); (*ratio) = (double)((*systemFullWidth) - this->GetDrawingLabelsWidth() - this->m_systemLeftMar - this->m_systemRightMar) / ((double)m_drawingTotalWidth - this->GetDrawingLabelsWidth()); + //LogDebug("System::JustifyX: *ratio=%lf", (*ratio)); + if ((*ratio) < 0.8 ) { // Arbitrary value for avoiding over-compressed justification - LogWarning("Justification stop because of a ratio smaller the 0.8"); + LogWarning("Justification stop because of a ratio smaller than 0.8"); //return FUNCTOR_SIBLINGS; } @@ -243,10 +226,10 @@ int System::JustifyX( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int System::SetBoundingBoxYShiftEnd( ArrayPtrVoid params ) +int System::SetBoundingBoxYShiftEnd( ArrayPtrVoid *params ) { // param 0: the height of the previous staff - int *system_height = static_cast(params[1]); + int *system_height = static_cast((*params).at(1)); m_systemAligner.GetBottomAlignment()->SetYShift( (*system_height) ); @@ -254,18 +237,18 @@ int System::SetBoundingBoxYShiftEnd( ArrayPtrVoid params ) } -int System::CastOffPages( ArrayPtrVoid params ) +int System::CastOffPages( ArrayPtrVoid *params ) { // param 0: a pointer to the page we are taking the content from // param 1: a pointer the document we are adding pages to // param 2: a pointer to the current page // param 3: the cummulated shift (m_drawingYRel of the first system of the current page) // param 4: the page height - Page *contentPage = static_cast(params[0]); - Doc *doc = static_cast(params[1]); - Page **currentPage = static_cast(params[2]); - int *shift = static_cast(params[3]); - int *pageHeight = static_cast(params[4]); + Page *contentPage = static_cast((*params).at(0)); + Doc *doc = static_cast((*params).at(1)); + Page **currentPage = static_cast((*params).at(2)); + int *shift = static_cast((*params).at(3)); + int *pageHeight = static_cast((*params).at(4)); if ( ( (*currentPage)->GetChildCount() > 0 ) && ( this->m_drawingYRel - this->GetHeight() - (*shift) < 0 )) { //(*pageHeight) ) ) { (*currentPage) = new Page(); @@ -283,10 +266,10 @@ int System::CastOffPages( ArrayPtrVoid params ) return FUNCTOR_SIBLINGS; } -int System::UnCastOff( ArrayPtrVoid params ) +int System::UnCastOff( ArrayPtrVoid *params ) { // param 0: a pointer to the system we are adding system to - System *currentSystem = static_cast(params[0]); + System *currentSystem = static_cast((*params).at(0)); // Just move all the content of the system to the continous one (parameter) // Use the MoveChildren method that move the and relinquishes them @@ -297,7 +280,7 @@ int System::UnCastOff( ArrayPtrVoid params ) return FUNCTOR_SIBLINGS; } -int System::SetDrawingXY( ArrayPtrVoid params ) +int System::SetDrawingXY( ArrayPtrVoid *params ) { // param 0: a pointer doc // param 1: a pointer to the current system @@ -306,9 +289,9 @@ int System::SetDrawingXY( ArrayPtrVoid params ) // param 4: a pointer to the current layer // param 5: a pointer to the view (unused) // param 6: a bool indicating if we are processing layer elements or not - Doc *doc = static_cast(params[0]); - System **currentSystem = static_cast(params[1]); - bool *processLayerElements = static_cast(params[6]); + Doc *doc = static_cast((*params).at(0)); + System **currentSystem = static_cast((*params).at(1)); + bool *processLayerElements = static_cast((*params).at(6)); (*currentSystem) = this; diff --git a/src/measureelement.cpp b/src/textdirective.cpp similarity index 65% rename from src/measureelement.cpp rename to src/textdirective.cpp index ff5aff03687..66509c23137 100644 --- a/src/measureelement.cpp +++ b/src/textdirective.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: measureelement.cpp +// Name: textdirective.cpp // Author: Laurent Pugin // Created: 2015 // Copyright (c) Authors and others. All rights reserved. ///////////////////////////////////////////////////////////////////////////// -#include "measureelement.h" +#include "textdirective.h" //---------------------------------------------------------------------------- @@ -14,33 +14,31 @@ //---------------------------------------------------------------------------- -namespace vrv { +#include "floatingelement.h" +namespace vrv { //---------------------------------------------------------------------------- -// MeasureElement +// Tempo //---------------------------------------------------------------------------- -MeasureElement::MeasureElement(): - DocObject("me") +Tempo::Tempo(): + FloatingElement("tempo-"), TextDirInterface() { + RegisterInterface( TextDirInterface::GetAttClasses(), TextDirInterface::IsInterface() ); + Reset(); } -MeasureElement::MeasureElement(std::string classid): - DocObject(classid) -{ - Reset(); -} -MeasureElement::~MeasureElement() +Tempo::~Tempo() { - -} +} -void MeasureElement::Reset() +void Tempo::Reset() { - DocObject::Reset(); + FloatingElement::Reset(); + TextDirInterface::Reset(); } } // namespace vrv diff --git a/src/textdirinterface.cpp b/src/textdirinterface.cpp new file mode 100644 index 00000000000..8f1c4fa024c --- /dev/null +++ b/src/textdirinterface.cpp @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: textdirinterface.cpp +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "textdirinterface.h" + +//---------------------------------------------------------------------------- + +#include + +//---------------------------------------------------------------------------- + + +namespace vrv { + +//---------------------------------------------------------------------------- +// TextDirInterface +//---------------------------------------------------------------------------- + +TextDirInterface::TextDirInterface(): Interface(), + AttCommon(), + AttPlacement(), + AttStaffident() +{ + RegisterInterfaceAttClass(ATT_COMMON); + RegisterInterfaceAttClass(ATT_PLACEMENT); + RegisterInterfaceAttClass(ATT_STAFFIDENT); + Reset(); +} + + +TextDirInterface::~TextDirInterface() +{ +} + +void TextDirInterface::Reset() +{ + ResetCommon(); + ResetPlacement(); + ResetStaffident(); +} + +} // namespace vrv diff --git a/src/tie.cpp b/src/tie.cpp index 6c3b3114dc6..3bdc1ae6f0f 100644 --- a/src/tie.cpp +++ b/src/tie.cpp @@ -21,8 +21,13 @@ namespace vrv { //---------------------------------------------------------------------------- Tie::Tie(): - MeasureElement("tie-"), TimeSpanningInterface() + FloatingElement("tie-"), TimeSpanningInterface(), + AttCurvature() { + RegisterAttClass(ATT_CURVATURE); + + RegisterInterface( TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface() ); + Reset(); } @@ -33,31 +38,9 @@ Tie::~Tie() void Tie::Reset() { - MeasureElement::Reset(); + FloatingElement::Reset(); TimeSpanningInterface::Reset(); + ResetCurvature(); } -//---------------------------------------------------------------------------- -// Tie functor methods -//---------------------------------------------------------------------------- - -int Tie::PrepareTimeSpanning( ArrayPtrVoid params ) -{ - // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::PrepareTimeSpanning(params, this); -} - - -int Tie::FillStaffCurrentTimeSpanning( ArrayPtrVoid params ) -{ - // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::FillStaffCurrentTimeSpanning(params, this); -} - -int Tie::ResetDarwing( ArrayPtrVoid params ) -{ - // Pass it to the pseudo functor of the interface - return TimeSpanningInterface::ResetDrawing(params, this); -}; - } // namespace vrv \ No newline at end of file diff --git a/src/timeinterface.cpp b/src/timeinterface.cpp index ed7384eb812..750dd86a091 100644 --- a/src/timeinterface.cpp +++ b/src/timeinterface.cpp @@ -25,12 +25,16 @@ namespace vrv { // TimeSpanningInterface //---------------------------------------------------------------------------- -TimeSpanningInterface::TimeSpanningInterface(): +TimeSpanningInterface::TimeSpanningInterface(): Interface(), AttStartendid(), AttStartid(), AttTimestampMusical(), AttTimestamp2Musical() { + RegisterInterfaceAttClass(ATT_STARTENDID); + RegisterInterfaceAttClass(ATT_STARTID); + RegisterInterfaceAttClass(ATT_TIMESTAMPMUSICAL); + RegisterInterfaceAttClass(ATT_TIMESTAMP2MUSICAL); Reset(); } @@ -95,12 +99,16 @@ std::string TimeSpanningInterface::ExtractUuidFragment(std::string refUuid) return refUuid; } -int TimeSpanningInterface::PrepareTimeSpanning( ArrayPtrVoid params, DocObject *object ) +//---------------------------------------------------------------------------- +// Interface pseudo functor (redirected) +//---------------------------------------------------------------------------- + +int TimeSpanningInterface::InterfacePrepareTimeSpanning( ArrayPtrVoid *params, DocObject *object ) { // param 0: std::vector* that holds the current elements to match // param 1: bool* fillList for indicating whether the elements have to be stack or not - std::vector *elements = static_cast*>(params[0]); - bool *fillList = static_cast(params[1]); + std::vector *elements = static_cast*>((*params).at(0)); + bool *fillList = static_cast((*params).at(1)); if ((*fillList)==false) { return FUNCTOR_CONTINUE; @@ -112,13 +120,13 @@ int TimeSpanningInterface::PrepareTimeSpanning( ArrayPtrVoid params, DocObject * return FUNCTOR_CONTINUE; } -int TimeSpanningInterface::FillStaffCurrentTimeSpanning( ArrayPtrVoid params, DocObject *object ) +int TimeSpanningInterface::InterfaceFillStaffCurrentTimeSpanning( ArrayPtrVoid *params, DocObject *object ) { // param 0: std::vector* of the current running TimeSpanningInterface elements - std::vector *elements = static_cast*>(params[0]); + std::vector *elements = static_cast*>((*params).at(0)); if (this->HasStartAndEnd()) { - if ( GetStart()->GetFirstParent( &typeid(Staff) ) != GetEnd()->GetFirstParent( &typeid(Staff) ) ) { + if ( GetStart()->GetFirstParent( STAFF ) != GetEnd()->GetFirstParent( STAFF ) ) { // We have a running syl started in a previous measure elements->push_back(object); } @@ -126,7 +134,7 @@ int TimeSpanningInterface::FillStaffCurrentTimeSpanning( ArrayPtrVoid params, Do return FUNCTOR_CONTINUE; } -int TimeSpanningInterface::ResetDrawing( ArrayPtrVoid params, DocObject *object ) +int TimeSpanningInterface::InterfaceResetDrawing( ArrayPtrVoid *params, DocObject *object ) { m_start = NULL; m_end = NULL; diff --git a/src/toolkit.cpp b/src/toolkit.cpp index edfcff37c09..1933d539c1d 100644 --- a/src/toolkit.cpp +++ b/src/toolkit.cpp @@ -53,6 +53,7 @@ Toolkit::Toolkit( bool initFont ) m_adjustPageHeight = false; m_noJustification = false; m_showBoundingBoxes = false; + m_scoreBasedMei = false; m_cString = NULL; @@ -68,6 +69,12 @@ Toolkit::~Toolkit() free( m_cString ); } } + +bool Toolkit::SetResourcePath( const std::string &path ) +{ + Resources::SetPath( path ); + return Resources::InitFonts(); +}; bool Toolkit::SetBorder( int border ) { @@ -317,6 +324,7 @@ std::string Toolkit::GetMEI( int pageNo, bool scoreBased ) bool Toolkit::SaveFile( const std::string &filename ) { MeiOutput meioutput( &m_doc, filename.c_str()); + meioutput.SetScoreBasedMEI( m_scoreBasedMei ); if (!meioutput.ExportFile()) { LogError( "Unknown error" ); return false; @@ -563,12 +571,13 @@ int Toolkit::GetPageCount() { return m_doc.GetPageCount(); } -int Toolkit::GetPageWithElement( const std::string &xmlId ) { +int Toolkit::GetPageWithElement( const std::string &xmlId ) +{ Object *element = m_doc.FindChildByUuid(xmlId); if (!element) { return 0; } - Page *page = dynamic_cast( element->GetFirstParent( &typeid(Page) ) ); + Page *page = dynamic_cast( element->GetFirstParent( PAGE ) ); if (!page) { return 0; } @@ -605,9 +614,10 @@ bool Toolkit::Drag( std::string elementId, int x, int y ) { if ( !m_doc.GetDrawingPage() ) return false; Object *element = m_doc.GetDrawingPage()->FindChildByUuid(elementId); - if ( dynamic_cast(element) ) { + if ( element->Is() == NOTE ) { Note *note = dynamic_cast(element); - Layer *layer = dynamic_cast(note->GetFirstParent(&typeid(Layer))); + assert( note ); + Layer *layer = dynamic_cast( note->GetFirstParent( LAYER ) ); if ( !layer ) return false; int oct; data_PITCHNAME pname = (data_PITCHNAME)m_view.CalculatePitchCode( layer, m_view.ToLogicalY(y), note->GetDrawingX(), &oct ); @@ -639,13 +649,13 @@ bool Toolkit::Insert( std::string elementType, std::string startid, std::string return false; } - Measure *measure = dynamic_cast(start->GetFirstParent(&typeid(Measure))); + Measure *measure = dynamic_cast(start->GetFirstParent( MEASURE ) ); assert( measure ); if (elementType == "slur" ) { Slur *slur = new Slur(); slur->SetStartid( startid ); slur->SetEndid( endid ); - measure->AddMeasureElement(slur); + measure->AddFloatingElement(slur); m_doc.PrepareDrawing(); return true; } diff --git a/src/trem.cpp b/src/trem.cpp new file mode 100644 index 00000000000..4f57dad4237 --- /dev/null +++ b/src/trem.cpp @@ -0,0 +1,13 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: trem.cpp +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "trem.h" + +namespace vrv { + +} // namespace vrv diff --git a/src/tuplet.cpp b/src/tuplet.cpp index 212353308eb..f3bf351c9a4 100644 --- a/src/tuplet.cpp +++ b/src/tuplet.cpp @@ -15,8 +15,14 @@ namespace vrv { //---------------------------------------------------------------------------- Tuplet::Tuplet(): - LayerElement("tuplet-"), ObjectListInterface() + LayerElement("tuplet-"), ObjectListInterface(), + AttDurationRatio(), + AttNumberplacement(), + AttTupletVis() { + RegisterAttClass(ATT_DURATIONRATIO); + RegisterAttClass(ATT_NUMBERPLACEMENT); + RegisterAttClass(ATT_TUPLETVIS); Reset(); } @@ -28,11 +34,14 @@ Tuplet::~Tuplet() void Tuplet::Reset() { LayerElement::Reset(); + ResetDurationRatio(); + ResetNumberplacement(); + ResetTupletVis(); } void Tuplet::AddLayerElement(LayerElement *element) { - //if (!element->HasDurationInterface()) { + //if (!element->HasInterface(INTERFACE_DURATION)()) { // return; //} @@ -48,8 +57,7 @@ void Tuplet::FilterList( ListOfObjects *childList ) ListOfObjects::iterator iter = childList->begin(); while ( iter != childList->end()) { - LayerElement *currentElement = dynamic_cast(*iter); - if ( currentElement && !currentElement->HasDurationInterface() ) + if ( !(*iter)->IsLayerElement() || !(*iter)->HasInterface(INTERFACE_DURATION) ) { iter = childList->erase( iter ); } else { diff --git a/src/verse.cpp b/src/verse.cpp index 3dd9bb74603..b56599ab15f 100644 --- a/src/verse.cpp +++ b/src/verse.cpp @@ -30,6 +30,7 @@ Verse::Verse(): LayerElement("verse-"), AttCommon() { + RegisterAttClass(ATT_COMMON); Reset(); } @@ -55,12 +56,12 @@ void Verse::AddLayerElement(vrv::LayerElement *element) // Verse functor methods //---------------------------------------------------------------------------- -int Verse::AlignVertically( ArrayPtrVoid params ) +int Verse::AlignVertically( ArrayPtrVoid *params ) { // param 0: the systemAligner // param 1: the staffNb - SystemAligner **systemAligner = static_cast(params[0]); - int *staffNb = static_cast(params[1]); + SystemAligner **systemAligner = static_cast((*params).at(0)); + int *staffNb = static_cast((*params).at(1)); // we need to call it because we are overriding Object::AlignVertically this->ResetVerticalAlignment(); @@ -76,16 +77,16 @@ int Verse::AlignVertically( ArrayPtrVoid params ) return FUNCTOR_CONTINUE; } -int Verse::PrepareProcessingLists( ArrayPtrVoid params ) +int Verse::PrepareProcessingLists( ArrayPtrVoid *params ) { // param 0: the IntTree* for staff/layer/verse // param 1: the IntTree* for staff/layer (unused) - IntTree *tree = static_cast(params[0]); + IntTree *tree = static_cast((*params).at(0)); // Alternate solution with StaffN_LayerN_VerseN_t - //StaffN_LayerN_VerseN_t *tree = static_cast(params[0]); + //StaffN_LayerN_VerseN_t *tree = static_cast((*params).at(0)); - Staff *staff = dynamic_cast( this->GetFirstParent( &typeid( Staff ) ) ); - Layer *layer = dynamic_cast( this->GetFirstParent( &typeid( Layer ) ) ); + Staff *staff = dynamic_cast( this->GetFirstParent( STAFF ) ); + Layer *layer = dynamic_cast( this->GetFirstParent( LAYER ) ); assert( staff && layer ); tree->child[ staff->GetN() ].child[ layer->GetN() ].child[ this->GetN() ]; diff --git a/src/view.cpp b/src/view.cpp index ff4944a2f5b..576c5951ea1 100644 --- a/src/view.cpp +++ b/src/view.cpp @@ -11,6 +11,7 @@ //---------------------------------------------------------------------------- #include +#include #include //---------------------------------------------------------------------------- @@ -19,6 +20,8 @@ #include "page.h" namespace vrv { + +int View::s_deCasteljau[4][4]; //---------------------------------------------------------------------------- // View @@ -64,7 +67,6 @@ void View::SetDoc( Doc *doc ) void View::SetPage( int pageIdx, bool doLayout ) { - assert( m_doc ); // Page cannot be NULL assert( m_doc->HasPage( pageIdx ) ); @@ -172,5 +174,41 @@ std::wstring View::IntToSmuflFigures(unsigned short number, int offset) return str; } - +Point View::CalcPositionAfterRotation( Point point , float rot_alpha, Point center) +{ + float s = sin(rot_alpha); + float c = cos(rot_alpha); + + // translate point back to origin: + point.x -= center.x; + point.y -= center.y; + + // rotate point + float xnew = point.x * c - point.y * s; + float ynew = point.x * s + point.y * c; + + // translate point back: + point.x = xnew + center.x; + point.y = ynew + center.y; + return point; +} + +int View::CalcBezierAtPosition(Point bezier[], int x) +{ + int i, j; + double t = 0.0; + // avoid division by 0 + if (bezier[3].x != bezier[0].x) t = (double)(x - bezier[0].x) / (double)(bezier[3].x - bezier[0].x) ; + t = std::min(1.0, std::max(0.0, t)); + int n = 4; + + for(i = 0; i < n; i++) View::s_deCasteljau[0][i] = bezier[i].y; + for(j = 1; j < n; j++) { + for(int i = 0; i < 4 - j; i++) { + View::s_deCasteljau[j][i] = View::s_deCasteljau[j-1][i] * (1-t) + View::s_deCasteljau[j-1][i+1] * t; + } + } + return View::s_deCasteljau[n-1][0]; +} + } // namespace vrv diff --git a/src/view_beam.cpp b/src/view_beam.cpp index b88373ff85b..9c7e871fc4c 100644 --- a/src/view_beam.cpp +++ b/src/view_beam.cpp @@ -23,6 +23,7 @@ #include "layer.h" #include "layerelement.h" #include "note.h" +#include "smufl.h" #include "staff.h" #include "style.h" #include "vrv.h" @@ -31,10 +32,13 @@ namespace vrv { void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" + assert( dc ); + assert( layer ); + assert( staff ); + assert( measure ); Beam *beam = dynamic_cast(element); + assert( beam ); LayerElement *current; @@ -88,7 +92,7 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta lastDur = elementCount = 0; high = avgY = verticalBoost = 0.0; - verticalCenter = staff->GetDrawingY() - (m_doc->m_drawingDoubleUnit[staff->staffSize] * 2); //center point of the staff + verticalCenter = staff->GetDrawingY() - (m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 2); //center point of the staff yExtreme = verticalCenter; //value of farthest y point on the staff from verticalCenter minus verticalCenter; used if beamHasChord = ON ListOfObjects* beamChildren = beam->GetList(beam); @@ -108,8 +112,10 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta lastDur = dynamic_cast(current)->GetActualDur(); // x-offset values for stem bases, dx[y] where y = element->m_cueSize - dx[0] = m_doc->m_drawingNoteRadius[staff->staffSize][0] - (m_doc->m_style->m_stemWidth)/2; - dx[1] = m_doc->m_drawingNoteRadius[staff->staffSize][1] - (m_doc->m_style->m_stemWidth)/2; + dx[0] = m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staff->m_drawingStaffSize, false) / 2 - + (m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize))/2; + dx[1] = m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staff->m_drawingStaffSize, true) / 2 - + (m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize))/2; /******************************************************************/ // Populate BeamElementCoord for each element in the beam @@ -122,32 +128,32 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta do { // Beam list should contain only DurationInterface objects assert( dynamic_cast(current) ); - currentDur = dynamic_cast(current)->GetActualDur(); - if ( current->IsChord() ) { + if (current->Is() == CHORD) { beamHasChord = true; } // Can it happen? With rests? if (currentDur > DUR_4) { - (*beamElementCoords)[elementCount]->m_element = current; - current->m_beamElementCoord = (*beamElementCoords)[elementCount]; - (*beamElementCoords)[elementCount]->m_x = current->GetDrawingX(); - (*beamElementCoords)[elementCount]->m_dur = currentDur; + (*beamElementCoords).at(elementCount)->m_element = current; + current->m_beamElementCoord = (*beamElementCoords).at(elementCount); + (*beamElementCoords).at(elementCount)->m_x = current->GetDrawingX(); + (*beamElementCoords).at(elementCount)->m_dur = currentDur; // Look at beam breaks - (*beamElementCoords)[elementCount]->m_breaksec = 0; + (*beamElementCoords).at(elementCount)->m_breaksec = 0; AttBeamsecondary *beamsecondary = dynamic_cast(current); if ( elementCount && beamsecondary && beamsecondary->HasBreaksec()) { if (!changingDur) changingDur = ON; - (*beamElementCoords)[elementCount]->m_breaksec = beamsecondary->GetBreaksec(); + (*beamElementCoords).at(elementCount)->m_breaksec = beamsecondary->GetBreaksec(); } // Skip rests - if (current->IsNote() || current->IsChord()) { + if ( (current->Is() == NOTE) || (current->Is() == CHORD) ) { // look at the stemDir to see if we have multiple stem Dir if (!hasMultipleStemDir) { + assert( dynamic_cast(current) ); currentStemDir = dynamic_cast(current)->GetStemDir(); if (currentStemDir != STEMDIRECTION_NONE) { if ((stemDir != STEMDIRECTION_NONE) && (stemDir != currentStemDir)) { @@ -193,29 +199,32 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta // elementCount holds the last one for (i = 0; i < elementCount; i++) { - if (dynamic_cast((*beamElementCoords)[i]->m_element)) { - dynamic_cast((*beamElementCoords)[i]->m_element)->GetYExtremes(&yMax, &yMin); - (*beamElementCoords)[i]->m_yTop = yMax; - (*beamElementCoords)[i]->m_yBottom = yMin; + + if ((*beamElementCoords).at(i)->m_element->Is() == CHORD) { + Chord *chord = dynamic_cast((*beamElementCoords).at(i)->m_element); + assert( chord ); + chord->GetYExtremes(&yMax, &yMin); + (*beamElementCoords).at(i)->m_yTop = yMax; + (*beamElementCoords).at(i)->m_yBottom = yMin; - avgY += (*beamElementCoords)[i]->m_y + ((yMax - yMin) / 2); + avgY += (*beamElementCoords).at(i)->m_y + ((yMax - yMin) / 2); // highest and lowest value; high= std::max(yMax, high); low = std::min(yMin, low); } else { - (*beamElementCoords)[i]->m_y = (*beamElementCoords)[i]->m_element->GetDrawingY(); + (*beamElementCoords).at(i)->m_y = (*beamElementCoords).at(i)->m_element->GetDrawingY(); // highest and lowest value; - high= std::max((*beamElementCoords)[i]->m_y, high); - low = std::min((*beamElementCoords)[i]->m_y, low); + high= std::max((*beamElementCoords).at(i)->m_y, high); + low = std::min((*beamElementCoords).at(i)->m_y, low); - curY = (*beamElementCoords)[i]->m_element->GetDrawingY(); - (*beamElementCoords)[i]->m_y = curY; - (*beamElementCoords)[i]->m_yTop = curY; - (*beamElementCoords)[i]->m_yBottom = curY; - avgY += (*beamElementCoords)[i]->m_y; + curY = (*beamElementCoords).at(i)->m_element->GetDrawingY(); + (*beamElementCoords).at(i)->m_y = curY; + (*beamElementCoords).at(i)->m_yTop = curY; + (*beamElementCoords).at(i)->m_yBottom = curY; + avgY += (*beamElementCoords).at(i)->m_y; } } @@ -226,7 +235,7 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta avgY /= elementCount; // If we have one stem direction in the beam, then don't look at the layer - if (stemDir != STEMDIRECTION_NONE) stemDir = layer->GetDrawingStemDir(); // force layer direction if it exists + if (stemDir == STEMDIRECTION_NONE) stemDir = layer->GetDrawingStemDir(); // force layer direction if it exists // Automatic stem direction if nothing in the notes or in the layer if (stemDir == STEMDIRECTION_NONE) { @@ -238,24 +247,18 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta if (stemDir == STEMDIRECTION_up) { //set stem direction for all the notes for (i = 0; i < elementCount; i++) { - (*beamElementCoords)[i]->m_y = (*beamElementCoords)[i]->m_yTop; + (*beamElementCoords).at(i)->m_y = (*beamElementCoords).at(i)->m_yTop; } } else { for (i = 0; i < elementCount; i++) { - (*beamElementCoords)[i]->m_y = (*beamElementCoords)[i]->m_yBottom; + (*beamElementCoords).at(i)->m_y = (*beamElementCoords).at(i)->m_yBottom; } } // We look only at the last note for checking if cuesized. Somehow arbitrarily - if ((*beamElementCoords)[last]->m_element->m_cueSize == false) { - beamWidthBlack = m_doc->m_drawingBeamWidth[staff->staffSize]; - beamWidthWhite = m_doc->m_drawingBeamWhiteWidth[staff->staffSize]; - } - else { - beamWidthBlack = std::max(2, (m_doc->m_drawingBeamWidth[staff->staffSize] * m_doc->m_style->m_graceNum / m_doc->m_style->m_graceDen)); - beamWidthWhite = std::max(2, (m_doc->m_drawingBeamWhiteWidth[staff->staffSize] * m_doc->m_style->m_graceNum / m_doc->m_style->m_graceDen)); - } + beamWidthBlack = m_doc->GetDrawingBeamWidth(staff->m_drawingStaffSize, (*beamElementCoords).at(last)->m_element->IsCueSize()); + beamWidthWhite = m_doc->GetDrawingBeamWhiteWidth(staff->m_drawingStaffSize, (*beamElementCoords).at(last)->m_element->IsCueSize()); beamWidth = beamWidthBlack + beamWidthWhite; @@ -266,13 +269,13 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta verticalShift = ((shortestDur-DUR_8)*(beamWidth)); //if the beam has smaller-size notes - if ((*beamElementCoords)[last]->m_element->m_cueSize) { - verticalShift += m_doc->m_drawingUnit[staff->staffSize]*5; + if ((*beamElementCoords).at(last)->m_element->IsCueSize()) { + verticalShift += m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*5; } else { verticalShift += (shortestDur > DUR_8) ? - m_doc->m_drawingDoubleUnit[staff->staffSize] * verticalShiftFactor : - m_doc->m_drawingDoubleUnit[staff->staffSize] * (verticalShiftFactor + 0.5); + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * verticalShiftFactor : + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * (verticalShiftFactor + 0.5); } // swap x position and verticalShift direction with stem down @@ -285,21 +288,21 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta for (i=0; im_element->IsNote() ) { - ((Note*)(*beamElementCoords)[i]->m_element)->m_drawingStemDir = stemDir; + if ( (*beamElementCoords).at(i)->m_element->Is() == NOTE ) { + ((Note*)(*beamElementCoords).at(i)->m_element)->SetDrawingStemDir( stemDir ); } - else if ( (*beamElementCoords)[i]->m_element->IsChord() ) { - ((Chord*)(*beamElementCoords)[i]->m_element)->SetDrawingStemDir(stemDir); + else if ( (*beamElementCoords).at(i)->m_element->Is() == CHORD ) { + ((Chord*)(*beamElementCoords).at(i)->m_element)->SetDrawingStemDir(stemDir); } - (*beamElementCoords)[i]->m_yBeam = (*beamElementCoords)[i]->m_y + verticalShift; - (*beamElementCoords)[i]->m_x += dx[(*beamElementCoords)[i]->m_element->m_cueSize]; + (*beamElementCoords).at(i)->m_yBeam = (*beamElementCoords).at(i)->m_y + verticalShift; + (*beamElementCoords).at(i)->m_x += dx[(*beamElementCoords).at(i)->m_element->IsCueSize()]; - s_y += (*beamElementCoords)[i]->m_yBeam; - s_y2 += (*beamElementCoords)[i]->m_yBeam * (*beamElementCoords)[i]->m_yBeam; - s_x += (*beamElementCoords)[i]->m_x; - s_x2 += (*beamElementCoords)[i]->m_x * (*beamElementCoords)[i]->m_x; - s_xy += (*beamElementCoords)[i]->m_x * (*beamElementCoords)[i]->m_yBeam; + s_y += (*beamElementCoords).at(i)->m_yBeam; + s_y2 += (*beamElementCoords).at(i)->m_yBeam * (*beamElementCoords).at(i)->m_yBeam; + s_x += (*beamElementCoords).at(i)->m_x; + s_x2 += (*beamElementCoords).at(i)->m_x * (*beamElementCoords).at(i)->m_x; + s_xy += (*beamElementCoords).at(i)->m_x * (*beamElementCoords).at(i)->m_yBeam; } y1 = elementCount * s_xy - s_x * s_y; @@ -319,22 +322,20 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta /* pente correcte: entre 0 et env 0.4 (0.2 a 0.4) */ startingY = (s_y - beamSlope * s_x) / elementCount; - + /******************************************************************/ // Start the Beam graphic and draw the children dc->StartGraphic( element, "", element->GetUuid() ); - - DrawLayerChildren(dc, beam, layer, staff, measure); /******************************************************************/ - // Calculate the stem lengths and draw them + // Calculate the stem lengths double oldYPos; //holds y position before calculation to determine if beam needs extra height double expectedY; for ( i=0; im_yBeam; - expectedY = startingY + verticalBoost + beamSlope * (*beamElementCoords)[i]->m_x; + oldYPos = (*beamElementCoords).at(i)->m_yBeam; + expectedY = startingY + verticalBoost + beamSlope * (*beamElementCoords).at(i)->m_x; //if the stem is not long enough, add extra stem length needed to all members of the beam if ((stemDir == STEMDIRECTION_up && (oldYPos > expectedY)) || (stemDir == STEMDIRECTION_down && (oldYPos < expectedY))) { @@ -344,33 +345,57 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta for (i=0; im_yBeam = startingY + verticalBoost + beamSlope * (*beamElementCoords)[i]->m_x; + (*beamElementCoords).at(i)->m_yBeam = startingY + verticalBoost + beamSlope * (*beamElementCoords).at(i)->m_x; } for (i=0; im_yBeam - m_doc->m_style->m_stemWidth; - fy2 = (*beamElementCoords)[i]->m_yBottom + m_doc->m_drawingUnit[staff->staffSize]/4; + fy1 = (*beamElementCoords).at(i)->m_yBeam - m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize); + fy2 = (*beamElementCoords).at(i)->m_yBottom + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)/4; } else { - fy1 = (*beamElementCoords)[i]->m_yBeam + m_doc->m_style->m_stemWidth; - fy2 = (*beamElementCoords)[i]->m_yTop - m_doc->m_drawingUnit[staff->staffSize]/4; + fy1 = (*beamElementCoords).at(i)->m_yBeam + m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize); + fy2 = (*beamElementCoords).at(i)->m_yTop - m_doc->GetDrawingUnit(staff->m_drawingStaffSize)/4; } - LayerElement *el = (*beamElementCoords)[i]->m_element; - el->m_drawingStemStart.x = el->m_drawingStemEnd.x = (*beamElementCoords)[i]->m_x; + // All notes and chords, including notes within chords, get their stem value stored + LayerElement *el = (*beamElementCoords).at(i)->m_element; + el->m_drawingStemStart.x = el->m_drawingStemEnd.x = (*beamElementCoords).at(i)->m_x; el->m_drawingStemStart.y = fy2; el->m_drawingStemEnd.y = fy1; el->m_drawingStemDir = stemDir; - if((el->IsNote() && ! dynamic_cast(el)->IsChordTone()) || el->IsChord()){ - DrawVerticalLine (dc,fy2, fy1, (*beamElementCoords)[i]->m_x, m_doc->m_style->m_stemWidth); + if ( (*beamElementCoords).at(i)->m_element->Is() == CHORD ) { + Chord *chord = (Chord*)(*beamElementCoords).at(i)->m_element; + for (ListOfObjects::iterator it = chord->GetList(chord)->begin(); it != chord->GetList(chord)->end(); it++) + { + Note *note = dynamic_cast(*it); + assert(note); + note->m_drawingStemStart.x = el->m_drawingStemEnd.x = (*beamElementCoords).at(i)->m_x; + note->m_drawingStemStart.y = fy2; + note->m_drawingStemEnd.y = fy1; + note->SetDrawingStemDir(stemDir); + } } } + + + /******************************************************************/ + // Draw the children + + DrawLayerChildren(dc, beam, layer, staff, measure); /******************************************************************/ - // Draw the beam full bars + // Draw the stems and the beam full bars + + for (i=0; im_element; + if( ( (el->Is() == NOTE) && !dynamic_cast(el)->IsChordTone()) || (el->Is() == CHORD) ) { + DrawVerticalLine (dc, el->m_drawingStemStart.y, el->m_drawingStemEnd.y, el->m_drawingStemStart.x, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize)); + } + } // Number of bars to draw - if we do not have changing values, draw // the number of bars according to the shortestDur value. Otherwise draw @@ -378,17 +403,17 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta fullBars = !changingDur ? (shortestDur - DUR_4) : 1; // Adjust the x position of the first and last element for taking into account the stem width - (*beamElementCoords)[0]->m_x -= (m_doc->m_style->m_stemWidth) / 2; - (*beamElementCoords)[last]->m_x += (m_doc->m_style->m_stemWidth) / 2; + (*beamElementCoords).at(0)->m_x -= (m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize)) / 2; + (*beamElementCoords).at(last)->m_x += (m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize)) / 2; // Shift direction shiftY = (stemDir == STEMDIRECTION_down) ? 1.0 : -1.0; - fy1 = (*beamElementCoords)[0]->m_yBeam; - fy2 = (*beamElementCoords)[last]->m_yBeam; + fy1 = (*beamElementCoords).at(0)->m_yBeam; + fy2 = (*beamElementCoords).at(last)->m_yBeam; - fx1 = (*beamElementCoords)[0]->m_x; - fx2 = (*beamElementCoords)[last]->m_x; + fx1 = (*beamElementCoords).at(0)->m_x; + fx2 = (*beamElementCoords).at(last)->m_x; s_y = shiftY; s_y2 = shiftY; @@ -439,23 +464,23 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta // all but the last one for (i = 0; i < elementCount - 1; i++) { - bool breakSec = (((*beamElementCoords)[i]->m_breaksec) && (testDur - DUR_8 >= (*beamElementCoords)[i]->m_breaksec)); - (*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] = PARTIAL_NONE; + bool breakSec = (((*beamElementCoords).at(i)->m_breaksec) && (testDur - DUR_8 >= (*beamElementCoords).at(i)->m_breaksec)); + (*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] = PARTIAL_NONE; // partial is needed - if ((*beamElementCoords)[i]->m_dur >= (char)testDur) { + if ((*beamElementCoords).at(i)->m_dur >= (char)testDur) { // and for the next one too, but no break - through - if (((*beamElementCoords)[i+1]->m_dur >= (char)testDur) && !breakSec) { - (*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] = PARTIAL_THROUGH; + if (((*beamElementCoords).at(i+1)->m_dur >= (char)testDur) && !breakSec) { + (*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] = PARTIAL_THROUGH; } // not needed for the next one or break else { // we are starting a beam or after a beam break - put it right if (start) { - (*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] = PARTIAL_RIGHT; + (*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] = PARTIAL_RIGHT; } // or the previous one had no partial - put it left - else if ((*beamElementCoords)[i-1]->m_dur < (char)testDur) { - (*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] = PARTIAL_LEFT; + else if ((*beamElementCoords).at(i-1)->m_dur < (char)testDur) { + (*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] = PARTIAL_LEFT; } } } @@ -468,39 +493,39 @@ void View::DrawBeam( DeviceContext *dc, LayerElement *element, Layer *layer, Sta } } // last one - (*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] = PARTIAL_NONE; + (*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] = PARTIAL_NONE; // partial is needed - if ((*beamElementCoords)[i]->m_dur >= (char)testDur) { + if ((*beamElementCoords).at(i)->m_dur >= (char)testDur) { // and the previous one had no partial - put it left - if ((*beamElementCoords)[i-1]->m_dur < (char)testDur) { - (*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] = PARTIAL_LEFT; + if ((*beamElementCoords).at(i-1)->m_dur < (char)testDur) { + (*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] = PARTIAL_LEFT; } } // draw them for (i=0; im_partialFlags[testDur-DUR_8] == PARTIAL_THROUGH) { + if ((*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] == PARTIAL_THROUGH) { // through should never be set on the last one assert( i < elementCount - 1); if (i >= elementCount - 1) continue; // assert for debug and skip otherwise - fy1 = (*beamElementCoords)[i]->m_yBeam + barY; - fy2 = (*beamElementCoords)[i+1]->m_yBeam + barY; + fy1 = (*beamElementCoords).at(i)->m_yBeam + barY; + fy2 = (*beamElementCoords).at(i+1)->m_yBeam + barY; polygonHeight = beamWidthBlack * shiftY; - DrawObliquePolygon (dc, (*beamElementCoords)[i]->m_x, fy1,(*beamElementCoords)[i+1]->m_x, fy2, polygonHeight); + DrawObliquePolygon (dc, (*beamElementCoords).at(i)->m_x, fy1,(*beamElementCoords).at(i+1)->m_x, fy2, polygonHeight); } - else if ((*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] == PARTIAL_RIGHT) { - fy1 = (*beamElementCoords)[i]->m_yBeam + barY; - int x2 = (*beamElementCoords)[i]->m_x + m_doc->m_drawingLedgerLine[staff->staffSize][0]; + else if ((*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] == PARTIAL_RIGHT) { + fy1 = (*beamElementCoords).at(i)->m_yBeam + barY; + int x2 = (*beamElementCoords).at(i)->m_x + m_doc->GetDrawingLedgerLineLength(staff->m_drawingStaffSize, false); fy2 = startingY + verticalBoost + barY + beamSlope * x2; polygonHeight= beamWidthBlack*shiftY; - DrawObliquePolygon (dc, (*beamElementCoords)[i]->m_x, fy1, x2, fy2, polygonHeight); + DrawObliquePolygon (dc, (*beamElementCoords).at(i)->m_x, fy1, x2, fy2, polygonHeight); } - else if ((*beamElementCoords)[i]->m_partialFlags[testDur-DUR_8] == PARTIAL_LEFT) { - fy2 = (*beamElementCoords)[i]->m_yBeam + barY; - int x1 = (*beamElementCoords)[i]->m_x - m_doc->m_drawingLedgerLine[staff->staffSize][0]; + else if ((*beamElementCoords).at(i)->m_partialFlags[testDur-DUR_8] == PARTIAL_LEFT) { + fy2 = (*beamElementCoords).at(i)->m_yBeam + barY; + int x1 = (*beamElementCoords).at(i)->m_x - m_doc->GetDrawingLedgerLineLength(staff->m_drawingStaffSize, false); fy1 = startingY + verticalBoost + barY + beamSlope * x1; polygonHeight = beamWidthBlack*shiftY; - DrawObliquePolygon (dc, x1, fy1, (*beamElementCoords)[i]->m_x, fy2, polygonHeight); + DrawObliquePolygon (dc, x1, fy1, (*beamElementCoords).at(i)->m_x, fy2, polygonHeight); } } diff --git a/src/view_element.cpp b/src/view_element.cpp index 07f6cf8304c..d8fd4fa0bf7 100644 --- a/src/view_element.cpp +++ b/src/view_element.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: musrc_element.cpp +// Name: view_element.cpp // Author: Laurent Pugin and Chris Niven // Created: 2011 // Copyright (c) Authors and others. All rights reserved. @@ -12,6 +12,7 @@ #include #include +#include //---------------------------------------------------------------------------- @@ -30,8 +31,9 @@ #include "mrest.h" #include "multirest.h" #include "note.h" +#include "proport.h" #include "rest.h" -#include "slur.h" +#include "rpt.h" #include "space.h" #include "smufl.h" #include "staff.h" @@ -51,8 +53,11 @@ namespace vrv { void View::DrawLayerElement( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); int previousColor = m_currentColour; @@ -63,74 +68,90 @@ void View::DrawLayerElement( DeviceContext *dc, LayerElement *element, Layer *la m_currentColour = AxBLACK; } - if (dynamic_cast(element)) { + if (element->Is() == ACCID) { DrawAccid(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == BARLINE) { DrawBarline(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == BEAM) { DrawBeam(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == BEATRPT) { + DrawBeatRpt(dc, element, layer, staff, measure); + } + else if (element->Is() == CHORD) { DrawDurationElement(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == CLEF) { DrawClef(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == CUSTOS) { DrawCustos(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == DOT) { DrawDot(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == KEYSIG) { DrawKeySig(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == MENSUR) { DrawMensur(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == METERSIG) { DrawMeterSig(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == MREST) { DrawMRest(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == MRPT) { + DrawMRpt(dc, element, layer, staff, measure); + } + else if (element->Is() == MRPT2) { + DrawMRpt2(dc, element, layer, staff, measure); + } + else if (element->Is() == MULTIREST) { DrawMultiRest(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { - DrawDurationElement(dc, element, layer, staff, measure); + else if (element->Is() == MULTIRPT) { + DrawMultiRpt(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == NOTE) { DrawDurationElement(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { - DrawTie(dc, element, layer, staff, measure); + else if (element->Is() == PROPORT) { + DrawProport(dc, element, layer, staff, measure); + } + else if (element->Is() == REST) { + DrawDurationElement(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == SPACE) { DrawSpace(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == SYL) { DrawSyl(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { - DrawTie(dc, element, layer, staff, measure); - } - else if (dynamic_cast(element)) { + else if (element->Is() == TUPLET) { DrawTuplet(dc, element, layer, staff, measure); } - else if (dynamic_cast(element)) { + else if (element->Is() == VERSE) { DrawVerse(dc, element, layer, staff, measure); } + else { + // This should never happen + LogError("Element '%s' cannot be drawn", element->GetClassName().c_str()); + } m_currentColour = previousColor; } void View::DrawDurationElement( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); if (dynamic_cast(element)) { dc->StartGraphic( element, "", element->GetUuid() ); @@ -147,16 +168,18 @@ void View::DrawDurationElement( DeviceContext *dc, LayerElement *element, Layer DrawRest( dc, element, layer, staff, measure ); dc->EndGraphic(element, this ); } - - return; } -void View::DrawTuplet(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) { - - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" +void View::DrawTuplet(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) +{ + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Tuplet *tuplet = dynamic_cast(element); + assert( tuplet ); dc->StartGraphic( element, "", element->GetUuid() ); @@ -177,11 +200,14 @@ void View::DrawTuplet(DeviceContext *dc, LayerElement *element, Layer *layer, St void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Note" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Note *note = dynamic_cast(element); + assert( note ); if (note->IsMensural()){ DrawMensuralNote(dc, element, layer, staff, measure); @@ -192,15 +218,17 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St Chord *inChord = note->IsChordTone(); + bool drawingCueSize = note->HasGrace(); + bool inBeam = false; // Get the immediate parent of the note // to see if beamed or not - Beam *beam_parent = dynamic_cast(note->GetFirstParent(&typeid(Beam))); + Beam *beam_parent = dynamic_cast(note->GetFirstParent( BEAM )); // This note is beamed and cue sized if (beam_parent != NULL) { - if (note->m_cueSize == true) { + if (drawingCueSize == true) { // Get the Parent of the parent // we want to see if we are in a group of // beamed cue notes @@ -215,7 +243,7 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St } } - int staffSize = staff->staffSize; + int staffSize = staff->m_drawingStaffSize; int noteY = element->GetDrawingY(); int xLedger, xNote, xAccid, xStem; int drawingDur; @@ -232,32 +260,33 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St drawingDur = note->GetDrawingDur(); drawingDur = ((note->GetColored()==BOOLEAN_true) && drawingDur > DUR_1) ? (drawingDur+1) : drawingDur; - int radius = m_doc->m_drawingNoteRadius[staffSize][note->m_cueSize]; - + int radius = m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staffSize, drawingCueSize) / 2; + if (drawingDur > DUR_1 || (drawingDur == DUR_1 && staff->notAnc)) { // annuler provisoirement la modif. des lignes addit. - ledge = m_doc->m_drawingLedgerLine[staffSize][note->m_cueSize]; + ledge = m_doc->GetDrawingLedgerLineLength(staffSize, drawingCueSize); } else { - ledge = m_doc->m_drawingLedgerLine[staffSize][note->m_cueSize]; + ledge = m_doc->GetDrawingLedgerLineLength(staffSize, drawingCueSize); radius += radius/3; } /************** Stem/notehead direction: **************/ - verticalCenter = staffY - m_doc->m_drawingDoubleUnit[staffSize]*2; - if ( note->HasDrawingStemDir() ) { - note->m_drawingStemDir = note->GetDrawingStemDir(); + verticalCenter = staffY - m_doc->GetDrawingDoubleUnit(staffSize)*2; + data_STEMDIRECTION noteStemDir = note->CalcDrawingStemDir(); + if ( noteStemDir != STEMDIRECTION_NONE ) { + note->SetDrawingStemDir( noteStemDir ); } else if ( layer->GetDrawingStemDir() != STEMDIRECTION_NONE) { - note->m_drawingStemDir = layer->GetDrawingStemDir(); + note->SetDrawingStemDir( layer->GetDrawingStemDir() ); } else { - note->m_drawingStemDir = (noteY >= verticalCenter) ? STEMDIRECTION_down : STEMDIRECTION_up; + note->SetDrawingStemDir( (noteY >= verticalCenter) ? STEMDIRECTION_down : STEMDIRECTION_up ); } //if the note is clustered, calculations are different if (note->m_cluster) { - if (note->m_drawingStemDir == STEMDIRECTION_down) { + if (note->GetDrawingStemDir() == STEMDIRECTION_down) { //stem down/even cluster = noteheads start on left (incorrect side) if (note->m_cluster->size() % 2 == 0) { flippedNotehead = (note->m_clusterPosition % 2 != 0); @@ -291,11 +320,11 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St else { //if we have a flipped notehead, we need to be in a chord assert(inChord); - if (note->m_drawingStemDir == STEMDIRECTION_up) { - xNote = xStem + radius - m_doc->m_style->m_stemWidth; + if (note->GetDrawingStemDir() == STEMDIRECTION_up) { + xNote = xStem + radius - m_doc->GetDrawingStemWidth(staffSize); } - else if (note->m_drawingStemDir == STEMDIRECTION_down) { - xNote = xStem - radius * 3 + m_doc->m_style->m_stemWidth; + else if (note->GetDrawingStemDir() == STEMDIRECTION_down) { + xNote = xStem - radius * 3 + m_doc->GetDrawingStemWidth(staffSize); } else { xNote = xStem - radius; @@ -319,7 +348,7 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St else fontNo = SMUFL_E0A2_noteheadWhole; - DrawSmuflCode( dc, xNote, noteY, fontNo, staff->staffSize, note->m_cueSize ); + DrawSmuflCode( dc, xNote, noteY, fontNo, staff->m_drawingStaffSize, drawingCueSize ); } // Other values else { @@ -330,18 +359,18 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St fontNo = SMUFL_E0A4_noteheadBlack; } - DrawSmuflCode( dc, xNote, noteY, fontNo, staff->staffSize, note->m_cueSize ); + DrawSmuflCode( dc, xNote, noteY, fontNo, staff->m_drawingStaffSize, drawingCueSize ); if (!(inBeam && drawingDur > DUR_4) && !inChord) { - DrawStem(dc, note, staff, note->m_drawingStemDir, radius, xStem, noteY); + DrawStem(dc, note, staff, note->GetDrawingStemDir(), radius, xStem, noteY); } } /************** Ledger lines: **************/ - int staffTop = staffY + m_doc->m_drawingUnit[staffSize]; - int staffBot = staffY - m_doc->m_drawingStaffSize[staffSize] - m_doc->m_drawingUnit[staffSize]; + int staffTop = staffY + m_doc->GetDrawingUnit(staffSize); + int staffBot = staffY - m_doc->GetDrawingStaffSize(staffSize) - m_doc->GetDrawingUnit(staffSize); //if the note is not in the staff if (!is_in(noteY,staffTop,staffBot)) @@ -350,9 +379,9 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St bool aboveStaff = (noteY > staffTop); - distance = (aboveStaff ? (noteY - staffY) : staffY - m_doc->m_drawingStaffSize[staffSize] - noteY); - highestNewLine = ((distance % m_doc->m_drawingDoubleUnit[staffSize] > 0) ? (distance - m_doc->m_drawingUnit[staffSize]) : distance); - numLines = highestNewLine / m_doc->m_drawingDoubleUnit[staffSize]; + distance = (aboveStaff ? (noteY - staffY) : staffY - m_doc->GetDrawingStaffSize(staffSize) - noteY); + highestNewLine = ((distance % m_doc->GetDrawingDoubleUnit(staffSize) > 0) ? (distance - m_doc->GetDrawingUnit(staffSize)) : distance); + numLines = highestNewLine / m_doc->GetDrawingDoubleUnit(staffSize); //if this is in a chord, we don't want to draw it yet, but we want to keep track of the maxima if (inChord) { @@ -362,8 +391,8 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St inChord->m_drawingLedgerLines[staff] = legerLines; } int idx = doubleLengthLedger + aboveStaff * 2; // 2x2 array - std::vector *legerLines = &inChord->m_drawingLedgerLines[staff]; - (*legerLines)[idx] = ledgermax(numLines, (*legerLines)[idx]); + std::vector *legerLines = &inChord->m_drawingLedgerLines.at(staff); + (*legerLines).at(idx) = ledgermax(numLines, (*legerLines).at(idx)); } //we do want to go ahead and draw if it's not in a chord else { @@ -374,7 +403,10 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St /************** Accidentals/dots/peripherals: **************/ if (note->m_drawingAccid) { - xAccid = xNote - 1.5 * m_doc->m_drawingAccidWidth[staffSize][note->m_cueSize]; + xAccid = xNote; + if (note->m_drawingAccid->GetFunc() != FUNC_edit) { + xAccid -= 1.5 * m_doc->GetGlyphWidth(SMUFL_E262_accidentalSharp, staffSize, drawingCueSize); + } note->m_drawingAccid->SetDrawingX( xAccid ); note->m_drawingAccid->SetDrawingY( noteY ); @@ -385,16 +417,16 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St if (note->GetDots() && !inChord) { int xDot; - if (note->GetActualDur() < DUR_2 || (note->GetActualDur() > DUR_8 && !inBeam && (note->m_drawingStemDir == STEMDIRECTION_up))) - xDot = xStem + m_doc->m_drawingUnit[staffSize]*7/2; + if (note->GetActualDur() < DUR_2 || (note->GetActualDur() > DUR_8 && !inBeam && (note->GetDrawingStemDir() == STEMDIRECTION_up))) + xDot = xStem + m_doc->GetDrawingUnit(staffSize)*7/2; else - xDot = xStem + m_doc->m_drawingUnit[staffSize]*5/2; + xDot = xStem + m_doc->GetDrawingUnit(staffSize)*5/2; DrawDots( dc, xDot, noteY, note->GetDots(), staff ); } if (note->GetDrawingTieAttr()) { - System *system = dynamic_cast(measure->GetFirstParent(&typeid(System))); + System *system = dynamic_cast(measure->GetFirstParent( SYSTEM ) ); // create a placeholder for the tie attribute that will be drawn from the system dc->StartGraphic(note->GetDrawingTieAttr(), "", note->GetDrawingTieAttr()->GetUuid().c_str()); dc->EndGraphic(note->GetDrawingTieAttr(), this); @@ -411,20 +443,26 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St if (note->m_embellishment == EMB_TRILL) { DrawTrill(dc, element, staff); } - - return; } void View::DrawStem( DeviceContext *dc, LayerElement *object, Staff *staff, data_STEMDIRECTION dir, int radius, int xn, int originY, int heightY) { - int staffSize = staff->staffSize; + assert(dynamic_cast(object)); + + int staffSize = staff->m_drawingStaffSize; int staffY = staff->GetDrawingY(); int baseStem, totalFlagStemHeight, flagStemHeight, nbFlags; int drawingDur = dynamic_cast(object)->GetActualDur(); - int verticalCenter = staffY - m_doc->m_drawingDoubleUnit[staffSize]*2; + bool drawingCueSize = object->IsCueSize(); + int verticalCenter = staffY - m_doc->GetDrawingDoubleUnit(staffSize)*2; - baseStem = object->m_cueSize ? ( m_doc->m_drawingUnit[staffSize]*5) : ( m_doc->m_drawingUnit[staffSize]*7); - flagStemHeight = object->m_cueSize ? m_doc->m_drawingUnit[staffSize] : m_doc->m_drawingDoubleUnit[staffSize]; + baseStem = m_doc->GetDrawingUnit(staffSize)*7; + flagStemHeight = m_doc->GetDrawingDoubleUnit(staffSize); + if (drawingCueSize) { + baseStem = m_doc->GetGraceSize(baseStem); + flagStemHeight = m_doc->GetGraceSize(flagStemHeight); + } + nbFlags = drawingDur - DUR_8; totalFlagStemHeight = flagStemHeight * (nbFlags * 2 - 1) / 2; @@ -449,47 +487,50 @@ void View::DrawStem( DeviceContext *dc, LayerElement *object, Staff *staff, data } // shorten the stem at its connection with the note head - int stemY1 = (dir == STEMDIRECTION_up) ? y1 + m_doc->m_drawingUnit[staffSize] / 4 : y1 - m_doc->m_drawingUnit[staffSize] / 4; + int stemY1 = (dir == STEMDIRECTION_up) ? y1 + m_doc->GetDrawingUnit(staffSize) / 4 : y1 - m_doc->GetDrawingUnit(staffSize) / 4; int stemY2 = y2; if (drawingDur > DUR_4) { // if we have flags, shorten the stem to make sure we have a nice overlap with the flag glyph - stemY2 = (dir == STEMDIRECTION_up) ? y2 - m_doc->m_drawingUnit[staffSize] : y2 + m_doc->m_drawingUnit[staffSize]; + int shortener = (drawingCueSize) ? + m_doc->GetGraceSize(m_doc->GetDrawingUnit(staffSize)) : + m_doc->GetDrawingUnit(staffSize); + stemY2 = (dir == STEMDIRECTION_up) ? y2 - shortener : y2 + shortener; } // draw the stems and the flags if (dir == STEMDIRECTION_up) { - DrawFullRectangle( dc, x2 - m_doc->m_style->m_stemWidth, stemY1, x2, stemY2); + DrawFullRectangle( dc, x2 - m_doc->GetDrawingStemWidth(staffSize), stemY1, x2, stemY2); - object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->m_style->m_stemWidth / 2); + object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->GetDrawingStemWidth(staffSize) / 2); object->m_drawingStemStart.y = y1; object->m_drawingStemEnd.y = y2; object->m_drawingStemDir = STEMDIRECTION_up; if (drawingDur > DUR_4) { - DrawSmuflCode( dc, x2 - m_doc->m_style->m_stemWidth, y2, SMUFL_E240_flag8thUp, staff->staffSize, object->m_cueSize ); + DrawSmuflCode( dc, x2 - m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize), y2, SMUFL_E240_flag8thUp, staff->m_drawingStaffSize, drawingCueSize ); for (int i=0; i < nbFlags; i++) - DrawSmuflCode( dc, x2 - m_doc->m_style->m_stemWidth, y2 - (i + 1) * flagStemHeight, SMUFL_E240_flag8thUp, staff->staffSize, object->m_cueSize ); + DrawSmuflCode( dc, x2 - m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize), y2 - (i + 1) * flagStemHeight, SMUFL_E240_flag8thUp, staff->m_drawingStaffSize, drawingCueSize ); } } else { - DrawFullRectangle( dc, x2, stemY1, x2 + m_doc->m_style->m_stemWidth, stemY2); + DrawFullRectangle( dc, x2, stemY1, x2 + m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize), stemY2); - object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->m_style->m_stemWidth / 2); + object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) / 2); object->m_drawingStemStart.y = y1; object->m_drawingStemEnd.y = y2; object->m_drawingStemDir = STEMDIRECTION_down; if (drawingDur > DUR_4) { - DrawSmuflCode( dc, x2 , y2, SMUFL_E241_flag8thDown , staff->staffSize, object->m_cueSize ); + DrawSmuflCode( dc, x2 , y2, SMUFL_E241_flag8thDown , staff->m_drawingStaffSize, drawingCueSize ); for (int i=0; i < nbFlags; i++) - DrawSmuflCode( dc, x2, y2 + (i + 1) * flagStemHeight, SMUFL_E241_flag8thDown, staff->staffSize, - object->m_cueSize ); + DrawSmuflCode( dc, x2, y2 + (i + 1) * flagStemHeight, SMUFL_E241_flag8thDown, staff->m_drawingStaffSize, drawingCueSize ); } } - if (object->m_cueSize && dynamic_cast(object)->m_acciaccatura) { + + // cast to note is check when setting drawingCueSize value + if ( drawingCueSize && ( dynamic_cast(object)->GetGrace() == GRACE_acc ) ) { DrawAcciaccaturaSlash(dc, object); } - } //skips "skip" lines before drawing "n" ledger lines @@ -498,15 +539,18 @@ void View::DrawLedgerLines ( DeviceContext *dc, LayerElement *element, Staff *st //various variables int ledgerY; int staffY = staff->GetDrawingY(); - int staffSize = staff->staffSize; - int betweenLines = m_doc->m_drawingDoubleUnit[staffSize]; - int ledge = m_doc->m_drawingLedgerLine[staffSize][element->m_cueSize]; - int noteDiameter = m_doc->m_drawingNoteRadius[staffSize][element->m_cueSize] * 2; + int staffSize = staff->m_drawingStaffSize; + int betweenLines = m_doc->GetDrawingDoubleUnit(staffSize); + bool drawingCueSize = element->IsCueSize(); + int ledge = m_doc->GetDrawingLedgerLineLength(staffSize, drawingCueSize); + int noteDiameter = m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staffSize, drawingCueSize); //prep start and end positions of ledger line depending on stem direction and doubleLength int xLedgerStart, xLedgerEnd; if (doubleLength) { - if (dynamic_cast(element)->GetDrawingStemDir() == STEMDIRECTION_down) { + Chord *chord = dynamic_cast(element); + assert( chord ); + if (chord->GetDrawingStemDir() == STEMDIRECTION_down) { xLedgerStart = element->GetDrawingX() - ledge - noteDiameter; xLedgerEnd = element->GetDrawingX() + ledge; } @@ -525,14 +569,14 @@ void View::DrawLedgerLines ( DeviceContext *dc, LayerElement *element, Staff *st ledgerY = (skip * betweenLines) + staffY; } else { - ledgerY = staffY - m_doc->m_drawingStaffSize[staffSize] - (skip * betweenLines); - betweenLines = -m_doc->m_drawingDoubleUnit[staffSize]; + ledgerY = staffY - m_doc->GetDrawingStaffSize(staffSize) - (skip * betweenLines); + betweenLines = -m_doc->GetDrawingDoubleUnit(staffSize); } //add one line's distance to get it off the edge of the staff ledgerY += betweenLines; - dc->SetPen( m_currentColour, ToDeviceContextX( m_doc->m_style->m_staffLineWidth ), AxSOLID ); + dc->SetPen( m_currentColour, ToDeviceContextX( m_doc->GetDrawingStaffLineWidth(staffSize) ), AxSOLID ); dc->SetBrush(m_currentColour , AxTRANSPARENT ); //draw the lines @@ -548,24 +592,28 @@ void View::DrawLedgerLines ( DeviceContext *dc, LayerElement *element, Staff *st void View::DrawRest ( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL - assert(staff); // Pointer to staff cannot be NULL - assert(dynamic_cast(element)); // Element must be a Rest + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Rest *rest = dynamic_cast(element); + assert( rest ); + bool drawingCueSize = rest->IsCueSize(); int drawingDur = rest->GetActualDur(); int x = element->GetDrawingX(); int y = element->GetDrawingY(); // Temporary fix for rest within tuplet because drawing tuplet requires m_drawingStemXXX to be set - element->m_drawingStemStart.x = element->m_drawingStemEnd.x = element->GetDrawingX() - (m_doc->m_style->m_stemWidth / 2); + element->m_drawingStemStart.x = element->m_drawingStemEnd.x = element->GetDrawingX() - (m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) / 2); element->m_drawingStemEnd.y = element->GetDrawingY(); element->m_drawingStemStart.y = element->GetDrawingY(); if (drawingDur > DUR_2) { - x -= m_doc->m_drawingNoteRadius[staff->staffSize][rest->m_cueSize]; + //x -= m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staff->m_drawingStaffSize, drawingCueSize); } switch (drawingDur) @@ -573,103 +621,230 @@ void View::DrawRest ( DeviceContext *dc, LayerElement *element, Layer *layer, St case DUR_LG: DrawLongRest ( dc, x, y, staff); break; case DUR_BR: DrawBreveRest( dc, x, y, staff); break; case DUR_1: - case DUR_2: DrawWholeRest ( dc, x, y, drawingDur, rest->GetDots(), rest->m_cueSize, staff); break; - default: DrawQuarterRest( dc, x, y, drawingDur, rest->GetDots(), rest->m_cueSize, staff); + case DUR_2: DrawWholeRest ( dc, x, y, drawingDur, rest->GetDots(), drawingCueSize, staff); break; + default: DrawQuarterRest( dc, x, y, drawingDur, rest->GetDots(), drawingCueSize, staff); } if(rest->GetFermata() != PLACE_NONE) { DrawFermata(dc, element, staff); } - - return; } void View::DrawMRest(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a MultiRest" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); - //MRest *mrest = dynamic_cast(element); + assert( dynamic_cast(element) ); // Element must be a MultiRest" dc->StartGraphic( element, "", element->GetUuid() ); - //LogMessage("Measure %d - X %d - RightX %d;", measure->GetIdx(), element->m_drawingX, measure->GetRightBarlineX() ); - - int x = element->GetDrawingX(); - int xCentered = x + (measure->GetDrawingX() + measure->GetRightBarlineX() - x) / 2; + int width = measure->GetRightBarlineX() - measure->GetNonJustifiableLeftMargin(); + int xCentered = measure->GetDrawingX() + measure->GetNonJustifiableLeftMargin() + (width / 2); int y = element->GetDrawingY(); // move it down according to the number of line in the staff - y -= staff->m_drawingLines / 2 * m_doc->m_drawingDoubleUnit[staff->staffSize] - m_doc->m_drawingDoubleUnit[staff->staffSize]; + y -= staff->m_drawingLines / 2 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); DrawWholeRest ( dc, xCentered, y, DUR_1, 0, false, staff ); dc->EndGraphic(element, this); - - return; - } /** This function draws multi-measure rests **/ void View::DrawMultiRest(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) -{ - int x1, x2, y1, y2, length; - - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Symbol" +{ + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); - MultiRest *multirest = dynamic_cast(element); + MultiRest *multiRest = dynamic_cast(element); + assert( multiRest ); + int x1, x2, y1, y2, length; + dc->StartGraphic( element, "", element->GetUuid() ); - int x = element->GetDrawingX(); + int width = measure->GetRightBarlineX() - measure->GetNonJustifiableLeftMargin(); + int xCentered = measure->GetDrawingX() + measure->GetNonJustifiableLeftMargin() + (width / 2); + // We do not support more than three chars - if (multirest->GetNum() > 999) - multirest->SetNum(999); - - // This is 1/2 the length of th black rectangle - length = (m_doc->m_drawingUnit[staff->staffSize] * 5); - - // Position centered in third line - // it would be m_drawingDoubleUnit * 6.5, or m_drawingDoubleUnit / 2 * 13 - y1 = staff->GetDrawingY() - (m_doc->m_drawingDoubleUnit[staff->staffSize] / 2) * 5; - y2 = y1 + m_doc->m_drawingDoubleUnit[staff->staffSize]; - - // a is the central point, claculate x and x2 - x1 = x - length; - x2 = x + length; + int num = std::min( multiRest->GetNum(), 999); - // Draw the base rect - // make it 8 pixels smaller than the interline space - // these are the two 4 substracted and added - DrawFullRectangle(dc, x1, y2 - 4, x2, y1 + 4); - - //Draw the to lines at beginning and end - // make it 8 pixesl longers, and 4 pixels width - int border = m_doc->m_drawingUnit[staff->staffSize]; - DrawVerticalLine(dc, y1 - border, y2 + border, x1, m_doc->m_style->m_stemWidth * 2); - DrawVerticalLine(dc, y1 - border, y2 + border, x2, m_doc->m_style->m_stemWidth * 2); + if (num > 2 ) { + // This is 1/2 the length of th black rectangle + length = width - 2 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + + // a is the central point, claculate x and x2 + x1 = xCentered - length / 2; + x2 = xCentered + length / 2; + + // Position centered in third line + y1 = staff->GetDrawingY() - (m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) / 2) * 5; + y2 = y1 + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + + // Draw the base rect + // make it 8 pixels smaller than the interline space + // these are the two 4 substracted and added + DrawFullRectangle(dc, x1, y2, x2, y1); + + //Draw the to lines at beginning and end + // make it 8 pixesl longers, and 4 pixels width + int border = m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + DrawVerticalLine(dc, y1 - border, y2 + border, x1, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) * 2); + DrawVerticalLine(dc, y1 - border, y2 + border, x2, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) * 2); + } + else { + // Draw the base rect + x1 = xCentered - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) / 3; + x2 = xCentered + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) / 3 ; + + // Position centered in third line + y1 = staff->GetDrawingY() - (m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) / 2) * 4; + y2 = y1 + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + DrawFullRectangle(dc, x1, y2 - 4, x2, y1 + 4); + } // Draw the text above int w, h; int start_offset = 0; // offset from x to center text // convert to string - std::wstring wtext = IntToTimeSigFigures(multirest->GetNum()); + std::wstring wtext = IntToTimeSigFigures(num); - dc->SetFont(&m_doc->m_drawingSmuflFonts[staff->staffSize][0]); + dc->SetFont(m_doc->GetDrawingSmuflFont(staff->m_drawingStaffSize, false)); dc->GetSmuflTextExtent( wtext, &w, &h); start_offset = (x2 - x1 - w) / 2; // calculate offset to center text - DrawSmuflString(dc, x1 + start_offset, staff->GetDrawingY() + 5, wtext, false); + DrawSmuflString(dc, x1 + start_offset, staff->GetDrawingY() + 3 * m_doc->GetDrawingUnit(staff->m_drawingStaffSize), wtext, false); dc->ResetFont(); dc->EndGraphic(element, this); +} - return; +void View::DrawBeatRpt(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) +{ + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); + + BeatRpt *beatRpt = dynamic_cast(element); + assert( beatRpt ); + + dc->StartGraphic( element, "", element->GetUuid() ); + + int x = element->GetDrawingX(); + int xSymbol = x; + int y = element->GetDrawingY(); + y -= staff->m_drawingLines / 2 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + + if (beatRpt->GetRend() == BEATRPT_REND_mixed) { + DrawSmuflCode( dc, xSymbol, y, SMUFL_E501_repeat2Bars, staff->m_drawingStaffSize, false ); + } + else { + DrawSmuflCode( dc, xSymbol, y, SMUFL_E101_noteheadSlashHorizontalEnds, staff->m_drawingStaffSize, false ); + int additionalSlash = beatRpt->GetRend() - BEATRPT_REND_8; + int halfWidth = m_doc->GetGlyphWidth(SMUFL_E101_noteheadSlashHorizontalEnds, staff->m_drawingStaffSize, false) / 2; + int i; + for (i = 0; i < additionalSlash; i++) { + xSymbol += halfWidth; + DrawSmuflCode( dc, xSymbol, y, SMUFL_E101_noteheadSlashHorizontalEnds, staff->m_drawingStaffSize, false ); + } + } + dc->EndGraphic(element, this); +} + +void View::DrawMRpt(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) +{ + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); + + MRpt *mRpt = dynamic_cast(element); + assert( mRpt ); + + dc->StartGraphic( element, "", element->GetUuid() ); + + DrawMRptPart(dc, element->GetDrawingX(), SMUFL_E500_repeat1Bar, mRpt->m_drawingMeasureCount, false, staff, measure ); + + dc->EndGraphic(element, this); +} + +void View::DrawMRpt2(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) +{ + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); + + MRpt2 *mRpt2 = dynamic_cast(element); + assert( mRpt2 ); + + dc->StartGraphic( element, "", element->GetUuid() ); + + DrawMRptPart(dc, element->GetDrawingX(), SMUFL_E501_repeat2Bars, 2, true, staff, measure ); + + dc->EndGraphic(element, this); +} + +void View::DrawMultiRpt(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) +{ + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); + + MultiRpt *multiRpt = dynamic_cast(element); + assert( multiRpt ); + + dc->StartGraphic( element, "", element->GetUuid() ); + + DrawMRptPart(dc, element->GetDrawingX(), SMUFL_E501_repeat2Bars, multiRpt->GetNum(), true, staff, measure ); + + dc->EndGraphic(element, this); + + return; +} + +void View::DrawMRptPart(DeviceContext *dc, int x, wchar_t smuflCode, int num, bool line, Staff *staff, Measure *measure ) +{ + int width = measure->GetRightBarlineX() - measure->GetNonJustifiableLeftMargin(); + int xCentered = measure->GetDrawingX() + measure->GetNonJustifiableLeftMargin() + (width / 2); + + int xSymbol = xCentered - m_doc->GetGlyphWidth(smuflCode, staff->m_drawingStaffSize, false) / 2; + int y = staff->GetDrawingY(); + int ySymbol = y - staff->m_drawingLines / 2 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + + DrawSmuflCode( dc, xSymbol, ySymbol, smuflCode, staff->m_drawingStaffSize, false ); + + if (line) { + DrawVerticalLine( dc, y, y - m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize), + xCentered, m_doc->GetDrawingBarLineWidth(staff->m_drawingStaffSize)); + } + + if (num > 0) { + dc->SetFont( m_doc->GetDrawingSmuflFont( staff->m_drawingStaffSize, false) ); + // calculate the width of the figures + int txt_length = 0; + int txt_height = 0; + std::wstring figures = IntToTupletFigures(num); + dc->GetSmuflTextExtent(figures, &txt_length, &txt_height); + dc->DrawMusicText( figures, ToDeviceContextX(xCentered - txt_length / 2), + ToDeviceContextY(staff->GetDrawingY() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)) ); + dc->ResetFont(); + } } void View::DrawLongRest ( DeviceContext *dc, int x, int y, Staff *staff) @@ -678,15 +853,14 @@ void View::DrawLongRest ( DeviceContext *dc, int x, int y, Staff *staff) y1 = y; x1 = x; - x2 = x + (m_doc->m_drawingUnit[staff->staffSize] * 2 / 3); + x2 = x + (m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2 / 3); // look if on line or between line - if ( (y - staff->GetDrawingY()) % m_doc->m_drawingDoubleUnit[staff->staffSize]) - y1 -= m_doc->m_drawingUnit[staff->staffSize]; + if ( (y - staff->GetDrawingY()) % m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)) + y1 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize); - y2 = y1 + m_doc->m_drawingDoubleUnit[staff->staffSize]*2; + y2 = y1 + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)*2; DrawFullRectangle( dc, x1, y2, x2, y1); - return; } @@ -695,41 +869,30 @@ void View::DrawBreveRest ( DeviceContext *dc, int x, int y, Staff *staff) int x1, x2, y1, y2; y1 = y; x1 = x; - x2 = x + (m_doc->m_drawingUnit[staff->staffSize] * 2 / 3); + x2 = x + (m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2 / 3); // look if one line or between line - if ( (y - staff->GetDrawingY()) % m_doc->m_drawingDoubleUnit[staff->staffSize]) - y1 -= m_doc->m_drawingUnit[staff->staffSize]; + if ( (y - staff->GetDrawingY()) % m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)) + y1 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize); - y2 = y1 + m_doc->m_drawingDoubleUnit[staff->staffSize]; + y2 = y1 + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); DrawFullRectangle( dc, x1, y2, x2, y1); // lines - x1 = x - m_doc->m_drawingUnit[staff->staffSize]; - x2 = x + m_doc->m_drawingUnit[staff->staffSize]; + x1 = x - m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + x2 = x + m_doc->GetDrawingUnit(staff->m_drawingStaffSize); DrawHorizontalLine ( dc, x1, x2, y2, 1); DrawHorizontalLine ( dc, x1, x2, y1, 1); - return; } -void View::DrawWholeRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, unsigned int smaller, Staff *staff) +void View::DrawWholeRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, bool cueSize, Staff *staff) { int x1, x2, y1, y2, vertic; y1 = y; - vertic = m_doc->m_drawingUnit[staff->staffSize]; + vertic = m_doc->GetDrawingUnit(staff->m_drawingStaffSize); - int off; - float foff; - - if (staff->notAnc) - foff = (m_doc->m_drawingUnit[staff->staffSize] *1 / 3); - else - foff = (m_doc->m_drawingLedgerLine[staff->staffSize][2] * 2) / 3; // i.e., la moitie de la ronde - - if (smaller) - foff *= (int)( (float)m_doc->m_drawingGraceRatio[0] / (float)m_doc->m_drawingGraceRatio[1] ); - off = (int)foff; + int off = m_doc->GetDrawingLedgerLineLength(staff->m_drawingStaffSize, cueSize) * 2 / 3; // i.e., la moitie de la ronde x1 = x - off; x2 = x + off; @@ -738,7 +901,7 @@ void View::DrawWholeRest ( DeviceContext *dc, int x, int y, int valeur, unsigned vertic = -vertic; // look if one line or between line - if ( (y - staff->GetDrawingY()) % m_doc->m_drawingDoubleUnit[staff->staffSize]) + if ( (y - staff->GetDrawingY()) % m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)) { if (valeur == DUR_2) y1 -= vertic; @@ -754,36 +917,35 @@ void View::DrawWholeRest ( DeviceContext *dc, int x, int y, int valeur, unsigned x2 += off; // legder line - if (y > (int)staff->GetDrawingY() || y < staff->GetDrawingY() - m_doc->m_drawingStaffSize[staff->staffSize]) - DrawHorizontalLine ( dc, x1, x2, y1, m_doc->m_style->m_staffLineWidth); + if (y > (int)staff->GetDrawingY() || y < staff->GetDrawingY() - m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize)) + DrawHorizontalLine ( dc, x1, x2, y1, m_doc->GetDrawingStaffLineWidth(staff->m_drawingStaffSize)); - if (dots) - DrawDots( dc, (x2 + m_doc->m_drawingUnit[staff->staffSize]), y2, dots, staff); + if (dots) { + DrawDots( dc, (x2 + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)), y2, dots, staff); + } } -void View::DrawQuarterRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, unsigned int smaller, Staff *staff) +void View::DrawQuarterRest ( DeviceContext *dc, int x, int y, int valeur, unsigned char dots, bool cueSize, Staff *staff) { - int y2 = y + m_doc->m_drawingDoubleUnit[staff->staffSize]; - DrawSmuflCode( dc, x, y2, SMUFL_E4E5_restQuarter + (valeur-DUR_4), staff->staffSize, smaller ); + int y2 = y + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + DrawSmuflCode( dc, x, y2, SMUFL_E4E5_restQuarter + (valeur-DUR_4), staff->m_drawingStaffSize, cueSize ); if (dots) - { if (valeur < DUR_16) - y += m_doc->m_drawingDoubleUnit[staff->staffSize]; - DrawDots( dc, (x + 2 * m_doc->m_drawingDoubleUnit[staff->staffSize]), y, dots, staff); + { if (valeur < DUR_16) y += m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + DrawDots( dc, (x + 2 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)), y, dots, staff); } - return; } bool View::IsOnStaffLine ( int y, Staff *staff) { - return ((y - staff->GetDrawingY()) % m_doc->m_drawingDoubleUnit[staff->staffSize] == 0 ); + return ((y - staff->GetDrawingY()) % m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) == 0 ); } void View::PrepareChordDots ( DeviceContext *dc, Chord *chord, int x, int y, unsigned char dots, Staff *staff ) { std::list *dotsList = &chord->m_dots; - int fullUnit = m_doc->m_drawingUnit[staff->staffSize]; + int fullUnit = m_doc->GetDrawingUnit(staff->m_drawingStaffSize); int doubleUnit = fullUnit * 2; //if it's on a staff line to start with, we need to compensate here and add a full unit like DrawDots would @@ -818,65 +980,70 @@ void View::PrepareChordDots ( DeviceContext *dc, Chord *chord, int x, int y, uns //if it's not, add it to the dots list and go back to DrawChord dotsList->push_back(y); - return; } void View::DrawDots ( DeviceContext *dc, int x, int y, unsigned char dots, Staff *staff) { int i; if ( IsOnStaffLine(y, staff) ) { - y += m_doc->m_drawingUnit[staff->staffSize]; + y += m_doc->GetDrawingUnit(staff->m_drawingStaffSize); } for (i = 0; i < dots; i++) { - DrawDot ( dc, x, y ); - x += std::max (6, 2 * m_doc->m_drawingUnit[staff->staffSize]); + DrawDot ( dc, x, y, staff->m_drawingStaffSize ); + x += m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); } - return; } void View::DrawBarline( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(staff->m_parent); // Pointer to system cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Barline" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Barline *barLine = dynamic_cast(element); - int x = element->GetDrawingX(); + assert( barLine ); + + if (barLine->GetRend() == BARRENDITION_invis) { + barLine->SetEmptyBB(); + return; + } dc->StartGraphic( element, "", element->GetUuid() ); - if (barLine->m_partialBarline) - { - DrawPartialBarline ( dc, dynamic_cast( staff->m_parent ), x, staff); - } - else - { - int y = staff->GetDrawingY(); - DrawBarline( dc, y, y - m_doc->m_drawingStaffSize[staff->staffSize], barLine ); - } + int y = staff->GetDrawingY(); + DrawBarline( dc, y, y - m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize), barLine ); dc->EndGraphic(element, this ); } void View::DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); + Chord* chord = dynamic_cast(element); + assert( chord ); - int staffSize = staff->staffSize; + int staffSize = staff->m_drawingStaffSize; int staffY = staff->GetDrawingY(); - int verticalCenter = staffY - m_doc->m_drawingDoubleUnit[staffSize]*2; - int radius = m_doc->m_drawingNoteRadius[staffSize][chord->m_cueSize]; - int fullUnit = m_doc->m_drawingUnit[staffSize]; + int verticalCenter = staffY - m_doc->GetDrawingDoubleUnit(staffSize)*2; + bool drawingCueSize = chord->IsCueSize(); + int radius = m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staffSize, drawingCueSize) / 2; + int fullUnit = m_doc->GetDrawingUnit(staffSize); bool inBeam = false; // Get the immadiate parent of the note // to see if beamed or not - Beam *beam_parent = dynamic_cast(chord->GetFirstParent(&typeid(Beam))); + Beam *beam_parent = dynamic_cast(chord->GetFirstParent( BEAM )); // This note is beamed and cue sized if (beam_parent != NULL) { - if (chord->m_cueSize == true) { + if (drawingCueSize == true) { // Get the Parent of the parent // we want to see if we are in a group of // beamed cue notes @@ -899,8 +1066,8 @@ void View::DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, St int drawingDur = chord->GetDur(); - //(unless we're in a beam) - if (!(inBeam && drawingDur > DUR_4)) { + //(unless we're in a beam or whole notes) + if (!inBeam && (drawingDur > DUR_1)) { int yMax, yMin; chord->GetYExtremes(&yMax, &yMin); @@ -986,7 +1153,7 @@ void View::DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, St //iterate through the list of notes with accidentals for(idx = 0; idx < size; idx++) { - Accid *curAccid = noteList[idx]->m_drawingAccid; + Accid *curAccid = noteList.at(idx)->m_drawingAccid; //if the note does not need to be moved, save a new cluster start position if (CalculateAccidX(staff, curAccid, chord, false)) @@ -1002,17 +1169,17 @@ void View::DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, St for(idx = 0; idx < accidSize; idx++) { //set fwIdx to the start of the cluster - fwIdx = accidClusterStarts[idx]; + fwIdx = accidClusterStarts.at(idx); //if this is the last cluster, set bwIdx to the last note in the chord if (idx == accidSize - 1) bwIdx = size - 1; //otherwise, set bwIdx to one before the beginning of the next cluster - else bwIdx = accidClusterStarts[idx + 1] - 1; + else bwIdx = accidClusterStarts.at(idx + 1) - 1; //if it's even, this will catch the overlap; if it's odd, there's an if in the middle there while (fwIdx <= bwIdx) { - Accid *accidFwd = noteList[fwIdx]->m_drawingAccid; - Accid *accidBwd = noteList[bwIdx]->m_drawingAccid; + Accid *accidFwd = noteList.at(fwIdx)->m_drawingAccid; + Accid *accidBwd = noteList.at(bwIdx)->m_drawingAccid; //if the top note has an accidental, draw it and update prevAccid accidFwd->SetDrawingX(xAccid); @@ -1034,7 +1201,7 @@ void View::DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, St /************ Ledger lines ************/ - dc->SetPen( m_currentColour, ToDeviceContextX( m_doc->m_style->m_staffLineWidth ), AxSOLID ); + dc->SetPen( m_currentColour, ToDeviceContextX( m_doc->GetDrawingStaffLineWidth(staffSize) ), AxSOLID ); dc->SetBrush(m_currentColour , AxTRANSPARENT ); MapOfLedgerLineFlags::iterator iter; @@ -1043,20 +1210,20 @@ void View::DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, St std::vector *legerLines = &(*iter).second; //if there are double-length lines, we only need to draw single-length after they've been drawn - (*legerLines)[0] -= (*legerLines)[1]; - (*legerLines)[2] -= (*legerLines)[3]; + (*legerLines).at(0) -= (*legerLines).at(1); + (*legerLines).at(2) -= (*legerLines).at(3); //double-length lines below the staff - DrawLedgerLines(dc, chord, (*iter).first, false, true, 0, (*legerLines)[1]); + DrawLedgerLines(dc, chord, (*iter).first, false, true, 0, (*legerLines).at(1)); //remainder single-length lines below the staff - DrawLedgerLines(dc, chord, (*iter).first, false, false, (*legerLines)[1], (*legerLines)[0]); + DrawLedgerLines(dc, chord, (*iter).first, false, false, (*legerLines).at(1), (*legerLines).at(0)); //double-length lines above the staff - DrawLedgerLines(dc, chord, (*iter).first, true, true, 0, (*legerLines)[3]); + DrawLedgerLines(dc, chord, (*iter).first, true, true, 0, (*legerLines).at(3)); //remainder single-length lines above the staff - DrawLedgerLines(dc, chord, (*iter).first, true, false, (*legerLines)[3], (*legerLines)[2]); + DrawLedgerLines(dc, chord, (*iter).first, true, false, (*legerLines).at(3), (*legerLines).at(2)); } @@ -1066,11 +1233,14 @@ void View::DrawChord( DeviceContext *dc, LayerElement *element, Layer *layer, St void View::DrawClef( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Clef" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Clef *clef = dynamic_cast(element); + assert( clef ); dc->StartGraphic( element, "", element->GetUuid() ); @@ -1086,50 +1256,50 @@ void View::DrawClef( DeviceContext *dc, LayerElement *element, Layer *layer, Sta { case C1 : sym = SMUFL_E05C_cClef; - b -= m_doc->m_drawingStaffSize[ staff->staffSize ]; + b -= m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize); break; case G1 : - b -= m_doc->m_drawingStaffSize[ staff->staffSize ]; + b -= m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize); break; case G2_8va : sym = SMUFL_E053_gClef8va; - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]*3; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 3; break; case G2_8vb : sym = SMUFL_E052_gClef8vb; - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]*3; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 3; break; case C2 : sym = SMUFL_E05C_cClef; - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]*3; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 3; break; case G2 : - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]*3; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 3; break; case F3 : sym = SMUFL_E062_fClef; - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]*2; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)*2; break; case C3 : sym = SMUFL_E05C_cClef; - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]*2; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)*2; break; case F5 : sym =SMUFL_E062_fClef; break; case F4 : sym = SMUFL_E062_fClef; - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); break; case C4 : sym = SMUFL_E05C_cClef; - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); break; case C5 : sym = SMUFL_E05C_cClef; break; case perc : - b -= m_doc->m_drawingDoubleUnit[ staff->staffSize ]*2; + b -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 2; // FIXME sym = SMUFL_E05C_cClef; break; @@ -1137,73 +1307,75 @@ void View::DrawClef( DeviceContext *dc, LayerElement *element, Layer *layer, Sta break; } - bool cueSize = clef->m_cueSize; + bool cueSize = false; // force cue size for intermediate clefs - if (clef->GetFirstParent(&typeid(Layer))) cueSize = true; + if (clef->GetFirstParent( LAYER )) cueSize = true; if (!cueSize) - a -= m_doc->m_drawingUnit[staff->staffSize] * 2; + a -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; - DrawSmuflCode ( dc, a, b, sym, staff->staffSize, cueSize ); + DrawSmuflCode ( dc, a, b, sym, staff->m_drawingStaffSize, cueSize ); dc->EndGraphic(element, this ); } void View::DrawMeterSigFigures( DeviceContext *dc, int x, int y, int num, int numBase, Staff *staff) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staff ); int ynum, yden; std::wstring wtext; if (numBase) { - ynum = y - (m_doc->m_drawingUnit[staff->staffSize]*2); - yden = ynum - (m_doc->m_drawingDoubleUnit[staff->staffSize]*2); + ynum = y - (m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*2); + yden = ynum - (m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)*2); } else - ynum = y - (m_doc->m_drawingUnit[staff->staffSize]*4); + ynum = y - (m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*4); if (numBase > 9 || num > 9) { - x += m_doc->m_drawingUnit[staff->staffSize] * 2; + x += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; } - dc->SetFont( &m_doc->m_drawingSmuflFonts[staff->staffSize][0] ); + dc->SetFont(m_doc->GetDrawingSmuflFont(staff->m_drawingStaffSize, false)); wtext = IntToTimeSigFigures(num); - DrawSmuflString ( dc, x, ynum, wtext, 1, staff->staffSize); // '1' = centrer + DrawSmuflString ( dc, x, ynum, wtext, true, staff->m_drawingStaffSize); // true = center if (numBase) { wtext = IntToTimeSigFigures(numBase); - DrawSmuflString ( dc, x, yden, wtext, 1, staff->staffSize); // '1' = centrer + DrawSmuflString ( dc, x, yden, wtext, true, staff->m_drawingStaffSize); // '1' = center } dc->ResetFont(); - - return; } void View::DrawMeterSig( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Mensur" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); MeterSig *meterSig = dynamic_cast(element); + assert( meterSig ); dc->StartGraphic( element, "", element->GetUuid() ); - int y = staff->GetDrawingY() - (m_doc->m_drawingUnit[ staff->staffSize ]*4); + int y = staff->GetDrawingY() - (m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 4); int x = element->GetDrawingX(); if ( meterSig->GetSym() == METERSIGN_common ) { - DrawSmuflCode( dc, element->GetDrawingX(), y, SMUFL_E08A_timeSigCommon, staff->staffSize, false); - x += m_doc->m_drawingUnit[staff->staffSize] * 5; // step forward because we have a symbol + DrawSmuflCode( dc, element->GetDrawingX(), y, SMUFL_E08A_timeSigCommon, staff->m_drawingStaffSize, false); + x += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 5; // step forward because we have a symbol } else if ( meterSig->GetSym() == METERSIGN_cut ) { - DrawSmuflCode( dc, element->GetDrawingX(), y, SMUFL_E08B_timeSigCutCommon, staff->staffSize, false); - x += m_doc->m_drawingUnit[staff->staffSize] * 5; // step forward because we have a symbol + DrawSmuflCode( dc, element->GetDrawingX(), y, SMUFL_E08B_timeSigCutCommon, staff->m_drawingStaffSize, false); + x += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 5; // step forward because we have a symbol } else if (meterSig->GetCount()) { @@ -1211,7 +1383,6 @@ void View::DrawMeterSig( DeviceContext *dc, LayerElement *element, Layer *layer, } dc->EndGraphic(element, this ); - } bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjustHorizontally) @@ -1219,7 +1390,7 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust std::vector< std::vector > *accidSpace = &chord->m_accidSpace; //global drawing variables - int fullUnit = m_doc->m_drawingUnit[staff->staffSize]; + int fullUnit = m_doc->GetDrawingUnit(staff->m_drawingStaffSize); int halfUnit = fullUnit / 2; int accidHeight = ACCID_HEIGHT * halfUnit; @@ -1263,13 +1434,13 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust accidBot = accidTop + (accidHeightDiff * FLAT_BOTTOM_HEIGHT_MULTIPLIER); assert(accidBot < accidSpaceSize); while (currentX < xLength) { - if (accidSpace->at(accidTop + (ACCID_HEIGHT * FLAT_CORNER_HEIGHT_IGNORE))[currentX - accidWidthDiff]) currentX += 1; + if (accidSpace->at(accidTop + (ACCID_HEIGHT * FLAT_CORNER_HEIGHT_IGNORE)).at(currentX - accidWidthDiff)) currentX += 1; // just in case else if (currentX - accidWidthDiff + (ACCID_WIDTH * FLAT_CORNER_WIDTH_IGNORE) >= xLength ) break; - else if (accidSpace->at(accidTop)[currentX - accidWidthDiff + (ACCID_WIDTH * FLAT_CORNER_WIDTH_IGNORE)]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidTop)[currentX]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX]) currentX += 1; + else if (accidSpace->at(accidTop).at(currentX - accidWidthDiff + (ACCID_WIDTH * FLAT_CORNER_WIDTH_IGNORE))) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidTop).at(currentX)) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX)) currentX += 1; else break; }; } @@ -1280,15 +1451,15 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust //Midpoint needs to be checked for non-flats as there's a chance that a natural/sharp could completely overlap a flat int accidMid = accidTop + (accidBot - accidTop) / 2; while (currentX < xLength) { - if (accidSpace->at(accidTop + (ACCID_HEIGHT * NATURAL_CORNER_HEIGHT_IGNORE))[currentX - accidWidthDiff]) currentX += 1; + if (accidSpace->at(accidTop + (ACCID_HEIGHT * NATURAL_CORNER_HEIGHT_IGNORE)).at(currentX - accidWidthDiff)) currentX += 1; // just in case else if (currentX - accidWidthDiff + (ACCID_WIDTH * NATURAL_CORNER_WIDTH_IGNORE) >= xLength ) break; - else if (accidSpace->at(accidTop)[currentX - accidWidthDiff + (ACCID_WIDTH * NATURAL_CORNER_WIDTH_IGNORE)]) currentX += 1; - else if (accidSpace->at(accidMid)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidTop)[currentX]) currentX += 1; - else if (accidSpace->at(accidMid)[currentX]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX]) currentX += 1; + else if (accidSpace->at(accidTop).at(currentX - accidWidthDiff + (ACCID_WIDTH * NATURAL_CORNER_WIDTH_IGNORE))) currentX += 1; + else if (accidSpace->at(accidMid).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidTop).at(currentX)) currentX += 1; + else if (accidSpace->at(accidMid).at(currentX)) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX)) currentX += 1; else break; }; } @@ -1298,12 +1469,12 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust //Midpoint needs to be checked for non-flats as there's a chance that a natural/sharp could completely overlap a flat int accidMid = accidTop + (accidBot - accidTop) / 2; while (currentX < xLength) { - if (accidSpace->at(accidTop)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidMid)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidTop)[currentX]) currentX += 1; - else if (accidSpace->at(accidMid)[currentX]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX]) currentX += 1; + if (accidSpace->at(accidTop).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidMid).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidTop).at(currentX)) currentX += 1; + else if (accidSpace->at(accidMid).at(currentX)) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX)) currentX += 1; else break; }; } @@ -1315,12 +1486,12 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust int accidMid = accidTop + (accidBot - accidTop) / 2; assert(accidMid < accidSpaceSize); while (currentX < xLength) { - if (accidSpace->at(accidTop)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidMid)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX - accidWidthDiff]) currentX += 1; - else if (accidSpace->at(accidTop)[currentX]) currentX += 1; - else if (accidSpace->at(accidMid)[currentX]) currentX += 1; - else if (accidSpace->at(accidBot)[currentX]) currentX += 1; + if (accidSpace->at(accidTop).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidMid).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX - accidWidthDiff)) currentX += 1; + else if (accidSpace->at(accidTop).at(currentX)) currentX += 1; + else if (accidSpace->at(accidMid).at(currentX)) currentX += 1; + else if (accidSpace->at(accidBot).at(currentX)) currentX += 1; else break; }; } @@ -1332,7 +1503,7 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust int yComp = accidTop - alignmentThreshold; assert(yComp < accidSpaceSize); assert(yComp >= 0); - if((accidSpace->at(yComp)[currentX + 1] == false) && (accidSpace->at(yComp)[currentX] == true)) currentX += 1; + if((accidSpace->at(yComp).at(currentX + 1) == false) && (accidSpace->at(yComp).at(currentX) == true)) currentX += 1; } //If the accidental is lined up with the one below it, move it left by a halfunit to avoid visual confusion @@ -1342,7 +1513,7 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust int yComp = accidBot; assert(yComp < accidSpaceSize); assert(yComp >= 0); - if((accidSpace->at(yComp)[currentX + 1] == false) && (accidSpace->at(yComp)[currentX] == true)) currentX += 1; + if((accidSpace->at(yComp).at(currentX + 1) == false) && (accidSpace->at(yComp).at(currentX) == true)) currentX += 1; } //Just to make sure. @@ -1394,19 +1565,46 @@ bool View::CalculateAccidX(Staff *staff, Accid *accid, Chord *chord, bool adjust void View::DrawAccid( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure, Accid *prevAccid ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Symbol" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Accid *accid = dynamic_cast(element); + assert( accid ); + dc->StartGraphic( element, "", element->GetUuid() ); // Parent will be NULL if we are drawing a note @accid (see DrawNote) - the y value is already set if ( accid->m_parent ) { - //accid->SetDrawingY( accid->GetDrawingY() + CalculatePitchPosY( staff, accid->GetPloc(), layer->GetClefOffset( accid ), accid->GetOloc()) ); + accid->SetDrawingY( accid->GetDrawingY() + CalculatePitchPosY( staff, accid->GetPloc(), layer->GetClefOffset( accid ), accid->GetOloc()) ); + accid->m_drawingCueSize = accid->IsCueSize(); + } + + /************** editorial accidental **************/ + + if ( accid->GetFunc() == FUNC_edit ) { + // position is currently only above the staff + int y = staff->GetDrawingY(); + // look at the note position and adjust it if necessary + Note *note = dynamic_cast( accid->GetFirstParent( NOTE, MAX_ACCID_DEPTH ) ); + if ( note ) { + if ( note->GetDrawingY() > y ) { + y = note->GetDrawingY() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + } + if ( (note->GetDrawingStemDir() == STEMDIRECTION_up) && (note->m_drawingStemEnd.y > y )) { + y = note->m_drawingStemEnd.y; + } + + // adjust the x position so it is centered + int radius = m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staff->m_drawingStaffSize, accid->m_drawingCueSize); + if ( note->GetActualDur() < DUR_2 ) radius += radius/3; + accid->SetDrawingX( accid->GetDrawingX() + radius / 2 ); + } + accid->SetDrawingY( y + TEMP_STYLE_ACCID_EDIT_SPACE * m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / PARAM_DENOMINATOR ); } - // Get the offset int x = accid->GetDrawingX(); int y = accid->GetDrawingY(); @@ -1432,8 +1630,8 @@ void View::DrawAccid( DeviceContext *dc, LayerElement *element, Layer *layer, St // mensural notation if (staff->notAnc) { symc = SMUFL_E262_accidentalSharp; - DrawSmuflCode ( dc, x, y, symc, staff->staffSize, accid->m_cueSize ); - y += 7*m_doc->m_drawingUnit[staff->staffSize]; // LP + DrawSmuflCode ( dc, x, y, symc, staff->m_drawingStaffSize, accid->m_drawingCueSize ); + y += 7*m_doc->GetDrawingUnit(staff->m_drawingStaffSize); // LP } else { symc = SMUFL_E263_accidentalDoubleSharp; break; @@ -1446,15 +1644,18 @@ void View::DrawAccid( DeviceContext *dc, LayerElement *element, Layer *layer, St default : break; } - DrawSmuflCode ( dc, x, y, symc, staff->staffSize, accid->m_cueSize ); + DrawSmuflCode ( dc, x, y, symc, staff->m_drawingStaffSize, accid->m_drawingCueSize ); dc->EndGraphic(element, this ); } -void View::DrawSpace(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) { - - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" +void View::DrawSpace(DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure) +{ + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); dc->StartGraphic( element, "", element->GetUuid() ); dc->DrawPlaceholder( ToDeviceContextX( element->GetDrawingX() ), ToDeviceContextY( element->GetDrawingY() ) ); @@ -1463,11 +1664,15 @@ void View::DrawSpace(DeviceContext *dc, LayerElement *element, Layer *layer, Sta void View::DrawCustos( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Symbol" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Custos *custos = dynamic_cast(element); + assert( custos ); + dc->StartGraphic( element, "", element->GetUuid() ); element->SetDrawingY( element->GetDrawingY() + CalculatePitchPosY( staff, custos->GetPloc(), layer->GetClefOffset( element ), custos->GetOloc()) ); @@ -1475,22 +1680,25 @@ void View::DrawCustos( DeviceContext *dc, LayerElement *element, Layer *layer, S int x = element->GetDrawingX(); int y = element->GetDrawingY(); - y -= m_doc->m_drawingUnit[staff->staffSize] - m_doc->m_drawingUnit[staff->staffSize]/4; // LP - correction in 2.0.0 + y -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize) - m_doc->GetDrawingUnit(staff->m_drawingStaffSize)/4; // LP - correction in 2.0.0 // HARDCODED (smufl code wrong) - DrawSmuflCode( dc, x, y, 35, staff->staffSize, custos->m_cueSize ); + DrawSmuflCode( dc, x, y, 35, staff->m_drawingStaffSize, false ); - dc->EndGraphic(element, this ); //RZ - + dc->EndGraphic(element, this ); } void View::DrawDot( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Symbol" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Dot *dot = dynamic_cast(element); + assert( dot ); + dc->StartGraphic( element, "", element->GetUuid() ); element->SetDrawingY( element->GetDrawingY() + CalculatePitchPosY( staff, dot->GetPloc(), layer->GetClefOffset( element ), dot->GetOloc()) ); @@ -1500,15 +1708,51 @@ void View::DrawDot( DeviceContext *dc, LayerElement *element, Layer *layer, Staf // Use the note to which the points to for position if ( dot->m_drawingNote ) { - x = dot->m_drawingNote->GetDrawingX() + m_doc->m_drawingUnit[staff->staffSize]*7/2; + x = dot->m_drawingNote->GetDrawingX() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*7/2; y = dot->m_drawingNote->GetDrawingY(); } DrawDots( dc, x, y, 1, staff ); dc->EndGraphic(element, this ); +} + + +void View::DrawProport( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) +{ + assert(layer); // Pointer to layer cannot be NULL" + assert(staff); // Pointer to staff cannot be NULL" + assert(dynamic_cast(element)); // Element must be a Mensur" + + int x1, x2, y1, y2; + + Proport *proport = dynamic_cast(element); + + dc->StartGraphic( element, "", element->GetUuid() ); + + int y = staff->GetDrawingY() - (m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*4); + int x = element->GetDrawingX(); + + x1 = x+120; x2 = x1+150; // ??TEST: JUST DRAW AN ARBITRARY RECTANGLE + y1 = y; y2 = y+50+(50*proport->GetNum()); + //DrawFullRectangle( dc,x1,y1,x2,y2); + DrawPartFullRectangle( dc,x1,y1,x2,y2, 0); + if (proport->HasNum()) + { + x = element->GetDrawingX(); + //if (proport->GetSign() || proport->HasTempus()) // ??WHAT SHOULD THIS BE? + { + x += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 5; // step forward because we have a sign or a meter symbol + } + int numbase = proport->HasNumbase() ? proport->GetNumbase() : 0; + DrawMeterSigFigures ( dc, x, staff->GetDrawingY(), proport->GetNum(), numbase, staff); + } + + + dc->EndGraphic(element, this ); } + int View::GetSylY( Syl *syl, Staff *staff ) { @@ -1516,7 +1760,8 @@ int View::GetSylY( Syl *syl, Staff *staff ) int y = syl->GetStart()->GetDrawingY(); if (staff->GetAlignment() ) { - y = staff->GetDrawingY() + staff->GetAlignment()->GetMaxHeight() - syl->m_drawingVerse * m_doc->m_drawingUnit[staff->staffSize] * 4; + y = staff->GetDrawingY() + staff->GetAlignment()->GetMaxHeight() - + syl->m_drawingVerse * TEMP_STYLE_LYIRC_LINE_SPACE * m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / PARAM_DENOMINATOR; } return y; } @@ -1524,6 +1769,7 @@ int View::GetSylY( Syl *syl, Staff *staff ) void View::DrawSyl( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { Syl *syl = dynamic_cast(element); + assert( syl ); if ( !syl->GetStart() ) { LogDebug("Syl parent note was not found"); @@ -1531,7 +1777,7 @@ void View::DrawSyl( DeviceContext *dc, LayerElement *element, Layer *layer, Staf } // move the position back - to be updated HARDCODED also see View::DrawSylConnector and View::DrawSylConnectorLines - syl->SetDrawingX( syl->GetStart()->GetDrawingX() - m_doc->m_drawingUnit[staff->staffSize] * 2 ); + syl->SetDrawingX( syl->GetStart()->GetDrawingX() - m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2 ); syl->SetDrawingY( GetSylY(syl, staff) ); dc->StartGraphic( syl, "", syl->GetUuid() ); @@ -1540,21 +1786,21 @@ void View::DrawSyl( DeviceContext *dc, LayerElement *element, Layer *layer, Staf FontInfo currentFont; if (syl->HasFontstyle()) { - currentFont = m_doc->m_drawingLyricFonts[ staff->staffSize ]; + currentFont = *m_doc->GetDrawingLyricFont(staff->m_drawingStaffSize); currentFont.SetStyle(syl->GetFontstyle()); dc->SetFont(¤tFont); } else { - dc->SetFont( &m_doc->m_drawingLyricFonts[ staff->staffSize ] ); + dc->SetFont( m_doc->GetDrawingLyricFont(staff->m_drawingStaffSize) ); } - DrawLyricString(dc, syl->GetDrawingX(), syl->GetDrawingY(), syl->GetText().c_str(), staff->staffSize ); + DrawLyricString(dc, syl->GetDrawingX(), syl->GetDrawingY(), syl->GetText().c_str(), staff->m_drawingStaffSize ); dc->ResetFont(); dc->ResetBrush(); if (syl->GetStart() && syl->GetEnd()) { - System *currentSystem = dynamic_cast( measure->GetFirstParent( &typeid(System) ) ); + System *currentSystem = dynamic_cast( measure->GetFirstParent( SYSTEM ) ); // Postpone the drawing of the syl to the end of the system; this will call DrawSylConnector // that will look if the last note is in the same system (or not) and draw the connectors accordingly if (currentSystem) { @@ -1563,100 +1809,18 @@ void View::DrawSyl( DeviceContext *dc, LayerElement *element, Layer *layer, Staf } dc->EndGraphic(syl, this ); - -} - -void View::DrawSylConnector( DeviceContext *dc, Syl *syl, int x1, int x2, Staff *staff, char spanningType, DocObject *graphic ) -{ - assert( syl->GetStart() && syl->GetEnd()); - if ( !syl->GetStart() || !syl->GetEnd()) return; - - int y = GetSylY(syl, staff); - int w, h; - - // The both correspond to the current system, which means no system break in-between (simple case) - if ( spanningType == SPANNING_START_END ) { - dc->SetFont( &m_doc->m_drawingLyricFonts[ staff->staffSize ] ); - dc->GetTextExtent(syl->GetText(), &w, &h); - dc->ResetFont(); - // x position of the syl is two units back - x1 += w - m_doc->m_drawingUnit[staff->staffSize] * 2; - } - // Only the first parent is the same, this means that the syl is "open" at the end of the system - else if ( spanningType == SPANNING_START) { - dc->SetFont( &m_doc->m_drawingLyricFonts[ staff->staffSize ] ); - dc->GetTextExtent(syl->GetText(), &w, &h); - dc->ResetFont(); - // idem - x1 += w - m_doc->m_drawingUnit[staff->staffSize] * 2; - - } - // We are in the system of the last note - draw the connector from the beginning of the system - else if ( spanningType == SPANNING_END ) { - // nothing to adjust - } - // Rare case where neither the first note and the last note are in the current system - draw the connector throughout the system - else { - // nothing to adjust - } - - if ( graphic ) dc->ResumeGraphic(graphic, graphic->GetUuid()); - else dc->StartGraphic(syl, "spanning-connector", ""); - dc->DeactivateGraphic(); - DrawSylConnectorLines( dc, x1, x2, y, syl, staff); - dc->ReactivateGraphic(); - if ( graphic ) dc->EndResumedGraphic(graphic, this); - else dc->EndGraphic(syl, this); - -} - -void View::DrawSylConnectorLines( DeviceContext *dc, int x1, int x2, int y, Syl *syl, Staff *staff ) -{ - if (syl->GetCon() == CON_d) { - - y += m_doc->m_drawingUnit[staff->staffSize] * 2 / 3; - // x position of the syl is two units back - x2 -= 2 * (int)m_doc->m_drawingUnit[staff->staffSize]; - - //if ( x1 > x2 ) { - // DrawFullRectangle(dc, x1, y + 2* m_doc->m_style->m_barlineWidth, x2, y + 3 * m_doc->m_style->m_barlineWidth); - // LogDebug("x1 > x2 (%d %d)", x1, x2 ); - //} - - // the length of the dash and the space between them - can be made a parameter - int dashLength = m_doc->m_drawingUnit[staff->staffSize] * 4 / 3; - int dashSpace = m_doc->m_drawingStaffSize[staff->staffSize] * 5 / 3; - int halfDashLength = dashLength / 2; - - int dist = x2 - x1; - int nbDashes = dist / dashSpace; - - int margin = dist / 2; - // at least one dash - if (nbDashes < 2) { - nbDashes = 1; - } - else { - margin = (dist - ((nbDashes - 1) * dashSpace)) / 2; - } - margin -= dashLength / 2; - int i, x; - for (i = 0; i < nbDashes; i++) { - x = x1 + margin + (i * dashSpace); - DrawFullRectangle(dc, x - halfDashLength, y, x + halfDashLength, y + m_doc->m_style->m_barlineWidth); - } - - } - else if (syl->GetCon() == CON_u) { - x1 += (int)m_doc->m_drawingUnit[staff->staffSize] / 2; - DrawFullRectangle(dc, x1, y, x2, y + m_doc->m_style->m_barlineWidth); - } - } void View::DrawVerse( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); + Verse *verse = dynamic_cast(element); + assert( verse ); dc->StartGraphic( verse, "", verse->GetUuid() ); @@ -1668,189 +1832,116 @@ void View::DrawVerse( DeviceContext *dc, LayerElement *element, Layer *layer, St void View::DrawKeySig( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); - KeySig *ks = dynamic_cast(element); - - if (ks->GetAlterationNumber()==0) { - return; - } + KeySig *keySig = dynamic_cast(element); + assert( keySig ); int symb; - int x, y; + int x, y, i; Clef *c = layer->GetClef(element); if (!c) { + keySig->SetEmptyBB(); return; } - dc->StartGraphic( element, "", element->GetUuid() ); - - for (int i = 0; i < ks->GetAlterationNumber(); i++) { - - // HARDCODED - x = element->GetDrawingX() + (m_doc->m_drawingAccidWidth[staff->staffSize][0] * 1.2) * i; - y = staff->GetDrawingY() + CalculatePitchPosY( staff, ks->GetAlterationAt(i), layer->GetClefOffset( element ), ks->GetOctave(ks->GetAlterationAt(i), c->GetClefId()));; - - if (ks->GetAlteration() == ACCID_FLAT) - symb = SMUFL_E260_accidentalFlat; - else - symb = SMUFL_E262_accidentalSharp; - - DrawSmuflCode ( dc, x, y, symb, staff->staffSize, false ); - } - - dc->EndGraphic(element, this ); //RZ - -} - -void View::DrawTie( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) -{ - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element) || dynamic_cast(element)); // The element must be a tie - - bool up = false; - LayerElement *note1 = NULL; - LayerElement *note2 = NULL; - - // coordinates for the tie/slur - int x1, x2, y1, y2; - up = true; - data_STEMDIRECTION noteStemDir = STEMDIRECTION_NONE; - - Tie *tie = dynamic_cast(element); - Slur *slur = dynamic_cast(element); - if ( tie ) { - note1 = tie->GetStart(); - note2 = tie->GetEnd(); - } else if ( slur ) { - note1 = slur->GetStart(); - note2 = slur->GetEnd(); + // hidden key signature + if (!keySig->m_drawingShow) { + keySig->SetEmptyBB(); + return; } - if ( !note1 && !note2 ) { - // no note, obviously nothing to do... + // C major (0) key sig and no cancellation + else if ((keySig->GetAlterationNumber() == 0) && (keySig->m_drawingCancelAccidCount == 0)) { + keySig->SetEmptyBB(); return; } - - System *currentSystem = dynamic_cast( staff->GetFirstParent( &typeid(System) ) ); - System *parentSystem1 = NULL; - System *parentSystem2 = NULL; - // In order to know if we are drawing a normal tie or a tie splitted over two systems, we need - // to look at the parent system of each note. - if ( note1 ) { - parentSystem1 = dynamic_cast( note1->GetFirstParent( &typeid(System) ) ); - } - if ( note2 ) { - parentSystem2 = dynamic_cast( note2->GetFirstParent( &typeid(System) ) ); - } - - // This is the case when the tie is split over two system of two pages. - // In this case, we are now drawing its beginning to the end of the measure (i.e., the last aligner) - if ( parentSystem2 && currentSystem && ( parentSystem2 != currentSystem) ) { - Alignment *nextAlignement = note1->GetAlignment(); - while (nextAlignement) { - if (nextAlignement->GetType() == ALIGNMENT_MEASURE_END) break; - nextAlignement = dynamic_cast(nextAlignement->GetNextSibling()); - } - if (!nextAlignement) { - return; - } - y1 = y2 = note1->GetDrawingY(); - x1 = note1->GetDrawingX(); - x2 = measure->GetDrawingX() + nextAlignement->GetXRel(); - assert(dynamic_cast(note1)); - noteStemDir = dynamic_cast(note1)->m_drawingStemDir; - //DrawTieOrSlurBezier(dc, note1->GetDrawingX(), y - 14, x2, y - 14, true); - } - // Now this is the case when the tie is split but we are drawing the end of it - else if ( parentSystem1 && currentSystem && ( parentSystem1 != currentSystem) ) { - Alignment *previousAlignement = note2->GetAlignment(); - while (previousAlignement) { - if (previousAlignement->GetType() != ALIGNMENT_DEFAULT) break; - previousAlignement = dynamic_cast(previousAlignement->GetPreviousSibling()); - } - if (!previousAlignement) { - return; + dc->StartGraphic( element, "", element->GetUuid() ); + + x = element->GetDrawingX(); + // HARDCODED + int step = m_doc->GetGlyphWidth(SMUFL_E262_accidentalSharp, staff->m_drawingStaffSize, false) * 1.3; + + // Show cancellation if C major (0) or if any cancellation and show cancellation (showchange) is true (false by default) + if ( (keySig->GetAlterationNumber() == 0) || (layer->DrawKeySigCancellation() && keySig->m_drawingShowchange) ) { + // The type of alteration is different (f/s or f/n or s/n) - cancel all accid in the normal order + if (keySig->GetAlterationType() != keySig->m_drawingCancelAccidType) { + for (i = 0; i < keySig->m_drawingCancelAccidCount; i++) { + data_PITCHNAME pitch = KeySig::GetAlterationAt( keySig->m_drawingCancelAccidType, i); + y = staff->GetDrawingY() + CalculatePitchPosY( staff, pitch, layer->GetClefOffset( element ), + KeySig::GetOctave( keySig->m_drawingCancelAccidType, pitch, c->GetClefId()));; + + DrawSmuflCode ( dc, x, y, SMUFL_E261_accidentalNatural, staff->m_drawingStaffSize, false ); + x += step; + } } - y1 = y2 = note2->GetDrawingY(); - x2 = note2->GetDrawingX(); - x1 = x2 - m_doc->m_drawingDoubleUnit[ staff->staffSize ]; - assert(dynamic_cast(note2)); - noteStemDir = dynamic_cast(note2)->m_drawingStemDir; - //DrawTieOrSlurBezier(dc, x1, y - 14, note2->GetDrawingX(), y - 14, true); - } - // Finally the normal case - else { - assert( note1 && note2 ); - // Copied from DrawNote - // We could use the stamDir information - // but then we have to take in account (1) beams (2) stemmed and non stemmed notes tied together - y1 = note1->GetDrawingY(); - y2 = note2->GetDrawingY(); - x1 = note1->GetDrawingX(); - x2 = note2->GetDrawingX(); - assert(dynamic_cast(note1)); - // for now we only look at the first note - needs to be improved - // m_drawingStemDir it not set properly in beam - needs to be fixed. - noteStemDir = dynamic_cast(note1)->m_drawingStemDir; - /* - assert(dynamic_cast(note2)); - if (dynamic_cast(note2)->m_drawingStemDir != noteStemDir) { - LogDebug("Diverging stem directions (%d;%d)", noteStemDir, dynamic_cast(note2)->m_drawingStemDir); + // Cancel some of them if more accid before + else if (keySig->GetAlterationNumber() < keySig->m_drawingCancelAccidCount) { + for (i = keySig->GetAlterationNumber(); i < keySig->m_drawingCancelAccidCount; i++) { + data_PITCHNAME pitch = KeySig::GetAlterationAt( keySig->m_drawingCancelAccidType, i); + y = staff->GetDrawingY() + CalculatePitchPosY( staff, pitch, layer->GetClefOffset( element ), + KeySig::GetOctave( keySig->m_drawingCancelAccidType, pitch, c->GetClefId()));; + + DrawSmuflCode ( dc, x, y, SMUFL_E261_accidentalNatural, staff->m_drawingStaffSize, false ); + x += step; + } } - */ - } - - assert( dynamic_cast(note1)); - if (noteStemDir == STEMDIRECTION_up) { - up = false; - } - else if (noteStemDir == STEMDIRECTION_NONE) { - // no information from the note stem directions, look at the position in the notes - int center = staff->GetDrawingY() - m_doc->m_drawingDoubleUnit[staff->staffSize] * 2; - up = (y1 > center) ? true : false; } - // FIXME, take in account elements that can be netween notes, eg keys time etc - // 20 height nice with 70, not nice with 50 - // Also remove HARDCODED values! - if (up) { - y1 += m_doc->m_drawingUnit[staff->staffSize] * 1.6; - y2 += m_doc->m_drawingUnit[staff->staffSize] * 1.6; - } - else { - y1 -= m_doc->m_drawingUnit[staff->staffSize] * 1.6; - y2 -= m_doc->m_drawingUnit[staff->staffSize] * 1.6; + for (i = 0; i < keySig->GetAlterationNumber(); i++) { + data_PITCHNAME pitch = KeySig::GetAlterationAt( keySig->GetAlterationType(), i); + y = staff->GetDrawingY() + CalculatePitchPosY( staff, pitch, layer->GetClefOffset( element ), + KeySig::GetOctave( keySig->GetAlterationType(), pitch, c->GetClefId()));; + + if (keySig->GetAlterationType() == ACCIDENTAL_EXPLICIT_f) symb = SMUFL_E260_accidentalFlat; + else symb = SMUFL_E262_accidentalSharp; + + DrawSmuflCode ( dc, x, y, symb, staff->m_drawingStaffSize, false ); + x += step; } - dc->StartGraphic( element, "", element->GetUuid() ); - dc->DeactivateGraphic(); - DrawTieOrSlurBezier(dc, x1, y1, x2, y2, !up); - dc->ReactivateGraphic(); dc->EndGraphic(element, this ); - - } -void View::DrawAcciaccaturaSlash(DeviceContext *dc, LayerElement *element) { - +void View::DrawAcciaccaturaSlash(DeviceContext *dc, LayerElement *element) +{ Note *note = dynamic_cast(element); + assert( note ); + + Staff *staff = dynamic_cast( note->GetFirstParent( STAFF ) ); + assert( staff ); if (note->GetActualDur() < DUR_8) return; - dc->SetPen(AxBLACK, 2, AxSOLID); + dc->SetPen(AxBLACK, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize), AxSOLID); dc->SetBrush( AxBLACK, AxSOLID ); + int positionShift = m_doc->GetGraceSize(m_doc->GetDrawingUnit(staff->m_drawingStaffSize)); + int positionShiftX1 = positionShift * 3 / 2; + int positionShiftY1 = positionShift * 2; + int positionShiftX2 = positionShift * 3; + int positionShiftY2 = positionShift * 6; + // HARDCODED - if (element->m_drawingStemDir) - dc->DrawLine(element->m_drawingStemStart.x - 10, ToDeviceContextY(element->m_drawingStemStart.y + 10), element->m_drawingStemStart.x + 20, ToDeviceContextY(element->m_drawingStemStart.y + 40)); - else - dc->DrawLine(element->m_drawingStemStart.x - 10, ToDeviceContextY(element->m_drawingStemStart.y - 10), element->m_drawingStemStart.x + 20, ToDeviceContextY(element->m_drawingStemStart.y - 40)); + if (element->m_drawingStemDir == STEMDIRECTION_up) { + dc->DrawLine( + ToDeviceContextX(element->m_drawingStemStart.x - positionShiftX1 ), + ToDeviceContextY(element->m_drawingStemStart.y + positionShiftY1), + ToDeviceContextX(element->m_drawingStemStart.x + positionShiftX2), + ToDeviceContextY(element->m_drawingStemStart.y + positionShiftY2)); + } else { + dc->DrawLine(ToDeviceContextX(element->m_drawingStemStart.x - positionShiftX1), + ToDeviceContextY(element->m_drawingStemStart.y - positionShiftY1), + ToDeviceContextX(element->m_drawingStemStart.x + positionShiftX2), + ToDeviceContextY(element->m_drawingStemStart.y - positionShiftY2)); + } dc->ResetPen(); dc->ResetBrush(); @@ -1861,17 +1952,18 @@ void View::DrawAcciaccaturaSlash(DeviceContext *dc, LayerElement *element) { note - for breves and semibreves, only above the staff - for flagged notes, the fermata is on the side of the notehead */ -void View::DrawFermata(DeviceContext *dc, LayerElement *element, Staff *staff) { +void View::DrawFermata(DeviceContext *dc, LayerElement *element, Staff *staff) +{ int x, y; int emb_offset = 0; // if there is and embellishment, offset the note up - // We position the fermata in the same horizontal pos. of th object - // but it shoud be moved according to half of the fermata size - x = element->GetDrawingX() - m_doc->m_drawingDoubleUnit[staff->staffSize]; + // We move the fermata position of half of the fermata size + x = element->GetDrawingX() - m_doc->GetGlyphWidth(SMUFL_E4C0_fermataAbove, staff->m_drawingStaffSize, false) / 2; // First case, notes - if (dynamic_cast(element)) { + if (element->Is() == NOTE) { Note *note = dynamic_cast(element); + assert( note ); /* // stem down or semibreve/longa, fermata up! @@ -1879,58 +1971,59 @@ void View::DrawFermata(DeviceContext *dc, LayerElement *element, Staff *staff) { */ // only for up-fermatas, if there is a trill on the same note if (note->m_embellishment) - emb_offset = m_doc->m_drawingDoubleUnit[staff->staffSize]; + emb_offset = m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); // check that the notehead is in the staff. if ((element->GetDrawingY()) < staff->GetDrawingY()) // in the staff, set the fermata 20 pixels above the last line (+ embellishment offset) - y = staff->GetDrawingY() + m_doc->m_drawingUnit[staff->staffSize] + emb_offset; + y = staff->GetDrawingY() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) + emb_offset; else // out of the staff, place the trill above the notehead - y = (element->GetDrawingY()) + m_doc->m_drawingUnit[staff->staffSize] + emb_offset; + y = (element->GetDrawingY()) + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) + emb_offset; // draw the up-fermata - DrawSmuflCode ( dc, x, y, SMUFL_E4C0_fermataAbove, staff->staffSize, false ); + DrawSmuflCode ( dc, x, y, SMUFL_E4C0_fermataAbove, staff->m_drawingStaffSize, false ); /* } else { // stem up fermata down // This works as above, only we check that the note head is not // UNDER the staff - if ((element->GetDrawingY()) > (staff->GetDrawingY() - m_doc->m_drawingStaffSize[staff->staffSize])) + if ((element->GetDrawingY()) > (staff->GetDrawingY() - m_doc->m_drawingStaffSize.at(staff->m_drawingStaffSize))) // notehead in staff, set under - y = staff->GetDrawingY() - m_doc->m_drawingStaffSize[staff->staffSize] - m_doc->m_drawingDoubleUnit[staff->staffSize]; + y = staff->GetDrawingY() - m_doc->m_drawingStaffSize.at(staff->m_drawingStaffSize) - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); else // notehead under staff, set under notehead - y = (element->GetDrawingY()) - m_doc->m_drawingDoubleUnit[staff->staffSize]; + y = (element->GetDrawingY()) - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); DrawSmuflCode ( dc, x, y, LEIPZIG_FERMATA_DOWN, staff, false ); } */ - } else if (dynamic_cast(element)) { + } else if (element->Is() == REST) { // this is a rest // rests for the moment are always in the staff // so just place the fermata above the staff - y = staff->GetDrawingY() + m_doc->m_drawingDoubleUnit[staff->staffSize]; - DrawSmuflCode ( dc, x, y, SMUFL_E4C0_fermataAbove, staff->staffSize, false ); + y = staff->GetDrawingY() + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); + DrawSmuflCode ( dc, x, y, SMUFL_E4C0_fermataAbove, staff->m_drawingStaffSize, false ); } } // Draw a trill above the notehead // This function works as the up-fermata portion of DrawFermata // if there are many symbols to draw we could make a generalized function -void View::DrawTrill(DeviceContext *dc, LayerElement *element, Staff *staff) { +void View::DrawTrill(DeviceContext *dc, LayerElement *element, Staff *staff) +{ int x, y; // It shoud be moved according to half of the trill size - x = element->GetDrawingX() - m_doc->m_drawingAccidWidth[staff->staffSize][element->m_cueSize]; + x = element->GetDrawingX() - m_doc->GetGlyphWidth(SMUFL_E566_ornamentTrill, staff->m_drawingStaffSize, false); // HARDCODED if ((element->GetDrawingY()) < staff->GetDrawingY()) - y = staff->GetDrawingY() + m_doc->m_drawingDoubleUnit[staff->staffSize]; + y = staff->GetDrawingY() + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); else - y = (element->GetDrawingY()) + m_doc->m_drawingDoubleUnit[staff->staffSize]; + y = (element->GetDrawingY()) + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); - DrawSmuflCode ( dc, x, y, SMUFL_E566_ornamentTrill, staff->staffSize, false ); + DrawSmuflCode ( dc, x, y, SMUFL_E566_ornamentTrill, staff->m_drawingStaffSize, false ); } } // namespace vrv diff --git a/src/view_floating.cpp b/src/view_floating.cpp new file mode 100644 index 00000000000..7ef3eb4bb98 --- /dev/null +++ b/src/view_floating.cpp @@ -0,0 +1,746 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: view_floating.cpp +// Author: Laurent Pugin +// Created: 2015 +// Copyright (c) Authors and others. All rights reserved. +///////////////////////////////////////////////////////////////////////////// + + +#include "view.h" + +//---------------------------------------------------------------------------- + +#include +#include +#include + +//---------------------------------------------------------------------------- + +#include "att_comparison.h" +#include "bboxdevicecontext.h" +#include "devicecontext.h" +#include "doc.h" +#include "floatingelement.h" +#include "layer.h" +#include "layerelement.h" +#include "measure.h" +#include "note.h" +#include "slur.h" +#include "staff.h" +#include "style.h" +#include "syl.h" +#include "system.h" +#include "tie.h" +#include "timeinterface.h" +#include "vrv.h" + +namespace vrv { + +//---------------------------------------------------------------------------- +// View - FloatingElement +//---------------------------------------------------------------------------- + +void View::DrawFloatingElement( DeviceContext *dc, FloatingElement *element, Measure *measure, System *system) +{ + assert( dc ); + assert( system ); + assert( measure ); + assert( element ); + + if (element->HasInterface(INTERFACE_TIME_SPANNING)) { + // creating placeholder + dc->StartGraphic( element, "", element->GetUuid() ); + dc->EndGraphic( element, this); + system->AddToDrawingList(element); + } +} + +void View::DrawTimeSpanningElement( DeviceContext *dc, DocObject *element, System *system ) +{ + assert( dc ); + assert( element ); + assert( system ); + + TimeSpanningInterface *interface = dynamic_cast(element); + assert( interface ); + + if ( !interface->HasStartAndEnd() ) return; + + // Get the parent system of the first and last note + System *parentSystem1 = dynamic_cast( interface->GetStart()->GetFirstParent( SYSTEM ) ); + System *parentSystem2 = dynamic_cast( interface->GetEnd()->GetFirstParent( SYSTEM ) ); + + int x1, x2; + Staff *staff = NULL; + DocObject *graphic = NULL; + char spanningType = SPANNING_START_END; + + // The both correspond to the current system, which means no system break in-between (simple case) + if (( system == parentSystem1 ) && ( system == parentSystem2 )) { + // Get the parent staff for calculating the y position + staff = dynamic_cast( interface->GetStart()->GetFirstParent( STAFF ) ); + if ( !Check( staff ) ) return; + + x1 = interface->GetStart()->GetDrawingX(); + x2 = interface->GetEnd()->GetDrawingX(); + graphic = element; + } + // Only the first parent is the same, this means that the element is "open" at the end of the system + else if ( system == parentSystem1 ) { + // We need the last measure of the system for x2 + Measure *last = dynamic_cast( system->FindChildByType( MEASURE, 1, BACKWARD ) ); + if ( !Check( last ) ) return; + staff = dynamic_cast( interface->GetStart()->GetFirstParent( STAFF ) ); + if ( !Check( staff ) ) return; + + x1 = interface->GetStart()->GetDrawingX(); + x2 = last->GetDrawingX() + last->GetRightBarlineX(); + graphic = element; + spanningType = SPANNING_START; + } + // We are in the system of the last note - draw the element from the beginning of the system + else if ( system == parentSystem2 ) { + // We need the first measure of the system for x1 + Measure *first = dynamic_cast( system->FindChildByType( MEASURE, 1, FORWARD ) ); + if ( !Check( first ) ) return; + // Get the staff of the first note - however, not the staff we need + Staff *lastStaff = dynamic_cast( interface->GetEnd()->GetFirstParent( STAFF ) ); + if ( !Check( lastStaff ) ) return; + // We need the first staff from the current system, i.e., the first measure. + AttCommonNComparison comparison( STAFF, lastStaff->GetN() ); + staff = dynamic_cast(system->FindChildByAttComparison(&comparison, 2)); + if (!staff ) { + LogDebug("Could not get staff (%d) while drawing staffGrp - View::DrawSylConnector", lastStaff->GetN() ); + return; + } + // Also try to get a first note - we should change this once we have a x position in measure that + // takes into account the scoreDef + Note *firstNote = dynamic_cast( staff->FindChildByType( NOTE ) ); + + x1 = firstNote ? firstNote->GetDrawingX() - 2 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) : first->GetDrawingX(); + x2 = interface->GetEnd()->GetDrawingX(); + spanningType = SPANNING_END; + } + // Rare case where neither the first note and the last note are in the current system - draw the connector throughout the system + else { + // We need the first measure of the system for x1 + Measure *first = dynamic_cast( system->FindChildByType( MEASURE, 1, FORWARD ) ); + if ( !Check( first ) ) return; + // Also try to get a first note - we should change this once we have a x position in measure that + // takes into account the scoreDef + Note *firstNote = dynamic_cast( first->FindChildByType( NOTE ) ); + // We need the last measure of the system for x2 + Measure *last = dynamic_cast( system->FindChildByType( MEASURE, 1, BACKWARD ) ); + if ( !Check( last ) ) return; + // Get the staff of the first note - however, not the staff we need + Staff *firstStaff = dynamic_cast( interface->GetStart()->GetFirstParent( STAFF ) ); + if ( !Check( firstStaff ) ) return; + + // We need the staff from the current system, i.e., the first measure. + AttCommonNComparison comparison( STAFF, firstStaff->GetN() ); + staff = dynamic_cast(first->FindChildByAttComparison(&comparison, 1)); + if (!staff ) { + LogDebug("Could not get staff (%d) while drawing staffGrp - View::DrawSylConnector", firstStaff->GetN() ); + return; + } + + x1 = firstNote ? firstNote->GetDrawingX() - 2 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) : first->GetDrawingX(); + x2 = last->GetDrawingX() + last->GetRightBarlineX(); + spanningType = SPANNING_MIDDLE; + } + + if (element->Is() == SLUR) { + // cast to Slur check in DrawTieOrSlur + DrawSlur(dc, dynamic_cast(element), x1, x2, staff, spanningType, graphic); + } + else if (element->Is() == SYL) { + // cast to Syl check in DrawSylConnector + DrawSylConnector(dc, dynamic_cast(element), x1, x2, staff, spanningType, graphic); + } + else if (element->Is() == TIE) { + // cast to Slur check in DrawTieOrSlur + DrawTie(dc, dynamic_cast(element), x1, x2, staff, spanningType, graphic); + } + +} + +void View::DrawSlur( DeviceContext *dc, Slur *slur, int x1, int x2, Staff *staff, + char spanningType, DocObject *graphic ) +{ + assert( dc ); + assert( slur ); + assert( staff ); + + LayerElement *start = NULL; + LayerElement *end = NULL; + Beam *parentBeam = NULL; + Chord *startParentChord = NULL; + Chord *endParentChord = NULL; + Note *startNote = NULL; + Note *endNote = NULL; + Chord *startChord = NULL; + Chord *endChord = NULL; + + bool up = true; + data_STEMDIRECTION noteStemDir = STEMDIRECTION_NONE; + int y1, y2; + + /************** parent layers **************/ + + start = dynamic_cast(slur->GetStart()); + end = dynamic_cast(slur->GetEnd()); + + if ( !start || !end ) { + // no note, obviously nothing to do... + return; + } + + if (start->Is() == NOTE) { + startNote = dynamic_cast(start); + assert(startNote); + startParentChord = startNote->IsChordTone(); + } + else if (start->Is() == CHORD) { + startChord = dynamic_cast(start); + assert(startChord); + } + if (end->Is() == NOTE) { + endNote = dynamic_cast(end); + assert(endNote); + endParentChord = endNote->IsChordTone(); + } + else if (end->Is() == CHORD) { + endChord = dynamic_cast(end); + assert(endChord); + } + + Layer* layer1 = dynamic_cast(start->GetFirstParent( LAYER ) ); + Layer* layer2 = dynamic_cast(end->GetFirstParent( LAYER ) ); + assert( layer1 && layer2 ); + + if ( layer1->GetN() != layer2->GetN() ) { + LogWarning("Slurs between different layers may not be fully supported."); + } + + /************** y positions **************/ + + // the normal case + if ( spanningType == SPANNING_START_END ) { + noteStemDir = start->GetDrawingStemDir(); + } + // This is the case when the tie is split over two system of two pages. + // In this case, we are now drawing its beginning to the end of the measure (i.e., the last aligner) + else if ( spanningType == SPANNING_START ) { + noteStemDir = start->GetDrawingStemDir(); + } + // Now this is the case when the tie is split but we are drawing the end of it + else if ( spanningType == SPANNING_END ) { + noteStemDir = end->GetDrawingStemDir(); + } + // Finally, slur accross an entire system; use the staff position and up (see below) + else { + // To be adjusted + y1 = staff->GetDrawingY(); + y2 = y1; + noteStemDir = STEMDIRECTION_down; + } + + /************** direction **************/ + + // first should be the tie @curvedir + if (slur->HasCurvedir()) { + up = (slur->GetCurvedir() == CURVEDIR_above) ? true : false; + } + // then layer direction trumps note direction + else if (layer1 && layer1->GetDrawingStemDir() != STEMDIRECTION_NONE){ + up = layer1->GetDrawingStemDir() == STEMDIRECTION_up ? true : false; + } + // the look if in a chord + else if (startParentChord) { + if (startParentChord->PositionInChord(startNote) < 0) up = false; + else if (startParentChord->PositionInChord(startNote) > 0) up = true; + // away from the stem if odd number (center note) + else up = (noteStemDir != STEMDIRECTION_up); + } + else if (noteStemDir == STEMDIRECTION_up) { + up = false; + } + else if (noteStemDir == STEMDIRECTION_NONE) { + // no information from the note stem directions, look at the position in the notes + int center = staff->GetDrawingY() - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 2; + up = (y1 > center) ? true : false; + } + + /************** adjusting y position **************/ + + int yChordMax, yChordMin; + if ((spanningType == SPANNING_START_END) || (spanningType == SPANNING_START)) { + // first get the min max of the chord (if any) + if (startParentChord) startParentChord->GetYExtremes(&yChordMax, &yChordMin); + else if (startChord) startChord->GetYExtremes(&yChordMax, &yChordMin); + // slur is up + if (up) { + // P(^) + if (noteStemDir == STEMDIRECTION_down) y1 = start->GetDrawingY(); + // d(^)d + else if ((parentBeam = start->IsInBeam()) && !parentBeam->IsLastInBeam(start)) { + y1 = start->m_drawingStemEnd.y; + } + // d(^) + else { + x1 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 3 / 2; + if (startChord || startParentChord) y1 = yChordMin + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + else y1 = start->GetDrawingY() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + } + } + // slur is down + else { + // d(_) + if (noteStemDir == STEMDIRECTION_up) y1 = start->GetDrawingY(); + // P(_)P + else if ((parentBeam = start->IsInBeam()) && !parentBeam->IsLastInBeam(start)) { + y1 = start->m_drawingStemEnd.y; + } + // P(_) + else { + //x1 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 3 / 2; + y1 = start->GetDrawingY() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + if (startChord || startParentChord) y1 = yChordMin + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + else y1 = start->GetDrawingY() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + } + } + } + if ((spanningType == SPANNING_START_END) || (spanningType == SPANNING_END)) { + // get the min max of the chord if any + if (endParentChord) endParentChord->GetYExtremes(&yChordMax, &yChordMin); + else if (endChord) endChord->GetYExtremes(&yChordMax, &yChordMin); + // get the stem direction of the end + data_STEMDIRECTION endStemDir = end->GetDrawingStemDir(); + // slur is up + if (up) { + // (^)P + if (endStemDir == STEMDIRECTION_down) y2 = end->GetDrawingY(); + // d(^)d + else if ((parentBeam = end->IsInBeam()) && !parentBeam->IsLastInBeam(end)) { + y2 = end->m_drawingStemEnd.y; + } + // (^)d + else { + //x1 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 3 / 2; + if (endChord || endParentChord) y2 = yChordMin + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + else y2 = end->GetDrawingY() + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + } + } + else { + // (_)d + if (endStemDir == STEMDIRECTION_up) y2 = end->GetDrawingY(); + // P(_)P + else if ((parentBeam = end->IsInBeam()) && !parentBeam->IsLastInBeam(end)) { + y2 = end->m_drawingStemEnd.y; + } + // (_)P + else { + x2 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + if (endChord || endParentChord) y2 = yChordMin + m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + else y2 = end->GetDrawingY() - m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + } + } + } + + /************** y position **************/ + + if (up) { + y1 += 2 * m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y2 += 2 * m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + } + else { + y1 -= 2 * m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y2 -= 2 * m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + } + + Point points[4]; + points[0] = Point(x1, y1); + points[1] = Point(x2, y2); + + float angle = AdjustSlurPosition(slur, staff, layer1->GetN(), up, points); + + int thickness = m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * m_doc->GetSlurThickness() / DEFINITON_FACTOR ; + + if ( graphic ) dc->ResumeGraphic(graphic, graphic->GetUuid()); + else dc->StartGraphic(slur, "spanning-slur", ""); + dc->DeactivateGraphic(); + DrawThickBezierCurve(dc, points[0], points[1], points[2], points[3], thickness, staff->m_drawingStaffSize, angle); + dc->ReactivateGraphic(); + + if ( graphic ) dc->EndResumedGraphic(graphic, this); + else dc->EndGraphic(slur, this); +} + +float View::AdjustSlurPosition(Slur *slur, Staff *staff, int layerN, bool up, Point points[]) +{ + // For readability makes them p1 and p2 + Point *p1 = &points[0]; + Point *p2 = &points[1]; + + /************** angle **************/ + + float slurAngle = atan2(p2->y - p1->y, p2->x - p1->x); + + // the slope of the slur is high and needs to be corrected + if (fabs(slurAngle) > TEMP_STYLE_MAX_SLUR_SLOPE) { + int side = (p2->x - p1->x) * sin(TEMP_STYLE_MAX_SLUR_SLOPE) / sin(M_PI / 2 - TEMP_STYLE_MAX_SLUR_SLOPE); + if (p2->y > p1->y) { + if (up) p1->y = p2->y - side; + else p2->y = p1->y + side; + slurAngle = TEMP_STYLE_MAX_SLUR_SLOPE; + } + else { + if (up) p2->y = p1->y - side; + else p1->y = p2->y + side; + slurAngle = -TEMP_STYLE_MAX_SLUR_SLOPE; + } + } + + Point rotatedP2 = View::CalcPositionAfterRotation(*p2, -slurAngle, *p1); + //LogDebug("P1 %d %d, P2 %d %d, Angle %f, Pres %d %d", x1, y1, x2, y2, slurAnge, rotadedP2.x, rotatedP2.y); + + /************** height **************/ + + // the 'height' of the bezier + int height; + if (slur->HasBulge()){ + height = m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * slur->GetBulge(); + } + else { + int dist = abs( p2->x - p1->x ); + height = std::max( m_doc->GetSlurMinHeight() * m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / DEFINITON_FACTOR, dist / TEMP_STYLE_SLUR_HEIGHT_FACTOR); + height = std::min( m_doc->GetSlurMaxHeight() * m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / DEFINITON_FACTOR, height ); + } + + // the height of the control points + height = height * 4 / 3; + + /************** rotation **************/ + + // control points + Point rotatecC1, rotatedC2; + + int cPos = std::min((rotatedP2.x - p1->x) / TEMP_STYLE_SLUR_CONTROL_POINT_FACTOR, m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize)); + rotatecC1.x = p1->x + cPos; // point at 1/4 + rotatedC2.x = rotatedP2.x - cPos;; // point at 3/4 + + if (up) { + rotatecC1.y = p1->y + height; + rotatedC2.y = rotatedP2.y + height; + } else { + rotatecC1.y = p1->y - height; + rotatedC2.y = rotatedP2.y - height; + } + + /************** content **************/ + + + System *system = dynamic_cast(staff->GetFirstParent(SYSTEM)); + assert(system); + std::vectorspanningContent; + ArrayPtrVoid params; + params.push_back(&spanningContent); + params.push_back(&p1->x); + params.push_back(&p2->x); + std::vector filters; + // Create ad comparison object for each type / @n + // For now we only look at one layer (assumed layer1 == layer2) + AttCommonNComparison matchStaff( STAFF, staff->GetN() ); + AttCommonNComparison matchLayer( LAYER, layerN ); + filters.push_back( &matchStaff ); + filters.push_back( &matchLayer ); + + Functor timeSpanningLayerElements( &Object::TimeSpanningLayerElements ); + //LogDebug("*** %d - %d", note1->GetDrawingX(), note2->GetDrawingX() ) ; + system->Process( &timeSpanningLayerElements, ¶ms, NULL, &filters ); + if (spanningContent.size() > 12) LogDebug("### %d %s", spanningContent.size(), slur->GetUuid().c_str()); + + + points[1] = View::CalcPositionAfterRotation(rotatedP2, slurAngle, *p1); + points[2] = View::CalcPositionAfterRotation(rotatecC1, slurAngle, *p1); + points[3] = View::CalcPositionAfterRotation(rotatedC2, slurAngle, *p1); + + + /* + Point bezier[4]; + bezier[0].x = 100; + bezier[1].x = 200; + bezier[2].x = 300; + bezier[3].x = 400; + bezier[0].y = 000; + bezier[1].y = 100; + bezier[2].y = 100; + bezier[3].y = 000; + + int p = View::CalcBezierAtPosition(bezier, 24550); + p; + */ + + return slurAngle; +} + +void View::DrawTie( DeviceContext *dc, Tie *tie, int x1, int x2, Staff *staff, + char spanningType, DocObject *graphic ) +{ + assert( dc ); + assert( tie ); + assert( staff ); + + Note *note1 = NULL; + Note *note2 = NULL; + Chord *parentChord = NULL; + + bool up = true; + data_STEMDIRECTION noteStemDir = STEMDIRECTION_NONE; + int y1, y2; + + /************** parent layers **************/ + + note1 = dynamic_cast(tie->GetStart()); + note2 = dynamic_cast(tie->GetEnd()); + + if ( !note1 || !note2 ) { + // no note, obviously nothing to do... + return; + } + + Chord *chordParent1 = note1->IsChordTone(); + + Layer* layer1 = dynamic_cast(note1->GetFirstParent( LAYER ) ); + Layer* layer2 = dynamic_cast(note2->GetFirstParent( LAYER ) ); + assert( layer1 && layer2 ); + + if ( layer1->GetN() != layer2->GetN() ) { + LogWarning("Ties between different layers may not be fully supported."); + } + + /************** x positions **************/ + + bool isShortTie = false; + // shortTie correction cannot be applied for chords + if (!chordParent1 && (x2 - x1 < 3 * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize))) isShortTie = true; + + // the normal case + if ( spanningType == SPANNING_START_END ) { + y1 = note1->GetDrawingY(); + y2 = note2->GetDrawingY(); + if (!isShortTie) { + x1 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 3 / 2; + x2 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 3 / 2; + if (note1->HasDots()) { + x1 += m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * note1->GetDots(); + } + else if (chordParent1 && chordParent1->HasDots()) { + x1 += m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * chordParent1->GetDots(); + } + } + noteStemDir = note1->GetDrawingStemDir(); + } + // This is the case when the tie is split over two system of two pages. + // In this case, we are now drawing its beginning to the end of the measure (i.e., the last aligner) + else if ( spanningType == SPANNING_START ) { + y1 = note1->GetDrawingY(); + y2 = y1; + if (!isShortTie) { + x1 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 3 / 2; + } + noteStemDir = note1->GetDrawingStemDir(); + } + // Now this is the case when the tie is split but we are drawing the end of it + else if ( spanningType == SPANNING_END ) { + y1 = note2->GetDrawingY(); + y2 = y1; + if (!isShortTie) { + x2 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 3 / 2; + } + noteStemDir = note2->GetDrawingStemDir(); + } + // Finally + else { + LogDebug("Tie across an entire system is not supported"); + return; + } + + /************** direction **************/ + + // first should be the tie @curvedir + if (tie->HasCurvedir()) { + up = (tie->GetCurvedir() == CURVEDIR_above) ? true : false; + } + // then layer direction trumps note direction + else if (layer1 && layer1->GetDrawingStemDir() != STEMDIRECTION_NONE){ + up = layer1->GetDrawingStemDir() == STEMDIRECTION_up ? true : false; + } + // the look if in a chord + else if (parentChord) { + if (parentChord->PositionInChord(note1) < 0) up = false; + else if (parentChord->PositionInChord(note1) > 0) up = true; + // away from the stem if odd number (center note) + else up = (noteStemDir != STEMDIRECTION_up); + } + else if (noteStemDir == STEMDIRECTION_up) { + up = false; + } + else if (noteStemDir == STEMDIRECTION_NONE) { + // no information from the note stem directions, look at the position in the notes + int center = staff->GetDrawingY() - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) * 2; + up = (y1 > center) ? true : false; + } + + /************** y position **************/ + + if (up) { + y1 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / 2; + y2 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / 2; + if (isShortTie) { + y1 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y2 += m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + } + } + else { + y1 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / 2; + y2 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / 2; + if (isShortTie) { + y1 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y2 -= m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + } + } + + /************** bezier points **************/ + + // the 'height' of the bezier + int height; + if (tie->HasBulge()){ + height = m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * tie->GetBulge(); + } + else { + height = m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + // if the space between the to points is more than two staff height, increase the height + if (x2 - x1 > 2 * m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize)) { + height += m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + } + } + int thickness = m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * m_doc->GetTieThickness() / DEFINITON_FACTOR ; + + // control points + Point c1, c2; + + // the height of the control points + height = height * 4 / 3; + + c1.x = x1 + (x2 - x1) / 4; // point at 1/4 + c2.x = x1 + (x2 - x1) / 4 * 3; // point at 3/4 + + if (up) { + c1.y = y1 + height; + c2.y = y2 + height; + } else { + c1.y = y1 - height; + c2.y = y2 - height; + } + + if ( graphic ) dc->ResumeGraphic(graphic, graphic->GetUuid()); + else dc->StartGraphic(tie, "spanning-tie", ""); + dc->DeactivateGraphic(); + DrawThickBezierCurve(dc, Point(x1, y1), Point(x2, y2), c1, c2, thickness, staff->m_drawingStaffSize ); + dc->ReactivateGraphic(); + if ( graphic ) dc->EndResumedGraphic(graphic, this); + else dc->EndGraphic(tie, this); +} + +void View::DrawSylConnector( DeviceContext *dc, Syl *syl, int x1, int x2, Staff *staff, char spanningType, DocObject *graphic ) +{ + assert( syl ); + assert( syl->GetStart() && syl->GetEnd() ); + if ( !syl->GetStart() || !syl->GetEnd() ) return; + + int y = GetSylY(syl, staff); + int w, h; + + // The both correspond to the current system, which means no system break in-between (simple case) + if ( spanningType == SPANNING_START_END ) { + dc->SetFont( m_doc->GetDrawingLyricFont( staff->m_drawingStaffSize ) ); + dc->GetTextExtent(syl->GetText(), &w, &h); + dc->ResetFont(); + // x position of the syl is two units back + x1 += w - m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + } + // Only the first parent is the same, this means that the syl is "open" at the end of the system + else if ( spanningType == SPANNING_START) { + dc->SetFont( m_doc->GetDrawingLyricFont( staff->m_drawingStaffSize ) ); + dc->GetTextExtent(syl->GetText(), &w, &h); + dc->ResetFont(); + // idem + x1 += w - m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2; + + } + // We are in the system of the last note - draw the connector from the beginning of the system + else if ( spanningType == SPANNING_END ) { + // nothing to adjust + } + // Rare case where neither the first note and the last note are in the current system - draw the connector throughout the system + else { + // nothing to adjust + } + + if ( graphic ) dc->ResumeGraphic(graphic, graphic->GetUuid()); + else dc->StartGraphic(syl, "spanning-connector", ""); + dc->DeactivateGraphic(); + DrawSylConnectorLines( dc, x1, x2, y, syl, staff); + dc->ReactivateGraphic(); + if ( graphic ) dc->EndResumedGraphic(graphic, this); + else dc->EndGraphic(syl, this); + +} + +void View::DrawSylConnectorLines( DeviceContext *dc, int x1, int x2, int y, Syl *syl, Staff *staff ) +{ + if (syl->GetCon() == CON_d) { + + y += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2 / 3; + // x position of the syl is two units back + x2 -= 2 * (int)m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + + //if ( x1 > x2 ) { + // DrawFullRectangle(dc, x1, y + 2* m_doc->GetDrawingBarLineWidth(staff->m_drawingStaffSize), x2, y + 3 * m_doc->GetDrawingBarLineWidth(staff->m_drawingStaffSize)); + // LogDebug("x1 > x2 (%d %d)", x1, x2 ); + //} + + // the length of the dash and the space between them - can be made a parameter + int dashLength = m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 4 / 3; + int dashSpace = m_doc->GetDrawingStaffSize(staff->m_drawingStaffSize) * 5 / 3; + int halfDashLength = dashLength / 2; + + int dist = x2 - x1; + int nbDashes = dist / dashSpace; + + int margin = dist / 2; + // at least one dash + if (nbDashes < 2) { + nbDashes = 1; + } + else { + margin = (dist - ((nbDashes - 1) * dashSpace)) / 2; + } + margin -= dashLength / 2; + int i, x; + for (i = 0; i < nbDashes; i++) { + x = x1 + margin + (i * dashSpace); + DrawFullRectangle(dc, x - halfDashLength, y, x + halfDashLength, y + m_doc->GetDrawingBarLineWidth(staff->m_drawingStaffSize)); + } + + } + else if (syl->GetCon() == CON_u) { + x1 += (int)m_doc->GetDrawingUnit(staff->m_drawingStaffSize) / 2; + DrawFullRectangle(dc, x1, y, x2, y + m_doc->GetDrawingBarLineWidth(staff->m_drawingStaffSize)); + } + +} + +} // namespace vrv + diff --git a/src/view_graph.cpp b/src/view_graph.cpp old mode 100644 new mode 100755 index bdc7148fbb2..72fffd73ce6 --- a/src/view_graph.cpp +++ b/src/view_graph.cpp @@ -24,7 +24,7 @@ namespace vrv { void View::DrawVerticalLine ( DeviceContext *dc, int y1, int y2, int x1, int nbr) { - assert( dc ); // DC cannot be NULL + assert( dc ); dc->SetPen( m_currentColour, std::max( 1, ToDeviceContextX(nbr) ), AxSOLID ); dc->SetBrush( m_currentColour, AxSOLID ); @@ -38,7 +38,7 @@ void View::DrawVerticalLine ( DeviceContext *dc, int y1, int y2, int x1, int nbr void View::DrawHorizontalLine ( DeviceContext *dc, int x1, int x2, int y1, int nbr) { - assert( dc ); // DC cannot be NULL + assert( dc ); dc->SetPen( m_currentColour, std::max( 1, ToDeviceContextX(nbr) ), AxSOLID ); dc->SetBrush( m_currentColour, AxSOLID ); @@ -50,9 +50,32 @@ void View::DrawHorizontalLine ( DeviceContext *dc, int x1, int x2, int y1, int n return; } -void View::DrawFullRectangle( DeviceContext *dc, int x1, int y1, int x2, int y2 ) /* dessine rectangle plein */ + /* Draw rectangle partly filled in, as specified by : 1=top, 2=bottom, 3=left side, + 4=right side; 0=don't fill in any part. ??SO FAR, IS IGNORED. + */ + void View::DrawPartFullRectangle( DeviceContext *dc, int x1, int y1, int x2, int y2, int fillSection ) + { + assert( dc ); // DC cannot be NULL + + SwapY( &y1, &y2 ); + + //dc->SetPen( m_currentColour, 0, AxSOLID ); + //dc->SetBrush( AxWHITE, AxTRANSPARENT ); + dc->SetPen( AxBLUE, 0, AxSOLID ); + dc->SetBrush( AxRED, AxTRANSPARENT ); + + dc->DrawRectangle( ToDeviceContextX( x1 ), ToDeviceContextY(y1), ToDeviceContextX(x2 - x1) , ToDeviceContextX( y1 - y2 )); + + dc->ResetPen(); + dc->ResetBrush(); + + return; + } + + + void View::DrawFullRectangle( DeviceContext *dc, int x1, int y1, int x2, int y2 ) /* dessine rectangle plein */ { - assert( dc ); // DC cannot be NULL + assert( dc ); SwapY( &y1, &y2 ); @@ -91,10 +114,9 @@ void View::DrawObliquePolygon ( DeviceContext *dc, int x1, int y1, int x2, int y } - -void View::DrawDot ( DeviceContext *dc, int x, int y ) +void View::DrawDot ( DeviceContext *dc, int x, int y, int staffSize ) { - int r = std::max( ToDeviceContextX( m_doc->m_drawingDoubleUnit[0] / 5 ), 2 ); + int r = std::max( ToDeviceContextX( m_doc->GetDrawingDoubleUnit( staffSize ) / 5 ), 2 ); dc->SetPen( m_currentColour, 1, AxSOLID ); dc->SetBrush( m_currentColour, AxSOLID ); @@ -107,61 +129,43 @@ void View::DrawDot ( DeviceContext *dc, int x, int y ) void View::DrawSmuflCode ( DeviceContext *dc, int x, int y, wchar_t code, int staffSize, bool dimin ) -{ - int fontCorr = 0; +{ + assert( dc ); + + dc->SetBackground( AxBLUE ); + dc->SetBackgroundMode( AxTRANSPARENT ); - if (dc->CorrectMusicAscent()) { - fontCorr = m_doc->m_drawingFontHeightAscent[staffSize][dimin]; - } - - assert( dc ); // DC cannot be NULL + std::wstring str; + str.push_back(code); + dc->SetBrush( m_currentColour, AxSOLID ); + dc->SetFont( m_doc->GetDrawingSmuflFont(staffSize, dimin) ); - if ( dc) - { - dc->SetBackground( AxBLUE ); - dc->SetBackgroundMode( AxTRANSPARENT ); - - std::wstring str; - str.push_back(code); - - dc->SetBrush( m_currentColour, AxSOLID ); - dc->SetFont( &m_doc->m_drawingSmuflFonts[staffSize][dimin] ); - - dc->DrawMusicText( str, ToDeviceContextX(x), ToDeviceContextY(y + fontCorr) ); + dc->DrawMusicText( str, ToDeviceContextX(x), ToDeviceContextY(y) ); - dc->ResetFont(); - dc->ResetBrush(); - - } + dc->ResetFont(); + dc->ResetBrush(); return; } -void View::DrawSmuflString ( DeviceContext *dc, int x, int y, std::wstring s, int centrer, int staffSize) +void View::DrawSmuflString ( DeviceContext *dc, int x, int y, std::wstring s, bool center, int staffSize) { - assert( dc ); // DC cannot be NULL - - int fontCorr = 0; + assert( dc ); int xDC = ToDeviceContextX(x); - if (dc->CorrectMusicAscent()) { - fontCorr = m_doc->m_drawingFontHeightAscent[staffSize][0]; - } - if ( centrer ) + if ( center ) { - LogDebug("Centering string not implemented with DeviceContext"); - int w, h; dc->GetSmuflTextExtent( s, &w, &h ); xDC -= w / 2; } dc->SetBrush( m_currentColour, AxSOLID ); - dc->SetFont( &m_doc->m_drawingSmuflFonts[staffSize][0] ); + dc->SetFont( m_doc->GetDrawingSmuflFont(staffSize, 0) ); - dc->DrawMusicText( s, xDC, ToDeviceContextY(y + fontCorr )); + dc->DrawMusicText( s, xDC, ToDeviceContextY(y) ); dc->ResetFont(); dc->ResetBrush(); @@ -169,7 +173,7 @@ void View::DrawSmuflString ( DeviceContext *dc, int x, int y, std::wstring s, in void View::DrawLyricString ( DeviceContext *dc, int x, int y, std::wstring s, int staffSize) { - assert( dc ); // DC cannot be NULL + assert( dc ); dc->StartText( ToDeviceContextX( x ), ToDeviceContextY( y ) ); @@ -184,7 +188,7 @@ void View::DrawLyricString ( DeviceContext *dc, int x, int y, std::wstring s, in FontInfo vrvTxt; vrvTxt.SetFaceName("VerovioText"); - vrvTxt.SetPointSize( m_doc->m_drawingLyricFonts[staffSize].GetPointSize()); + vrvTxt.SetPointSize( m_doc->GetDrawingLyricFont(staffSize)->GetPointSize() ); dc->SetFont( &vrvTxt ); dc->VrvTextFont(); @@ -197,46 +201,43 @@ void View::DrawLyricString ( DeviceContext *dc, int x, int y, std::wstring s, in dc->EndText( ); } - -void View::DrawTieOrSlurBezier(DeviceContext *dc, int x, int y, int x1, int y1, bool direction) -{ - int height = std::max( MIN_TIE_HEIGHT * DEFINITON_FACTOR, std::min( 5 * m_doc->m_drawingDoubleUnit[0] / 3, abs( x1 - x ) / 4 ) ); - int thickness = std::max( m_doc->m_drawingDoubleUnit[0] / 3, MIN_TIE_THICKNESS * DEFINITON_FACTOR ); +void View::DrawThickBezierCurve(DeviceContext *dc, Point p1, Point p2, Point c1, Point c2, int thickness, int staffSize, float angle) +{ + assert( dc ); - int one, two; // control points at 1/4 and 3/4 of total lenght int bez1[6], bez2[6]; // filled array with control points and end point - - int top_y, top_y_fill; // Y for control points in both beziers - - one = (x1 - x) / 4; // point at 1/4 - two = (x1 - x) / 4 * 3; // point at 3/4 - - if (direction) { - // tie goes up - top_y = std::min(y, y1) - height; - // the second bezier in internal - top_y_fill = top_y + thickness; - } else { - //tie goes down - top_y = std::max(y, y1) + height; - // second bezier is internal as above - top_y_fill = top_y - thickness; + Point c1Rotated = c1; + Point c2Rotated = c2; + c1Rotated.y += thickness / 2; + c2Rotated.y += thickness / 2; + if (angle != 0.0) { + c1Rotated = CalcPositionAfterRotation(c1Rotated, angle, c1); + c2Rotated = CalcPositionAfterRotation(c2Rotated, angle, c2); } // Points for first bez, they go from xy to x1y1 - bez1[0] = ToDeviceContextX(x + one); bez1[1] = ToDeviceContextY(top_y); - bez1[2] = ToDeviceContextX(x + two); bez1[3] = ToDeviceContextY(top_y); - bez1[4] = ToDeviceContextX(x1); bez1[5] = ToDeviceContextY(y1); + bez1[0] = ToDeviceContextX(c1Rotated.x); bez1[1] = ToDeviceContextY(c1Rotated.y); + bez1[2] = ToDeviceContextX(c2Rotated.x); bez1[3] = ToDeviceContextY(c2Rotated.y); + bez1[4] = ToDeviceContextX(p2.x); bez1[5] = ToDeviceContextY(p2.y); + + c1Rotated = c1; + c2Rotated = c2; + c1Rotated.y -= thickness / 2; + c2Rotated.y -= thickness / 2; + if (angle != 0.0) { + c1Rotated = CalcPositionAfterRotation(c1Rotated, angle, c1); + c2Rotated = CalcPositionAfterRotation(c2Rotated, angle, c2); + } // second bez. goes back - bez2[0] = ToDeviceContextX(x + two); bez2[1] = ToDeviceContextY(top_y_fill); - bez2[2] = ToDeviceContextX(x + one); bez2[3] = ToDeviceContextY(top_y_fill); - bez2[4] = ToDeviceContextX(x); bez2[5] = ToDeviceContextY(y); + bez2[0] = ToDeviceContextX(c2Rotated.x); bez2[1] = ToDeviceContextY(c2Rotated.y); + bez2[2] = ToDeviceContextX(c1Rotated.x); bez2[3] = ToDeviceContextY(c1Rotated.y); + bez2[4] = ToDeviceContextX(p1.x); bez2[5] = ToDeviceContextY(p1.y); // Actually draw it - dc->SetPen( m_currentColour, std::max( 1, m_doc->m_style->m_stemWidth / 2 ), AxSOLID ); - dc->DrawComplexBezierPath(ToDeviceContextX(x), ToDeviceContextY(y), bez1, bez2); + dc->SetPen( m_currentColour, std::max( 1, m_doc->GetDrawingStemWidth(staffSize) / 2 ), AxSOLID ); + dc->DrawComplexBezierPath(ToDeviceContextX(p1.x), ToDeviceContextY(p1.y), bez1, bez2); dc->ResetPen(); } diff --git a/src/view_mensural.cpp b/src/view_mensural.cpp index c49f963b232..1cf21e1cb16 100644 --- a/src/view_mensural.cpp +++ b/src/view_mensural.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: musrc_mensural.cpp +// Name: view_mensural.cpp // Author: Laurent Pugin // Created: 2015 // Copyright (c) Authors and others. All rights reserved. @@ -34,16 +34,20 @@ bool View::s_drawingLigObliqua = false; // marque le 1e passage pour une oblique void View::DrawMensuralNote ( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Note" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Note *note = dynamic_cast(element); + assert( note ); - int staffSize = staff->staffSize; + int staffSize = staff->m_drawingStaffSize; int noteY = element->GetDrawingY(); int xLedger, xNote, xStem; int drawingDur; + bool drawingCueSize; int staffY = staff->GetDrawingY(); wchar_t fontNo; int ledge; @@ -53,28 +57,30 @@ void View::DrawMensuralNote ( DeviceContext *dc, LayerElement *element, Layer *l xLedger = xStem; drawingDur = note->GetDrawingDur(); + drawingCueSize = note->HasGrace(); - int radius = m_doc->m_drawingNoteRadius[staffSize][note->m_cueSize]; + int radius = m_doc->GetGlyphWidth(SMUFL_E0A3_noteheadHalf, staffSize, drawingCueSize); if (drawingDur > DUR_1 || (drawingDur == DUR_1 && staff->notAnc)) { // annuler provisoirement la modif. des lignes addit. - ledge = m_doc->m_drawingLedgerLine[staffSize][note->m_cueSize]; + ledge = m_doc->GetDrawingLedgerLineLength(staffSize, drawingCueSize); } else { - ledge = m_doc->m_drawingLedgerLine[staffSize][note->m_cueSize]; + ledge = m_doc->GetDrawingLedgerLineLength(staffSize, drawingCueSize); radius += radius/3; } /************** Stem/notehead direction: **************/ - verticalCenter = staffY - m_doc->m_drawingDoubleUnit[staffSize]*2; - if ( note->HasDrawingStemDir() ) { - note->m_drawingStemDir = note->GetDrawingStemDir(); + verticalCenter = staffY - m_doc->GetDrawingDoubleUnit(staffSize)*2; + data_STEMDIRECTION noteStemDir = note->CalcDrawingStemDir(); + if ( noteStemDir != STEMDIRECTION_NONE ) { + note->SetDrawingStemDir( noteStemDir ); } else if ( layer->GetDrawingStemDir() != STEMDIRECTION_NONE) { - note->m_drawingStemDir = layer->GetDrawingStemDir(); + note->SetDrawingStemDir( layer->GetDrawingStemDir() ); } else { - note->m_drawingStemDir = (noteY >= verticalCenter) ? STEMDIRECTION_down : STEMDIRECTION_up; + note->SetDrawingStemDir((noteY >= verticalCenter) ? STEMDIRECTION_down : STEMDIRECTION_up); } xNote = xStem - radius; @@ -88,18 +94,17 @@ void View::DrawMensuralNote ( DeviceContext *dc, LayerElement *element, Layer *l else if (drawingDur < DUR_1) { DrawMaximaToBrevis( dc, noteY, element, layer, staff); } - // Whole notes else if (drawingDur == DUR_1) { - if (note->GetColored()==BOOLEAN_true) - fontNo = SMUFL_E0FA_noteheadWholeFilled; + if (note->GetColored()) + fontNo = SMUFL_E938_mensuralNoteheadSemibrevisBlack; else - fontNo = SMUFL_E0A2_noteheadWhole; + fontNo = SMUFL_E939_mensuralNoteheadSemibrevisVoid; - DrawSmuflCode( dc, xNote, noteY, fontNo, staff->staffSize, note->m_cueSize ); + DrawSmuflCode( dc, xNote, noteY, fontNo, staff->m_drawingStaffSize, drawingCueSize ); } - // Other values - else { - if (note->GetColored()==BOOLEAN_true) { + // Other values ??WE WANT MENSURAL NOTEHEADS, NOT CMN!!!!!!!! + else { + if (note->GetColored()) { if (drawingDur == DUR_2) fontNo = SMUFL_E0A4_noteheadBlack; else fontNo = SMUFL_E0A3_noteheadHalf; } @@ -108,15 +113,15 @@ void View::DrawMensuralNote ( DeviceContext *dc, LayerElement *element, Layer *l else fontNo = SMUFL_E0A3_noteheadHalf; } - DrawSmuflCode( dc, xNote, noteY, fontNo, staff->staffSize, note->m_cueSize ); + DrawSmuflCode( dc, xNote, noteY, fontNo, staff->m_drawingStaffSize, drawingCueSize ); - DrawStem(dc, note, staff, note->m_drawingStemDir, radius, xStem, noteY); + DrawStem(dc, note, staff, note->GetDrawingStemDir(), radius, xStem, noteY); } /************** Ledger lines: **************/ - int staffTop = staffY + m_doc->m_drawingUnit[staffSize]; - int staffBot = staffY - m_doc->m_drawingStaffSize[staffSize] - m_doc->m_drawingUnit[staffSize]; + int staffTop = staffY + m_doc->GetDrawingUnit(staffSize); + int staffBot = staffY - m_doc->GetDrawingStaffSize(staffSize) - m_doc->GetDrawingUnit(staffSize); //if the note is not in the staff if (!is_in(noteY,staffTop,staffBot)) @@ -124,9 +129,9 @@ void View::DrawMensuralNote ( DeviceContext *dc, LayerElement *element, Layer *l int distance, highestNewLine, numLines; bool aboveStaff = (noteY > staffTop); - distance = (aboveStaff ? (noteY - staffY) : staffY - m_doc->m_drawingStaffSize[staffSize] - noteY); - highestNewLine = ((distance % m_doc->m_drawingDoubleUnit[staffSize] > 0) ? (distance - m_doc->m_drawingUnit[staffSize]) : distance); - numLines = highestNewLine / m_doc->m_drawingDoubleUnit[staffSize]; + distance = (aboveStaff ? (noteY - staffY) : staffY - m_doc->GetDrawingStaffSize(staffSize) - noteY); + highestNewLine = ((distance % m_doc->GetDrawingDoubleUnit(staffSize) > 0) ? (distance - m_doc->GetDrawingUnit(staffSize)) : distance); + numLines = highestNewLine / m_doc->GetDrawingDoubleUnit(staffSize); DrawLedgerLines(dc, note, staff, aboveStaff, false, 0, numLines); @@ -136,10 +141,10 @@ void View::DrawMensuralNote ( DeviceContext *dc, LayerElement *element, Layer *l if (note->GetDots()) { int xDot; - if (note->GetDur() < DUR_2 || (note->GetDur() > DUR_8 && (note->m_drawingStemDir == STEMDIRECTION_up))) - xDot = xStem + m_doc->m_drawingUnit[staffSize]*7/2; + if (note->GetDur() < DUR_2 || (note->GetDur() > DUR_8 && (note->GetDrawingStemDir() == STEMDIRECTION_up))) + xDot = xStem + m_doc->GetDrawingUnit(staffSize)*7/2; else - xDot = xStem + m_doc->m_drawingUnit[staffSize]*5/2; + xDot = xStem + m_doc->GetDrawingUnit(staffSize)*5/2; DrawDots( dc, xDot, noteY, note->GetDots(), staff ); } @@ -148,11 +153,14 @@ void View::DrawMensuralNote ( DeviceContext *dc, LayerElement *element, Layer *l void View::DrawMensur( DeviceContext *dc, LayerElement *element, Layer *layer, Staff *staff, Measure *measure ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Mensur" + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + assert( measure ); Mensur *mensur = dynamic_cast(element); + assert( mensur ); dc->StartGraphic( element, "", element->GetUuid() ); @@ -185,25 +193,38 @@ void View::DrawMensur( DeviceContext *dc, LayerElement *element, Layer *layer, S x = element->GetDrawingX(); if (mensur->GetSign() || mensur->HasTempus()) { - x += m_doc->m_drawingUnit[staff->staffSize] * 5; // step forward because we have a sign or a meter symbol + x += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 5; // step forward because we have a sign or a meter symbol } int numbase = mensur->HasNumbase() ? mensur->GetNumbase() : 0; DrawMeterSigFigures ( dc, x, staff->GetDrawingY(), mensur->GetNum(), numbase, staff); } - dc->EndGraphic(element, this ); //RZ + dc->EndGraphic(element, this ); } +/* Set size of mensuration sign circle relative to space between staff lines. The entire mensuration sign fits easily between two staff lines, so the radius is considerably less than half the distance between them. + ??THESE #defines PROBABLY BELONG IN style.h . */ +#define MCIRCLE_RADIUS_FACTOR 0.32 +/* Set default vertical position of mensuration sign circle as distance below the top of the staff for center + of the circle */ +#define MCIRCLE_STAFFLINES_BELOW_TOP 1.5 +/* Set size rel. to dist. between staff lines of mensural-notation dot, e.g., within mensuration signs */ +#define MENSUR_DOTSIZE 0.15 + void View::DrawMensurCircle( DeviceContext *dc, int x, int yy, Staff *staff ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staff ); - int y = ToDeviceContextY (yy - m_doc->m_drawingDoubleUnit[ staff->staffSize ] * 2); - int r = ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staff->staffSize ]); + int y = ToDeviceContextY (yy - m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize ) * MCIRCLE_STAFFLINES_BELOW_TOP); + int r = ToDeviceContextX( m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize )); + r = (int)(MCIRCLE_RADIUS_FACTOR*r); - dc->SetPen( m_currentColour, m_doc->m_style->m_staffLineWidth, AxSOLID ); + int lineWidth = (int)(m_doc->GetDrawingStaffLineWidth( staff->m_drawingStaffSize ) * 0.5); + dc->SetPen( m_currentColour, lineWidth, AxSOLID ); + dc->SetPen( m_currentColour, m_doc->GetDrawingStaffLineWidth(staff->m_drawingStaffSize), AxSOLID ); dc->SetBrush( m_currentColour, AxTRANSPARENT ); dc->DrawCircle( ToDeviceContextX(x), y, r ); @@ -214,13 +235,15 @@ void View::DrawMensurCircle( DeviceContext *dc, int x, int yy, Staff *staff ) void View::DrawMensurHalfCircle( DeviceContext *dc, int x, int yy, Staff *staff ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staff ); - dc->SetPen( m_currentColour, m_doc->m_style->m_staffLineWidth, AxSOLID ); + dc->SetPen( m_currentColour, m_doc->GetDrawingStaffLineWidth(staff->m_drawingStaffSize), AxSOLID ); dc->SetBrush( m_currentColour, AxTRANSPARENT ); - int y = ToDeviceContextY (yy - m_doc->m_drawingDoubleUnit[ staff->staffSize ]); - int r = ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staff->staffSize ]); + int y = ToDeviceContextY (yy - m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize ) * MCIRCLE_STAFFLINES_BELOW_TOP); + int r = ToDeviceContextX( m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize )); + r = (int)(MCIRCLE_RADIUS_FACTOR*r); x = ToDeviceContextX (x); x -= 3*r/3; @@ -235,13 +258,14 @@ void View::DrawMensurHalfCircle( DeviceContext *dc, int x, int yy, Staff *staff void View::DrawMensurReversedHalfCircle( DeviceContext *dc, int x, int yy, Staff *staff ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert (staff ); - dc->SetPen( m_currentColour, m_doc->m_style->m_staffLineWidth, AxSOLID ); + dc->SetPen( m_currentColour, m_doc->GetDrawingStaffLineWidth(staff->m_drawingStaffSize), AxSOLID ); dc->SetBrush( m_currentColour, AxTRANSPARENT ); - int y = ToDeviceContextY (yy - m_doc->m_drawingDoubleUnit[ staff->staffSize ]); - int r = ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staff->staffSize ] ); + int y = ToDeviceContextY (yy - m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize )); + int r = ToDeviceContextX( m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize ) ); // needs to be fixed x = ToDeviceContextX (x); @@ -257,10 +281,13 @@ void View::DrawMensurReversedHalfCircle( DeviceContext *dc, int x, int yy, Staff void View::DrawMensurDot ( DeviceContext *dc, int x, int yy, Staff *staff ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staff ); - int y = ToDeviceContextY (yy - m_doc->m_drawingDoubleUnit[ staff->staffSize ] * 2); - int r = m_doc->m_drawingUnit[staff->staffSize] * 2 / 3; + //int y = ToDeviceContextY (yy - m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize ) * MCIRCLE_STAFFLINES_BELOW_TOP); + //int r = m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * MENSUR_DOTSIZE; + int y = ToDeviceContextY (yy - m_doc->GetDrawingDoubleUnit( staff->m_drawingStaffSize ) * 2); + int r = m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 2 / 3; dc->SetPen( m_currentColour, 1, AxSOLID ); dc->SetBrush( m_currentColour, AxSOLID ); @@ -276,12 +303,13 @@ void View::DrawMensurDot ( DeviceContext *dc, int x, int yy, Staff *staff ) void View::DrawMensurSlash ( DeviceContext *dc, int a, int yy, Staff *staff ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staff ); int y1 = yy; - int y2 = y1 - m_doc->m_drawingStaffSize[ staff->staffSize ]; + int y2 = y1 - m_doc->GetDrawingStaffSize( staff->m_drawingStaffSize ); - DrawVerticalLine ( dc, y1, y2, a, m_doc->m_style->m_staffLineWidth); + DrawVerticalLine ( dc, y1, y2, a, m_doc->GetDrawingStaffLineWidth(staff->m_drawingStaffSize)); return; } @@ -304,7 +332,7 @@ void View::CalculateLigaturePosX ( LayerElement *element, Layer *layer, Staff *s } if (previousNote->m_lig && previousNote->m_dur <= DUR_1) { - element->SetDrawingX( previous->GetDrawingX() + m_doc->m_drawingBrevisWidth[staff->staffSize] * 2 ); + element->SetDrawingX( previous->GetDrawingX() + m_doc->m_drawingBrevisWidth[staff->m_drawingStaffSize] * 2 ); } */ return; @@ -312,31 +340,32 @@ void View::CalculateLigaturePosX ( LayerElement *element, Layer *layer, Staff *s void View::DrawMaximaToBrevis( DeviceContext *dc, int y, LayerElement *element, Layer *layer, Staff *staff ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Note" - + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); Note *note = dynamic_cast(element); + assert( note ); int xn, x1, x2, y1, y2, y3, y4; // int yy2, y5; // unused int verticalCenter, up, height; - height = m_doc->m_drawingBeamWidth[staff->staffSize]/2 ; + height = m_doc->GetDrawingBeamWidth(staff->m_drawingStaffSize, false) / 2 ; xn = element->GetDrawingX(); // calcul des dimensions du rectangle - x1 = xn - m_doc->m_drawingBrevisWidth[staff->staffSize]; - x2 = xn + m_doc->m_drawingBrevisWidth[staff->staffSize]; + x1 = xn - m_doc->GetDrawingBrevisWidth( staff->m_drawingStaffSize ); + x2 = xn + m_doc->GetDrawingBrevisWidth( staff->m_drawingStaffSize ); if (note->GetActualDur() == DUR_MX) { - x1 -= m_doc->m_drawingBrevisWidth[staff->staffSize]; - x2 += m_doc->m_drawingBrevisWidth[staff->staffSize]; + x1 -= m_doc->GetDrawingBrevisWidth( staff->m_drawingStaffSize ); + x2 += m_doc->GetDrawingBrevisWidth( staff->m_drawingStaffSize ); } - y1 = y + m_doc->m_drawingUnit[staff->staffSize]; - y2 = y - m_doc->m_drawingUnit[staff->staffSize]; - y3 = (int)(y1 + m_doc->m_drawingUnit[staff->staffSize]/2); // partie d'encadrement qui depasse - y4 = (int)(y2 - m_doc->m_drawingUnit[staff->staffSize]/2); + y1 = y + m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y2 = y - m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y3 = (int)(y1 + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)/2); // partie d'encadrement qui depasse + y4 = (int)(y2 - m_doc->GetDrawingUnit(staff->m_drawingStaffSize)/2); if (note->GetColored()!=BOOLEAN_true) { // double base des carrees @@ -347,16 +376,16 @@ void View::DrawMaximaToBrevis( DeviceContext *dc, int y, LayerElement *element, DrawFullRectangle( dc,x1,y1,x2,y2); } - DrawVerticalLine ( dc, y3, y4, x1, m_doc->m_style->m_stemWidth ); // corset lateral - DrawVerticalLine ( dc, y3, y4, x2, m_doc->m_style->m_stemWidth ); + DrawVerticalLine ( dc, y3, y4, x1, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); // corset lateral + DrawVerticalLine ( dc, y3, y4, x2, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); // stem if (note->GetActualDur() < DUR_BR) { - verticalCenter = staff->GetDrawingY() - m_doc->m_drawingDoubleUnit[staff->staffSize]*2; + verticalCenter = staff->GetDrawingY() - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)*2; up = (y < verticalCenter) ? true : false; - if ( note->m_drawingStemDir != STEMDIRECTION_NONE ) { - if ( note->m_drawingStemDir == STEMDIRECTION_up) { + if ( note->GetDrawingStemDir() != STEMDIRECTION_NONE ) { + if ( note->GetDrawingStemDir() == STEMDIRECTION_up) { up = true; } else { @@ -365,14 +394,14 @@ void View::DrawMaximaToBrevis( DeviceContext *dc, int y, LayerElement *element, } if (!up) { - y3 = y1 - m_doc->m_drawingUnit[staff->staffSize]*8; + y3 = y1 - m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*8; y2 = y1; } else { - y3 = y1 + m_doc->m_drawingUnit[staff->staffSize]*6; + y3 = y1 + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*6; y2 = y1; } - DrawVerticalLine ( dc, y2,y3,x2, m_doc->m_style->m_stemWidth ); + DrawVerticalLine ( dc, y2,y3,x2, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); } return; @@ -380,18 +409,19 @@ void View::DrawMaximaToBrevis( DeviceContext *dc, int y, LayerElement *element, void View::DrawLigature ( DeviceContext *dc, int y, LayerElement *element, Layer *layer, Staff *staff ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" - assert(dynamic_cast(element)); // Element must be a Note" - - + assert( dc ); + assert( element ); + assert( layer ); + assert( staff ); + Note *note = dynamic_cast(element); + assert( note ); int xn, x1, x2, y1, y2, y3, y4; // int yy2, y5; // unused int verticalCenter, up, epaisseur; - epaisseur = std::max (2, m_doc->m_drawingBeamWidth[staff->staffSize]/2); + epaisseur = std::max (2, m_doc->GetDrawingBeamWidth(staff->m_drawingStaffSize, false) / 2); xn = element->GetDrawingX(); /* @@ -405,11 +435,11 @@ void View::DrawLigature ( DeviceContext *dc, int y, LayerElement *element, Layer } // calcul des dimensions du rectangle - x1 = xn - m_doc->m_drawingBrevisWidth[staff->staffSize]; x2 = xn + m_doc->m_drawingBrevisWidth[staff->staffSize]; - y1 = y + m_doc->m_drawingUnit[staff->staffSize]; - y2 = y - m_doc->m_drawingUnit[staff->staffSize]; - y3 = (int)(y1 + m_doc->m_drawingUnit[staff->staffSize]/2); // partie d'encadrement qui depasse - y4 = (int)(y2 - m_doc->m_drawingUnit[staff->staffSize]/2); + x1 = xn - m_doc->GetDrawingBrevisWidth(staff->m_drawingStaffSize); x2 = xn + m_doc->GetDrawingBrevisWidth(staff->m_drawingStaffSize); + y1 = y + m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y2 = y - m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + y3 = (int)(y1 + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)/2); // partie d'encadrement qui depasse + y4 = (int)(y2 - m_doc->GetDrawingUnit(staff->m_drawingStaffSize)/2); //if (!note->m_ligObliqua && (!View::s_drawingLigObliqua)) // notes rectangulaires, y c. en ligature @@ -422,15 +452,15 @@ void View::DrawLigature ( DeviceContext *dc, int y, LayerElement *element, Layer else DrawFullRectangle( dc,x1,y1,x2,y2); // dessine val carree pleine // ENZ correction de x2 - DrawVerticalLine ( dc, y3, y4, x1, m_doc->m_style->m_stemWidth ); // corset lateral - DrawVerticalLine ( dc, y3, y4, x2, m_doc->m_style->m_stemWidth ); + DrawVerticalLine ( dc, y3, y4, x1, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); // corset lateral + DrawVerticalLine ( dc, y3, y4, x2, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); } /* else // traitement des obliques { if (!View::s_drawingLigObliqua) // 1e passage: ligne flagStemHeighte initiale { - DrawVerticalLine (dc,y3,y4,x1, m_doc->m_style->m_stemWidth ); + DrawVerticalLine (dc,y3,y4,x1, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); View::s_drawingLigObliqua = true; //oblique = OFF; // if (val == DUR_1) // queue gauche haut si DUR_1 @@ -438,19 +468,19 @@ void View::DrawLigature ( DeviceContext *dc, int y, LayerElement *element, Layer } else // 2e passage: lignes obl. et flagStemHeighte finale { - x1 -= m_doc->m_drawingBrevisWidth[staff->staffSize]*2; // avance auto + x1 -= m_doc->m_drawingBrevisWidth[staff->m_drawingStaffSize]*2; // avance auto - y1 = *View::s_drawingLigY - m_doc->m_drawingUnit[staff->staffSize]; // ligat_y contient y original + y1 = *View::s_drawingLigY - m_doc->GetDrawingUnit(staff->m_drawingStaffSize); // ligat_y contient y original yy2 = y2; - y5 = y1+ m_doc->m_drawingDoubleUnit[staff->staffSize]; y2 += m_doc->m_drawingDoubleUnit[staff->staffSize]; // on monte d'un INTERL + y5 = y1+ m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); y2 += m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); // on monte d'un INTERL if (note->GetColored()==BOOLEAN_true) - DrawObliquePolygon ( dc, x1, y1, x2, yy2, m_doc->m_drawingDoubleUnit[staff->staffSize]); + DrawObliquePolygon ( dc, x1, y1, x2, yy2, m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)); else { DrawObliquePolygon ( dc, x1, y1, x2, yy2, 5); DrawObliquePolygon ( dc, x1, y5, x2, y2, -5); } - DrawVerticalLine ( dc,y3,y4,x2,m_doc->m_style->m_stemWidth); //cloture flagStemHeighte + DrawVerticalLine ( dc,y3,y4,x2,m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize)); //cloture flagStemHeighte View::s_drawingLigObliqua = false; // queue_lig = OFF; //desamorce alg.queue DUR_BR @@ -469,34 +499,34 @@ void View::DrawLigature ( DeviceContext *dc, int y, LayerElement *element, Layer } - y3 = y2 - m_doc->m_drawingUnit[staff->staffSize]*6; + y3 = y2 - m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*6; if (note->m_lig) { if (note->m_dur == DUR_BR) // && this->queue_lig) // queue gauche bas: DUR_BR initiale descendante // ax2 - no support of queue_lig (see WG corrigeLigature) { - DrawVerticalLine ( dc, y2, y3, x1, m_doc->m_style->m_stemWidth ); + DrawVerticalLine ( dc, y2, y3, x1, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); } else if (note->m_dur == DUR_LG) // && !this->queue_lig) // DUR_LG en ligature, queue droite bas // ax2 - no support of queue_lig { - DrawVerticalLine (dc, y2, y3, x2, m_doc->m_style->m_stemWidth ); + DrawVerticalLine (dc, y2, y3, x2, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); } else if (note->m_dur == DUR_1) // && this->queue_lig ) // queue gauche haut // ax2 - no support of queue_lig { - y2 = y1 + m_doc->m_drawingUnit[staff->staffSize]*6; - DrawVerticalLine ( dc, y1, y2, x1, m_doc->m_style->m_stemWidth ); + y2 = y1 + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*6; + DrawVerticalLine ( dc, y1, y2, x1, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); } } else if (note->m_dur == DUR_LG) // DUR_LG isolee: queue comme notes normales */ if (note->GetActualDur() == DUR_LG) { - verticalCenter = staff->GetDrawingY() - m_doc->m_drawingDoubleUnit[staff->staffSize]*2; + verticalCenter = staff->GetDrawingY() - m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize)*2; // ENZ up = (y < verticalCenter) ? ON : OFF; // ENZ - if ( note->m_drawingStemDir != STEMDIRECTION_NONE ) { - if ( note->m_drawingStemDir == STEMDIRECTION_up) { + if ( note->GetDrawingStemDir() != STEMDIRECTION_NONE ) { + if ( note->GetDrawingStemDir() == STEMDIRECTION_up) { up = ON; } else { @@ -506,14 +536,14 @@ void View::DrawLigature ( DeviceContext *dc, int y, LayerElement *element, Layer if (!up) { - y3 = y1 - m_doc->m_drawingUnit[staff->staffSize]*8; + y3 = y1 - m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*8; y2 = y1; } else { - y3 = y1 + m_doc->m_drawingUnit[staff->staffSize]*6; + y3 = y1 + m_doc->GetDrawingUnit(staff->m_drawingStaffSize)*6; y2 = y1; } - DrawVerticalLine ( dc, y2,y3,x2, m_doc->m_style->m_stemWidth ); + DrawVerticalLine ( dc, y2,y3,x2, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize) ); } return; diff --git a/src/view_page.cpp b/src/view_page.cpp index 083122d0bc1..3577573fa87 100644 --- a/src/view_page.cpp +++ b/src/view_page.cpp @@ -11,7 +11,6 @@ //---------------------------------------------------------------------------- #include -#include //---------------------------------------------------------------------------- @@ -20,6 +19,7 @@ #include "devicecontext.h" #include "doc.h" #include "editorial.h" +#include "floatingelement.h" #include "keysig.h" #include "layer.h" #include "measure.h" @@ -27,13 +27,11 @@ #include "metersig.h" #include "note.h" #include "page.h" -#include "slur.h" #include "smufl.h" #include "staff.h" #include "style.h" #include "system.h" #include "syl.h" -#include "tie.h" #include "tuplet.h" #include "vrv.h" @@ -45,7 +43,7 @@ namespace vrv { void View::DrawCurrentPage( DeviceContext *dc, bool background ) { - assert( dc ); // DC cannot be NULL + assert( dc ); assert( m_doc ); m_currentPage = m_doc->SetDrawingPage( m_pageIdx ); @@ -67,10 +65,10 @@ void View::DrawCurrentPage( DeviceContext *dc, bool background ) Functor setDrawingXY( &Object::SetDrawingXY ); // First pass without processing the LayerElements - we need this for cross-staff going down because // the elements will need the position of the staff below to have been set before - m_currentPage->Process( &setDrawingXY, params ); + m_currentPage->Process( &setDrawingXY, ¶ms ); // Second pass that process the LayerElements (only) processLayerElement = true; - m_currentPage->Process( &setDrawingXY, params ); + m_currentPage->Process( &setDrawingXY, ¶ms ); // Set the current score def to the page one // The page one has previously been set by Object::SetCurrentScoreDef @@ -87,7 +85,8 @@ void View::DrawCurrentPage( DeviceContext *dc, bool background ) for (i = 0; i < m_currentPage->GetSystemCount(); i++) { - system = dynamic_cast(m_currentPage->m_children[i]); + // cast to System check in DrawSystem + system = dynamic_cast(m_currentPage->m_children.at(i)); DrawSystem( dc, system ); } @@ -103,7 +102,8 @@ void View::DrawCurrentPage( DeviceContext *dc, bool background ) void View::DrawSystem( DeviceContext *dc, System *system ) { - assert( system ); // other asserted before + assert( dc ); + assert( system ); dc->StartGraphic( system, "", system->GetUuid() ); @@ -111,7 +111,7 @@ void View::DrawSystem( DeviceContext *dc, System *system ) system->ResetDrawingList(); // First get the first measure of the system - Measure *measure = dynamic_cast(system->FindChildByType( &typeid(Measure) ) ); + Measure *measure = dynamic_cast(system->FindChildByType( MEASURE ) ); if ( measure ) { // NULL for the Barline parameters indicates that we are drawing the scoreDef DrawScoreDef( dc, &m_drawingScoreDef, measure, system->GetDrawingX(), NULL ); @@ -119,8 +119,8 @@ void View::DrawSystem( DeviceContext *dc, System *system ) // This needs to be improved because we are now using (tuplet) oblique figures. // We should also have a better way to specify if the number has to be displayed or not if ( (measure->GetN() != VRV_UNSET) && (measure->GetN() > 1) ) { - dc->SetFont( &m_doc->m_drawingSmuflFonts[0][0] ); - dc->DrawMusicText( IntToTupletFigures( measure->GetN() ) , ToDeviceContextX(system->GetDrawingX()), ToDeviceContextY(system->GetDrawingY() - m_doc->GetSpacingStaff() * m_doc->m_drawingUnit[0]) ); + dc->SetFont( m_doc->GetDrawingSmuflFont( 100, false) ); + dc->DrawMusicText( IntToTupletFigures( measure->GetN() ) , ToDeviceContextX(system->GetDrawingX()), ToDeviceContextY(system->GetDrawingY() - m_doc->GetSpacingStaff() * m_doc->GetDrawingUnit(100)) ); dc->ResetFont(); } } @@ -128,17 +128,18 @@ void View::DrawSystem( DeviceContext *dc, System *system ) DrawSystemChildren(dc, system, system); // first draw the beams - DrawSystemList(dc, system, &typeid(Syl) ); - DrawSystemList(dc, system, &typeid(Tie) ); - DrawSystemList(dc, system, &typeid(Slur) ); + DrawSystemList(dc, system, SYL ); + DrawSystemList(dc, system, TIE ); + DrawSystemList(dc, system, SLUR ); dc->EndGraphic(system, this ); } -void View::DrawSystemList( DeviceContext *dc, System *system, const std::type_info *elementType ) +void View::DrawSystemList( DeviceContext *dc, System *system, const ClassId classId ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( system ); ListOfObjects *drawingList = system->GetDrawingList(); DocObject *element = NULL; @@ -147,16 +148,17 @@ void View::DrawSystemList( DeviceContext *dc, System *system, const std::type_in for (iter = drawingList->begin(); iter != drawingList->end(); ++iter) { + // We need to cast to DocObject for calling DrawTimeSpanningElement element = dynamic_cast(*iter); if (!element) continue; - if ( (typeid(*element) == *elementType) && (*elementType == typeid(Syl) ) ) { + if ( (element->Is() == classId) && (classId == SYL) ) { DrawTimeSpanningElement( dc, element, system ); } - if ( (typeid(*element) == *elementType) && (*elementType == typeid(Tie) ) ) { + if ( (element->Is() == classId) && (classId == TIE) ) { DrawTimeSpanningElement(dc, element, system ); } - if ( (typeid(*element) == *elementType) && (*elementType == typeid(Slur) ) ) { + if ( (element->Is() == classId) && (classId == SLUR) ) { DrawTimeSpanningElement(dc, element, system ); } } @@ -164,25 +166,25 @@ void View::DrawSystemList( DeviceContext *dc, System *system, const std::type_in void View::DrawScoreDef( DeviceContext *dc, ScoreDef *scoreDef, Measure *measure, int x, Barline *barLine ) { - assert( scoreDef ); // other asserted before - + assert( dc ); + assert( scoreDef ); // we need at least one measure to be able to draw the groups - we need access to the staff elements, assert( measure ); - StaffGrp *staffGrp = dynamic_cast(scoreDef->FindChildByType( &typeid(StaffGrp) ) ); + StaffGrp *staffGrp = dynamic_cast(scoreDef->FindChildByType( STAFFGRP ) ); if ( !staffGrp ) { return; } - if ( barLine == NULL) { + if (barLine == NULL) { // Draw the first staffGrp and from there its children recursively - DrawStaffGrp( dc, measure, staffGrp, x, true ); + DrawStaffGrp( dc, measure, staffGrp, x, true, !scoreDef->DrawLabels() ); DrawStaffDefLabels( dc, measure, scoreDef, !scoreDef->DrawLabels() ); // if this was true (non-abbreviated labels), set it to false for next one scoreDef->SetDrawLabels( false ); } - else{ + else { barLine->SetDrawingX( x ); dc->StartGraphic( barLine, "", barLine->GetUuid() ); DrawBarlines( dc, measure, staffGrp, barLine ); @@ -192,11 +194,14 @@ void View::DrawScoreDef( DeviceContext *dc, ScoreDef *scoreDef, Measure *measure return; } -void View::DrawStaffGrp( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, int x, bool topStaffGrp ) +void View::DrawStaffGrp( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, int x, bool topStaffGrp, bool abbreviations ) { + assert( dc ); assert( measure ); assert( staffGrp ); + int w, h; + ListOfObjects *staffDefs = staffGrp->GetList( staffGrp ); if ( staffDefs->empty() ) { return; @@ -212,9 +217,9 @@ void View::DrawStaffGrp( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp } // Get the corresponding staff looking at the previous (or first) measure - AttCommonNComparison comparisonFirst( &typeid(Staff), firstDef->GetN() ); + AttCommonNComparison comparisonFirst( STAFF, firstDef->GetN() ); Staff *first = dynamic_cast(measure->FindChildByAttComparison(&comparisonFirst, 1)); - AttCommonNComparison comparisonLast( &typeid(Staff), lastDef->GetN() ); + AttCommonNComparison comparisonLast( STAFF, lastDef->GetN() ); Staff *last = dynamic_cast(measure->FindChildByAttComparison(&comparisonLast, 1)); if (!first || !last ) { @@ -222,28 +227,65 @@ void View::DrawStaffGrp( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp return; } + int y_top = first->GetDrawingY(); // for the bottom position we need to take into account the number of lines and the staff size - int y_bottom = last->GetDrawingY() - (lastDef->GetLines() - 1) * m_doc->m_drawingDoubleUnit[last->staffSize]; + int y_bottom = last->GetDrawingY() - (lastDef->GetLines() - 1) * m_doc->GetDrawingDoubleUnit(last->m_drawingStaffSize); + int barLineWidth = m_doc->GetDrawingBarLineWidth(100); // ajdust the top and bottom according to staffline width - y_top += m_doc->m_style->m_staffLineWidth / 2; - y_bottom -= m_doc->m_style->m_staffLineWidth / 2; + y_top += m_doc->GetDrawingStaffLineWidth(100) / 2; + y_bottom -= m_doc->GetDrawingStaffLineWidth(100) / 2; + + if (staffGrp->HasLabel()) { + std::string label = staffGrp->GetLabel(); + if ( abbreviations ) { + label = staffGrp->GetLabelAbbr(); + } + + if ( label.length() != 0) { + // HARDCODED + int space = 4 * m_doc->GetDrawingBeamWidth(100, false); + int x_label = x - space; + int y_label = y_bottom - (y_bottom - y_top) / 2 - m_doc->GetDrawingUnit(100); + + dc->SetBrush( m_currentColour, AxSOLID ); + dc->SetFont(m_doc->GetDrawingLyricFont(100)); + + dc->GetTextExtent(label, &w, &h); + + // keep the widest width for the system + System *system = dynamic_cast(measure->GetFirstParent( SYSTEM ) ); + if (!system) { + LogDebug("Staff or System missing in View::DrawStaffDefLabels"); + } + else { + system->SetDrawingLabelsWidth( w + space ); + } + + dc->StartText( ToDeviceContextX( x_label ), ToDeviceContextY( y_label ), RIGHT ); + dc->DrawText( label ); + dc->EndText( ); + + dc->ResetFont(); + dc->ResetBrush(); + } + } // actually draw the line, the brace or the bracket - if ( topStaffGrp ) { - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_style->m_barlineWidth ); + if ( topStaffGrp && ( (firstDef != lastDef) || (staffGrp->GetSymbol() != SYMBOL_NONE) ) ) { + DrawVerticalLine( dc , y_top, y_bottom, x, barLineWidth); } // this will need to be changed with the next version of MEI will line means additional thick line - if ( staffGrp->GetSymbol() == STAFFGRP_LINE ) { - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_style->m_barlineWidth ); + if ( staffGrp->GetSymbol() == SYMBOL_line ) { + DrawVerticalLine( dc , y_top, y_bottom, x, barLineWidth); } - else if ( staffGrp->GetSymbol() == STAFFGRP_BRACE ) { - DrawBrace ( dc, x, y_top, y_bottom, last->staffSize ); + else if ( staffGrp->GetSymbol() == SYMBOL_brace ) { + DrawBrace ( dc, x, y_top, y_bottom, last->m_drawingStaffSize ); } - else if ( staffGrp->GetSymbol() == STAFFGRP_BRACKET ) { - DrawBracket( dc, x, y_top, y_bottom, last->staffSize ); - x -= 2 * m_doc->m_drawingBeamWidth[0] - m_doc->m_drawingBeamWhiteWidth[0]; + else if ( staffGrp->GetSymbol() == SYMBOL_bracket ) { + DrawBracket( dc, x, y_top, y_bottom, last->m_drawingStaffSize ); + x -= 2 * m_doc->GetDrawingBeamWidth(100, false) - m_doc->GetDrawingBeamWhiteWidth(100, false); } // recursively draw the children @@ -252,14 +294,14 @@ void View::DrawStaffGrp( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp for (i = 0; i < staffGrp->GetChildCount(); i++) { childStaffGrp = dynamic_cast(staffGrp->GetChild( i )); if ( childStaffGrp ) { - DrawStaffGrp( dc, measure, childStaffGrp, x ); + DrawStaffGrp( dc, measure, childStaffGrp, x, false, abbreviations ); } } } - void View::DrawStaffDefLabels( DeviceContext *dc, Measure *measure, ScoreDef *scoreDef, bool abbreviations ) { + assert( dc ); assert( measure ); assert( scoreDef ); @@ -276,9 +318,9 @@ void View::DrawStaffDefLabels( DeviceContext *dc, Measure *measure, ScoreDef *sc continue; } - AttCommonNComparison comparison( &typeid(Staff), staffDef->GetN() ); + AttCommonNComparison comparison( STAFF, staffDef->GetN() ); Staff *staff = dynamic_cast(measure->FindChildByAttComparison(&comparison, 1 )); - System *system = dynamic_cast(measure->GetFirstParent( &typeid(System) ) ); + System *system = dynamic_cast(measure->GetFirstParent( SYSTEM ) ); if (!staff || !system) { LogDebug("Staff or System missing in View::DrawStaffDefLabels"); @@ -296,15 +338,17 @@ void View::DrawStaffDefLabels( DeviceContext *dc, Measure *measure, ScoreDef *sc continue; } - int x = system->GetDrawingX() - 3 * m_doc->m_drawingBeamWidth[0]; - int y = staff->GetDrawingY() - (staffDef->GetLines() * m_doc->m_drawingDoubleUnit[staff->staffSize] / 2); + // HARDCODED + int space = 3 * m_doc->GetDrawingBeamWidth(100, false); + int x = system->GetDrawingX() - space; + int y = staff->GetDrawingY() - (staffDef->GetLines() * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize) / 2); dc->SetBrush( m_currentColour, AxSOLID ); - dc->SetFont( &m_doc->m_drawingLyricFonts[ 0 ] ); + dc->SetFont(m_doc->GetDrawingLyricFont(100)); // keep the widest width for the system dc->GetTextExtent( label, &w, &h); - system->SetDrawingLabelsWidth( w ); + system->SetDrawingLabelsWidth( w + space ); dc->StartText( ToDeviceContextX( x ), ToDeviceContextY( y ), RIGHT ); dc->DrawText( label ); @@ -320,18 +364,20 @@ void View::DrawStaffDefLabels( DeviceContext *dc, Measure *measure, ScoreDef *sc void View::DrawBracket ( DeviceContext *dc, int x, int y1, int y2, int staffSize) { + assert( dc ); + int x1, x2; - x2 = x - m_doc->m_drawingBeamWidth[0]; - x1 = x2 - m_doc->m_drawingBeamWidth[0]; + x2 = x - m_doc->GetDrawingBeamWidth(100, false); + x1 = x2 - m_doc->GetDrawingBeamWidth(100, false); DrawSmuflCode( dc, x1, y1,SMUFL_E003_bracketTop, staffSize, false ); DrawSmuflCode( dc, x1, y2,SMUFL_E004_bracketBottom, staffSize, false ); // adjust to top and bottom position so we make sure the is not white space between // the glyphs and the line - y1 += m_doc->m_style->m_stemWidth; - y2 -= m_doc->m_style->m_stemWidth; + y1 += m_doc->GetDrawingStemWidth(100); + y2 -= m_doc->GetDrawingStemWidth(100); DrawFullRectangle(dc, x1 , y1, x2, y2 ); return; @@ -339,33 +385,33 @@ void View::DrawBracket ( DeviceContext *dc, int x, int y1, int y2, int staffSize void View::DrawBrace ( DeviceContext *dc, int x, int y1, int y2, int staffSize) -{ +{ + assert( dc ); + int new_coords[2][6]; Point points[4]; - - assert( dc ); // DC cannot be NULL - int penWidth = m_doc->m_style->m_stemWidth; + int penWidth = m_doc->GetDrawingStemWidth(100); y1 -= penWidth; y2 += penWidth; SwapY( &y1, &y2 ); int ymed, xdec, fact; - x -= m_doc->m_drawingBeamWhiteWidth[ staffSize ]; // distance entre barre et debut accolade + x -= m_doc->GetDrawingBeamWhiteWidth(staffSize, false); // distance entre barre et debut accolade ymed = (y1 + y2) / 2; - fact = m_doc->m_drawingBeamWidth[ staffSize ] + m_doc->m_style->m_stemWidth; + fact = m_doc->GetDrawingBeamWhiteWidth(staffSize, false) + m_doc->GetDrawingStemWidth(100); xdec = ToDeviceContextX(fact); points[0].x = ToDeviceContextX(x); points[0].y = ToDeviceContextY(y1); - points[1].x = ToDeviceContextX(x - m_doc->m_drawingDoubleUnit[ staffSize ]*2); - points[1].y = points[0].y - ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staffSize ]*3); - points[3].x = ToDeviceContextX(x - m_doc->m_drawingDoubleUnit[ staffSize ] ); + points[1].x = ToDeviceContextX(x - m_doc->GetDrawingDoubleUnit(staffSize) * 2); + points[1].y = points[0].y - ToDeviceContextX( m_doc->GetDrawingDoubleUnit(staffSize) * 3); + points[3].x = ToDeviceContextX(x - m_doc->GetDrawingDoubleUnit(staffSize) ); points[3].y = ToDeviceContextY(ymed); - points[2].x = ToDeviceContextX(x + m_doc->m_drawingUnit[staffSize]); - points[2].y = points[3].y + ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staffSize ]); + points[2].x = ToDeviceContextX(x + m_doc->GetDrawingUnit(staffSize)); + points[2].y = points[3].y + ToDeviceContextX( m_doc->GetDrawingDoubleUnit(staffSize)); new_coords[0][0] = points[1].x; new_coords[0][1] = points[1].y; @@ -379,7 +425,7 @@ void View::DrawBrace ( DeviceContext *dc, int x, int y1, int y2, int staffSize) points[1].x += xdec; points[2].x += xdec; - points[1].y = points[0].y + ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staffSize ]*2); + points[1].y = points[0].y + ToDeviceContextX( m_doc->GetDrawingDoubleUnit(staffSize) * 2); new_coords[1][0] = points[1].x; new_coords[1][1] = points[1].y; @@ -394,9 +440,9 @@ void View::DrawBrace ( DeviceContext *dc, int x, int y1, int y2, int staffSize) dc->DrawComplexBezierPath(ToDeviceContextX(x), ToDeviceContextY(y1), new_coords[0], new_coords[1]); // on produit l'image reflet vers le bas: 0 est identique - points[1].y = points[0].y - ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staffSize ]*2); + points[1].y = points[0].y - ToDeviceContextX( m_doc->GetDrawingDoubleUnit(staffSize)*2); points[3].y = ToDeviceContextY(y2); - points[2].y = points[3].y + ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staffSize ]*3); + points[2].y = points[3].y + ToDeviceContextX( m_doc->GetDrawingDoubleUnit(staffSize)*3); new_coords[0][0] = points[1].x; new_coords[0][1] = points[1].y; @@ -410,7 +456,7 @@ void View::DrawBrace ( DeviceContext *dc, int x, int y1, int y2, int staffSize) points[1].x -= xdec; points[2].x -= xdec; - points[2].y = points[3].y - ToDeviceContextX( m_doc->m_drawingDoubleUnit[ staffSize ]); + points[2].y = points[3].y - ToDeviceContextX( m_doc->GetDrawingDoubleUnit(staffSize)); new_coords[1][0] = points[1].x; new_coords[1][1] = points[1].y; @@ -430,11 +476,13 @@ void View::DrawBrace ( DeviceContext *dc, int x, int y1, int y2, int staffSize) void View::DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, Barline *barLine ) { + assert( dc ); assert( measure ); assert( staffGrp ); + assert( barLine ); - if ( !staffGrp->GetBarthru() ) { - // recursively draw the children (staffDef or staffGrp) + if (staffGrp->GetBarthru() != BOOLEAN_true) { + // recursively draw the children (staffDef or staffGrp) - we assume @barthru is false by default int i; StaffGrp *childStaffGrp = NULL; StaffDef *childStaffDef = NULL; @@ -445,7 +493,7 @@ void View::DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp DrawBarlines( dc, measure, childStaffGrp, barLine ); } else if ( childStaffDef ) { - AttCommonNComparison comparison( &typeid(Staff), childStaffDef->GetN() ); + AttCommonNComparison comparison( STAFF, childStaffDef->GetN() ); Staff *staff = dynamic_cast(measure->FindChildByAttComparison(&comparison, 1 ) ); if (!staff ) { LogDebug("Could not get staff (%d) while drawing staffGrp - Vrv::DrawBarlines", childStaffDef->GetN() ); @@ -453,7 +501,7 @@ void View::DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp } int y_top = staff->GetDrawingY(); // for the bottom position we need to take into account the number of lines and the staff size - int y_bottom = staff->GetDrawingY() - (childStaffDef->GetLines() - 1) * m_doc->m_drawingDoubleUnit[staff->staffSize]; + int y_bottom = staff->GetDrawingY() - (childStaffDef->GetLines() - 1) * m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); DrawBarline( dc, y_top, y_bottom, barLine ); if ( barLine->HasRepetitionDots() ) { DrawBarlineDots( dc, childStaffDef, staff, barLine ); @@ -478,9 +526,9 @@ void View::DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp } // Get the corresponding staff looking at the previous (or first) measure - AttCommonNComparison comparisonFirst( &typeid(Staff), firstDef->GetN() ); + AttCommonNComparison comparisonFirst( STAFF, firstDef->GetN() ); Staff *first = dynamic_cast(measure->FindChildByAttComparison(&comparisonFirst, 1)); - AttCommonNComparison comparisonLast( &typeid(Staff), lastDef->GetN() ); + AttCommonNComparison comparisonLast( STAFF, lastDef->GetN() ); Staff *last = dynamic_cast(measure->FindChildByAttComparison(&comparisonLast, 1)); if (!first || !last ) { @@ -490,7 +538,7 @@ void View::DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp int y_top = first->GetDrawingY(); // for the bottom position we need to take into account the number of lines and the staff size - int y_bottom = last->GetDrawingY() - (lastDef->GetLines() - 1) * m_doc->m_drawingDoubleUnit[last->staffSize]; + int y_bottom = last->GetDrawingY() - (lastDef->GetLines() - 1) * m_doc->GetDrawingDoubleUnit(last->m_drawingStaffSize); DrawBarline( dc, y_top, y_bottom, barLine ); @@ -501,7 +549,7 @@ void View::DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp for (i = 0; i < staffGrp->GetChildCount(); i++) { childStaffDef = dynamic_cast(staffGrp->GetChild( i )); if ( childStaffDef ) { - AttCommonNComparison comparison( &typeid(Staff), childStaffDef->GetN() ); + AttCommonNComparison comparison( STAFF, childStaffDef->GetN() ); Staff *staff = dynamic_cast(measure->FindChildByAttComparison(&comparison, 1)); if (!staff ) { LogDebug("Could not get staff (%d) while drawing staffGrp - Vrv::DrawBarlines", childStaffDef->GetN() ); @@ -517,110 +565,93 @@ void View::DrawBarlines( DeviceContext *dc, Measure *measure, StaffGrp *staffGrp void View::DrawBarline( DeviceContext *dc, int y_top, int y_bottom, Barline *barLine ) { assert( dc ); + assert( barLine ); // adjust the top and bottom - y_top += m_doc->m_style->m_staffLineWidth / 2; - y_bottom -= m_doc->m_style->m_staffLineWidth / 2; + y_top += m_doc->GetDrawingStaffLineWidth(100) / 2; + y_bottom -= m_doc->GetDrawingStaffLineWidth(100) / 2; int x = barLine->GetDrawingX(); - int x1 = x - m_doc->m_drawingBeamWidth[0] - m_doc->m_style->m_barlineWidth; - int x2 = x + m_doc->m_drawingBeamWidth[0] + m_doc->m_style->m_barlineWidth; + int barLineWidth = m_doc->GetDrawingBarLineWidth(100); + int x1 = x - m_doc->GetDrawingBeamWidth(100, false) - barLineWidth; + int x2 = x + m_doc->GetDrawingBeamWidth(100, false) + barLineWidth; if (barLine->GetRend() == BARRENDITION_single) { - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_style->m_barlineWidth); + DrawVerticalLine( dc , y_top, y_bottom, x, barLineWidth); } else if (barLine->GetRend() == BARRENDITION_rptboth) { - DrawVerticalLine( dc , y_top, y_bottom, x1, m_doc->m_style->m_barlineWidth); - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_drawingBeamWidth[0]); - DrawVerticalLine( dc , y_top, y_bottom, x2, m_doc->m_style->m_barlineWidth); + DrawVerticalLine( dc , y_top, y_bottom, x1, barLineWidth); + DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->GetDrawingBeamWidth(100, false)); + DrawVerticalLine( dc , y_top, y_bottom, x2, barLineWidth); } else if (barLine->GetRend() == BARRENDITION_rptstart) { - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_drawingBeamWidth[0]); - DrawVerticalLine( dc , y_top, y_bottom, x2, m_doc->m_style->m_barlineWidth); + DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->GetDrawingBeamWidth(100, false)); + DrawVerticalLine( dc , y_top, y_bottom, x2, barLineWidth); } else if (barLine->GetRend() == BARRENDITION_rptend) { - DrawVerticalLine( dc , y_top, y_bottom, x1, m_doc->m_style->m_barlineWidth); - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_drawingBeamWidth[0]); + DrawVerticalLine( dc , y_top, y_bottom, x1, barLineWidth); + DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->GetDrawingBeamWidth(100, false)); } else if (barLine->GetRend() == BARRENDITION_dbl) { // Narrow the bars a little bit - should be centered? - x1 += m_doc->m_style->m_barlineWidth; - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_style->m_barlineWidth); - DrawVerticalLine( dc , y_top, y_bottom, x1, m_doc->m_style->m_barlineWidth); + x1 += barLineWidth; + DrawVerticalLine( dc , y_top, y_bottom, x, barLineWidth); + DrawVerticalLine( dc , y_top, y_bottom, x1, barLineWidth); } else if (barLine->GetRend() == BARRENDITION_end) { - DrawVerticalLine( dc , y_top, y_bottom, x1, m_doc->m_style->m_barlineWidth); - DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->m_drawingBeamWidth[0]); + DrawVerticalLine( dc , y_top, y_bottom, x1, barLineWidth); + DrawVerticalLine( dc , y_top, y_bottom, x, m_doc->GetDrawingBeamWidth(100, false)); + } + else { + barLine->SetEmptyBB(); } } void View::DrawBarlineDots ( DeviceContext *dc, StaffDef *staffDef, Staff *staff, Barline *barLine ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staffDef ); + assert( staff ); + assert( barLine ); int x = barLine->GetDrawingX(); - int x1 = x - 2 * m_doc->m_drawingBeamWidth[0] - m_doc->m_style->m_barlineWidth; - int x2 = x + 2 * m_doc->m_drawingBeamWidth[0] + m_doc->m_style->m_barlineWidth; + int x1 = x - 2 * m_doc->GetDrawingBeamWidth(staff->m_drawingStaffSize, false) - m_doc->GetDrawingBarLineWidth(staff->m_drawingStaffSize); + int x2 = x + 2 * m_doc->GetDrawingBeamWidth(staff->m_drawingStaffSize, false) + m_doc->GetDrawingBarLineWidth(staff->m_drawingStaffSize); - int y_bottom = staff->GetDrawingY() - staffDef->GetLines() * m_doc->m_drawingUnit[staff->staffSize]; - int y_top = y_bottom + m_doc->m_drawingDoubleUnit[staff->staffSize]; + int y_bottom = staff->GetDrawingY() - staffDef->GetLines() * m_doc->GetDrawingUnit(staff->m_drawingStaffSize); + int y_top = y_bottom + m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); if ((barLine->GetRend() == BARRENDITION_rptstart) || (barLine->GetRend() == BARRENDITION_rptboth)) { - DrawDot(dc, x2, y_bottom ); - DrawDot(dc, x2, y_top ); + DrawDot(dc, x2, y_bottom, staff->m_drawingStaffSize); + DrawDot(dc, x2, y_top, staff->m_drawingStaffSize); } if ((barLine->GetRend() == BARRENDITION_rptend) || (barLine->GetRend() == BARRENDITION_rptboth)) { - DrawDot(dc, x1, y_bottom ); - DrawDot(dc, x1, y_top ); + DrawDot(dc, x1, y_bottom, staff->m_drawingStaffSize); + DrawDot(dc, x1, y_top, staff->m_drawingStaffSize); } return; } - -void View::DrawPartialBarline ( DeviceContext *dc, System *system, int x, Staff *pportee) -{ - assert( dc ); // DC cannot be NULL - - if ( !system ) { - return; - } - - /* ax3 - int b, bb; - - Staff *next = system->GetNext( NULL ); - if ( next ) - { - b = pportee->m_drawingY - m_doc->m_drawingStaffSize[ pportee->staffSize ]*2; - bb = next->m_drawingY - m_doc->m_drawingStaffSize[ next->staffSize]; - - DrawVerticalLine ( dc, b, bb, x, m_doc->m_style->m_barlineWidth); - - } - */ - -} - - - //---------------------------------------------------------------------------- // View - Measure //---------------------------------------------------------------------------- void View::DrawMeasure( DeviceContext *dc, Measure *measure, System *system ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( measure ); + assert( system ); // This is a special case where we do not draw (SVG, Bounding boxes, etc.) the measure if un-measured music if ( measure->IsMeasuredMusic()) { @@ -641,26 +672,12 @@ void View::DrawMeasure( DeviceContext *dc, Measure *measure, System *system ) } } -void View::DrawMeasureElement( DeviceContext *dc, MeasureElement *element, Measure *measure, System *system) -{ - assert(system); // Pointer to layer cannot be NULL" - assert(measure); // Pointer to staff cannot be NULL" - - if (dynamic_cast(element)) { - dc->StartGraphic( element, "", element->GetUuid() ); - dc->EndGraphic( element, this); - system->AddToDrawingList(element); - } - else if (dynamic_cast(element)) { - DrawStaff(dc, dynamic_cast(element), measure, system); - } -} //---------------------------------------------------------------------------- -// View - MeasureElement +// View - Staff //---------------------------------------------------------------------------- -int View::CalculatePitchPosY ( Staff *staff, char pname, int dec_clef, int oct) +int View::CalculatePitchPosY ( Staff *staff, data_PITCHNAME pname, int dec_clef, int oct) { assert(staff); // Pointer to staff cannot be NULL" @@ -671,16 +688,16 @@ int View::CalculatePitchPosY ( Staff *staff, char pname, int dec_clef, int oct) // Old Wolfgang code with octave stored in an unsigned char - this could be refactored oct -= OCTAVE_OFFSET; - y_int = ((dec_clef + oct*7) - 9 ) * m_doc->m_drawingUnit[staff->staffSize]; + y_int = ((dec_clef + oct*7) - 9 ) * m_doc->GetDrawingUnit(staff->m_drawingStaffSize); if (staff->m_drawingLines > 5) { - y_int -= ((staff->m_drawingLines - 5) * 2) * m_doc->m_drawingUnit[staff->staffSize]; + y_int -= ((staff->m_drawingLines - 5) * 2) * m_doc->GetDrawingUnit(staff->m_drawingStaffSize); } /* exprime distance separant m_drawingY de position 1e Si, corrigee par dec_clef et oct. Elle est additionnee ensuite, donc elle doit etre NEGATIVE si plus bas que m_drawingY */ for (i=0; i<(signed)sizeof(touches); i++) { - if (*(ptouche+i) == pname) return (y_int += ((i+1)*m_doc->m_drawingUnit[staff->staffSize])); + if (*(ptouche+i) == pname) return (y_int += ((i+1)*m_doc->GetDrawingUnit(staff->m_drawingStaffSize))); } return 0; } @@ -689,7 +706,7 @@ int View::CalculateRestPosY ( Staff *staff, char duration) { assert(staff); // Pointer to staff cannot be NULL" - int staff_space = m_doc->m_drawingUnit[staff->staffSize]; + int staff_space = m_doc->GetDrawingUnit(staff->m_drawingStaffSize); int base = -17 * staff_space; // -17 is a magic number copied from above int offset; @@ -705,8 +722,6 @@ int View::CalculateRestPosY ( Staff *staff, char duration) case DUR_64: offset = 10; break; case DUR_128: offset = 10; break; case DUR_256: offset = 9; break; - case VALSilSpec: offset = 15; break; // MM rests have same height as wholes - default: offset = 12; break; // Signal an error, put the clef up high } return base + staff_space * offset; @@ -715,13 +730,19 @@ int View::CalculateRestPosY ( Staff *staff, char duration) void View::DrawStaff( DeviceContext *dc, Staff *staff, Measure *measure, System *system ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staff ); + assert( measure ); + assert( system ); dc->StartGraphic( staff, "", staff->GetUuid()); // Doing it here might be problematic with cross-staff, even though the default value will be 5 if ( StaffDef *staffDef = m_drawingScoreDef.GetStaffDef( staff->GetN() ) ) { staff->m_drawingLines = staffDef->GetLines( ) ; + if (staffDef->HasScale()) { + staff->m_drawingStaffSize = staffDef->GetScale(); + } } DrawStaffLines( dc, staff, measure, system ); @@ -737,9 +758,15 @@ void View::DrawStaff( DeviceContext *dc, Staff *staff, Measure *measure, System } +/* Linewidth for staff lines in mensural notation, relative to the "normal" width of staff lines */ +#define MENSURAL_LINEWIDTH_FACTOR 0.5 + void View::DrawStaffLines( DeviceContext *dc, Staff *staff, Measure *measure, System *system ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( staff ); + assert( measure ); + assert( system ); if (staff->invisible) return; @@ -752,17 +779,19 @@ void View::DrawStaffLines( DeviceContext *dc, Staff *staff, Measure *measure, Sy //x2 = m_doc->m_drawingPageWidth - m_doc->m_drawingPageLeftMar - m_doc->m_drawingPageRightMar - system->m_systemRightMar; x1 = measure->GetDrawingX(); - x2 = x1 + measure->GetWidth(); // - m_doc->m_style->m_barlineWidth / 2; + x2 = x1 + measure->GetWidth(); - dc->SetPen( m_currentColour, ToDeviceContextX( m_doc->m_style->m_staffLineWidth ), AxSOLID ); + //dc->SetPen( m_currentColour, ToDeviceContextX( m_doc->m_style->m_staffLineWidth ), AxSOLID ); + int lineWidth = (int)(m_doc->GetDrawingStaffLineWidth(staff->m_drawingStaffSize) * MENSURAL_LINEWIDTH_FACTOR); + dc->SetPen( m_currentColour, ToDeviceContextX( lineWidth ), AxSOLID ); + dc->SetPen( m_currentColour, ToDeviceContextX( m_doc->GetDrawingStaffLineWidth(staff->m_drawingStaffSize) ), AxSOLID ); dc->SetBrush( m_currentColour , AxSOLID ); for(j = 0;j < staff->m_drawingLines; j++) { dc->DrawLine( ToDeviceContextX (x1) , ToDeviceContextY ( yy ) , ToDeviceContextX (x2) , ToDeviceContextY ( yy ) ); // For drawing rectangles insteam of line - //DrawFullRectangle(dc, x1, yy - m_doc->m_style->m_barlineWidth / 2, x2, yy + m_doc->m_style->m_barlineWidth / 2 ); - yy -= m_doc->m_drawingDoubleUnit[staff->staffSize]; + yy -= m_doc->GetDrawingDoubleUnit(staff->m_drawingStaffSize); } staff->m_drawingHeight = staff->GetDrawingY() - yy; @@ -773,211 +802,6 @@ void View::DrawStaffLines( DeviceContext *dc, Staff *staff, Measure *measure, Sy return; } -void View::DrawTimeSpanningElement( DeviceContext *dc, DocObject *element, System *system ) -{ - assert(dynamic_cast(element)); // Element must be a TimeSpanningInterface - TimeSpanningInterface *interface = dynamic_cast(element); - - if ( !interface->HasStartAndEnd() ) return; - - // Get the parent system of the first and last note - System *parentSystem1 = dynamic_cast( interface->GetStart()->GetFirstParent( &typeid(System) ) ); - System *parentSystem2 = dynamic_cast( interface->GetEnd()->GetFirstParent( &typeid(System) ) ); - - int x1, x2; - Staff *staff = NULL; - DocObject *graphic = NULL; - char spanningType = SPANNING_START_END; - - // The both correspond to the current system, which means no system break in-between (simple case) - if (( system == parentSystem1 ) && ( system == parentSystem2 )) { - // Get the parent staff for calculating the y position - staff = dynamic_cast( interface->GetStart()->GetFirstParent( &typeid(Staff) ) ); - if ( !Check( staff ) ) return; - - x1 = interface->GetStart()->GetDrawingX(); - x2 = interface->GetEnd()->GetDrawingX(); - graphic = element; - } - // Only the first parent is the same, this means that the element is "open" at the end of the system - else if ( system == parentSystem1 ) { - // We need the last measure of the system for x2 - Measure *last = dynamic_cast( system->FindChildByType( &typeid(Measure), 1, BACKWARD ) ); - if ( !Check( last ) ) return; - staff = dynamic_cast( interface->GetStart()->GetFirstParent( &typeid(Staff) ) ); - if ( !Check( staff ) ) return; - - x1 = interface->GetStart()->GetDrawingX(); - x2 = last->GetDrawingX() + last->GetRightBarlineX(); - graphic = element; - spanningType = SPANNING_START; - } - // We are in the system of the last note - draw the element from the beginning of the system - else if ( system == parentSystem2 ) { - // We need the first measure of the system for x1 - Measure *first = dynamic_cast( system->FindChildByType( &typeid(Measure), 1, FORWARD ) ); - if ( !Check( first ) ) return; - // Get the staff of the first note - however, not the staff we need - Staff *lastStaff = dynamic_cast( interface->GetEnd()->GetFirstParent( &typeid(Staff) ) ); - if ( !Check( lastStaff ) ) return; - // We need the first staff from the current system, i.e., the first measure. - AttCommonNComparison comparison( &typeid(Staff), lastStaff->GetN() ); - staff = dynamic_cast(system->FindChildByAttComparison(&comparison, 2)); - if (!staff ) { - LogDebug("Could not get staff (%d) while drawing staffGrp - View::DrawSylConnector", lastStaff->GetN() ); - return; - } - // Also try to get a first note - we should change this once we have a x position in measure that - // takes into account the scoreDef - Note *firstNote = dynamic_cast( staff->FindChildByType( &typeid(Note) ) ); - - x1 = firstNote ? firstNote->GetDrawingX() - 2 * m_doc->m_drawingDoubleUnit[staff->staffSize] : first->GetDrawingX(); - x2 = interface->GetEnd()->GetDrawingX(); - spanningType = SPANNING_END; - } - // Rare case where neither the first note and the last note are in the current system - draw the connector throughout the system - else { - // We need the first measure of the system for x1 - Measure *first = dynamic_cast( system->FindChildByType( &typeid(Measure), 1, FORWARD ) ); - if ( !Check( first ) ) return; - // Also try to get a first note - we should change this once we have a x position in measure that - // takes into account the scoreDef - Note *firstNote = dynamic_cast( first->FindChildByType( &typeid(Note) ) ); - // We need the last measure of the system for x2 - Measure *last = dynamic_cast( system->FindChildByType( &typeid(Measure), 1, BACKWARD ) ); - if ( !Check( last ) ) return; - // Get the staff of the first note - however, not the staff we need - Staff *firstStaff = dynamic_cast( interface->GetStart()->GetFirstParent( &typeid(Staff) ) ); - if ( !Check( firstStaff ) ) return; - - // We need the staff from the current system, i.e., the first measure. - AttCommonNComparison comparison( &typeid(Staff), firstStaff->GetN() ); - staff = dynamic_cast(first->FindChildByAttComparison(&comparison, 1)); - if (!staff ) { - LogDebug("Could not get staff (%d) while drawing staffGrp - View::DrawSylConnector", firstStaff->GetN() ); - return; - } - - x1 = firstNote ? firstNote->GetDrawingX() - 2 * m_doc->m_drawingDoubleUnit[staff->staffSize] : first->GetDrawingX(); - x2 = last->GetDrawingX() + last->GetRightBarlineX(); - spanningType = SPANNING_MIDDLE; - } - - if (dynamic_cast(element)) { - DrawTieOrSlur(dc, dynamic_cast(element), x1, x2, staff, spanningType, graphic); - } - else if (dynamic_cast(element)) { - DrawSylConnector(dc, dynamic_cast(element), x1, x2, staff, spanningType, graphic); - } - else if (dynamic_cast(element)) { - DrawTieOrSlur(dc, dynamic_cast(element), x1, x2, staff, spanningType, graphic); - } - -} - -void View::DrawTieOrSlur( DeviceContext *dc, MeasureElement *element, int x1, int x2, Staff *staff, - char spanningType, DocObject *graphic ) -{ - assert(dynamic_cast(element) || dynamic_cast(element)); // Element must be a Tie or a Slur - TimeSpanningInterface *interface = dynamic_cast(element); - - LayerElement *note1 = NULL; - LayerElement *note2 = NULL; - - bool up = true; - data_STEMDIRECTION noteStemDir = STEMDIRECTION_NONE; - int y1, y2; - - note1 = interface->GetStart(); - note2 = interface->GetEnd(); - - if ( !note1 && !note2 ) { - // no note, obviously nothing to do... - return; - } - - Layer* layer1 = dynamic_cast(note1->GetFirstParent(&typeid(Layer))); - Layer* layer2 = dynamic_cast(note2->GetFirstParent(&typeid(Layer))); - - if ( layer1->GetN() != layer2->GetN() ) { - LogWarning("Ties between different layers may not be fully supported."); - } - - //the normal case - if ( spanningType == SPANNING_START_END ) { - assert( note1 && note2 ); - // Copied from DrawNote - // We could use the stamDir information - // but then we have to take in account (1) beams (2) stemmed and non stemmed notes tied together - y1 = note1->GetDrawingY(); - y2 = note2->GetDrawingY(); - // for now we only look at the first note - needs to be improved - // m_drawingStemDir it not set properly in beam - needs to be fixed. - if (dynamic_cast(note1)) noteStemDir = dynamic_cast(note1)->m_drawingStemDir; - else if (dynamic_cast(note1)) noteStemDir = dynamic_cast(note1)->GetDrawingStemDir(); - else assert(false); - } - // This is the case when the tie is split over two system of two pages. - // In this case, we are now drawing its beginning to the end of the measure (i.e., the last aligner) - else if ( spanningType == SPANNING_START ) { - y1 = note1->GetDrawingY(); - y2 = y1; - // m_drawingStemDir it not set properly in beam - needs to be fixed. - if (dynamic_cast(note1)) noteStemDir = dynamic_cast(note1)->m_drawingStemDir; - else if (dynamic_cast(note1)) noteStemDir = dynamic_cast(note1)->GetDrawingStemDir(); - else assert(false); - } - // Now this is the case when the tie is split but we are drawing the end of it - else if ( spanningType == SPANNING_END ) { - y1 = note2->GetDrawingY(); - y2 = y1; - x2 = note2->GetDrawingX(); - if (dynamic_cast(note2)) noteStemDir = dynamic_cast(note2)->m_drawingStemDir; - else if (dynamic_cast(note2)) noteStemDir = dynamic_cast(note2)->GetDrawingStemDir(); - else assert(false); - } - // Finally - else { - LogDebug("Slur across an entire system is not supported"); - return; - } - - assert( dynamic_cast(note1) || dynamic_cast(note1)); - //layer direction trumps note direction - if (layer1 && layer1->GetDrawingStemDir() != STEMDIRECTION_NONE){ - up = layer1->GetDrawingStemDir() == STEMDIRECTION_up ? true : false; - } - else if (noteStemDir == STEMDIRECTION_up) { - up = false; - } - else if (noteStemDir == STEMDIRECTION_NONE) { - // no information from the note stem directions, look at the position in the notes - int center = staff->GetDrawingY() - m_doc->m_drawingDoubleUnit[staff->staffSize] * 2; - up = (y1 > center) ? true : false; - } - - // FIXME, take in account elements that can be netween notes, eg keys time etc - // 20 height nice with 70, not nice with 50 - // Also remove HARDCODED values! - if (up) { - y1 += m_doc->m_drawingUnit[staff->staffSize] * 1.6; - y2 += m_doc->m_drawingUnit[staff->staffSize] * 1.6; - } - else { - y1 -= m_doc->m_drawingUnit[staff->staffSize] * 1.6; - y2 -= m_doc->m_drawingUnit[staff->staffSize] * 1.6; - } - - if ( graphic ) dc->ResumeGraphic(graphic, graphic->GetUuid()); - else dc->StartGraphic(element, "spanning-tie-or-slur", ""); - dc->DeactivateGraphic(); - DrawTieOrSlurBezier(dc, x1, y1, x2, y2, !up); - dc->ReactivateGraphic(); - - if ( graphic ) dc->EndResumedGraphic(graphic, this); - else dc->EndGraphic(element, this); -} - //---------------------------------------------------------------------------- // View - Layer //---------------------------------------------------------------------------- @@ -988,23 +812,24 @@ void View::DrawTieOrSlur( DeviceContext *dc, MeasureElement *element, int x1, in int View::CalculatePitchCode ( Layer *layer, int y_n, int x_pos, int *octave ) { - assert(layer); // Pointer to layer cannot be NULL" - assert(layer->m_parent); // Pointer to staff cannot be NULL" - assert(dynamic_cast(layer->m_parent)); // Pointer to parent has to be a staff + assert( layer ); + assert( octave ); + + Staff *parentStaff = dynamic_cast(layer->GetFirstParent( STAFF ) ); + assert( parentStaff ); // Pointer to parent has to be a staff static int touches[] = {PITCHNAME_c,PITCHNAME_d,PITCHNAME_e,PITCHNAME_f,PITCHNAME_g,PITCHNAME_a,PITCHNAME_b}; int y_dec, yb, plafond; int degres, octaves, position, code; char clefId=0; - Staff *parentStaff = dynamic_cast(layer->m_parent); - int staffSize = parentStaff->staffSize; + int staffSize = parentStaff->m_drawingStaffSize; // calculer position du do central en fonction clef - //y_n += (int) m_doc->m_drawingUnit[staffSize]/4; - yb = parentStaff->GetDrawingY() - m_doc->m_drawingStaffSize[staffSize]; // UT1 default + //y_n += (int) m_doc->GetDrawingUnit(staffSize)/4; + yb = parentStaff->GetDrawingY() - m_doc->GetDrawingStaffSize(staffSize); // UT1 default - plafond = yb + 8 * m_doc->m_drawingOctaveSize[staffSize]; + plafond = yb + 8 * m_doc->GetDrawingOctaveSize(staffSize); if (y_n > plafond) y_n = plafond; @@ -1016,16 +841,16 @@ int View::CalculatePitchCode ( Layer *layer, int y_n, int x_pos, int *octave ) Clef *clef = layer->GetClef (pelement); if (clef) { clefId = clef->GetClefId(); - yb += (clef->GetClefOffset()) * m_doc->m_drawingUnit[staffSize]; // UT1 reel + yb += (clef->GetClefOffset()) * m_doc->GetDrawingUnit(staffSize); // UT1 reel } - yb -= 4 * m_doc->m_drawingOctaveSize[staffSize]; // UT, note la plus grave + yb -= 4 * m_doc->GetDrawingOctaveSize(staffSize); // UT, note la plus grave y_dec = y_n - yb; // decalage par rapport a UT le plus grave if (y_dec< 0) y_dec = 0; - degres = y_dec / m_doc->m_drawingUnit[staffSize]; // ecart en degres (PITCHNAME_c..PITCHNAME_b) par rapport a UT1 + degres = y_dec / m_doc->GetDrawingUnit(staffSize); // ecart en degres (PITCHNAME_c..PITCHNAME_b) par rapport a UT1 octaves = degres / 7; position = degres % 7; @@ -1035,31 +860,12 @@ int View::CalculatePitchCode ( Layer *layer, int y_n, int x_pos, int *octave ) return (code); } -Point CalcPositionAfterRotation( Point point , float rot_alpha, Point center) -{ - int distCenterX = (point.x - center.x); - int distCenterY = (point.y - center.y); - // pythagore, distance entre le point d'origine et le centre - int distCenter = (int)sqrt( pow( (double)distCenterX, 2 ) + pow( (double)distCenterY, 2 ) ); - - // angle d'origine entre l'axe x et la droite passant par le point et le centre - float alpha = atan ( (float)distCenterX / (float)(distCenterY) ); - - Point new_p = center; - int new_distCenterX, new_distCenterY; - - new_distCenterX = ( (int)( sin( alpha - rot_alpha ) * distCenter ) ); - new_p.x += new_distCenterX; - - new_distCenterY = ( (int)( cos( alpha - rot_alpha ) * distCenter ) ); - new_p.y += new_distCenterY; - - return new_p; -} - void View::DrawLayer( DeviceContext *dc, Layer *layer, Staff *staff, Measure *measure) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( layer ); + assert( staff ); + assert( measure ); dc->StartGraphic( layer, "", layer->GetUuid()); @@ -1082,44 +888,35 @@ void View::DrawLayer( DeviceContext *dc, Layer *layer, Staff *staff, Measure *me DrawLayerChildren(dc, layer, layer, staff, measure); - // first draw the tuplets - DrawLayerList(dc, layer, staff, measure, &typeid(Tuplet) ); - // then ties - DrawLayerList(dc, layer, staff, measure, &typeid(Tie) ); - // then slurs - DrawLayerList(dc, layer, staff, measure, &typeid(Slur) ); + // first draw the postponed tuplets + DrawLayerList(dc, layer, staff, measure, TUPLET ); dc->EndGraphic( layer, this ); } -void View::DrawLayerList( DeviceContext *dc, Layer *layer, Staff *staff, Measure *measure, const std::type_info *elementType ) +void View::DrawLayerList( DeviceContext *dc, Layer *layer, Staff *staff, Measure *measure, const ClassId classId ) { - assert( dc ); // DC cannot be NULL + assert( dc ); + assert( layer ); + assert( staff ); + assert( measure ); ListOfObjects *drawingList = layer->GetDrawingList(); - LayerElement *element = NULL; - ListOfObjects::iterator iter; for (iter = drawingList->begin(); iter != drawingList->end(); ++iter) { - element = dynamic_cast(*iter); - if (!element) continue; - - if ( (typeid(*element) == *elementType) && (*elementType == typeid(Tuplet) ) ) { - Tuplet *tuplet = dynamic_cast(element); + if ( ((*iter)->Is() == classId) && (classId == TUPLET) ) { + Tuplet *tuplet = dynamic_cast((*iter)); + assert( tuplet ); dc->ResumeGraphic(tuplet, tuplet->GetUuid()); DrawTupletPostponed( dc, tuplet, layer, staff ); dc->EndResumedGraphic(tuplet, this); } - else if ( (typeid(*element) == *elementType) && (*elementType == typeid(Tie) ) ) { - // Not sure about ReStart and ReEnd Tie and Slur - DrawTie( dc, element, layer, staff, measure ); - } - else if ( (typeid(*element) == *elementType) && (*elementType == typeid(Slur) ) ) { - // Not sure about ReStart and ReEnd Tie and Slur - DrawTie( dc, element, layer, staff, measure ); + else { + // This should never happen + LogError("Element '%s' in the layer list cannot be drawn", (*iter)->GetClassName().c_str()); } } } @@ -1130,25 +927,26 @@ void View::DrawLayerList( DeviceContext *dc, Layer *layer, Staff *staff, Measure void View::DrawSystemChildren( DeviceContext *dc, Object *parent, System *system ) { - Measure *measure = NULL; - ScoreDef *scoreDef = NULL; - EditorialElement *editorialElement = NULL; + assert( dc ); + assert( parent ); + assert( system ); Object* current; for (current = parent->GetFirst( ); current; current = parent->GetNext( ) ) { - measure = dynamic_cast(current); - scoreDef = dynamic_cast(current); - editorialElement = dynamic_cast(current); - if (measure) { - DrawMeasure( dc , measure, system ); + if (current->Is() == MEASURE) { + // cast to Measure check in DrawMeasure + DrawMeasure( dc , dynamic_cast(current), system ); } - else if (editorialElement) { - DrawSystemEditorialElement( dc , editorialElement, system ); + else if (current->IsEditorialElement()) { + // cast to EditorialElement check in DrawSystemEditorial element + DrawSystemEditorialElement( dc , dynamic_cast(current), system ); } // scoreDef are not drawn directly, but anything else should not be possible - else if (scoreDef) { - m_drawingScoreDef.Replace( scoreDef ); + else if (current->Is() == SCOREDEF) { + // nothing to do, then + // ScoreDef *scoreDef = dynamic_cast(current); + // assert( scoreDef ); } else { assert(false); @@ -1158,21 +956,28 @@ void View::DrawSystemChildren( DeviceContext *dc, Object *parent, System *system void View::DrawMeasureChildren( DeviceContext *dc, Object *parent, Measure *measure, System *system ) { - MeasureElement *measureElement = NULL; - EditorialElement *editorialElement = NULL; + assert( dc ); + assert( parent ); + assert( measure ); + assert( system ); Object* current; for (current = parent->GetFirst( ); current; current = parent->GetNext( ) ) { - measureElement = dynamic_cast(current); - editorialElement = dynamic_cast(current); - if (measureElement) { - DrawMeasureElement( dc , measureElement, measure, system ); + if (current->Is() == STAFF) { + // cast to Staff check in DrawStaff + DrawStaff(dc, dynamic_cast(current), measure, system); } - else if (editorialElement) { - DrawMeasureEditorialElement( dc , editorialElement, measure, system ); + else if (current->IsFloatingElement()) { + // cast to FloatingElement check in DrawFloatingElement + DrawFloatingElement( dc , dynamic_cast(current), measure, system ); + } + else if (current->IsEditorialElement()) { + // cast to EditorialElement check in DrawMeasureEditorialElement + DrawMeasureEditorialElement( dc , dynamic_cast(current), measure, system ); } else { + LogDebug("Current is %s", current->GetClassName().c_str() ); assert(false); } } @@ -1180,19 +985,21 @@ void View::DrawMeasureChildren( DeviceContext *dc, Object *parent, Measure *meas void View::DrawStaffChildren( DeviceContext *dc, Object *parent, Staff *staff, Measure *measure ) { - Layer *layer = NULL; - EditorialElement *editorialElement = NULL; + assert( dc ); + assert( parent ); + assert( staff ); + assert( measure ); Object* current; for (current = parent->GetFirst( ); current; current = parent->GetNext( ) ) { - layer = dynamic_cast(current); - editorialElement = dynamic_cast(current); - if (layer) { - DrawLayer( dc , layer, staff, measure ); + if (current->Is() == LAYER) { + // cast to Layer check in DrawLayer + DrawLayer( dc , dynamic_cast(current), staff, measure ); } - else if (editorialElement) { - DrawStaffEditorialElement( dc , editorialElement, staff, measure ); + else if (current->IsEditorialElement()) { + // cast to EditorialElement check in DrawStaffEditorialElement + DrawStaffEditorialElement( dc , dynamic_cast(current), staff, measure ); } else { assert(false); @@ -1202,19 +1009,21 @@ void View::DrawStaffChildren( DeviceContext *dc, Object *parent, Staff *staff, void View::DrawLayerChildren( DeviceContext *dc, Object *parent, Layer *layer, Staff *staff, Measure *measure ) { - LayerElement *layerElement = NULL; - EditorialElement *editorialElement = NULL; + assert( dc ); + assert( parent ); + assert( layer ); + assert( staff ); + assert( measure ); Object* current; for (current = parent->GetFirst( ); current; current = parent->GetNext( ) ) { - layerElement = dynamic_cast(current); - editorialElement = dynamic_cast(current); - if (layerElement) { - DrawLayerElement( dc, layerElement, layer, staff, measure ); + if (current->IsLayerElement()) { + DrawLayerElement( dc, dynamic_cast(current), layer, staff, measure ); } - else if (editorialElement) { - DrawLayerEditorialElement( dc , editorialElement, layer, staff, measure ); + else if (current->IsEditorialElement()) { + // cast to EditorialElement check in DrawLayerEditorialElement + DrawLayerEditorialElement( dc , dynamic_cast(current), layer, staff, measure ); } else { assert(false); @@ -1229,7 +1038,8 @@ void View::DrawLayerChildren( DeviceContext *dc, Object *parent, Layer *layer, S void View::DrawSystemEditorialElement( DeviceContext *dc, EditorialElement *element, System *system ) { - if ( dynamic_cast(element) ) { + assert( element ); + if ( element->Is() == APP ) { assert( dynamic_cast(element)->GetLevel() == EDITORIAL_SYSTEM ); } @@ -1242,7 +1052,8 @@ void View::DrawSystemEditorialElement( DeviceContext *dc, EditorialElement *elem void View::DrawMeasureEditorialElement( DeviceContext *dc, EditorialElement *element, Measure *measure, System *system ) { - if ( dynamic_cast(element) ) { + assert( element ); + if ( element->Object::Is() == APP ) { assert( dynamic_cast(element)->GetLevel() == EDITORIAL_MEASURE ); } @@ -1255,7 +1066,8 @@ void View::DrawMeasureEditorialElement( DeviceContext *dc, EditorialElement *ele void View::DrawStaffEditorialElement( DeviceContext *dc, EditorialElement *element, Staff *staff, Measure *measure ) { - if ( dynamic_cast(element) ) { + assert( element ); + if ( element->Is() == APP ) { assert( dynamic_cast(element)->GetLevel() == EDITORIAL_STAFF ); } @@ -1268,7 +1080,8 @@ void View::DrawStaffEditorialElement( DeviceContext *dc, EditorialElement *eleme void View::DrawLayerEditorialElement( DeviceContext *dc, EditorialElement *element, Layer *layer, Staff *staff, Measure *measure ) { - if ( dynamic_cast(element) ) { + assert( element ); + if ( element->Is() == APP ) { assert( dynamic_cast(element)->GetLevel() == EDITORIAL_LAYER ); } diff --git a/src/view_tuplet.cpp b/src/view_tuplet.cpp index 927d3542762..92482d9481c 100644 --- a/src/view_tuplet.cpp +++ b/src/view_tuplet.cpp @@ -17,6 +17,7 @@ #include "beam.h" #include "devicecontext.h" #include "doc.h" +#include "smufl.h" #include "staff.h" #include "style.h" #include "tuplet.h" @@ -29,18 +30,19 @@ namespace vrv { * Analyze a tuplet object and figure out if all the notes are in the same beam * or not */ -bool View::OneBeamInTuplet(Tuplet* tuplet) { +bool View::OneBeamInTuplet(Tuplet* tuplet) +{ + assert( tuplet ); Beam *currentBeam = NULL; ArrayOfObjects elems; // Are we contained in a beam? - if (dynamic_cast(tuplet->GetFirstParent(&typeid(Beam), MAX_BEAM_DEPTH)) && !tuplet->m_children.empty()) - return true; + if (tuplet->GetFirstParent( BEAM, MAX_BEAM_DEPTH ) && !tuplet->m_children.empty()) return true; // No we contain a beam? Go on and search for it in the children for (unsigned int i = 0; i < tuplet->m_children.size(); i++) { - currentBeam = dynamic_cast(tuplet->m_children[i]); + currentBeam = dynamic_cast(tuplet->m_children.at(i)); // first child is not a beam, or it is a beam but we have more than one child if (!currentBeam || tuplet->GetChildCount() > 1) { @@ -78,10 +80,17 @@ bool View::OneBeamInTuplet(Tuplet* tuplet) { */ -bool View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Point* end, Point *center) { +data_STEMDIRECTION View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Point* end, Point *center) +{ + assert( tuplet ); + assert( layer ); + assert( start ); + assert( end ); + assert( center ); + Point first, last; int x, y; - bool direction = true; //true = up, false = down + data_STEMDIRECTION direction = STEMDIRECTION_up; ListOfObjects* tupletChildren = tuplet->GetList(tuplet); LayerElement *firstNote = dynamic_cast(tupletChildren->front()); @@ -126,23 +135,21 @@ bool View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Poin ListOfObjects::iterator iter = tupletChildren->begin(); while (iter != tupletChildren->end()) { LayerElement *currentNote = dynamic_cast(*iter); - - if (currentNote->m_drawingStemDir == true) - ups++; - else - downs++; - + assert( currentNote ); + if (currentNote->m_drawingStemDir == STEMDIRECTION_up) ups++; + else downs++; + ++iter; } // true means up - direction = ups > downs ? true : false; + direction = ups > downs ? STEMDIRECTION_up : STEMDIRECTION_down; // if ups or downs is 0, it means all the stems go in the same direction if (ups == 0 || downs == 0) { // Calculate the average between the first and last stem // set center, start and end too. - if (direction) { // up + if (direction == STEMDIRECTION_up) { // up y = lastNote->m_drawingStemEnd.y + (firstNote->m_drawingStemEnd.y - lastNote->m_drawingStemEnd.y) / 2 + TUPLET_OFFSET; start->y = firstNote->m_drawingStemEnd.y + TUPLET_OFFSET; end->y = lastNote->m_drawingStemEnd.y + TUPLET_OFFSET; @@ -160,7 +167,7 @@ bool View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Poin while (iter != tupletChildren->end()) { LayerElement *currentNote = dynamic_cast(*iter); - if (direction) { + if (direction == STEMDIRECTION_up) { // The note is more than the avg, adjust to y the difference // from this note to the avg if (currentNote->m_drawingStemEnd.y + TUPLET_OFFSET > y) { @@ -194,21 +201,18 @@ bool View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Poin LayerElement *currentNote = dynamic_cast(*iter); if (currentNote->m_drawingStemDir == direction) { - - if (direction) { + if (direction == STEMDIRECTION_up) { if (y == 0 || currentNote->m_drawingStemEnd.y + TUPLET_OFFSET >= y) y = currentNote->m_drawingStemEnd.y + TUPLET_OFFSET; } else { if (y == 0 || currentNote->m_drawingStemEnd.y - TUPLET_OFFSET <= y) y = currentNote->m_drawingStemEnd.y - TUPLET_OFFSET; } - } else { // do none for now // but if a notehead with a reversed stem is taller that the last // calculated y, we need to offset } - ++iter; } @@ -225,8 +229,14 @@ bool View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Poin void View::DrawTupletPostponed( DeviceContext *dc, Tuplet *tuplet, Layer *layer, Staff *staff) { - assert(layer); // Pointer to layer cannot be NULL" - assert(staff); // Pointer to staff cannot be NULL" + assert( dc ); + assert( tuplet ); + assert( layer ); + assert( staff ); + + if ((tuplet->GetBracketVisible() == BOOLEAN_false) && (tuplet->GetNumVisible() == BOOLEAN_false)) { + return; + } tuplet->ResetList(tuplet); @@ -235,7 +245,8 @@ void View::DrawTupletPostponed( DeviceContext *dc, Tuplet *tuplet, Layer *layer, std::wstring notes; - dc->SetFont(&m_doc->m_drawingSmuflFonts[staff->staffSize][0]); + // + dc->SetFont(m_doc->GetDrawingSmuflFont(staff->m_drawingStaffSize, tuplet->IsCueSize())); if (tuplet->GetNum() > 0) { notes = IntToTupletFigures((short int)tuplet->GetNum()); @@ -243,24 +254,30 @@ void View::DrawTupletPostponed( DeviceContext *dc, Tuplet *tuplet, Layer *layer, } Point start, end, center; - bool direction = GetTupletCoordinates(tuplet, layer, &start, &end, ¢er); + data_STEMDIRECTION direction = GetTupletCoordinates(tuplet, layer, &start, &end, ¢er); // Calculate position for number 0x82 // since the number is slanted, move the center left // by 4 pixels so it seems more centered to the eye int txt_x = center.x - (txt_length / 2); - // we need to move down the figure of half of it height, which is about an accid width - int txt_y = center.y - m_doc->m_drawingAccidWidth[staff->staffSize][tuplet->m_cueSize]; + // we need to move down the figure of half of it height, which is about an accid width; + // also, cue size is not supported. Does it has to? + int txt_y = center.y - m_doc->GetGlyphWidth(SMUFL_E262_accidentalSharp, staff->m_drawingStaffSize, tuplet->IsCueSize()); - if (tuplet->GetNum()) { - DrawSmuflString(dc, txt_x, txt_y, notes, false, staff->staffSize); + if (tuplet->GetNum() && (tuplet->GetNumVisible() != BOOLEAN_false)) { + DrawSmuflString(dc, txt_x, txt_y, notes, false, staff->m_drawingStaffSize); } dc->ResetFont(); - int verticalLine = m_doc->m_drawingUnit[0]; + // Nothing to do if the bracket is not visible + if (tuplet->GetBracketVisible() == BOOLEAN_false) { + return; + } + + int verticalLine = m_doc->GetDrawingUnit(100); - dc->SetPen(m_currentColour, m_doc->m_style->m_stemWidth, AxSOLID); + dc->SetPen(m_currentColour, m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize), AxSOLID); // Start is 0 when no line is necessary (i.e. beamed notes) if (start.x > 0) { @@ -270,21 +287,27 @@ void View::DrawTupletPostponed( DeviceContext *dc, Tuplet *tuplet, Layer *layer, double m = (double)(start.y - end.y) / (double)(start.x - end.x); // x = 10 pixels before the number - double x = txt_x - 40; + int x = txt_x - 40; // xa = just after, the number is abundant so I do not add anything - double xa = txt_x + txt_length + 20; + int xa = txt_x + txt_length + 20; // calculate the y coords in the slope double y1 = (double)start.y + m * (x - (double)start.x); double y2 = (double)start.y + m * (xa - (double)start.x); - // first line - dc->DrawLine(start.x, ToDeviceContextY(start.y), (int)x, ToDeviceContextY((int)y1)); - // second line after gap - dc->DrawLine((int)xa, ToDeviceContextY((int)y2), end.x, ToDeviceContextY(end.y)); - + if (tuplet->GetNumVisible() == BOOLEAN_false) { + // one single line + dc->DrawLine(start.x, ToDeviceContextY(start.y), end.x, ToDeviceContextY((int)y1)); + } + else { + // first line + dc->DrawLine(start.x, ToDeviceContextY(start.y), (int)x, ToDeviceContextY((int)y1)); + // second line after gap + dc->DrawLine((int)xa, ToDeviceContextY((int)y2), end.x, ToDeviceContextY(end.y)); + } + // vertical bracket lines - if (direction) { + if (direction == STEMDIRECTION_up) { dc->DrawLine(start.x, ToDeviceContextY(start.y), start.x, ToDeviceContextY(start.y - verticalLine)); dc->DrawLine(end.x, ToDeviceContextY(end.y), end.x, ToDeviceContextY(end.y - verticalLine)); } else { diff --git a/src/vrv.cpp b/src/vrv.cpp index d4160fe6fe9..8b3cef7d987 100644 --- a/src/vrv.cpp +++ b/src/vrv.cpp @@ -44,17 +44,18 @@ bool Resources::InitFonts() { // We will need to rethink this for adding the option to add custom fonts // Font Bravura first since it is expected to have always all symbols - if (!LoadFont("Bravura")) LogError("Bravura font could not be loaded"); + if (!LoadFont("Bravura")) LogError("Bravura font could not be loaded."); // The Leipzig as the default font - if (!LoadFont("Leipzig")) LogError("Leipzig font could not be loaded"); + if (!LoadFont("Leipzig")) LogError("Leipzig font could not be loaded."); if ( m_font.size() < SMUFL_COUNT ) { - LogError("All default SMUFL glyphs could not be loaded"); + LogError("Expected %d default SMUFL glyphs but could load only %d.", + SMUFL_COUNT, m_font.size()); return false; } if ( !InitTextFont() ) { - LogError("Text font could not be initialized"); + LogError("Text font could not be initialized."); return false; } @@ -464,7 +465,9 @@ std::string GetFilename( std::string fullpath ) } std::string GetVersion() { - return StringFormat("%d.%d.%d-%s", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, GIT_COMMIT ); + std::string dev; + if (VERSION_DEV) dev = "-dev"; + return StringFormat("%d.%d.%d%s-%s", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, dev.c_str(), GIT_COMMIT ); } } // namespace vrv \ No newline at end of file diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index de818eade60..be6cdbe991b 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -4,12 +4,18 @@ project(Verovio) SET(CMAKE_BUILD_TYPE Release) +option(NO_PAE_SUPPORT "Disable Plain and Easy support" OFF) + add_definitions(-g) EXEC_PROGRAM(../tools/get_git_commit.sh ARGS OUTPUT_VARIABLE GIT_COMMIT) include_directories(/usr/local/include ../include ../include/vrv ../libmei) +if(NO_PAE_SUPPORT) + add_definitions(-DNO_PAE_SUPPORT) +endif() + add_executable (verovio main.cpp ../src/accid.cpp @@ -24,9 +30,10 @@ add_executable (verovio ../src/devicecontext.cpp ../src/doc.cpp ../src/dot.cpp - ../src/drawinglistinterface.cpp + ../src/drawinginterface.cpp ../src/durationinterface.cpp ../src/editorial.cpp + ../src/floatingelement.cpp ../src/glyph.cpp ../src/io.cpp ../src/iodarms.cpp @@ -39,7 +46,6 @@ add_executable (verovio ../src/mensur.cpp ../src/metersig.cpp ../src/measure.cpp - ../src/measureelement.cpp ../src/mrest.cpp ../src/multirest.cpp ../src/note.cpp @@ -47,15 +53,11 @@ add_executable (verovio ../src/page.cpp ../src/pitchinterface.cpp ../src/positioninterface.cpp - ../src/view.cpp - ../src/view_beam.cpp - ../src/view_element.cpp - ../src/view_graph.cpp - ../src/view_mensural.cpp - ../src/view_page.cpp - ../src/view_tuplet.cpp + ../src/proport.cpp ../src/rest.cpp + ../src/rpt.cpp ../src/scoredef.cpp + ../src/scoredefinterface.cpp ../src/slur.cpp ../src/space.cpp ../src/staff.cpp @@ -63,11 +65,22 @@ add_executable (verovio ../src/svgdevicecontext.cpp ../src/syl.cpp ../src/system.cpp + ../src/textdirective.cpp + ../src/textdirinterface.cpp ../src/tie.cpp ../src/timeinterface.cpp + ../src/trem.cpp ../src/toolkit.cpp ../src/tuplet.cpp ../src/verse.cpp + ../src/view.cpp + ../src/view_beam.cpp + ../src/view_element.cpp + ../src/view_floating.cpp + ../src/view_graph.cpp + ../src/view_mensural.cpp + ../src/view_page.cpp + ../src/view_tuplet.cpp ../src/vrv.cpp ../src/pugixml.cpp #../libmei/atts_analysis.cpp diff --git a/tools/main.cpp b/tools/main.cpp index e5deaf9c5b5..0633168dc5b 100644 --- a/tools/main.cpp +++ b/tools/main.cpp @@ -62,9 +62,14 @@ bool dir_exists (string dir) { } } +void display_version() { + cerr << "Verovio " << GetVersion() << endl; +} + void display_usage() { - cerr << "Verovio " << GetVersion() << endl << "Usage:" << endl << endl; + display_version(); + cerr << endl << "Usage:" << endl << endl; cerr << " verovio [-f format] [-s scale] [-t type] [-r resources] [-o outfile] infile" << endl << endl; // These need to be kept in alphabetical order: @@ -86,11 +91,13 @@ void display_usage() { cerr << " -o, --outfile=FILE_NAME Output file name (use \"-\" for standard output)" << endl; - cerr << " -r, --recources=PATH Path to SVG resources (default is " << vrv::Resources::GetPath() << ")" << endl; + cerr << " -r, --resources=PATH Path to SVG resources (default is " << vrv::Resources::GetPath() << ")" << endl; cerr << " -s, --scale=FACTOR Scale percent (default is " << DEFAULT_SCALE << ")" << endl; cerr << " -t, --type=OUTPUT_TYPE Select output format: mei, svg (default is svg)" << endl; + + cerr << " -v, --version Display the version number" << endl; cerr << " -w, --page-width=WIDTH Specify the page width (default is " << DEFAULT_PAGE_WIDTH << ")" << endl; @@ -101,7 +108,7 @@ void display_usage() { cerr << " --all-pages Output all pages with one output file per page" << endl; - cerr << " --font=FONT Select the music font to use (default is Leipzig, Bravura and Gootville are also available)" << endl; + cerr << " --font=FONT Select the music font to use (default is Leipzig; Bravura and Gootville are also available)" << endl; cerr << " --help Display this message" << endl; @@ -148,6 +155,7 @@ int main(int argc, char** argv) int show_bounding_boxes = 0; int page = 1; int show_help = 0; + int show_version = 0; // Create the toolkit instance without loading the font because // the resource path might be specified in the parameters @@ -188,11 +196,12 @@ int main(int argc, char** argv) {"spacing-staff", required_argument, 0, 0}, {"spacing-system", required_argument, 0, 0}, {"type", required_argument, 0, 't'}, + {"version", no_argument, &show_version, 1}, {0, 0, 0, 0} }; int option_index = 0; - while ((c = getopt_long(argc, argv, "b:f:h:o:p:r:s:t:w:", long_options, &option_index)) != -1) + while ((c = getopt_long(argc, argv, "b:f:h:o:p:r:s:t:w:v", long_options, &option_index)) != -1) { switch (c) { @@ -256,6 +265,10 @@ int main(int argc, char** argv) exit(1); } break; + + case 'v': + show_version = 1; + break; case 'w': if ( !toolkit.SetPageWidth( atoi(optarg) ) ) { @@ -273,6 +286,11 @@ int main(int argc, char** argv) } } + if (show_version) { + display_version(); + exit(0); + } + if (show_help) { display_usage(); exit(0); @@ -297,13 +315,13 @@ int main(int argc, char** argv) // Make sure the user uses a valid Resource path // Save many headaches for empty SVGs if(!dir_exists(vrv::Resources::GetPath())) { - cerr << "The resources path " << vrv::Resources::GetPath() << " could not be found, please use -r option." << endl; + cerr << "The resources path " << vrv::Resources::GetPath() << " could not be found; please use -r option." << endl; exit(1); } // Loaded the music font from the resource diretory if (!Resources::InitFonts()) { - cerr << "The music font could not be loaded, please verify the content of the directory." << endl; + cerr << "The music font could not be loaded; please check the contents of the resource directory." << endl; exit(1); } @@ -314,7 +332,7 @@ int main(int argc, char** argv) } if (outformat != "svg" && outformat != "mei") { - cerr << "Output format can only be: mei svg" << endl; + cerr << "Output format can only be 'mei' or 'svg'." << endl; exit(1); } @@ -343,24 +361,24 @@ int main(int argc, char** argv) data_stream << line << endl; } if ( !toolkit.LoadString( data_stream.str() ) ) { - cerr << "The input could not be loaded" << endl; + cerr << "The input could not be loaded." << endl; exit(1); } } else { if ( !toolkit.LoadFile( infile ) ) { - cerr << "The file '" << infile << "' could not be open" << endl; + cerr << "The file '" << infile << "' could not be opened." << endl; exit(1); } } // Check the page range if (page > toolkit.GetPageCount()) { - cerr << "The page requested (" << page << ") is not in the page range (max is " << toolkit.GetPageCount() << ")" << endl; + cerr << "The page requested (" << page << ") is not in the page range (max is " << toolkit.GetPageCount() << ")." << endl; exit(1); } if (page < 1) { - cerr << "The page number has to be greater than 0" << endl; + cerr << "The page number has to be greater than 0." << endl; exit(1); } @@ -369,15 +387,14 @@ int main(int argc, char** argv) if (all_pages) { to = toolkit.GetPageCount() + 1; } - - int p; - for (p = from; p < to; p++) { - std::string cur_outfile = outfile; - if (all_pages) { - cur_outfile += StringFormat("_%03d", p); - } - // Create SVG or mei - if (outformat == "svg") { + + if (outformat == "svg") { + int p; + for (p = from; p < to; p++) { + std::string cur_outfile = outfile; + if (all_pages) { + cur_outfile += StringFormat("_%03d", p); + } cur_outfile += ".svg"; if (std_output) { cout << toolkit.RenderToSvg( p ); @@ -387,25 +404,36 @@ int main(int argc, char** argv) exit(1); } else { - cerr << "Output written to " << cur_outfile << endl; + cerr << "Output written to " << cur_outfile << "." << endl; } - // Write it to file - - } else { - // To be implemented in Toolkit - cur_outfile += ".mei"; + } + } + else { + if (all_pages) { + toolkit.SetScoreBasedMei( true ); + outfile += ".mei"; if (std_output) { - cout << toolkit.GetMEI( p ); + cerr << "MEI output of all pages to standard output is not possible." << endl; + exit(1); + } - else if ( !toolkit.SaveFile( cur_outfile ) ) { - cerr << "Unable to write MEI to " << cur_outfile << "." << endl; + else if ( !toolkit.SaveFile( outfile ) ) { + cerr << "Unable to write MEI to " << outfile << "." << endl; exit(1); } else { - cerr << "Output written to " << cur_outfile << endl; + cerr << "Output written to " << outfile << "." << endl; + } + } + else { + if (std_output) { + cout << toolkit.GetMEI( page ); + } + else { + cerr << "MEI output of one page is available only to standard output." << endl; + exit(1); } } - } return 0;