Skip to content

Need help displaying chord diagrams above staff #1812

Answered by Danielku15
ldupouey asked this question in Q&A
Discussion options

You must be logged in to vote

Some bits of the rendering rely onthis.width. If glyphs are used within the EffectBarRenderer via EffectInfo they are sized automatically according to the specified sizingMode This ensures they are placed and aligned correctly. The width calculated in the doLayout 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

        let w: number =
            this._firstFretSpacing +
            (this._chord.staff.tuning.length - 1) * ChordDiagramGlyph.StringSpacing +

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ldupouey
Comment options

Answer selected by Danielku15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants