Ejemplo n.º 1
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;
         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();
     }
 }
Ejemplo n.º 2
0
 public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         canvas.beginPath();
         canvas.circle(((double)((cx + this.x))), ((double)((cy + this.y))), this._size);
         canvas.fill();
     }
 }