Need help displaying chord diagrams above staff #1812
-
Hi everyone,
I get it to display the diagrams but spacings are off and some lines are missing : Any idea why this is happening and how I could get the diagrams to be displayed properly ? Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Some bits of the rendering rely on The small width cause the horizontal lines to be quasi invisible. Staying on the 'ignore overlaps route', replacing https://github.com/CoderLine/alphaTab/blob/develop/src/rendering/glyphs/ChordDiagramGlyph.ts#L52 let w: number =
this._firstFretSpacing +
(this._chord.staff.tuning.length - 1) * ChordDiagramGlyph.StringSpacing +
2 * ChordDiagramGlyph.Padding[0] -
2 * ChordDiagramGlyph.Padding[0] -
this._firstFretSpacing; |
Beta Was this translation helpful? Give feedback.
Some bits of the rendering rely on
this.width
. If glyphs are used within theEffectBarRenderer
viaEffectInfo
they are sized automatically according to the specifiedsizingMode
This ensures they are placed and aligned correctly. Thewidth
calculated in thedoLayout
is overwritten later.The small width cause the horizontal lines to be quasi invisible. Staying on the 'ignore overlaps route', replacing
this.width
with a a calculated value works:https://github.com/CoderLine/alphaTab/blob/develop/src/rendering/glyphs/ChordDiagramGlyph.ts#L52