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; canvas.setColor(res.mainGlyphColor); double blockWidth = (4 * this.renderer.stave.staveGroup.layout.renderer.settings.scale); int top = ((cy + this.y) + this.renderer.getTopPadding()); int bottom = (((cy + this.y) + this.renderer.height) - this.renderer.getBottomPadding()); double left = ((cx + this.x) + 0.5); int h = (bottom - top); canvas.fillRect(left, ((double)(top)), blockWidth, ((double)(h))); left += ((blockWidth * 2) - 0.5); canvas.beginPath(); canvas.moveTo(left, ((double)(top))); canvas.lineTo(left, ((double)(bottom))); canvas.stroke(); left += (3 * this.renderer.stave.staveGroup.layout.renderer.settings.scale); double circleSize = (this._circleSize * this.renderer.stave.staveGroup.layout.renderer.settings.scale); double middle = (((double)(((top + bottom)))) / 2); canvas.beginPath(); canvas.circle(left, (middle - (circleSize * this._dotOffset)), circleSize); canvas.circle(left, (middle + (circleSize * this._dotOffset)), circleSize); canvas.fill(); } }
public static void __hx_ctor_alphatab_rendering_RenderingResources(global::alphatab.rendering.RenderingResources __temp_me97, double scale) { unchecked { __temp_me97.init(scale); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { if ((this._svg == default(global::alphatab.rendering.glyphs.LazySvg))) { return; } this._xScale = (this._xGlyphScale * this.renderer.stave.staveGroup.layout.renderer.settings.scale); this._yScale = (this._yGlyphScale * this.renderer.stave.staveGroup.layout.renderer.settings.scale); global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; canvas.setColor(res.mainGlyphColor); int startX = (this.x + cx); int startY = (this.y + cy); this._currentX = ((double)(startX)); this._currentY = ((double)(startY)); canvas.setColor(new global::alphatab.platform.model.Color(((int)(0)), ((int)(0)), ((int)(0)), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))))); canvas.beginPath(); { int _g = 0; global::haxe.root.Array <object> _g1 = this._svg.@get(); while ((_g < _g1.length)) { global::alphatab.rendering.glyphs.SvgCommand c = ((global::alphatab.rendering.glyphs.SvgCommand)(_g1[_g])); ++_g; this.parseCommand(startX, startY, canvas, c); } } canvas.fill(); } }
public override void paintBackground(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { global::alphatab.rendering.RenderingResources res = this.stave.staveGroup.layout.renderer.renderingResources; canvas.setColor(res.staveLineColor); int lineY = ((cy + this.y) + this.getNumberOverflow()); int startY = lineY; { int _g1 = 0; int _g = this._bar.track.tuning.length; while ((_g1 < _g)) { int i = _g1++; if ((i > 0)) { lineY += ((int)((11 * this.stave.staveGroup.layout.renderer.settings.scale))); } canvas.beginPath(); canvas.moveTo(((double)((cx + this.x))), ((double)(lineY))); canvas.lineTo(((double)(((cx + this.x) + this.width))), ((double)(lineY))); canvas.stroke(); } } } }
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; canvas.setFont(this._font); canvas.setColor(res.mainGlyphColor); canvas.fillText(this._text, ((double)((cx + this.x))), ((double)((cy + this.y)))); } }
public virtual int getNumberOverflow() { unchecked { global::alphatab.rendering.RenderingResources res = this.stave.staveGroup.layout.renderer.renderingResources; { double x = ((res.tablatureFont.getSize() / 2) + (res.tablatureFont.getSize() * 0.2)); return((int)(x)); } } }
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; canvas.setColor(res.mainGlyphColor); canvas.strokeRect(((double)((cx + this.x))), ((double)((cy + this.y))), ((double)(this.width)), (20 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)); canvas.setFont(res.tablatureFont); canvas.fillText(this._s, ((double)((cx + this.x))), ((double)((cy + this.y)))); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { double step = (11 * this.renderer.stave.staveGroup.layout.renderer.settings.scale); int loops = default(int); { double v = global::System.Math.Max(((double)(1)), ((double)((this.width / step)))); { double x = global::System.Math.Floor(((double)(v))); loops = ((int)(x)); } } global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; canvas.setColor(res.mainGlyphColor); canvas.setFont(res.effectFont); canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Left); double textWidth = canvas.measureText(this._label); canvas.fillText(this._label, ((double)((cx + this.x))), ((double)((cy + this.y)))); if (this._isExpanded) { int lineSpacing = ((int)((3 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); double startX = (((cx + this.x) + textWidth) + lineSpacing); int endX = ((((cx + this.x) + this.width) - lineSpacing) - lineSpacing); int lineY = ((cy + this.y) + ((int)((8 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)))); int lineSize = ((int)((8 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); if ((endX > startX)) { double lineX = startX; while ((lineX < endX)) { canvas.beginPath(); canvas.moveTo(lineX, ((double)(lineY))); int __temp_stmt606 = default(int); { double x1 = global::System.Math.Min(((double)((lineX + lineSize))), ((double)(endX))); __temp_stmt606 = ((int)(x1)); } canvas.lineTo(((double)(__temp_stmt606)), ((double)(lineY))); lineX += ((double)((lineSize + lineSpacing))); canvas.stroke(); } canvas.beginPath(); canvas.moveTo(((double)(endX)), ((double)((lineY - ((int)((6 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))))))); canvas.lineTo(((double)(endX)), ((double)((lineY + ((int)((6 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))))))); canvas.stroke(); } } } }
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; canvas.setFont(res.markerFont); canvas.setColor(res.mainGlyphColor); global::alphatab.rendering.glyphs.SvgGlyph symbol = new global::alphatab.rendering.glyphs.SvgGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.rendering.glyphs.LazySvg)(global::alphatab.rendering.glyphs.MusicFont.Tempo)), ((double)(1)), ((double)(1))); symbol.renderer = this.renderer; symbol.paint((cx + this.x), (cy + this.y), canvas); canvas.fillText(global::haxe.lang.Runtime.concat("", global::haxe.lang.Runtime.toString(this._tempo)), ((double)(((cx + this.x) + ((int)((30 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)))))), ((double)(((cy + this.y) + ((int)((7 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))))))); } }
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 override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { if (this._hidden) { return; } global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; canvas.setColor(res.barNumberColor); canvas.setFont(res.barNumberFont); canvas.fillText(global::Std.@string(this._number), ((double)((cx + this.x))), ((double)((cy + this.y)))); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { if (((this._endNote == default(global::alphatab.model.Note)) || (this._startNote.beat.index != this._endNote.beat.index))) { return; } global::alphatab.rendering.TabBarRenderer r = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.rendering.glyphs.TabBeatContainerGlyph parent = ((global::alphatab.rendering.glyphs.TabBeatContainerGlyph)(this._parent)); global::alphatab.rendering.RenderingResources res = r.stave.staveGroup.layout.renderer.renderingResources; int startX = (cx + r.getNoteX(this._startNote, default(global::haxe.lang.Null <bool>))); int endX = default(int); if ((this._endNote == default(global::alphatab.model.Note))) { endX = (((cx + parent.x) + parent.postNotes.x) + parent.postNotes.width); } else { endX = (cx + r.getNoteX(this._endNote, new global::haxe.lang.Null <bool>(false, true))); } bool down = (this._startNote.@string > 3); double offset = (res.tablatureFont.getSize() / 2); if (down) { offset *= ((double)(-1)); } double startY = ((cy + r.getNoteY(this._startNote)) + offset); double endY = default(double); if ((this._endNote == default(global::alphatab.model.Note))) { endY = startY; } else { endY = ((cy + r.getNoteY(this._endNote)) + offset); } global::alphatab.rendering.glyphs.TieGlyph.paintTie(canvas, this.renderer.stave.staveGroup.layout.renderer.settings.scale, ((double)(startX)), startY, ((double)(endX)), endY, new global::haxe.lang.Null <bool>((this._startNote.@string > 3), true)); canvas.setColor(this.renderer.stave.staveGroup.layout.renderer.renderingResources.mainGlyphColor); canvas.fill(); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { if ((this._endings.length > 0)) { global::alphatab.rendering.RenderingResources res = this.stave.staveGroup.layout.renderer.renderingResources; canvas.setColor(res.mainGlyphColor); canvas.setFont(res.wordsFont); canvas.moveTo(((double)((cx + this.x))), ((double)(((cy + this.y) + this.height)))); canvas.lineTo(((double)((cx + this.x))), ((double)((cy + this.y)))); canvas.lineTo(((double)(((cx + this.x) + this.width))), ((double)((cy + this.y)))); canvas.stroke(); canvas.fillText(this._endingsString, ((double)(((int)(((cx + this.x) + (3 * this.stave.staveGroup.layout.renderer.settings.scale)))))), ((double)(((int)((cy + (this.y * this.stave.staveGroup.layout.renderer.settings.scale))))))); } } }
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; canvas.setColor(res.mainGlyphColor); canvas.setFont(res.barNumberFont); string s = global::haxe.lang.Runtime.concat("x", global::Std.@string(this._count)); int w = default(int); { double x = (canvas.measureText(s) / 1.5); w = ((int)(x)); } canvas.fillText(s, ((double)(((cx + this.x) - w))), ((double)((cy + this.y)))); } }
public virtual global::alphatab.rendering.Glyph createNewGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat) { unchecked { global::alphatab.rendering.RenderingResources res = renderer.stave.staveGroup.layout.renderer.renderingResources; if (beat.slap) { return(new global::alphatab.rendering.glyphs.effects.TextGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), global::haxe.lang.Runtime.toString("S"), ((global::alphatab.platform.model.Font)(res.effectFont)))); } if (beat.pop) { return(new global::alphatab.rendering.glyphs.effects.TextGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), global::haxe.lang.Runtime.toString("P"), ((global::alphatab.platform.model.Font)(res.effectFont)))); } return(new global::alphatab.rendering.glyphs.effects.TextGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), global::haxe.lang.Runtime.toString("T"), ((global::alphatab.platform.model.Font)(res.effectFont)))); } }
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; canvas.setFont(res.markerFont); canvas.setColor(res.mainGlyphColor); double textw = canvas.measureText("tr"); canvas.fillText("tr", ((double)((cx + this.x))), ((double)((cy + this.y)))); double startX = textw; double endX = (this.width - startX); double step = ((11 * this.renderer.stave.staveGroup.layout.renderer.settings.scale) * this._scale); int loops = default(int); { double v = global::System.Math.Max(((double)(1)), ((double)((((endX - startX)) / step)))); { double x = global::System.Math.Floor(((double)(v))); loops = ((int)(x)); } } int loopX = ((int)(startX)); { int _g = 0; while ((_g < loops)) { int i = _g++; global::alphatab.rendering.glyphs.SvgGlyph glyph = new global::alphatab.rendering.glyphs.SvgGlyph(new global::haxe.lang.Null <int>(loopX, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.rendering.glyphs.LazySvg)(global::alphatab.rendering.glyphs.MusicFont.WaveHorizontal)), ((double)(this._scale)), ((double)(this._scale))); glyph.renderer = this.renderer; int __temp_stmt607 = default(int); { double x1 = (res.markerFont.getSize() / 2); __temp_stmt607 = ((int)(x1)); } glyph.paint((cx + this.x), ((cy + this.y) + __temp_stmt607), canvas); { double x2 = global::System.Math.Floor(((double)(step))); loopX += ((int)(x2)); } } } } }
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 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; canvas.setColor(res.barSeperatorColor); double blockWidth = (4 * this.renderer.stave.staveGroup.layout.renderer.settings.scale); int top = ((cy + this.y) + this.renderer.getTopPadding()); int bottom = (((cy + this.y) + this.renderer.height) - this.renderer.getBottomPadding()); double left = ((double)((cx + this.x))); int h = (bottom - top); canvas.beginPath(); canvas.moveTo(left, ((double)(top))); canvas.lineTo(left, ((double)(bottom))); canvas.stroke(); if (this._isLast) { left += ((3 * this.renderer.stave.staveGroup.layout.renderer.settings.scale) + 0.5); canvas.fillRect(left, ((double)(top)), blockWidth, ((double)(h))); } } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { double height = (17 * this.renderer.stave.staveGroup.layout.renderer.settings.scale); global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; canvas.setColor(res.mainGlyphColor); canvas.beginPath(); if ((this._crescendo == global::alphatab.rendering.glyphs.CrescendoType.Crescendo)) { canvas.moveTo(((double)(((cx + this.x) + this.width))), ((double)((cy + this.y)))); canvas.lineTo(((double)((cx + this.x))), ((double)(((cy + this.y) + ((int)((height / 2))))))); canvas.lineTo(((double)(((cx + this.x) + this.width))), ((cy + this.y) + height)); } else { canvas.moveTo(((double)((cx + this.x))), ((double)((cy + this.y)))); canvas.lineTo(((double)(((cx + this.x) + this.width))), ((double)(((cy + this.y) + ((int)((height / 2))))))); canvas.lineTo(((double)((cx + this.x))), ((cy + this.y) + height)); } canvas.stroke(); } }
public virtual int paintScoreInfo(int x, int y) { unchecked { int flags = default(int); if (this.renderer.settings.layout.@get <bool>("hideInfo", false)) { flags = 0; } else { flags = 511; } global::alphatab.model.Score score = this.renderer._get_score(); double scale = this.renderer.settings.scale; global::alphatab.platform.ICanvas canvas = this.renderer.canvas; global::alphatab.rendering.RenderingResources res = this.renderer.renderingResources; canvas.setColor(new global::alphatab.platform.model.Color(((int)(0)), ((int)(0)), ((int)(0)), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))))); canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Center); double tX = default(double); double size = default(double); string str = ""; if ((!(this.isNullOrEmpty(score.title)) && (((flags & 1)) != 0))) { this.drawCentered(score.title, res.titleFont, y); { double x1 = global::System.Math.Floor(((double)((35 * scale)))); y += ((int)(x1)); } } if ((!(this.isNullOrEmpty(score.subTitle)) && (((flags & 2)) != 0))) { this.drawCentered(score.subTitle, res.subTitleFont, y); { double x2 = global::System.Math.Floor(((double)((20 * scale)))); y += ((int)(x2)); } } if ((!(this.isNullOrEmpty(score.artist)) && (((flags & 4)) != 0))) { this.drawCentered(score.artist, res.subTitleFont, y); { double x3 = global::System.Math.Floor(((double)((20 * scale)))); y += ((int)(x3)); } } if ((!(this.isNullOrEmpty(score.album)) && (((flags & 8)) != 0))) { this.drawCentered(score.album, res.subTitleFont, y); { double x4 = global::System.Math.Floor(((double)((20 * scale)))); y += ((int)(x4)); } } if (((!(this.isNullOrEmpty(score.music)) && string.Equals(score.music, score.words)) && (((flags & 64)) != 0))) { this.drawCentered(global::haxe.lang.Runtime.concat("Music and Words by ", score.words), res.wordsFont, y); { double x5 = global::System.Math.Floor(((double)((20 * scale)))); y += ((int)(x5)); } } else { canvas.setFont(res.wordsFont); if ((!(this.isNullOrEmpty(score.music)) && (((flags & 32)) != 0))) { canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Right); canvas.fillText(global::haxe.lang.Runtime.concat("Music by ", score.music), ((double)((this.width - global::alphatab.rendering.layout.PageViewLayout.PagePadding[2]))), ((double)(y))); } if ((!(this.isNullOrEmpty(score.words)) && (((flags & 16)) != 0))) { canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Left); canvas.fillText(global::haxe.lang.Runtime.concat("Words by ", score.music), ((double)(x)), ((double)(y))); } { double x6 = global::System.Math.Floor(((double)((20 * scale)))); y += ((int)(x6)); } } { double x7 = global::System.Math.Floor(((double)((20 * scale)))); y += ((int)(x7)); } if (!(this.renderer.track.isPercussion)) { canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Left); global::alphatab.model.Tuning tuning = global::alphatab.model.Tuning.findTuning(this.renderer.track.tuning); if ((tuning != default(global::alphatab.model.Tuning))) { canvas.setFont(res.effectFont); canvas.fillText(tuning.name, ((double)(x)), ((double)(y))); { double x8 = global::System.Math.Floor(((double)((15 * scale)))); y += ((int)(x8)); } if (!(tuning.isStandard)) { int stringsPerColumn = default(int); { double x9 = global::System.Math.Ceiling(((double)((((double)(this.renderer.track.tuning.length)) / 2)))); stringsPerColumn = ((int)(x9)); } int currentX = x; int currentY = y; { int _g1 = 0; int _g = this.renderer.track.tuning.length; while ((_g1 < _g)) { int i = _g1++; str = global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("(", global::Std.@string((i + 1))), ") = "), global::alphatab.model.Tuning.getTextForTuning(this.renderer.track.tuning[i], false)); canvas.fillText(str, ((double)(currentX)), ((double)(currentY))); { double x10 = global::System.Math.Floor(((double)((15 * scale)))); currentY += ((int)(x10)); } if ((i == (stringsPerColumn - 1))) { currentY = y; { double x11 = global::System.Math.Floor(((double)((43 * scale)))); currentX += ((int)(x11)); } } } } int __temp_stmt479 = default(int); { double x12 = global::System.Math.Floor(((double)((15 * scale)))); __temp_stmt479 = ((int)(x12)); } y += (stringsPerColumn * __temp_stmt479); } } } { double x13 = global::System.Math.Floor(((double)((25 * scale)))); y += ((int)(x13)); } return(y); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { global::alphatab.rendering.TabBarRenderer tabBarRenderer = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.model.Track track = this.renderer.stave.staveGroup.layout.renderer.track; global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; double startY = ((cy + this.y) + ((10 * this.renderer.stave.staveGroup.layout.renderer.settings.scale) * 0.6)); int endY = ((cy + this.y) + tabBarRenderer.getTabY(track.tuning.length, new global::haxe.lang.Null <int>(-2, true))); double fontScale = ((double)(1)); double correction = ((double)(0)); { int _g = track.tuning.length; switch (_g) { case 4: { fontScale = 0.6; break; } case 5: { fontScale = 0.8; break; } case 6: { fontScale = 1.1; correction = ((double)(1)); break; } case 7: { fontScale = 1.15; break; } case 8: { fontScale = 1.35; break; } } } global::alphatab.platform.model.Font font = res.tabClefFont.clone(); font.setSize((font.getSize() * fontScale)); canvas.setColor(res.mainGlyphColor); canvas.setFont(font); canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Center); canvas.fillText("T", ((double)(((cx + this.x) + (this.width / 2)))), startY); canvas.fillText("A", ((double)(((cx + this.x) + (this.width / 2)))), ((startY + font.getSize()) - ((int)((correction * this.renderer.stave.staveGroup.layout.renderer.settings.scale))))); canvas.fillText("B", ((double)(((cx + this.x) + (this.width / 2)))), (startY + (((font.getSize() - ((int)((correction * this.renderer.stave.staveGroup.layout.renderer.settings.scale))))) * 2))); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { global::alphatab.rendering.TabBarRenderer r = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; double dX = (((double)(this.width)) / 60); int maxValue = 0; { int _g1 = 0; int _g = this._note.bendPoints.length; while ((_g1 < _g)) { int i = _g1++; if ((((global::alphatab.model.BendPoint)(this._note.bendPoints[i])).@value > maxValue)) { maxValue = ((global::alphatab.model.BendPoint)(this._note.bendPoints[i])).@value; } } } double dY = (((double)(this._height)) / maxValue); int xx = (cx + this.x); int yy = ((cy + this.y) + r.getNoteY(this._note)); canvas.beginPath(); { int _g11 = 0; int _g2 = (this._note.bendPoints.length - 1); while ((_g11 < _g2)) { int i1 = _g11++; global::alphatab.model.BendPoint firstPt = ((global::alphatab.model.BendPoint)(this._note.bendPoints[i1])); global::alphatab.model.BendPoint secondPt = ((global::alphatab.model.BendPoint)(this._note.bendPoints[(i1 + 1)])); if (((firstPt.@value == secondPt.@value) && (i1 == (this._note.bendPoints.length - 2)))) { continue; } double x1 = (xx + (dX * firstPt.offset)); double y1 = (yy - (dY * firstPt.@value)); double x2 = (xx + (dX * secondPt.offset)); double y2 = (yy - (dY * secondPt.@value)); if ((firstPt.@value == secondPt.@value)) { canvas.moveTo(x1, y1); canvas.lineTo(x2, y2); canvas.stroke(); } else { double hx = (x1 + ((x2 - x1))); double hy = (yy - (dY * firstPt.@value)); canvas.moveTo(x1, y1); canvas.bezierCurveTo(hx, hy, x2, y2, x2, y2); canvas.stroke(); } double arrowSize = (6 * this.renderer.stave.staveGroup.layout.renderer.settings.scale); if ((secondPt.@value > firstPt.@value)) { canvas.beginPath(); canvas.moveTo(x2, y2); canvas.lineTo((x2 - (arrowSize * 0.5)), (y2 + arrowSize)); canvas.lineTo((x2 + (arrowSize * 0.5)), (y2 + arrowSize)); canvas.closePath(); canvas.fill(); } else { if ((secondPt.@value != firstPt.@value)) { canvas.beginPath(); canvas.moveTo(x2, y2); canvas.lineTo((x2 - (arrowSize * 0.5)), (y2 - arrowSize)); canvas.lineTo((x2 + (arrowSize * 0.5)), (y2 - arrowSize)); canvas.closePath(); canvas.fill(); } } canvas.stroke(); if ((secondPt.@value != 0)) { double dV = ((double)((secondPt.@value - firstPt.@value))); bool up = (dV > 0); dV = global::System.Math.Abs(((double)(dV))); string s = ""; if ((dV == 4)) { s = "full"; dV -= ((double)(4)); } else { if ((dV > 4)) { int __temp_stmt594 = default(int); { double x = global::System.Math.Floor(((double)((dV / 4)))); __temp_stmt594 = ((int)(x)); } string __temp_stmt593 = global::Std.@string(__temp_stmt594); string __temp_stmt592 = global::haxe.lang.Runtime.concat(__temp_stmt593, " "); s = global::haxe.lang.Runtime.concat(s, __temp_stmt592); { double x3 = global::System.Math.Floor(((double)(dV))); dV -= ((double)(((int)(x3)))); } } } if ((dV > 0)) { s = global::haxe.lang.Runtime.concat(s, global::haxe.lang.Runtime.concat(global::Std.@string(dV), "/4")); } if (!(string.Equals(s, ""))) { if (!(up)) { s = global::haxe.lang.Runtime.concat("-", s); } canvas.setFont(res.tablatureFont); double size = canvas.measureText(s); double y = default(double); if (up) { y = ((y2 - res.tablatureFont.getSize()) - (2 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)); } else { y = (y2 + (2 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)); } double x4 = (x2 - (size / 2)); canvas.fillText(s, x4, y); } } } } } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 188579043: { this.settings = ((global::alphatab.Settings)(@value)); return(@value); } case 307761913: { this.renderingResources = ((global::alphatab.rendering.RenderingResources)(@value)); return(@value); } case 1488498346: { this.layout = ((global::alphatab.rendering.layout.ScoreLayout)(@value)); return(@value); } case 223048071: { this._currentLayoutMode = global::haxe.lang.Runtime.toString(@value); return(@value); } case 371166859: { this.track = ((global::alphatab.model.Track)(@value)); return(@value); } case 2027516754: { this.score = ((global::alphatab.model.Score)(@value)); return(@value); } case 943871192: { this.canvas = ((global::alphatab.platform.ICanvas)(@value)); return(@value); } case 1842287352: { this._renderFinishedListeners = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@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 188579043: { this.settings = ((global::alphatab.Settings) (@value) ); return @value; } case 307761913: { this.renderingResources = ((global::alphatab.rendering.RenderingResources) (@value) ); return @value; } case 1488498346: { this.layout = ((global::alphatab.rendering.layout.ScoreLayout) (@value) ); return @value; } case 223048071: { this._currentLayoutMode = global::haxe.lang.Runtime.toString(@value); return @value; } case 371166859: { this.track = ((global::alphatab.model.Track) (@value) ); return @value; } case 2027516754: { this.score = ((global::alphatab.model.Score) (@value) ); return @value; } case 943871192: { this.canvas = ((global::alphatab.platform.ICanvas) (@value) ); return @value; } case 1842287352: { this._renderFinishedListeners = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) ); return @value; } default: { return base.__hx_setField(field, hash, @value, handleProperties); } } } }
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; canvas.setColor(res.mainGlyphColor); global::haxe.root.Array <object> glyphs = default(global::haxe.root.Array <object>); { global::alphatab.model.DynamicValue _g = this._dynamics; switch (global::haxe.root.Type.enumIndex(_g)) { case 0: { glyphs = new global::haxe.root.Array <object>(new object[] { this.p(), this.p(), this.p() }); break; } case 1: { glyphs = new global::haxe.root.Array <object>(new object[] { this.p(), this.p() }); break; } case 2: { glyphs = new global::haxe.root.Array <object>(new object[] { this.p() }); break; } case 3: { glyphs = new global::haxe.root.Array <object>(new object[] { this.m(), this.p() }); break; } case 4: { glyphs = new global::haxe.root.Array <object>(new object[] { this.m(), this.f() }); break; } case 5: { glyphs = new global::haxe.root.Array <object>(new object[] { this.f() }); break; } case 6: { glyphs = new global::haxe.root.Array <object>(new object[] { this.f(), this.f() }); break; } case 7: { glyphs = new global::haxe.root.Array <object>(new object[] { this.f(), this.f(), this.f() }); break; } } } int glyphWidth = 0; { int _g1 = 0; while ((_g1 < glyphs.length)) { global::alphatab.rendering.Glyph g = ((global::alphatab.rendering.Glyph)(glyphs[_g1])); ++_g1; glyphWidth += g.width; } } int startX = (((this.width - glyphWidth)) / 2); { int _g2 = 0; while ((_g2 < glyphs.length)) { global::alphatab.rendering.Glyph g1 = ((global::alphatab.rendering.Glyph)(glyphs[_g2])); ++_g2; g1.x = startX; g1.y = 0; g1.renderer = this.renderer; g1.paint((cx + this.x), (cy + this.y), canvas); startX += g1.width; } } } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { global::alphatab.rendering.TabBarRenderer tabBarRenderer = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; int startY = default(int); int __temp_stmt600 = default(int); { double x = (tabBarRenderer.getNoteY(this._beat.maxNote()) - (res.tablatureFont.getSize() / 2)); __temp_stmt600 = ((int)(x)); } startY = ((cy + this.y) + __temp_stmt600); double endY = (((cy + this.y) + tabBarRenderer.getNoteY(this._beat.minNote())) + (res.tablatureFont.getSize() / 2)); int arrowX = ((int)(((cx + this.x) + (((double)(this.width)) / 2)))); double arrowSize = (8 * this.renderer.stave.staveGroup.layout.renderer.settings.scale); canvas.setColor(res.mainGlyphColor); if ((this._beat.brushType != global::alphatab.model.BrushType.None)) { if (((this._beat.brushType == global::alphatab.model.BrushType.BrushUp) || (this._beat.brushType == global::alphatab.model.BrushType.BrushDown))) { canvas.beginPath(); canvas.moveTo(((double)(arrowX)), ((double)(startY))); canvas.lineTo(((double)(arrowX)), endY); canvas.stroke(); } else { int size = ((int)((15 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); int steps = default(int); { double v = (global::System.Math.Abs(((double)((endY - startY)))) / size); { double x1 = global::System.Math.Floor(((double)(v))); steps = ((int)(x1)); } } { int _g = 0; while ((_g < ((int)(steps)))) { int i = _g++; global::alphatab.rendering.glyphs.SvgGlyph arrow = new global::alphatab.rendering.glyphs.SvgGlyph(new global::haxe.lang.Null <int>(((int)((3 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))), true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.rendering.glyphs.LazySvg)(global::alphatab.rendering.glyphs.MusicFont.WaveVertical)), ((double)(1)), ((double)(1))); arrow.renderer = this.renderer; arrow.doLayout(); arrow.paint((cx + this.x), (startY + (i * size)), canvas); } } } if (((this._beat.brushType == global::alphatab.model.BrushType.BrushUp) || (this._beat.brushType == global::alphatab.model.BrushType.ArpeggioUp))) { canvas.beginPath(); canvas.moveTo(((double)(arrowX)), endY); canvas.lineTo(((double)(((int)((arrowX + (arrowSize / 2)))))), ((double)(((int)((endY - arrowSize)))))); canvas.lineTo(((double)(((int)((arrowX - (arrowSize / 2)))))), ((double)(((int)((endY - arrowSize)))))); canvas.closePath(); canvas.fill(); } else { canvas.beginPath(); canvas.moveTo(((double)(arrowX)), ((double)(startY))); canvas.lineTo(((double)(((int)((arrowX + (arrowSize / 2)))))), ((double)(((int)((startY + arrowSize)))))); canvas.lineTo(((double)(((int)((arrowX - (arrowSize / 2)))))), ((double)(((int)((startY + arrowSize)))))); canvas.closePath(); canvas.fill(); } } } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { global::alphatab.rendering.TabBarRenderer tabBarRenderer = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; double startX = ((cx + this.x) + (((double)(this._parent.onNotes.width)) / 2)); double endX = default(double); if (((this._beat.nextBeat == default(global::alphatab.model.Beat)) || (this._beat.voice != this._beat.nextBeat.voice))) { endX = (((cx + this.x) + (((double)(this._parent.onNotes.width)) / 2)) + this._parent.postNotes.width); } else { endX = ((double)((cx + tabBarRenderer.getBeatX(this._beat.nextBeat)))); } int startY = (cy + this.y); int textOffset = ((int)((3 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); int sizeY = ((int)((60 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Center); if ((this._beat.whammyBarPoints.length >= 2)) { double dx = (((endX - startX)) / 60); double dy = (((double)(sizeY)) / 24); canvas.beginPath(); { int _g1 = 0; int _g = (this._beat.whammyBarPoints.length - 1); while ((_g1 < _g)) { int i = _g1++; global::alphatab.model.BendPoint pt1 = ((global::alphatab.model.BendPoint)(this._beat.whammyBarPoints[i])); global::alphatab.model.BendPoint pt2 = ((global::alphatab.model.BendPoint)(this._beat.whammyBarPoints[(i + 1)])); if (((pt1.@value == pt2.@value) && (i == (this._beat.whammyBarPoints.length - 2)))) { continue; } int pt1X = ((int)((startX + (dx * pt1.offset)))); int pt1Y = ((int)((startY - (dy * pt1.@value)))); int pt2X = ((int)((startX + (dx * pt2.offset)))); int pt2Y = ((int)((startY - (dy * pt2.@value)))); canvas.moveTo(((double)(pt1X)), ((double)(pt1Y))); canvas.lineTo(((double)(pt2X)), ((double)(pt2Y))); if ((pt2.@value != 0)) { double dv = (pt2.@value / 4.0); bool up = ((pt2.@value - pt1.@value) >= 0); string s = ""; if ((dv < 0)) { s = global::haxe.lang.Runtime.concat(s, "-"); } if (((dv >= 1) || (dv <= -1))) { int __temp_stmt605 = default(int); { double v = global::System.Math.Abs(((double)(dv))); { double x = global::System.Math.Floor(((double)(v))); __temp_stmt605 = ((int)(x)); } } string __temp_stmt604 = global::Std.@string(__temp_stmt605); string __temp_stmt603 = global::haxe.lang.Runtime.concat(__temp_stmt604, " "); s = global::haxe.lang.Runtime.concat(s, __temp_stmt603); } { double x1 = global::System.Math.Floor(((double)(dv))); dv -= ((double)(((int)(x1)))); } if ((dv == 0.25)) { s = global::haxe.lang.Runtime.concat(s, "1/4"); } else { if ((dv == 0.5)) { s = global::haxe.lang.Runtime.concat(s, "1/2"); } else { if ((dv == 0.75)) { s = global::haxe.lang.Runtime.concat(s, "3/4"); } } } canvas.setFont(res.graceFont); double size = canvas.measureText(s); double sy = default(double); if (up) { sy = ((pt2Y - res.graceFont.getSize()) - textOffset); } else { sy = ((double)((pt2Y + textOffset))); } int sx = pt2X; canvas.fillText(s, ((double)(sx)), sy); } } } canvas.stroke(); } } }