-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3571 from rism-digital/develop-facsimile-neume-line
Add support for neumes encoded line by line
- Loading branch information
Showing
33 changed files
with
779 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
///////////////////////////////////////////////////////////////////////////// | ||
// Name: adjustyrelfortranscriptionfunctor.h | ||
// Author: Yinan Zhou | ||
// Created: 2024 | ||
// Copyright (c) Authors and others. All rights reserved. | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
#ifndef __VRV_ADJUSTYRELFORTRANSCRIPTIONFUNCTOR_H__ | ||
#define __VRV_ADJUSTYRELFORTRANSCRIPTIONFUNCTOR_H__ | ||
|
||
#include "functor.h" | ||
|
||
namespace vrv { | ||
|
||
//---------------------------------------------------------------------------- | ||
// AdjustYRelForTranscriptionFunctor | ||
//---------------------------------------------------------------------------- | ||
|
||
/** | ||
* This class adjusts the YRel positions taking into account the bounding boxes. | ||
*/ | ||
class AdjustYRelForTranscriptionFunctor : public Functor { | ||
public: | ||
/** | ||
* @name Constructors, destructors | ||
*/ | ||
///@{ | ||
AdjustYRelForTranscriptionFunctor(); | ||
virtual ~AdjustYRelForTranscriptionFunctor() = default; | ||
///@} | ||
|
||
/* | ||
* Abstract base implementation | ||
*/ | ||
bool ImplementsEndInterface() const override { return false; } | ||
|
||
/* | ||
* Functor interface | ||
*/ | ||
///@{ | ||
FunctorCode VisitLayerElement(LayerElement *layerElement) override; | ||
///@} | ||
|
||
protected: | ||
// | ||
private: | ||
// | ||
public: | ||
// | ||
private: | ||
// | ||
}; | ||
|
||
} // namespace vrv | ||
|
||
#endif // __VRV_ADJUSTYRELFORTRANSCRIPTIONFUNCTOR_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,6 +451,14 @@ class Doc : public Object { | |
bool IsMensuralMusicOnly() const { return m_isMensuralMusicOnly; } | ||
///@} | ||
|
||
/** | ||
* @name Setter for and getter for neume-line flag | ||
*/ | ||
///@{ | ||
void SetNeumeLines(bool isNeumeLines) { m_isNeumeLines = isNeumeLines; } | ||
bool IsNeumeLines() const { return m_isNeumeLines; } | ||
///@} | ||
|
||
/** | ||
* @name Setter and getter for facsimile | ||
*/ | ||
|
@@ -660,6 +668,12 @@ class Doc : public Object { | |
*/ | ||
bool m_isMensuralMusicOnly; | ||
|
||
/** | ||
* A flag to indicate that the document contains neume lines. | ||
* This is a special document type where neume lines are encoded with <section type="neon-neume-line"> | ||
*/ | ||
bool m_isNeumeLines; | ||
|
||
/** Page width (MEI [email protected]) - currently not saved */ | ||
int m_pageWidth; | ||
/** Page height (MEI [email protected]) - currently not saved */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
///////////////////////////////////////////////////////////////////////////// | ||
// Name: adjustyrelfortranscriptionfunctor.cpp | ||
// Author: Yinan Zhou | ||
// Created: 2024 | ||
// Copyright (c) Authors and others. All rights reserved. | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
#include "adjustyrelfortranscriptionfunctor.h" | ||
|
||
//---------------------------------------------------------------------------- | ||
|
||
//---------------------------------------------------------------------------- | ||
|
||
namespace vrv { | ||
|
||
//---------------------------------------------------------------------------- | ||
// AdjustYRelForTranscriptionFunctor | ||
//---------------------------------------------------------------------------- | ||
|
||
AdjustYRelForTranscriptionFunctor::AdjustYRelForTranscriptionFunctor() : Functor() {} | ||
|
||
FunctorCode AdjustYRelForTranscriptionFunctor::VisitLayerElement(LayerElement *layerElement) | ||
{ | ||
if (layerElement->m_drawingFacsY == VRV_UNSET) return FUNCTOR_CONTINUE; | ||
|
||
if (layerElement->IsScoreDefElement()) return FUNCTOR_SIBLINGS; | ||
|
||
if (!layerElement->HasSelfBB()) return FUNCTOR_CONTINUE; | ||
|
||
layerElement->SetDrawingYRel(-layerElement->GetSelfY1()); | ||
|
||
return FUNCTOR_CONTINUE; | ||
} | ||
|
||
} // namespace vrv |
Oops, something went wrong.