|
MUSX Document Model
|
Static class containing utilites for ties. More...
#include <Tie.h>
Classes | |
| struct | ContourControlPoint |
| Control point parameters for a tie contour. More... | |
| struct | ContourControlPoints |
| Control points for a tie contour (left/right endpoints). More... | |
| struct | ContourGeometry |
| Caller-supplied horizontal geometry used for contour span classification. More... | |
| struct | ContourMetrics |
| Combined contour metrics for tie geometry and control points. More... | |
| struct | ContourResult |
| Result of contour style classification. More... | |
Public Types | |
| enum class | EndPointKind { Notehead , MeasureBoundary , SystemBoundary } |
| Classifies what the tie endpoint attaches to for contour-length calculations. More... | |
Static Public Member Functions | |
| static dom::CurveContourDirection | calcDefaultDirection (const dom::NoteInfoPtr ¬eInfo, bool forTieEnd=false) |
| Calculates the default tie direction for the specified note. | |
| static dom::CurveContourDirection | calcEffectiveDirection (const dom::NoteInfoPtr ¬eInfo, bool forTieEnd=false) |
| Calculates the effective tie direction taking into account overrides and special rules. | |
| static std::optional< std::pair< dom::TieConnectStyleType, dom::TieConnectStyleType > > | calcConnectStyleTypes (const dom::NoteInfoPtr ¬eInfo, bool forTieEnd) |
| Calculates the connect style types for both endpoints of a tie. | |
| static bool | calcIsOuterConnectStyle (dom::TieConnectStyleType type) |
| Returns true if the connect style is an outer placement. | |
| static std::optional< dom::details::TieAlterBase::ConnectionType > | calcConnectionType (const dom::NoteInfoPtr ¬eInfo, bool forTieEnd, bool forEndPoint, bool forPageView=true) |
| Calculates the default connection type for a tie endpoint. | |
| static dom::options::TieOptions::ConnectStyle | calcEndpointOffsets (const dom::NoteInfoPtr ¬eInfo, bool forTieEnd, bool forEndPoint, std::optional< dom::CurveContourDirection > direction=std::nullopt, bool forPageView=true) |
| Resolves endpoint offsets for a tie endpoint from default policy and tie-alter overrides. | |
| static std::optional< ContourResult > | calcContourStyleType (const dom::NoteInfoPtr ¬eInfo, const ContourGeometry &geometry, bool forTieEnd=false) |
| Calculates the tie control style span using caller-supplied horizontal geometry. | |
| static std::optional< ContourControlPoints > | calcDefaultContourControlPoints (const dom::NoteInfoPtr ¬eInfo, dom::options::TieOptions::ControlStyleType styleType, dom::Evpu length) |
| Calculates default contour control points (inset/height) for a given control style. | |
| static std::optional< ContourControlPoints > | calcEffectiveContourControlPoints (const dom::NoteInfoPtr ¬eInfo, bool forTieEnd, dom::options::TieOptions::ControlStyleType styleType, dom::Evpu length) |
| Calculates effective contour control points (inset/height) for a tie. | |
| static std::optional< ContourMetrics > | calcEffectiveContourMetrics (const dom::NoteInfoPtr ¬eInfo, const ContourGeometry &geometry, bool forTieEnd=false) |
| Calculates span classification and control points in one call. | |
Static class containing utilites for ties.
|
strong |
|
static |
Calculates the default connection type for a tie endpoint.
| noteInfo | The note whose endpoint is being analyzed. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
| forEndPoint | True if calculating the end point; false for the start point. |
| forPageView | True if calculating with page view system breaks, false for scroll/studio view. |
|
static |
Calculates the connect style types for both endpoints of a tie.
| noteInfo | The note whose tie is being analyzed. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
|
static |
Calculates the tie control style span using caller-supplied horizontal geometry.
| noteInfo | The note whose tie context is being evaluated. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
| geometry | Horizontal endpoint geometry in EVPU. startAdjustment and endAdjustment let the caller inject layout-engine-specific endpoint adjustments (for example system-boundary behavior or custom spacing policy) while this function still applies tie placement rules around noteheads. |
std::nullopt if no applicable tie can be resolved; otherwise the selected span style and computed EVPU length.
|
static |
Calculates default contour control points (inset/height) for a given control style.
| noteInfo | The note whose tie options are consulted. |
| styleType | The control style type to evaluate (Short/Medium/Long/TieEnds). |
| length | The tie length in EVPU used for interpolation when enabled. |
When tie options enable interpolation and styleType is MediumSpan, heights are interpolated between Short/Medium or Medium/Long depending on length. Relative inset ratios are interpolated only when the inset style is Percent; fixed insets remain the MediumSpan fixed values.
|
static |
Calculates the default tie direction for the specified note.
| noteInfo | The note whose default tie direction is being calculated. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
|
static |
Calculates effective contour control points (inset/height) for a tie.
| noteInfo | The note whose tie options and tie alterations are consulted. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
| styleType | The control style type to evaluate (Short/Medium/Long/TieEnds). |
| length | The tie length in EVPU used for interpolation when enabled. |
If a tie alteration record exists and control point adjustments are enabled, this returns the alteration control points (and inset style from the alteration). Otherwise it falls back to calcDefaultContourControlPoints.
|
static |
Calculates span classification and control points in one call.
| noteInfo | The note whose tie options and tie alterations are consulted. |
| geometry | Horizontal endpoint geometry in EVPU. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
|
static |
Calculates the effective tie direction taking into account overrides and special rules.
| noteInfo | The note whose effective tie direction is being calculated. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
|
static |
Resolves endpoint offsets for a tie endpoint from default policy and tie-alter overrides.
| noteInfo | The note whose tie alterations are consulted. |
| forTieEnd | True for tie-end stub ties, false for regular tie-forward ties. |
| forEndPoint | True for end-point offset, false for start-point offset. |
| direction | Optional tie contour direction. If omitted or Unspecified, effective direction is calculated. |
| forPageView | True to apply page-view system-break rules in endpoint connection evaluation. |
|
static |
Returns true if the connect style is an outer placement.
| type | The connect style to classify. |
type is an outer placement, otherwise false.