Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Read/Write zone coordinated ul #122

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
78afb12
Use ExtractIDFragment function
lpugin Dec 23, 2023
d449c0a
pass neon path as command line argument
yinanazhou May 16, 2023
9f8ef22
Remove testNeon.sh from git
yinanazhou Jul 5, 2023
e6bc318
MatchHeight editor action for bbox
yinanazhou Jul 10, 2023
f41a0a0
Add overlap correction on x-axis
yinanazhou Jul 12, 2023
2305741
Add staff rotation offset
yinanazhou Jul 13, 2023
187d982
Adjust original bbox size for ungrouping
yinanazhou Jul 13, 2023
81fd49f
Fix ungroup when syllable start with layer element
yinanazhou Jul 14, 2023
dea073b
Clean up comments
yinanazhou Jul 14, 2023
89321b8
Refactor ungroup bbox
yinanazhou Jul 24, 2023
9cb464b
Clean up
yinanazhou Jul 24, 2023
b302f3e
Remove x-axis adjustment
yinanazhou Jul 25, 2023
92fe5f6
Fix ungroup when firstIsSyl
yinanazhou Jul 27, 2023
a0e3dcd
Remove redundant new syl for insert action
yinanazhou Jul 28, 2023
0b26cc7
Remove unnecessary doubleParent check
yinanazhou Jul 30, 2023
682d11d
Rename doubleParent to secondParent
yinanazhou Jul 30, 2023
6d29f65
Optimize parents counting
yinanazhou Jul 30, 2023
ee76984
Clean up
yinanazhou Jul 30, 2023
affe5b4
Remove unnecessary conversion
yinanazhou Jul 30, 2023
88a7b37
Move second level parent check
yinanazhou Jul 31, 2023
3c91687
Clean up
yinanazhou Jul 31, 2023
8cc6061
Remove unnecessary second level parent check
yinanazhou Jul 31, 2023
08c4dcf
Simplify syl zone calculation
yinanazhou Jul 31, 2023
3c90120
Optimize reordering
yinanazhou Jul 31, 2023
87bc478
Rename fullSyllable to parent
yinanazhou Jul 31, 2023
d5fc196
Refactor multiple full parents
yinanazhou Aug 1, 2023
a52ba37
Fix bbox calculation for empty full parent
yinanazhou Aug 1, 2023
f35390d
Remove unnecessary checks & reordering
yinanazhou Aug 1, 2023
11425b4
Remove unused variable
yinanazhou Aug 1, 2023
dc01be2
Preserve ordering of multiple ligated nc in the same neume
yinanazhou Aug 2, 2023
9abbe67
Add validity check && correction
yinanazhou Aug 3, 2023
51f2b10
Convert m_infoObject to m_editInfo
yinanazhou Aug 14, 2023
8e0d846
Fix outer scope shadowing
yinanazhou Aug 14, 2023
31dcb03
Clean up comments
yinanazhou Aug 14, 2023
f3a5651
Break when last element
yinanazhou Aug 14, 2023
7b96407
Reset m_editInfo for OOM error
yinanazhou Aug 15, 2023
6238cff
Refactor new bbox zone && add staff rotation offset
yinanazhou Aug 17, 2023
7be3754
Add empty syl for follows syllable if precedes becomes empty
yinanazhou Oct 27, 2023
b0916d7
Set column value for newly inserted staff if has columns
yinanazhou Dec 1, 2023
8e884fa
Unlink syllable when removed
yinanazhou Dec 5, 2023
f6a7ecf
Handle empty staff when inserting new staff
yinanazhou Dec 11, 2023
bcbde28
New <measure> for blank files in neume notation
yinanazhou Dec 12, 2023
4a1c61f
Fix removing clef error
yinanazhou Dec 19, 2023
6ed5103
Fix staff rotation offset for inserted syllables
yinanazhou Dec 21, 2023
3b005e8
Add Doc::IsFacs helper (and others) and use it
lpugin Dec 23, 2023
16ab863
Merge branch 'develop-facsimile' into develop-ddmal-merge-23-12
lpugin Dec 23, 2023
a2667ae
Use Doc::IsTranscription helper
lpugin Dec 23, 2023
6215ccd
Merge branch 'develop-facsimile' into develop-ddmal-merge-23-12
lpugin Dec 23, 2023
d89dc94
Fix missing Read/Write zone coordinated ul
lpugin Dec 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/vrv/doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class Doc : public Object {
///@{
DocType GetType() const { return m_type; }
void SetType(DocType type);
bool IsFacs() const { return (m_type == Facs); }
bool IsRaw() const { return (m_type == Raw); }
bool IsRendering() const { return (m_type == Rendering); }
bool IsTranscription() const { return (m_type == Transcription); }
///@}

/**
Expand Down
10 changes: 5 additions & 5 deletions include/vrv/editortoolkit_neume.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ namespace vrv {
class EditorToolkitNeume : public EditorToolkit {
public:
EditorToolkitNeume(Doc *doc, View *view) : EditorToolkit(doc, view) {}
bool ParseEditorAction(const std::string &json_editorAction);
virtual std::string EditInfo() { return m_infoObject.json(); };
bool ParseEditorAction(const std::string &json_editorAction) override;
std::string EditInfo() override;

/**
* Experimental editor functions.
Expand All @@ -44,6 +44,7 @@ class EditorToolkitNeume : public EditorToolkit {
bool Insert(std::string elementType, std::string staffId, int ulx, int uly, int lrx, int lry,
std::vector<std::pair<std::string, std::string>> attributes);
bool InsertToSyllable(std::string elementId);
bool MatchHeight(std::string elementId);
bool Merge(std::vector<std::string> elementIds);
bool MoveOutsideSyllable(std::string elementId);
bool Set(std::string elementId, std::string attrType, std::string attrValue);
Expand All @@ -54,6 +55,7 @@ class EditorToolkitNeume : public EditorToolkit {
bool Remove(std::string elementId);
bool Resize(std::string elementId, int ulx, int uly, int lrx, int lry, float resize = NAN);
bool Group(std::string groupType, std::vector<std::string> elementIds);
void UnlinkSyllable(Syllable *syllable);
bool Ungroup(std::string groupType, std::vector<std::string> elementIds);
bool ChangeGroup(std::string elementId, std::string contour);
bool ToggleLigature(std::vector<std::string> elementIds);
Expand All @@ -72,6 +74,7 @@ class EditorToolkitNeume : public EditorToolkit {
bool ParseInsertAction(jsonxx::Object param, std::string *elementType, std::string *staffId, int *ulx, int *uly,
int *lrx, int *lry, std::vector<std::pair<std::string, std::string>> *attributes);
bool ParseInsertToSyllableAction(jsonxx::Object param, std::string *elementId);
bool ParseMatchHeightAction(jsonxx::Object param, std::string *elementId);
bool ParseMergeAction(jsonxx::Object param, std::vector<std::string> *elementIds);
bool ParseMoveOutsideSyllableAction(jsonxx::Object param, std::string *elementId);
bool ParseSetAction(jsonxx::Object param, std::string *elementId, std::string *attrType, std::string *attrValue);
Expand All @@ -98,9 +101,6 @@ class EditorToolkitNeume : public EditorToolkit {
bool AdjustPitchFromPosition(Object *obj, Clef *clef = NULL);
bool AdjustClefLineFromPosition(Clef *clef, Staff *staff = NULL);
///@}

private:
jsonxx::Object m_infoObject;
};

//--------------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ void Doc::PrepareData()
}

/************ Resolve @facs ************/
if (this->GetType() == Facs) {
if (this->IsFacs()) {
// Associate zones with elements
PrepareFacsimileFunctor prepareFacsimile(this->GetFacsimile());
this->Process(prepareFacsimile);
Expand Down Expand Up @@ -1281,10 +1281,10 @@ void Doc::ConvertToCastOffMensuralDoc(bool castOff)
if (!m_isMensuralMusicOnly) return;

// Do not convert transcription files
if (this->GetType() == Transcription) return;
if (this->IsTranscription()) return;

// Do not convert facs files
if (this->GetType() == Facs) return;
if (this->IsFacs()) return;

// We are converting to measure music in a definite way
if (this->GetOptions()->m_mensuralToMeasure.GetValue()) {
Expand Down Expand Up @@ -2088,7 +2088,7 @@ int Doc::GetAdjustedDrawingPageHeight() const
{
assert(m_drawingPage);

if ((this->GetType() == Transcription) || (this->GetType() == Facs)) {
if (this->IsTranscription() || this->IsFacs()) {
return m_drawingPage->m_pageHeight / DEFINITION_FACTOR;
}

Expand All @@ -2100,7 +2100,7 @@ int Doc::GetAdjustedDrawingPageWidth() const
{
assert(m_drawingPage);

if ((this->GetType() == Transcription) || (this->GetType() == Facs)) {
if (this->IsTranscription() || this->IsFacs()) {
return m_drawingPage->m_pageWidth / DEFINITION_FACTOR;
}

Expand Down
Loading