public virtual void createNoteGlyphs(global::alphatab.model.Note n) { unchecked { if (( n.trillValue >= 0 )) { this.addGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(0, true), ((int) (( 4 * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) ), ((global::haxe.lang.Null<bool>) (default(global::haxe.lang.Null<bool>)) ))); global::alphatab.model.Note trillNote = new global::alphatab.model.Note(); trillNote.isGhost = true; trillNote.fret = ( n.trillValue - n.beat.voice.bar.track.tuning[( ( n.beat.voice.bar.track.tuning.length - (( n.@string - 1 )) ) - 1 )] ); trillNote.@string = n.@string; global::alphatab.rendering.TabBarRenderer tr = default(global::alphatab.rendering.TabBarRenderer); tr = ((global::alphatab.rendering.TabBarRenderer) (this.renderer) ); global::alphatab.rendering.Glyph trillNumberGlyph = new global::alphatab.rendering.glyphs.NoteNumberGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(0, true), ((global::alphatab.model.Note) (trillNote) ), ((bool) (true) )); int l = ( n.beat.voice.bar.track.tuning.length - n.@string ); trillNumberGlyph.y = tr.getTabY(l, default(global::haxe.lang.Null<int>)); this.addGlyph(trillNumberGlyph); } if (( n.bendPoints.length > 1 )) { int bendHeight = ((int) (( 60 * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) ); this.renderer.registerOverflowTop(bendHeight); int __temp_stmt599 = default(int); { double x = ( this.getBeatDurationWidth() * this.renderer.stave.staveGroup.layout.renderer.settings.scale ); __temp_stmt599 = ((int) (x) ); } this.addGlyph(new global::alphatab.rendering.glyphs.BendGlyph(((global::alphatab.model.Note) (n) ), ((int) (__temp_stmt599) ), ((int) (bendHeight) ))); } } }
public virtual void createNoteGlyphs(global::alphatab.model.Note n) { unchecked { if ((n.trillValue >= 0)) { this.addGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((int)((4 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))), ((global::haxe.lang.Null <bool>)(default(global::haxe.lang.Null <bool>))))); global::alphatab.model.Note trillNote = new global::alphatab.model.Note(); trillNote.isGhost = true; trillNote.fret = (n.trillValue - n.beat.voice.bar.track.tuning[((n.beat.voice.bar.track.tuning.length - ((n.@string - 1))) - 1)]); trillNote.@string = n.@string; global::alphatab.rendering.TabBarRenderer tr = default(global::alphatab.rendering.TabBarRenderer); tr = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.rendering.Glyph trillNumberGlyph = new global::alphatab.rendering.glyphs.NoteNumberGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.Note)(trillNote)), ((bool)(true))); int l = (n.beat.voice.bar.track.tuning.length - n.@string); trillNumberGlyph.y = tr.getTabY(l, default(global::haxe.lang.Null <int>)); this.addGlyph(trillNumberGlyph); } if ((n.bendPoints.length > 1)) { int bendHeight = ((int)((60 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); this.renderer.registerOverflowTop(bendHeight); int __temp_stmt599 = default(int); { double x = (this.getBeatDurationWidth() * this.renderer.stave.staveGroup.layout.renderer.settings.scale); __temp_stmt599 = ((int)(x)); } this.addGlyph(new global::alphatab.rendering.glyphs.BendGlyph(((global::alphatab.model.Note)(n)), ((int)(__temp_stmt599)), ((int)(bendHeight)))); } } }
public virtual void addNoteGlyph(global::alphatab.rendering.glyphs.NoteNumberGlyph noteGlyph, global::alphatab.model.Note note) { unchecked { this._notes.push(noteGlyph); this._noteLookup.@set(note.@string, noteGlyph); if (((this._minNote == default(global::alphatab.model.Note)) || (note.@string < this._minNote.@string))) { this._minNote = note; } } }
public virtual void createNoteGlyph(global::alphatab.model.Note n) { unchecked { bool isGrace = (this.container.beat.graceType != global::alphatab.model.GraceType.None); global::alphatab.rendering.TabBarRenderer tr = default(global::alphatab.rendering.TabBarRenderer); tr = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.rendering.glyphs.NoteNumberGlyph noteNumberGlyph = new global::alphatab.rendering.glyphs.NoteNumberGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.Note)(n)), ((bool)(isGrace))); int l = ((n.beat.voice.bar.track.tuning.length - n.@string) + 1); noteNumberGlyph.y = tr.getTabY(l, new global::haxe.lang.Null <int>(-2, true)); this.noteNumbers.addNoteGlyph(noteNumberGlyph, n); } }
public override void doLayout() { unchecked { int w = 0; { int _g = 0; global::haxe.root.Array <object> _g1 = this._notes; while ((_g < _g1.length)) { global::alphatab.rendering.glyphs.NoteNumberGlyph g = ((global::alphatab.rendering.glyphs.NoteNumberGlyph)(_g1[_g])); ++_g; g.renderer = this.renderer; g.doLayout(); if ((g.width > w)) { w = g.width; } } } global::alphatab.rendering.TabBarRenderer tabRenderer = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); double tabHeight = this.renderer.stave.staveGroup.layout.renderer.renderingResources.tablatureFont.getSize(); int effectY = default(int); { double x = (this.getNoteY(this._minNote) + (tabHeight / 2)); effectY = ((int)(x)); } int effectSpacing = ((int)((7 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); { object __temp_iterator449 = this.beatEffects.iterator(); while (((bool)(global::haxe.lang.Runtime.callField(__temp_iterator449, "hasNext", 407283053, default(global::haxe.root.Array))))) { global::alphatab.rendering.Glyph g1 = ((global::alphatab.rendering.Glyph)(global::haxe.lang.Runtime.callField(__temp_iterator449, "next", 1224901875, default(global::haxe.root.Array)))); g1.y = effectY; g1.x = (this.width / 2); g1.renderer = this.renderer; effectY += effectSpacing; g1.doLayout(); } } this.width = w; } }
public virtual int getNoteX(global::alphatab.model.Note note, global::haxe.lang.Null <bool> onEnd) { unchecked { bool __temp_onEnd217 = ((global::haxe.lang.Runtime.eq((onEnd).toDynamic(), (default(global::haxe.lang.Null <bool>)).toDynamic())) ? (((bool)(true))) : (onEnd.@value)); if (this._noteLookup.exists(note.@string)) { global::alphatab.rendering.glyphs.NoteNumberGlyph n = ((global::alphatab.rendering.glyphs.NoteNumberGlyph)(this._noteLookup.@get(note.@string).@value)); int pos = ((this.x + n.x) + ((int)((0 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)))); if (__temp_onEnd217) { n.calculateWidth(); pos += n.width; } return(pos); } return(0); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; global::alphatab.model.TextBaseline old = canvas.getTextBaseline(); canvas.setTextBaseline(global::alphatab.model.TextBaseline.Middle); canvas.setColor(res.mainGlyphColor); if (this._isGrace) { canvas.setFont(res.graceFont); } else { canvas.setFont(res.tablatureFont); } { int _g = 0; global::haxe.root.Array <object> _g1 = this._notes; while ((_g < _g1.length)) { global::alphatab.rendering.glyphs.NoteNumberGlyph g = ((global::alphatab.rendering.glyphs.NoteNumberGlyph)(_g1[_g])); ++_g; g.renderer = this.renderer; g.paint((cx + this.x), (cy + this.y), canvas); } } canvas.setTextBaseline(old); { object __temp_iterator450 = this.beatEffects.iterator(); while (((bool)(global::haxe.lang.Runtime.callField(__temp_iterator450, "hasNext", 407283053, default(global::haxe.root.Array))))) { global::alphatab.rendering.Glyph g1 = ((global::alphatab.rendering.Glyph)(global::haxe.lang.Runtime.callField(__temp_iterator450, "next", 1224901875, default(global::haxe.root.Array)))); g1.paint((cx + this.x), (cy + this.y), canvas); } } } }
public static void __hx_ctor_alphatab_rendering_glyphs_NoteNumberGlyph(global::alphatab.rendering.glyphs.NoteNumberGlyph __temp_me173, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Note n, bool isGrace) { unchecked { int __temp_y172 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value)); int __temp_x171 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value)); global::alphatab.rendering.Glyph.__hx_ctor_alphatab_rendering_Glyph(__temp_me173, new global::haxe.lang.Null <int>(__temp_x171, true), new global::haxe.lang.Null <int>(__temp_y172, true)); __temp_me173._isGrace = isGrace; if (!(n.isTieDestination)) { if (n.isDead) { __temp_me173._noteString = "X"; } else { __temp_me173._noteString = global::Std.@string(n.fret); } if (n.isGhost) { __temp_me173._noteString = global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("(", __temp_me173._noteString), ")"); } } else { if ((n.beat.index == 0)) { __temp_me173._noteString = global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("(", global::haxe.lang.Runtime.toString(n.tieOrigin.fret)), ")"); } else { __temp_me173._noteString = ""; } } } }
public virtual void createNoteGlyph(global::alphatab.model.Note n) { unchecked { bool isGrace = ( this.container.beat.graceType != global::alphatab.model.GraceType.None ); global::alphatab.rendering.TabBarRenderer tr = default(global::alphatab.rendering.TabBarRenderer); tr = ((global::alphatab.rendering.TabBarRenderer) (this.renderer) ); global::alphatab.rendering.glyphs.NoteNumberGlyph noteNumberGlyph = new global::alphatab.rendering.glyphs.NoteNumberGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(0, true), ((global::alphatab.model.Note) (n) ), ((bool) (isGrace) )); int l = ( ( n.beat.voice.bar.track.tuning.length - n.@string ) + 1 ); noteNumberGlyph.y = tr.getTabY(l, new global::haxe.lang.Null<int>(-2, true)); this.noteNumbers.addNoteGlyph(noteNumberGlyph, n); } }