예제 #1
0
        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();
                    }
                }
            }
        }
예제 #2
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();
     }
 }
예제 #3
0
        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) * this._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));
                    }
                }

                int loopX = 0;
                {
                    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;
                        glyph.paint((cx + this.x), (cy + this.y), canvas);
                        {
                            double x1 = global::System.Math.Floor(((double)(step)));
                            loopX += ((int)(x1));
                        }
                    }
                }
            }
        }
예제 #4
0
        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();
            }
        }
예제 #5
0
 public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         base.paint(cx, cy, canvas);
         int glyphStart = this.getBeatGlyphsStart();
         {
             int _g = 0;
             global::haxe.root.Array <object> _g1 = this._uniqueEffectGlyphs;
             while ((_g < _g1.length))
             {
                 global::haxe.root.Array <object> v = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g1[_g])))));
                 ++_g;
                 {
                     int _g2 = 0;
                     while ((_g2 < v.length))
                     {
                         global::alphatab.rendering.Glyph g = ((global::alphatab.rendering.Glyph)(v[_g2]));
                         ++_g2;
                         if ((g.renderer == this))
                         {
                             g.paint(((cx + this.x) + glyphStart), (cy + this.y), canvas);
                         }
                     }
                 }
             }
         }
     }
 }
예제 #6
0
 public virtual void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         {
         }
     }
 }
예제 #7
0
 public override void paintBackground(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         {
         }
     }
 }
예제 #8
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();
     }
 }
예제 #9
0
 public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         if (!(string.Equals(this._noteString, default(string))))
         {
             canvas.fillText(global::Std.@string(this._noteString), ((cx + this.x) + (0 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)), ((double)((cy + this.y))));
         }
     }
 }
예제 #10
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.setFont(this._font);
         canvas.setColor(res.mainGlyphColor);
         canvas.fillText(this._text, ((double)((cx + this.x))), ((double)((cy + this.y))));
     }
 }
예제 #11
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);
         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))));
     }
 }
예제 #12
0
 public virtual void drawInfoGuide(global::alphatab.platform.ICanvas canvas, int cx, int cy, int y, global::alphatab.platform.model.Color c)
 {
     unchecked
     {
         canvas.setColor(c);
         canvas.beginPath();
         canvas.moveTo(((double)((cx + this.x))), ((double)(((cy + this.y) + y))));
         canvas.lineTo(((double)(((cx + this.x) + this.width))), ((double)(((cy + this.y) + y))));
         canvas.stroke();
     }
 }
예제 #13
0
        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();
                    }
                }
            }
        }
예제 #14
0
 public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         int size = ((int)((6 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)));
         canvas.beginPath();
         canvas.moveTo(((double)((cx + this.x))), ((double)((cy + this.y))));
         canvas.quadraticCurveTo(((double)(((cx + this.x) + (this.width / 2)))), ((double)((cy + this.y))), ((double)(((cx + this.x) + this.width))), ((double)(((cy + this.y) - size))));
         canvas.moveTo(((double)((cx + this.x))), ((double)((cy + this.y))));
         canvas.quadraticCurveTo(((double)(((cx + this.x) + (this.width / 2)))), ((double)((cy + this.y))), ((double)(((cx + this.x) + this.width))), ((double)(((cy + this.y) + size))));
         canvas.stroke();
     }
 }
예제 #15
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.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)))))));
     }
 }
예제 #16
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();
                    }
                }
            }
        }
예제 #17
0
 public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         int _g = 0;
         global::haxe.root.Array <object> _g1 = this.beatGlyphs;
         while ((_g < _g1.length))
         {
             global::alphatab.rendering.glyphs.BeatContainerGlyph g = ((global::alphatab.rendering.glyphs.BeatContainerGlyph)(_g1[_g]));
             ++_g;
             g.paint((cx + this.x), (cy + this.y), canvas);
         }
     }
 }
예제 #18
0
        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))));
            }
        }
예제 #19
0
 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)))))));
         }
     }
 }
예제 #20
0
        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();
            }
        }
예제 #21
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);
                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))));
            }
        }
예제 #22
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.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));
                        }
                    }
                }
            }
        }
