-
Notifications
You must be signed in to change notification settings - Fork 207
/
Copy pathDisplaySettings.ts
98 lines (86 loc) · 2.29 KB
/
DisplaySettings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import { RenderingResources } from '@src/RenderingResources';
/**
* Lists all stave profiles controlling which staves are shown.
*/
export enum StaveProfile {
/**
* The profile is auto detected by the track configurations.
*/
Default,
/**
* Standard music notation and guitar tablature are rendered.
*/
ScoreTab,
/**
* Only standard music notation is rendered.
*/
Score,
/**
* Only guitar tablature is rendered.
*/
Tab,
/**
* Only guitar tablature is rendered, but also rests and time signatures are not shown.
* This profile is typically used in multi-track scenarios.
*/
TabMixed
}
/**
* Lists all layout modes that are supported.
*/
export enum LayoutMode {
/**
* Bars are aligned in rows using a fixed width.
*/
Page,
/**
* Bars are aligned horizontally in one row
*/
Horizontal
}
/**
* The display settings control how the general layout and display of alphaTab is done.
* @json
*/
export class DisplaySettings {
/**
* Sets the zoom level of the rendered notation
*/
public scale: number = 1.0;
/**
* The default stretch force to use for layouting.
*/
public stretchForce: number = 1.0;
/**
* The layouting mode used to arrange the the notation.
*/
public layoutMode: LayoutMode = LayoutMode.Page;
/**
* The stave profile to use.
*/
public staveProfile: StaveProfile = StaveProfile.Default;
/**
* Limit the displayed bars per row.
*/
public barsPerRow: number = -1;
/**
* The bar start number to start layouting with. Note that this is the bar number and not an index!
*/
public startBar: number = 1;
/**
* The amount of bars to render overall.
*/
public barCount: number = -1;
/**
* The number of bars that should be rendered per partial. This setting is not used by all layouts.
*/
public barCountPerPartial: number = 10;
/**
* Gets or sets the resources used during rendering. This defines all fonts and colors used.
*/
public resources: RenderingResources = new RenderingResources();
/**
* Gets or sets the padding between the music notation and the border.
*/
public padding: Float32Array | null = null;
}