Skip to content

Commit

Permalink
Merge pull request #3492 from rettinghaus/develop-lineRend
Browse files Browse the repository at this point in the history
Update curveRend to lineRendBase
  • Loading branch information
lpugin authored Jul 28, 2023
2 parents 31ad8d1 + 2509d32 commit 2f7ed1d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions include/vrv/slur.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class Slur : public ControlElement,
public TimeSpanningInterface,
public AttColor,
public AttCurvature,
public AttCurveRend,
public AttLayerIdent {
public AttLayerIdent,
public AttLineRendBase {
public:
/**
* @name Constructors, destructors, reset and class name methods
Expand Down
2 changes: 1 addition & 1 deletion include/vrv/tie.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Tie : public ControlElement,
public TimeSpanningInterface,
public AttColor,
public AttCurvature,
public AttCurveRend {
public AttLineRendBase {
public:
/**
* @name Constructors, destructors, and other standard methods
Expand Down
14 changes: 7 additions & 7 deletions src/iomei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ void MEIOutput::WriteLv(pugi::xml_node currentNode, Lv *lv)
this->WriteTimeSpanningInterface(currentNode, lv);
lv->WriteColor(currentNode);
lv->WriteCurvature(currentNode);
lv->WriteCurveRend(currentNode);
lv->WriteLineRendBase(currentNode);
}

void MEIOutput::WriteMNum(pugi::xml_node currentNode, MNum *mNum)
Expand Down Expand Up @@ -2207,8 +2207,8 @@ void MEIOutput::WriteSlur(pugi::xml_node currentNode, Slur *slur)
this->WriteTimeSpanningInterface(currentNode, slur);
slur->WriteColor(currentNode);
slur->WriteCurvature(currentNode);
slur->WriteCurveRend(currentNode);
slur->WriteLayerIdent(currentNode);
slur->WriteLineRendBase(currentNode);
}

void MEIOutput::WriteStaff(pugi::xml_node currentNode, Staff *staff)
Expand Down Expand Up @@ -2249,7 +2249,7 @@ void MEIOutput::WriteTie(pugi::xml_node currentNode, Tie *tie)
this->WriteTimeSpanningInterface(currentNode, tie);
tie->WriteColor(currentNode);
tie->WriteCurvature(currentNode);
tie->WriteCurveRend(currentNode);
tie->WriteLineRendBase(currentNode);
}

void MEIOutput::WriteTrill(pugi::xml_node currentNode, Trill *trill)
Expand Down Expand Up @@ -5745,7 +5745,7 @@ bool MEIInput::ReadLv(Object *parent, pugi::xml_node lv)
this->ReadTimeSpanningInterface(lv, vrvLv);
vrvLv->ReadColor(lv);
vrvLv->ReadCurvature(lv);
vrvLv->ReadCurveRend(lv);
vrvLv->ReadLineRendBase(lv);

parent->AddChild(vrvLv);
this->ReadUnsupportedAttr(lv, vrvLv);
Expand Down Expand Up @@ -5851,8 +5851,8 @@ bool MEIInput::ReadPhrase(Object *parent, pugi::xml_node phrase)
this->ReadTimeSpanningInterface(phrase, vrvPhrase);
vrvPhrase->ReadColor(phrase);
vrvPhrase->ReadCurvature(phrase);
vrvPhrase->ReadCurveRend(phrase);
vrvPhrase->ReadLayerIdent(phrase);
vrvPhrase->ReadLineRendBase(phrase);

parent->AddChild(vrvPhrase);
this->ReadUnsupportedAttr(phrase, vrvPhrase);
Expand Down Expand Up @@ -5912,8 +5912,8 @@ bool MEIInput::ReadSlur(Object *parent, pugi::xml_node slur)
this->ReadTimeSpanningInterface(slur, vrvSlur);
vrvSlur->ReadColor(slur);
vrvSlur->ReadCurvature(slur);
vrvSlur->ReadCurveRend(slur);
vrvSlur->ReadLayerIdent(slur);
vrvSlur->ReadLineRendBase(slur);

parent->AddChild(vrvSlur);
this->ReadUnsupportedAttr(slur, vrvSlur);
Expand Down Expand Up @@ -5945,7 +5945,7 @@ bool MEIInput::ReadTie(Object *parent, pugi::xml_node tie)
this->ReadTimeSpanningInterface(tie, vrvTie);
vrvTie->ReadColor(tie);
vrvTie->ReadCurvature(tie);
vrvTie->ReadCurveRend(tie);
vrvTie->ReadLineRendBase(tie);

parent->AddChild(vrvTie);
this->ReadUnsupportedAttr(tie, vrvTie);
Expand Down
6 changes: 3 additions & 3 deletions src/iomusxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3128,7 +3128,7 @@ void MusicXmlInput::ReadMusicXmlNote(
// color
meiSlur->SetColor(slur.attribute("color").as_string());
// lineform
meiSlur->SetLform(meiSlur->AttCurveRend::StrToLineform(slur.attribute("line-type").as_string()));
meiSlur->SetLform(meiSlur->AttLineRendBase::StrToLineform(slur.attribute("line-type").as_string()));
if (slur.attribute("id")) meiSlur->SetID(slur.attribute("id").as_string());
meiSlur->SetStartid("#" + note->GetID());
// add it to the stack
Expand Down Expand Up @@ -3835,7 +3835,7 @@ void MusicXmlInput::ReadMusicXmlTies(
tie->SetColor(xmlTie.attribute("color").as_string());
// placement and orientation
tie->SetCurvedir(InferCurvedir(xmlTie));
tie->SetLform(tie->AttCurveRend::StrToLineform(xmlTie.attribute("line-type").as_string()));
tie->SetLform(tie->AttLineRendBase::StrToLineform(xmlTie.attribute("line-type").as_string()));
if (xmlTie.attribute("id")) tie->SetID(xmlTie.attribute("id").as_string());
// add it to the stack
m_controlElements.push_back({ measureNum, tie });
Expand All @@ -3848,7 +3848,7 @@ void MusicXmlInput::ReadMusicXmlTies(
lv->SetColor(xmlTie.attribute("color").as_string());
// placement and orientation
lv->SetCurvedir(InferCurvedir(xmlTie));
lv->SetLform(lv->AttCurveRend::StrToLineform(xmlTie.attribute("line-type").as_string()));
lv->SetLform(lv->AttLineRendBase::StrToLineform(xmlTie.attribute("line-type").as_string()));
if (xmlTie.attribute("id")) lv->SetID(xmlTie.attribute("id").as_string());
// add it to the stack
m_controlElements.push_back({ measureNum, lv });
Expand Down
14 changes: 7 additions & 7 deletions src/slur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ Slur::Slur()
, TimeSpanningInterface()
, AttColor()
, AttCurvature()
, AttCurveRend()
, AttLayerIdent()
, AttLineRendBase()
{
this->RegisterInterface(TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface());
this->RegisterAttClass(ATT_COLOR);
this->RegisterAttClass(ATT_CURVATURE);
this->RegisterAttClass(ATT_CURVEREND);
this->RegisterAttClass(ATT_LAYERIDENT);
this->RegisterAttClass(ATT_LINERENDBASE);

this->Reset();
}
Expand All @@ -62,14 +62,14 @@ Slur::Slur(ClassId classId)
, TimeSpanningInterface()
, AttColor()
, AttCurvature()
, AttCurveRend()
, AttLayerIdent()
, AttLineRendBase()
{
this->RegisterInterface(TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface());
this->RegisterAttClass(ATT_COLOR);
this->RegisterAttClass(ATT_CURVATURE);
this->RegisterAttClass(ATT_CURVEREND);
this->RegisterAttClass(ATT_LAYERIDENT);
this->RegisterAttClass(ATT_LINERENDBASE);

this->Reset();
}
Expand All @@ -79,14 +79,14 @@ Slur::Slur(ClassId classId, const std::string &classIdStr)
, TimeSpanningInterface()
, AttColor()
, AttCurvature()
, AttCurveRend()
, AttLayerIdent()
, AttLineRendBase()
{
this->RegisterInterface(TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface());
this->RegisterAttClass(ATT_COLOR);
this->RegisterAttClass(ATT_CURVATURE);
this->RegisterAttClass(ATT_CURVEREND);
this->RegisterAttClass(ATT_LAYERIDENT);
this->RegisterAttClass(ATT_LINERENDBASE);

this->Reset();
}
Expand All @@ -99,8 +99,8 @@ void Slur::Reset()
TimeSpanningInterface::Reset();
this->ResetColor();
this->ResetCurvature();
this->ResetCurveRend();
this->ResetLayerIdent();
this->ResetLineRendBase();

m_drawingCurveDir = SlurCurveDirection::None;
}
Expand Down
14 changes: 7 additions & 7 deletions src/tie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,34 @@ namespace vrv {

static const ClassRegistrar<Tie> s_factory("tie", TIE);

Tie::Tie() : ControlElement(TIE, "tie-"), TimeSpanningInterface(), AttColor(), AttCurvature(), AttCurveRend()
Tie::Tie() : ControlElement(TIE, "tie-"), TimeSpanningInterface(), AttColor(), AttCurvature(), AttLineRendBase()
{
this->RegisterInterface(TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface());
this->RegisterAttClass(ATT_COLOR);
this->RegisterAttClass(ATT_CURVATURE);
this->RegisterAttClass(ATT_CURVEREND);
this->RegisterAttClass(ATT_LINERENDBASE);

this->Reset();
}

Tie::Tie(ClassId classId)
: ControlElement(classId, "tie-"), TimeSpanningInterface(), AttColor(), AttCurvature(), AttCurveRend()
: ControlElement(classId, "tie-"), TimeSpanningInterface(), AttColor(), AttCurvature(), AttLineRendBase()
{
this->RegisterInterface(TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface());
this->RegisterAttClass(ATT_COLOR);
this->RegisterAttClass(ATT_CURVATURE);
this->RegisterAttClass(ATT_CURVEREND);
this->RegisterAttClass(ATT_LINERENDBASE);

this->Reset();
}

Tie::Tie(ClassId classId, const std::string &classIdStr)
: ControlElement(classId, classIdStr), TimeSpanningInterface(), AttColor(), AttCurvature(), AttCurveRend()
: ControlElement(classId, classIdStr), TimeSpanningInterface(), AttColor(), AttCurvature(), AttLineRendBase()
{
this->RegisterInterface(TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface());
this->RegisterAttClass(ATT_COLOR);
this->RegisterAttClass(ATT_CURVATURE);
this->RegisterAttClass(ATT_CURVEREND);
this->RegisterAttClass(ATT_LINERENDBASE);

this->Reset();
}
Expand All @@ -74,7 +74,7 @@ void Tie::Reset()
TimeSpanningInterface::Reset();
this->ResetColor();
this->ResetCurvature();
this->ResetCurveRend();
this->ResetLineRendBase();
}

bool Tie::AdjustEnharmonicTies(const Doc *doc, const FloatingCurvePositioner *curve, Point bezier[4],
Expand Down

0 comments on commit 2f7ed1d

Please sign in to comment.