예제 #23
0
        public static void paintTie(global::alphatab.platform.ICanvas canvas, double scale, double x1, double y1, double x2, double y2, global::haxe.lang.Null <bool> down)
        {
            unchecked
            {
                bool __temp_down200 = ((global::haxe.lang.Runtime.eq((down).toDynamic(), (default(global::haxe.lang.Null <bool>)).toDynamic())) ? (((bool)(false))) : (down.@value));
                if ((x2 > x1))
                {
                    double t = x1;
                    x1 = x2;
                    x2 = t;
                    t  = y1;
                    y1 = y2;
                    y2 = t;
                }

                double offset         = (15 * scale);
                double size           = (4 * scale);
                double normalVector_x = (y2 - y1);
                double normalVector_y = (x2 - x1);
                double length         = global::System.Math.Sqrt(((double)(((normalVector_x * normalVector_x) + (normalVector_y * normalVector_y)))));
                if (__temp_down200)
                {
                    normalVector_x *= ((double)(-1));
                }
                else
                {
                    normalVector_y *= ((double)(-1));
                }

                normalVector_x /= length;
                normalVector_y /= length;
                double center_x = (((x2 + x1)) / 2);
                double center_y = (((y2 + y1)) / 2);
                double cp1_x    = (center_x + (offset * normalVector_x));
                double cp1_y    = (center_y + (offset * normalVector_y));
                double cp2_x    = (center_x + (((offset - size)) * normalVector_x));
                double cp2_y    = (center_y + (((offset - size)) * normalVector_y));
                canvas.beginPath();
                canvas.moveTo(x1, y1);
                canvas.quadraticCurveTo(cp1_x, cp1_y, x2, y2);
                canvas.quadraticCurveTo(cp2_x, cp2_y, x1, y1);
                canvas.closePath();
            }
        }
예제 #24
0
        public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
        {
            unchecked
            {
                this.paintBackground(cx, cy, canvas);
                int glyphStartX = this.getPreBeatGlyphStart();
                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = this._preBeatGlyphs;
                    while ((_g < _g1.length))
                    {
                        global::alphatab.rendering.Glyph g = ((global::alphatab.rendering.Glyph)(_g1[_g]));
                        ++_g;
                        g.paint(((cx + this.x) + glyphStartX), (cy + this.y), canvas);
                    }
                }

                glyphStartX = this.getBeatGlyphsStart();
                {
                    int _g2 = 0;
                    global::haxe.root.Array <object> _g11 = this._voiceContainers;
                    while ((_g2 < _g11.length))
                    {
                        global::alphatab.rendering.glyphs.VoiceContainerGlyph c = ((global::alphatab.rendering.glyphs.VoiceContainerGlyph)(_g11[_g2]));
                        ++_g2;
                        c.paint(((cx + this.x) + glyphStartX), (cy + this.y), canvas);
                    }
                }

                glyphStartX = this.getPostBeatGlyphsStart();
                {
                    int _g3 = 0;
                    global::haxe.root.Array <object> _g12 = this._postBeatGlyphs;
                    while ((_g3 < _g12.length))
                    {
                        global::alphatab.rendering.Glyph g1 = ((global::alphatab.rendering.Glyph)(_g12[_g3]));
                        ++_g3;
                        g1.paint(((cx + this.x) + glyphStartX), (cy + this.y), canvas);
                    }
                }
            }
        }
예제 #25
0
 public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
 {
     unchecked
     {
         this.preNotes.paint((cx + this.x), (cy + this.y), canvas);
         this.onNotes.paint((cx + this.x), (cy + this.y), canvas);
         this.postNotes.paint((cx + this.x), (cy + this.y), canvas);
         {
             int _g = 0;
             global::haxe.root.Array <object> _g1 = this.ties;
             while ((_g < _g1.length))
             {
                 global::alphatab.rendering.Glyph t = ((global::alphatab.rendering.Glyph)(_g1[_g]));
                 ++_g;
                 t.renderer = this.renderer;
                 t.paint(cx, (cy + this.y), canvas);
             }
         }
     }
 }
예제 #26
0
        public virtual void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas)
        {
            unchecked
            {
                if ((this.height == 0))
                {
                    return;
                }

                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = this.barRenderers;
                    while ((_g < _g1.length))
                    {
                        global::alphatab.rendering.BarRendererBase r = ((global::alphatab.rendering.BarRendererBase)(_g1[_g]));
                        ++_g;
                        r.paint((cx + this.x), (cy + this.y), canvas);
                    }
                }
            }
        }
예제 #27
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;
                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);
                    }
                }
            }
        }
예제 #28
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.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)));
         }
     }
 }
예제 #29
0
        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.ScoreBarRenderer          r      = ((global::alphatab.rendering.ScoreBarRenderer)(this.renderer));
                global::alphatab.rendering.glyphs.BeatContainerGlyph parent = ((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this._parent));
                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)));
                }

                double startY = ((cy + r.getNoteY(this._startNote)) + 4.5);
                double endY   = default(double);
                if ((this._endNote == default(global::alphatab.model.Note)))
                {
                    endY = startY;
                }
                else
                {
                    endY = ((cy + r.getNoteY(this._endNote)) + 4.5);
                }

                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>((r.getBeatDirection(this._startNote.beat) == global::alphatab.rendering.utils.BeamDirection.Down), true));
                canvas.setColor(this.renderer.stave.staveGroup.layout.renderer.renderingResources.mainGlyphColor);
                canvas.fill();
            }
        }
예제 #30
0
        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();
            }
        }
예제 #31
0
		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);
					}
					
				}
				
			}
		}