8 #ifndef __VRV_ADJUSTSLURSFUNCTOR_H__
9 #define __VRV_ADJUSTSLURSFUNCTOR_H__
39 int requestedStaffSpace;
67 bool HasCrossStaffSlurs()
const {
return m_crossStaffSlurs; }
78 FunctorCode VisitStaffAlignment(StaffAlignment *staffAlignment)
override;
79 FunctorCode VisitSystem(System *system)
override;
88 void AdjustSlur(
int unit)
const;
91 void AdjustOuterSlur(
const ArrayOfFloatingCurvePositioners &innerCurves,
int unit)
const;
99 void FilterSpannedElements(
const BezierCurve &bezierCurve,
int margin)
const;
102 NearEndCollision DetectCollisionsNearEnd(
const BezierCurve &bezierCurve,
int margin)
const;
105 std::pair<int, int> CalcEndPointShift(
const BezierCurve &bezierCurve,
double flexibility,
int margin)
const;
108 void ApplyEndPointShift(BezierCurve &bezierCurve,
int endPointShiftLeft,
int endPointShiftRight)
const;
111 void AdjustSlurFromBulge(BezierCurve &bezierCurve,
int unit)
const;
114 bool AllowControlOffsetAdjustment(
const BezierCurve &bezierCurve,
double symmetry,
int unit)
const;
117 std::tuple<bool, int, int> CalcControlPointOffset(
const BezierCurve &bezierCurve,
int margin)
const;
120 ControlPointAdjustment CalcControlPointVerticalShift(
121 const BezierCurve &bezierCurve,
double symmetry,
int margin)
const;
124 std::pair<int, int> SolveControlPointConstraints(
125 const std::list<ControlPointConstraint> &constraints,
double symmetry = 0.0)
const;
128 void AdjustSlurShape(BezierCurve &bezierCurve, curvature_CURVEDIR dir,
int unit)
const;
136 ControlPointAdjustment CalcControlPointShift(
const BezierCurve &bezierCurve,
137 const ArrayOfFloatingCurvePositioners &innerCurves,
double symmetry,
int margin)
const;
140 std::pair<int, int> CalcEndPointShift(
const BezierCurve &bezierCurve,
141 const ArrayOfFloatingCurvePositioners &innerCurves,
double flexibility,
int margin)
const;
149 void ShiftEndPoints(
int &shiftLeft,
int &shiftRight,
double ratio,
int intersection,
double flexibility,
150 bool isBelow,
char spanningType)
const;
153 std::pair<double, double> CalcShiftRadii(
bool forShiftLeft,
double flexibility,
char spanningType)
const;
156 double CalcQuadraticInterpolation(
double zeroAt,
double oneAt,
double arg)
const;
161 double RotateSlope(
double slope,
double degrees,
double doublingBound,
bool upwards)
const;
164 float GetMinControlPointAngle(
const BezierCurve &bezierCurve,
float angle,
int unit)
const;
171 bool m_crossStaffSlurs;
175 FloatingCurvePositioner *m_currentCurve;
180 #endif // __VRV_ADJUSTSLURSFUNCTOR_H__