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 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 { 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))); } } }