public virtual void revertLastBar() { unchecked { if ((this.bars.length > 1)) { this.bars.pop(); int w = 0; { int _g = 0; global::haxe.root.Array <object> _g1 = this.staves; while ((_g < _g1.length)) { global::alphatab.rendering.staves.Stave s = ((global::alphatab.rendering.staves.Stave)(_g1[_g])); ++_g; { double x = global::System.Math.Max(((double)(w)), ((double)(((global::alphatab.rendering.BarRendererBase)(s.barRenderers[(s.barRenderers.length - 1)])).width))); w = ((int)(x)); } s.revertLastBar(); } } this.width -= w; } } }
public virtual void addStave(global::alphatab.rendering.staves.Stave stave) { unchecked { stave.staveGroup = this; stave.index = this.staves.length; this.staves.push(stave); if (((this._firstStaveInAccolade == default(global::alphatab.rendering.staves.Stave)) && stave._factory.isInAccolade)) { this._firstStaveInAccolade = stave; stave.isFirstInAccolade = true; } if (stave._factory.isInAccolade) { if ((this._lastStaveInAccolade != default(global::alphatab.rendering.staves.Stave))) { this._lastStaveInAccolade.isLastInAccolade = false; } this._lastStaveInAccolade = stave; this._lastStaveInAccolade.isLastInAccolade = true; } } }
public static void __hx_ctor_alphatab_rendering_staves_Stave(global::alphatab.rendering.staves.Stave __temp_me265, global::alphatab.rendering.BarRendererFactory barRendererFactory) { unchecked { __temp_me265.barRenderers = new global::haxe.root.Array <object>(); __temp_me265._factory = barRendererFactory; __temp_me265.topSpacing = 10; __temp_me265.bottomSpacing = 10; __temp_me265.staveTop = 0; __temp_me265.staveBottom = 0; } }
public virtual void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { { int _g = 0; global::haxe.root.Array <object> _g1 = this.staves; while ((_g < _g1.length)) { global::alphatab.rendering.staves.Stave s = ((global::alphatab.rendering.staves.Stave)(_g1[_g])); ++_g; s.paint((cx + this.x), (cy + this.y), canvas); } } global::alphatab.rendering.RenderingResources res = this.layout.renderer.renderingResources; if ((this.staves.length > 0)) { if (((this._firstStaveInAccolade != default(global::alphatab.rendering.staves.Stave)) && (this._lastStaveInAccolade != default(global::alphatab.rendering.staves.Stave)))) { int firstStart = (((((cy + this.y) + this._firstStaveInAccolade.y) + this._firstStaveInAccolade.staveTop) + this._firstStaveInAccolade.topSpacing) + this._firstStaveInAccolade.getTopOverflow()); int lastEnd = (((((cy + this.y) + this._lastStaveInAccolade.y) + this._lastStaveInAccolade.topSpacing) + this._lastStaveInAccolade.getTopOverflow()) + this._lastStaveInAccolade.staveBottom); canvas.setColor(res.barSeperatorColor); canvas.beginPath(); canvas.moveTo(((double)(((cx + this.x) + this._firstStaveInAccolade.x))), ((double)(firstStart))); canvas.lineTo(((double)(((cx + this.x) + this._lastStaveInAccolade.x))), ((double)(lastEnd))); canvas.stroke(); int barSize = ((int)((3 * this.layout.renderer.settings.scale))); int barOffset = barSize; int accoladeStart = (firstStart - (barSize * 4)); int accoladeEnd = (lastEnd + (barSize * 4)); canvas.fillRect(((double)((((cx + this.x) - barOffset) - barSize))), ((double)(accoladeStart)), ((double)(barSize)), ((double)((accoladeEnd - accoladeStart)))); int spikeStartX = (((cx + this.x) - barOffset) - barSize); int spikeEndX = ((cx + this.x) + (barSize * 2)); canvas.beginPath(); canvas.moveTo(((double)(spikeStartX)), ((double)(accoladeStart))); canvas.bezierCurveTo(((double)(spikeStartX)), ((double)(accoladeStart)), ((double)(this.x)), ((double)(accoladeStart)), ((double)(spikeEndX)), ((double)((accoladeStart - barSize)))); canvas.bezierCurveTo(((double)((cx + this.x))), ((double)((accoladeStart + barSize))), ((double)(spikeStartX)), ((double)((accoladeStart + barSize))), ((double)(spikeStartX)), ((double)((accoladeStart + barSize)))); canvas.closePath(); canvas.fill(); canvas.beginPath(); canvas.moveTo(((double)(spikeStartX)), ((double)(accoladeEnd))); canvas.bezierCurveTo(((double)(spikeStartX)), ((double)(accoladeEnd)), ((double)(this.x)), ((double)(accoladeEnd)), ((double)(spikeEndX)), ((double)((accoladeEnd + barSize)))); canvas.bezierCurveTo(((double)(this.x)), ((double)((accoladeEnd - barSize))), ((double)(spikeStartX)), ((double)((accoladeEnd - barSize))), ((double)(spikeStartX)), ((double)((accoladeEnd - barSize)))); canvas.closePath(); canvas.fill(); } } } }
public virtual void applyBarSpacing(int spacing) { unchecked { { int _g = 0; global::haxe.root.Array <object> _g1 = this.staves; while ((_g < _g1.length)) { global::alphatab.rendering.staves.Stave s = ((global::alphatab.rendering.staves.Stave)(_g1[_g])); ++_g; s.applyBarSpacing(spacing); } } this.width += (this.bars.length * spacing); } }
public virtual void addBar(global::alphatab.model.Bar bar) { unchecked { this.bars.push(bar); global::alphatab.rendering.staves.BarSizeInfo maxSizes = new global::alphatab.rendering.staves.BarSizeInfo(); { int _g = 0; global::haxe.root.Array <object> _g1 = this.staves; while ((_g < _g1.length)) { global::alphatab.rendering.staves.Stave s = ((global::alphatab.rendering.staves.Stave)(_g1[_g])); ++_g; s.addBar(bar); ((global::alphatab.rendering.BarRendererBase)(s.barRenderers[(s.barRenderers.length - 1)])).registerMaxSizes(maxSizes); } } int realWidth = 0; { int _g2 = 0; global::haxe.root.Array <object> _g11 = this.staves; while ((_g2 < _g11.length)) { global::alphatab.rendering.staves.Stave s1 = ((global::alphatab.rendering.staves.Stave)(_g11[_g2])); ++_g2; ((global::alphatab.rendering.BarRendererBase)(s1.barRenderers[(s1.barRenderers.length - 1)])).applySizes(maxSizes); if ((((global::alphatab.rendering.BarRendererBase)(s1.barRenderers[(s1.barRenderers.length - 1)])).width > realWidth)) { realWidth = ((global::alphatab.rendering.BarRendererBase)(s1.barRenderers[(s1.barRenderers.length - 1)])).width; } } } this.width += realWidth; } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 1058404052: { this._bar = ((global::alphatab.model.Bar)(@value)); return(@value); } case 1079503181: { this.bottomOverflow = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 698229495: { this.topOverflow = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 207609411: { this.isEmpty = ((bool)(@value)); return(@value); } case 1041537810: { this.index = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 38537191: { this.height = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 1247983110: { this.width = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 121: { this.y = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 120: { this.x = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 67860431: { this.stave = ((global::alphatab.rendering.staves.Stave)(@value)); return(@value); } default: { return(base.__hx_setField(field, hash, @value, handleProperties)); } } } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 1488498346: { this.layout = ((global::alphatab.rendering.layout.ScoreLayout) (@value) ); return @value; } case 100490692: { this.staves = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) ); return @value; } case 1091626816: { this.bars = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) ); return @value; } case 1247983110: { this.width = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 1630252697: { this.isFull = ((bool) (@value) ); return @value; } case 121: { this.y = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 120: { this.x = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 539976515: { this._lastStaveInAccolade = ((global::alphatab.rendering.staves.Stave) (@value) ); return @value; } case 84315527: { this._firstStaveInAccolade = ((global::alphatab.rendering.staves.Stave) (@value) ); return @value; } default: { return base.__hx_setField(field, hash, @value, handleProperties); } } } }
public virtual void addStave(global::alphatab.rendering.staves.Stave stave) { unchecked { stave.staveGroup = this; stave.index = this.staves.length; this.staves.push(stave); if (( ( this._firstStaveInAccolade == default(global::alphatab.rendering.staves.Stave) ) && stave._factory.isInAccolade )) { this._firstStaveInAccolade = stave; stave.isFirstInAccolade = true; } if (stave._factory.isInAccolade) { if (( this._lastStaveInAccolade != default(global::alphatab.rendering.staves.Stave) )) { this._lastStaveInAccolade.isLastInAccolade = false; } this._lastStaveInAccolade = stave; this._lastStaveInAccolade.isLastInAccolade = true; } } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 1488498346: { this.layout = ((global::alphatab.rendering.layout.ScoreLayout)(@value)); return(@value); } case 100490692: { this.staves = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value))))); return(@value); } case 1091626816: { this.bars = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value))))); return(@value); } case 1247983110: { this.width = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 1630252697: { this.isFull = ((bool)(@value)); return(@value); } case 121: { this.y = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 120: { this.x = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } case 539976515: { this._lastStaveInAccolade = ((global::alphatab.rendering.staves.Stave)(@value)); return(@value); } case 84315527: { this._firstStaveInAccolade = ((global::alphatab.rendering.staves.Stave)(@value)); return(@value); } default: { return(base.__hx_setField(field, hash, @value, handleProperties)); } } } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 1058404052: { this._bar = ((global::alphatab.model.Bar) (@value) ); return @value; } case 1079503181: { this.bottomOverflow = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 698229495: { this.topOverflow = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 207609411: { this.isEmpty = ((bool) (@value) ); return @value; } case 1041537810: { this.index = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 38537191: { this.height = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 1247983110: { this.width = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 121: { this.y = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 120: { this.x = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 67860431: { this.stave = ((global::alphatab.rendering.staves.Stave) (@value) ); return @value; } default: { return base.__hx_setField(field, hash, @value, handleProperties); } } } }