Esempio n. 1
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);
                         }
                     }
                 }
             }
         }
     }
 }
Esempio n. 2
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._glyphs;
         while ((_g < _g1.length))
         {
             global::alphatab.rendering.Glyph g = ((global::alphatab.rendering.Glyph)(_g1[_g]));
             ++_g;
             g.renderer = this.renderer;
             g.paint((cx + this.x), (cy + this.y), canvas);
         }
     }
 }
Esempio n. 3
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);
                    }
                }
            }
        }
Esempio n. 4
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);
             }
         }
     }
 }
        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.ScoreBarRenderer scoreRenderer = ((global::alphatab.rendering.ScoreBarRenderer) (this.renderer) );
				int effectY = default(int);
				if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
				{
					effectY = scoreRenderer.getScoreY(((int) (global::haxe.lang.Runtime.getField_f(this.maxNote, "line", 1202919412, true)) ), new global::haxe.lang.Null<int>(13, true));
				}
				 else 
				{
					effectY = scoreRenderer.getScoreY(((int) (global::haxe.lang.Runtime.getField_f(this.minNote, "line", 1202919412, true)) ), new global::haxe.lang.Null<int>(-9, true));
				}
				
				int effectSpacing = default(int);
				if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
				{
					effectSpacing = ((int) (( 7 * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) );
				}
				 else 
				{
					effectSpacing = ((int) (( -7 * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) );
				}
				
				{
					object __temp_iterator448 = this.beatEffects.iterator();
					while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator448, "hasNext", 407283053, default(global::haxe.root.Array))) ))
					{
						global::alphatab.rendering.Glyph g = ((global::alphatab.rendering.Glyph) (global::haxe.lang.Runtime.callField(__temp_iterator448, "next", 1224901875, default(global::haxe.root.Array))) );
						g.y = effectY;
						g.x = ( this.width / 2 );
						g.paint(( cx + this.x ), ( cy + this.y ), canvas);
						effectY += effectSpacing;
					}
					
				}
				
				canvas.setColor(this.renderer.stave.staveGroup.layout.renderer.renderingResources.staveLineColor);
				int linePadding = ((int) (( 3 * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) );
				if (this.hasTopOverflow()) 
				{
					int l = -1;
					while (( global::haxe.lang.Runtime.compare(l, ((int) (global::haxe.lang.Runtime.getField_f(this.minNote, "line", 1202919412, true)) )) >= 0 ))
					{
						int lY = ( ( cy + this.y ) + scoreRenderer.getScoreY(( l + 1 ), new global::haxe.lang.Null<int>(-1, true)) );
						canvas.beginPath();
						canvas.moveTo(((double) (( ( cx + this.x ) - linePadding )) ), ((double) (lY) ));
						canvas.lineTo(((double) (( ( ( cx + this.x ) + this.width ) + linePadding )) ), ((double) (lY) ));
						canvas.stroke();
						l -= 2;
					}
					
				}
				
				if (this.hasBottomOverflow()) 
				{
					int l1 = 11;
					while (( global::haxe.lang.Runtime.compare(l1, ((int) (global::haxe.lang.Runtime.getField_f(this.maxNote, "line", 1202919412, true)) )) <= 0 ))
					{
						int lY1 = ( ( cy + this.y ) + scoreRenderer.getScoreY(( l1 + 1 ), new global::haxe.lang.Null<int>(-1, true)) );
						canvas.beginPath();
						canvas.moveTo(((double) (( ( cx + this.x ) - linePadding )) ), ((double) (lY1) ));
						canvas.lineTo(((double) (( ( ( cx + this.x ) + this.width ) + linePadding )) ), ((double) (lY1) ));
						canvas.stroke();
						l1 += 2;
					}
					
				}
				
				if (( this._tremoloPicking != default(global::alphatab.rendering.Glyph) )) 
				{
					this._tremoloPicking.paint(( cx + this.x ), ( cy + this.y ), canvas);
				}
				
				{
					int _g = 0;
					global::haxe.root.Array<object> _g1 = this._infos;
					while (( _g < _g1.length ))
					{
						object g1 = _g1[_g];
						 ++ _g;
						((global::alphatab.rendering.Glyph) (global::haxe.lang.Runtime.getField(g1, "glyph", 369425836, true)) ).renderer = this.renderer;
						((global::alphatab.rendering.Glyph) (global::haxe.lang.Runtime.getField(g1, "glyph", 369425836, true)) ).paint(( cx + this.x ), ( cy + this.y ), canvas);
					}
					
				}
				
			}
		}
Esempio n. 7
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);
                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;
                    }
                }
            }
        }