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 = ((double) (( cx + this.x )) ); int h = ( bottom - top ); double circleSize = ( 1.5 * this.renderer.stave.staveGroup.layout.renderer.settings.scale ); double middle = ( ((double) ((( top + bottom ))) ) / 2 ); int dotOffset = 3; canvas.beginPath(); canvas.circle(left, ( middle - ( circleSize * dotOffset ) ), circleSize); canvas.circle(left, ( middle + ( circleSize * dotOffset ) ), circleSize); canvas.fill(); left += ( 4 * this.renderer.stave.staveGroup.layout.renderer.settings.scale ); canvas.beginPath(); canvas.moveTo(left, ((double) (top) )); canvas.lineTo(left, ((double) (bottom) )); canvas.stroke(); 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 { 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 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(global::java.awt.Graphics g) { // old school gradient :) var h = this.getHeight(); var w = this.getWidth(); for (int i = 0; i < h; i++) { g.setColor(GetBlue(1 - (double)i / (double)h)); g.drawLine(0, i, w, i); } g.setColor(new Color(0xffff00)); if (!string.IsNullOrEmpty(Error)) g.drawString(Error, 16, 64); if (this.Maze != null) { try { int x, y; int z = 12; for (x = 1; x < Maze.Width - 1; x++) for (y = 1; y < Maze.Height - 1; y++) { var v = Maze[x, y]; if ((v & 1) != 0) /* This cell has a top wall */ g.drawLine(x * z, y * z, x * z + z, y * z); if ((v & 4) != 0) /* This cell has a left wall */ g.drawLine(x * z, y * z, x * z, y * z + z); if ((v & 8) != 0) /* This cell has a right wall */ g.drawLine(x * z + z, y * z, x * z + z, y * z + z); if ((v & 2) != 0) /* This cell has a bottom wall */ g.drawLine(x * z, y * z + z, x * z + z, y * z + z); } var offset = Maze.Width * z; g.setColor(new Color(0x00ff00)); g.drawRect(offset + z, z, (Maze.Width - 2) * z, (Maze.Height - 2) * z); for (x = 1; x < Maze.Width - 1; x++) for (y = 1; y < Maze.Height - 1; y++) { var v = Maze[x, y]; var IsTop = (v & 1) != 0; var IsLeft = (v & 4) != 0; if (IsTop) /* This cell has a top wall */ g.fillRect(offset + x * z, y * z, z, z / 3); if (IsLeft) /* This cell has a left wall */ g.fillRect(offset + x * z, y * z, z / 3, z); var IsBottom = (v & 2) != 0; var IsRight = (v & 8) != 0; if (IsRight) { g.fillRect(offset + x * z + z - z / 3, y * z, z / 3, z); } if (IsBottom) { g.fillRect(offset + x * z, y * z + z - z / 3, z, z / 3); } } } catch { } } }