MUSX Document Model
Loading...
Searching...
No Matches
ArrowheadPresets.h
1/*
2 * Copyright (C) 2026, Robert Patterson
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22#pragma once
23
24#include "musx/dom/Fundamentals.h"
25#include "musx/dom/EnumClasses.h"
26
27namespace musx {
28namespace util {
29
32enum class ArrowheadPresetFillStyle
33{
34 SolidFill,
35 WhiteFillWithOutline
36};
37
42{
45 bool curvedBack{};
46 ArrowheadPresetFillStyle fillStyle{ArrowheadPresetFillStyle::SolidFill};
47};
48
52[[nodiscard]]
53constexpr ArrowheadPresetSpec getArrowheadPresetSpec(dom::ArrowheadPreset preset)
54{
55 switch (preset) {
57 return {20.0, 20.0, false, ArrowheadPresetFillStyle::SolidFill};
59 return {20.0, 20.0, false, ArrowheadPresetFillStyle::WhiteFillWithOutline};
61 return {20.0, 20.0, true, ArrowheadPresetFillStyle::SolidFill};
63 return {100.0, 100.0, true, ArrowheadPresetFillStyle::SolidFill};
65 return {60.0, 60.0, true, ArrowheadPresetFillStyle::SolidFill};
66 }
67 return {};
68}
69
70} // namespace util
71} // namespace musx
double EvpuFloat
EVPU fractional value (288.0 per inch)
Definition Fundamentals.h:58
ArrowheadPreset
Finale-defined arrowhead presets.
Definition EnumClasses.h:52
@ LargeCurved
Large curved-back arrowhead preset (≈4 staff spaces tall).
@ SmallCurved
Small curved-back arrowhead preset (≈1 staff space tall).
@ SmallOutline
Small outlined arrowhead preset (≈1 staff space tall).
@ SmallFilled
Small filled arrowhead preset (≈1 staff space tall).
@ MediumCurved
Medium curved-back arrowhead preset (≈2.5 staff spaces tall).
object model for musx file (enigmaxml)
Definition BaseClasses.h:36
Geometry and appearance for a Finale preset arrowhead.
Definition ArrowheadPresets.h:42
ArrowheadPresetFillStyle fillStyle
Visual fill style.
Definition ArrowheadPresets.h:46
dom::EvpuFloat baseWidth
Full width of the base.
Definition ArrowheadPresets.h:44
bool curvedBack
True for curved-back presets, false for straight-sided presets.
Definition ArrowheadPresets.h:45
dom::EvpuFloat length
Distance from the base midpoint to the tip.
Definition ArrowheadPresets.h:43