Ejemplo n.º 1
0
        public override void doLayout()
        {
            unchecked
            {
                int i = this._number;
                while ((i > 0))
                {
                    int num = (i % 10);
                    global::alphatab.rendering.glyphs.DigitGlyph gl = new global::alphatab.rendering.glyphs.DigitGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((int)(num)));
                    this._glyphs.push(gl);
                    i = (i / 10);
                }

                this._glyphs.reverse();
                int cx = 0;
                {
                    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.x        = cx;
                        g.y        = 0;
                        g.renderer = this.renderer;
                        g.doLayout();
                        cx += g.width;
                    }
                }

                this.width = cx;
            }
        }
Ejemplo n.º 2
0
        public override void finalizeRenderer(global::alphatab.rendering.layout.ScoreLayout layout)
        {
            unchecked
            {
                base.finalizeRenderer(layout);
                this.isEmpty = true;
                global::alphatab.rendering.Glyph prevGlyph = default(global::alphatab.rendering.Glyph);
                if ((this.index > 0))
                {
                    global::alphatab.rendering.EffectBarRenderer prevRenderer = ((global::alphatab.rendering.EffectBarRenderer)(((global::alphatab.rendering.BarRendererBase)(this.stave.barRenderers[(this.index - 1)]))));
                    if ((prevRenderer._lastBeat != default(global::alphatab.model.Beat)))
                    {
                        prevGlyph = ((global::alphatab.rendering.Glyph)(((global::haxe.ds.IntMap <object>)(global::haxe.ds.IntMap <object> .__hx_cast <object>(((global::haxe.ds.IntMap)(prevRenderer._effectGlyphs[0]))))).@get(prevRenderer._lastBeat.index).@value));
                    }
                }

                {
                    object __temp_iterator446 = ((global::haxe.ds.IntMap <object>)(global::haxe.ds.IntMap <object> .__hx_cast <object>(((global::haxe.ds.IntMap)(this._effectGlyphs[0]))))).keys();
                    while (((bool)(global::haxe.lang.Runtime.callField(__temp_iterator446, "hasNext", 407283053, default(global::haxe.root.Array)))))
                    {
                        int beatIndex = ((int)(global::haxe.lang.Runtime.toInt(global::haxe.lang.Runtime.callField(__temp_iterator446, "next", 1224901875, default(global::haxe.root.Array)))));
                        global::alphatab.rendering.Glyph effect = ((global::alphatab.rendering.Glyph)(((global::haxe.ds.IntMap <object>)(global::haxe.ds.IntMap <object> .__hx_cast <object>(((global::haxe.ds.IntMap)(this._effectGlyphs[0]))))).@get(beatIndex).@value));
                        this.alignGlyph(this._info.getSizingMode(), beatIndex, 0, prevGlyph);
                        prevGlyph    = effect;
                        this.isEmpty = false;
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public virtual void addPostBeatGlyph(global::alphatab.rendering.Glyph g)
 {
     unchecked
     {
         this.addGlyph(this._postBeatGlyphs, g);
     }
 }
Ejemplo n.º 4
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);
                         }
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 5
0
 public virtual void addGlyph(global::alphatab.rendering.Glyph g)
 {
     unchecked
     {
         this._glyphs.push(g);
     }
 }
Ejemplo n.º 6
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 1542788809:
                {
                    this._parent = ((global::alphatab.rendering.Glyph)(@value));
                    return(@value);
                }


                case 1692871406:
                {
                    this._endNote = ((global::alphatab.model.Note)(@value));
                    return(@value);
                }


                case 1570770229:
                {
                    this._startNote = ((global::alphatab.model.Note)(@value));
                    return(@value);
                }


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Ejemplo n.º 7
0
        public virtual void createNoteGlyph(global::alphatab.model.Note n)
        {
            unchecked
            {
                global::alphatab.rendering.ScoreBarRenderer sr = default(global::alphatab.rendering.ScoreBarRenderer);
                sr = ((global::alphatab.rendering.ScoreBarRenderer)(this.renderer));
                global::alphatab.rendering.Glyph noteHeadGlyph = this.createNoteHeadGlyph(n);
                int line = sr.getNoteLine(n);
                noteHeadGlyph.y = sr.getScoreY(line, new global::haxe.lang.Null <int>(-1, true));
                this.noteHeads.addNoteGlyph(noteHeadGlyph, n, line);
                if ((n.isStaccato && !(this.noteHeads.beatEffects.exists("Staccato"))))
                {
                    this.noteHeads.beatEffects.@set("Staccato", new global::alphatab.rendering.glyphs.CircleGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((double)(1.5))));
                }

                if (((n.accentuated == global::alphatab.model.AccentuationType.Normal) && !(this.noteHeads.beatEffects.exists("Accent"))))
                {
                    this.noteHeads.beatEffects.@set("Accent", new global::alphatab.rendering.glyphs.AccentuationGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.AccentuationType)(global::alphatab.model.AccentuationType.Normal))));
                }

                if (((n.accentuated == global::alphatab.model.AccentuationType.Heavy) && !(this.noteHeads.beatEffects.exists("HAccent"))))
                {
                    this.noteHeads.beatEffects.@set("HAccent", new global::alphatab.rendering.glyphs.AccentuationGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.AccentuationType)(global::alphatab.model.AccentuationType.Heavy))));
                }
            }
        }
Ejemplo n.º 8
0
 public static void __hx_ctor_alphatab_rendering_Glyph(global::alphatab.rendering.Glyph __temp_me96, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y)
 {
     unchecked
     {
         int __temp_y95 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x94 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         __temp_me96.x = __temp_x94;
         __temp_me96.y = __temp_y95;
     }
 }
Ejemplo n.º 9
0
        public override void doLayout()
        {
            unchecked
            {
                this._glyphs.sort((((global::alphatab.rendering.glyphs.AccidentalGroupGlyph_doLayout_35__Fun.__hx_current != default(global::alphatab.rendering.glyphs.AccidentalGroupGlyph_doLayout_35__Fun))) ? (global::alphatab.rendering.glyphs.AccidentalGroupGlyph_doLayout_35__Fun.__hx_current) : (global::alphatab.rendering.glyphs.AccidentalGroupGlyph_doLayout_35__Fun.__hx_current = ((global::alphatab.rendering.glyphs.AccidentalGroupGlyph_doLayout_35__Fun)(new global::alphatab.rendering.glyphs.AccidentalGroupGlyph_doLayout_35__Fun())))));
                global::haxe.root.Array <int> columns = new global::haxe.root.Array <int>();
                columns.push(-3000);
                int accidentalSize = ((int)((21 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)));
                {
                    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.doLayout();
                        int gColumn = 0;
                        while ((columns[gColumn] > g.y))
                        {
                            gColumn++;
                            if ((gColumn == columns.length))
                            {
                                columns.push(-3000);
                            }
                        }

                        g.x = gColumn;
                        columns[gColumn] = (g.y + accidentalSize);
                    }
                }

                int columnWidth = ((int)((8 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)));
                if ((this._glyphs.length == 0))
                {
                    this.width = 0;
                }
                else
                {
                    this.width = (columnWidth * columns.length);
                }

                {
                    int _g2 = 0;
                    global::haxe.root.Array <object> _g11 = this._glyphs;
                    while ((_g2 < _g11.length))
                    {
                        global::alphatab.rendering.Glyph g1 = ((global::alphatab.rendering.Glyph)(_g11[_g2]));
                        ++_g2;
                        g1.x = (this.width - (((g1.x + 1)) * columnWidth));
                    }
                }
            }
        }
Ejemplo n.º 10
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);
         }
     }
 }
 public override void applyGlyphSpacing(int spacing)
 {
     unchecked
     {
         base.applyGlyphSpacing(spacing);
         {
             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.x += spacing;
             }
         }
     }
 }
Ejemplo n.º 12
0
        public override void doLayout()
        {
            unchecked
            {
                int w = 0;
                {
                    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.doLayout();
                        if ((g.width > w))
                        {
                            w = g.width;
                        }
                    }
                }

                global::alphatab.rendering.TabBarRenderer tabRenderer = ((global::alphatab.rendering.TabBarRenderer)(this.renderer));
                double tabHeight = this.renderer.stave.staveGroup.layout.renderer.renderingResources.tablatureFont.getSize();
                int    effectY   = default(int);
                {
                    double x = (this.getNoteY(this._minNote) + (tabHeight / 2));
                    effectY = ((int)(x));
                }

                int effectSpacing = ((int)((7 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)));
                {
                    object __temp_iterator449 = this.beatEffects.iterator();
                    while (((bool)(global::haxe.lang.Runtime.callField(__temp_iterator449, "hasNext", 407283053, default(global::haxe.root.Array)))))
                    {
                        global::alphatab.rendering.Glyph g1 = ((global::alphatab.rendering.Glyph)(global::haxe.lang.Runtime.callField(__temp_iterator449, "next", 1224901875, default(global::haxe.root.Array))));
                        g1.y        = effectY;
                        g1.x        = (this.width / 2);
                        g1.renderer = this.renderer;
                        effectY    += effectSpacing;
                        g1.doLayout();
                    }
                }

                this.width = w;
            }
        }
Ejemplo n.º 13
0
		public virtual   void addNoteGlyph(global::alphatab.rendering.Glyph noteGlyph, global::alphatab.model.Note note, int noteLine)
		{
			unchecked 
			{
				object info = new global::haxe.lang.DynamicObject(new global::haxe.root.Array<int>(new int[]{369425836}), new global::haxe.root.Array<object>(new object[]{noteGlyph}), new global::haxe.root.Array<int>(new int[]{1202919412}), new global::haxe.root.Array<double>(new double[]{((double) (noteLine) )}));
				this._infos.push(info);
				this._noteLookup.@set(note.@string, noteGlyph);
				if (( global::haxe.lang.Runtime.refEq(this.minNote, default(object)) || ( global::haxe.lang.Runtime.compare(((int) (global::haxe.lang.Runtime.getField_f(this.minNote, "line", 1202919412, true)) ), ((int) (global::haxe.lang.Runtime.getField_f(info, "line", 1202919412, true)) )) > 0 ) )) 
				{
					this.minNote = info;
				}
				
				if (( global::haxe.lang.Runtime.refEq(this.maxNote, default(object)) || ( global::haxe.lang.Runtime.compare(((int) (global::haxe.lang.Runtime.getField_f(this.maxNote, "line", 1202919412, true)) ), ((int) (global::haxe.lang.Runtime.getField_f(info, "line", 1202919412, true)) )) < 0 ) )) 
				{
					this.maxNote = info;
				}
				
			}
		}
Ejemplo n.º 14
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);
                    }
                }
            }
        }
Ejemplo n.º 15
0
        public override void addGlyph(global::alphatab.rendering.Glyph g)
        {
            unchecked
            {
                if ((this.beatGlyphs.length == 0))
                {
                    g.x = 0;
                }
                else
                {
                    g.x = (((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this.beatGlyphs[(this.beatGlyphs.length - 1)])).x + ((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this.beatGlyphs[(this.beatGlyphs.length - 1)])).width);
                }

                g.index    = this.beatGlyphs.length;
                g.renderer = this.renderer;
                g.doLayout();
                this.beatGlyphs.push(((global::alphatab.rendering.glyphs.BeatContainerGlyph)(g)));
                this.width = (g.x + g.width);
            }
        }
Ejemplo n.º 16
0
        public virtual void addGlyph(global::haxe.root.Array <object> c, global::alphatab.rendering.Glyph g)
        {
            unchecked
            {
                this.isEmpty = false;
                if ((c.length == 0))
                {
                    g.x = 0;
                }
                else
                {
                    g.x = (((global::alphatab.rendering.Glyph)(c[(c.length - 1)])).x + ((global::alphatab.rendering.Glyph)(c[(c.length - 1)])).width);
                }

                g.index    = c.length;
                g.renderer = this;
                g.doLayout();
                c.push(g);
            }
        }
Ejemplo n.º 17
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);
             }
         }
     }
 }
Ejemplo n.º 18
0
		public virtual   int getNoteX(global::alphatab.model.Note note, global::haxe.lang.Null<bool> onEnd)
		{
			unchecked 
			{
				bool __temp_onEnd195 = ( (global::haxe.lang.Runtime.eq((onEnd).toDynamic(), (default(global::haxe.lang.Null<bool>)).toDynamic())) ? (((bool) (true) )) : (onEnd.@value) );
				if (this._noteLookup.exists(note.@string)) 
				{
					global::alphatab.rendering.Glyph n = ((global::alphatab.rendering.Glyph) (this._noteLookup.@get(note.@string).@value) );
					int pos = ( this.x + n.x );
					if (__temp_onEnd195) 
					{
						pos += n.width;
					}
					
					return pos;
				}
				
				return 0;
			}
		}
Ejemplo n.º 19
0
        public override double __hx_invoke2_f(double __fn_float1, double __fn_float2, object __fn_dyn1, object __fn_dyn2)
        {
            unchecked
            {
                global::alphatab.rendering.Glyph b = ((global::haxe.lang.Runtime.eq(__fn_dyn2, global::haxe.lang.Runtime.undefined)) ? (((global::alphatab.rendering.Glyph)(((object)(__fn_float2))))) : (((global::alphatab.rendering.Glyph)(__fn_dyn2))));
                global::alphatab.rendering.Glyph a = ((global::haxe.lang.Runtime.eq(__fn_dyn1, global::haxe.lang.Runtime.undefined)) ? (((global::alphatab.rendering.Glyph)(((object)(__fn_float1))))) : (((global::alphatab.rendering.Glyph)(__fn_dyn1))));
                if ((a.y == b.y))
                {
                    return((double)(0));
                }

                if ((a.y < b.y))
                {
                    return((double)(-1));
                }
                else
                {
                    return((double)(1));
                }
            }
        }
Ejemplo n.º 20
0
 public override void doLayout()
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.NumberGlyph numerator   = new global::alphatab.rendering.glyphs.NumberGlyph(((int)(0)), ((int)(0)), ((int)(this._numerator)));
         global::alphatab.rendering.glyphs.NumberGlyph denominator = new global::alphatab.rendering.glyphs.NumberGlyph(((int)(0)), ((int)((18 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))), ((int)(this._denominator)));
         this._glyphs.push(numerator);
         this._glyphs.push(denominator);
         base.doLayout();
         {
             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.x = (((this.width - g.width)) / 2);
             }
         }
     }
 }
Ejemplo n.º 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;
                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);
                    }
                }
            }
        }
Ejemplo n.º 22
0
        public override void doLayout()
        {
            unchecked
            {
                global::haxe.root.Array <object> _g = new global::haxe.root.Array <object>(new object[] { this });
                if (!(this.container.beat.isRest()))
                {
                    this.noteNumbers      = new global::alphatab.rendering.glyphs.TabNoteChordGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((bool)((this.container.beat.graceType != global::alphatab.model.GraceType.None))));
                    this.noteNumbers.beat = this.container.beat;
                    this.noteLoop(new global::alphatab.rendering.glyphs.TabBeatGlyph_doLayout_47__Fun(((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g)))))));
                    this.addGlyph(this.noteNumbers);
                    if (((this.container.beat.whammyBarPoints.length > 0) && !(this.noteNumbers.beatEffects.exists("Whammy"))))
                    {
                        this.noteNumbers.beatEffects.@set("Whammy", new global::alphatab.rendering.glyphs.WhammyBarGlyph(((global::alphatab.model.Beat)(this.container.beat)), ((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this.container))));
                    }

                    if (((!(global::haxe.lang.Runtime.eq((this.container.beat.tremoloSpeed).toDynamic(), (default(global::haxe.lang.Null <global::alphatab.model.Duration>)).toDynamic()))) && !(this.noteNumbers.beatEffects.exists("Tremolo"))))
                    {
                        this.noteNumbers.beatEffects.@set("Tremolo", new global::alphatab.rendering.glyphs.TremoloPickingGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), this.container.beat.tremoloSpeed.@value));
                    }
                }

                int w = 0;
                {
                    int _g1 = 0;
                    global::haxe.root.Array <object> _g11 = this._glyphs;
                    while ((_g1 < _g11.length))
                    {
                        global::alphatab.rendering.Glyph g = ((global::alphatab.rendering.Glyph)(_g11[_g1]));
                        ++_g1;
                        g.x        = w;
                        g.renderer = this.renderer;
                        g.doLayout();
                        w += g.width;
                    }
                }

                this.width = w;
            }
        }
Ejemplo n.º 23
0
        public override void doLayout()
        {
            unchecked
            {
                int w = 0;
                {
                    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.x        = w;
                        g.renderer = this.renderer;
                        g.doLayout();
                        w += g.width;
                    }
                }

                this.width = w;
            }
        }
Ejemplo n.º 24
0
        public override void doLayout()
        {
            unchecked
            {
                int w = 0;
                {
                    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.doLayout();
                        {
                            double x = global::System.Math.Max(((double)(w)), ((double)(g.width)));
                            w = ((int)(x));
                        }
                    }
                }

                this.width = w;
            }
        }
Ejemplo n.º 25
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1692978337:
					{
						this.beamingHelper = ((global::alphatab.rendering.utils.BeamingHelper) (@value) );
						return @value;
					}
					
					
					case 1091821942:
					{
						this.beat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					case 108520940:
					{
						this.beatEffects = ((global::haxe.ds.StringMap<object>) (global::haxe.ds.StringMap<object>.__hx_cast<object>(((global::haxe.ds.StringMap) (@value) ))) );
						return @value;
					}
					
					
					case 186102306:
					{
						this.downLineX = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1366752649:
					{
						this.upLineX = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1464822705:
					{
						this.spacingChanged = ((global::haxe.lang.Function) (@value) );
						return @value;
					}
					
					
					case 1228566710:
					{
						this.maxNote = ((object) (@value) );
						return @value;
					}
					
					
					case 974358180:
					{
						this.minNote = ((object) (@value) );
						return @value;
					}
					
					
					case 1270934932:
					{
						this._tremoloPicking = ((global::alphatab.rendering.Glyph) (@value) );
						return @value;
					}
					
					
					case 1381203243:
					{
						this._noteLookup = ((global::haxe.ds.IntMap<object>) (global::haxe.ds.IntMap<object>.__hx_cast<object>(((global::haxe.ds.IntMap) (@value) ))) );
						return @value;
					}
					
					
					case 972910470:
					{
						this._infos = ((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);
					}
					
				}
				
			}
		}
Ejemplo n.º 26
0
		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);
					}
					
				}
				
			}
		}
Ejemplo n.º 27
0
		public override   void doLayout()
		{
			unchecked 
			{
				this._infos.sort(( (( global::alphatab.rendering.glyphs.ScoreNoteChordGlyph_doLayout_130__Fun.__hx_current != default(global::alphatab.rendering.glyphs.ScoreNoteChordGlyph_doLayout_130__Fun) )) ? (global::alphatab.rendering.glyphs.ScoreNoteChordGlyph_doLayout_130__Fun.__hx_current) : (global::alphatab.rendering.glyphs.ScoreNoteChordGlyph_doLayout_130__Fun.__hx_current = ((global::alphatab.rendering.glyphs.ScoreNoteChordGlyph_doLayout_130__Fun) (new global::alphatab.rendering.glyphs.ScoreNoteChordGlyph_doLayout_130__Fun()) )) ));
				int padding = 0;
				int displacedX = 0;
				bool lastDisplaced = false;
				int lastLine = 0;
				bool anyDisplaced = false;
				int w = 0;
				{
					int _g1 = 0;
					int _g = this._infos.length;
					while (( _g1 < _g ))
					{
						int i = _g1++;
						global::alphatab.rendering.Glyph g = ((global::alphatab.rendering.Glyph) (global::haxe.lang.Runtime.getField(this._infos[i], "glyph", 369425836, true)) );
						g.renderer = this.renderer;
						g.doLayout();
						g.x = padding;
						if (( i == 0 )) 
						{
							displacedX = ( g.width + padding );
						}
						 else 
						{
							if (( global::System.Math.Abs(((double) (( ((int) (lastLine) ) - ((int) (global::haxe.lang.Runtime.getField_f(this._infos[i], "line", 1202919412, true)) ) )) )) <= 1 )) 
							{
								if ( ! (lastDisplaced) ) 
								{
									g.x = ((int) (( displacedX - this.renderer.stave.staveGroup.layout.renderer.settings.scale )) );
									anyDisplaced = true;
									lastDisplaced = true;
								}
								 else 
								{
									lastDisplaced = false;
								}
								
							}
							 else 
							{
								lastDisplaced = false;
							}
							
						}
						
						lastLine = ((int) (global::haxe.lang.Runtime.getField_f(this._infos[i], "line", 1202919412, true)) );
						{
							double x = global::System.Math.Max(((double) (w) ), ((double) (( g.x + g.width )) ));
							w = ((int) (x) );
						}
						
					}
					
				}
				
				if (anyDisplaced) 
				{
					this.upLineX = displacedX;
					this.downLineX = displacedX;
				}
				 else 
				{
					this.upLineX = w;
					this.downLineX = padding;
				}
				
				{
					object __temp_iterator447 = this.beatEffects.iterator();
					while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator447, "hasNext", 407283053, default(global::haxe.root.Array))) ))
					{
						global::alphatab.rendering.Glyph e = ((global::alphatab.rendering.Glyph) (global::haxe.lang.Runtime.callField(__temp_iterator447, "next", 1224901875, default(global::haxe.root.Array))) );
						e.renderer = this.renderer;
						e.doLayout();
					}
					
				}
				
				if (( ! (global::haxe.lang.Runtime.eq((this.beat.tremoloSpeed).toDynamic(), (default(global::haxe.lang.Null<global::alphatab.model.Duration>)).toDynamic())) )) 
				{
					int offset = default(int);
					object baseNote = default(object);
					if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
					{
						baseNote = this.minNote;
					}
					 else 
					{
						baseNote = this.maxNote;
					}
					
					int tremoloX = default(int);
					if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
					{
						tremoloX = displacedX;
					}
					 else 
					{
						tremoloX = 0;
					}
					
					{
						global::haxe.lang.Null<global::alphatab.model.Duration> _g2 = this.beat.tremoloSpeed;
						switch (global::haxe.root.Type.enumIndex((_g2).toDynamic()))
						{
							case 5:
							{
								if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
								{
									offset = -15;
								}
								 else 
								{
									offset = 10;
								}
								
								break;
							}
							
							
							case 4:
							{
								if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
								{
									offset = -12;
								}
								 else 
								{
									offset = 10;
								}
								
								break;
							}
							
							
							case 3:
							{
								if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
								{
									offset = -10;
								}
								 else 
								{
									offset = 10;
								}
								
								break;
							}
							
							
							default:
							{
								if (( this.beamingHelper.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up )) 
								{
									offset = -15;
								}
								 else 
								{
									offset = 15;
								}
								
								break;
							}
							
						}
						
					}
					
					this._tremoloPicking = new global::alphatab.rendering.glyphs.TremoloPickingGlyph(new global::haxe.lang.Null<int>(tremoloX, true), new global::haxe.lang.Null<int>(( ((global::alphatab.rendering.Glyph) (global::haxe.lang.Runtime.getField(baseNote, "glyph", 369425836, true)) ).y + ((int) (( offset * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) ) ), true), this.beat.tremoloSpeed.@value);
					this._tremoloPicking.renderer = this.renderer;
					this._tremoloPicking.doLayout();
				}
				
				this.width = ( w + padding );
			}
		}
Ejemplo n.º 28
0
 public static void __hx_ctor_alphatab_rendering_glyphs_ScoreTieGlyph(global::alphatab.rendering.glyphs.ScoreTieGlyph __temp_me202, global::alphatab.model.Note startNote, global::alphatab.model.Note endNote, global::alphatab.rendering.Glyph parent)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.TieGlyph.__hx_ctor_alphatab_rendering_glyphs_TieGlyph(__temp_me202, startNote, endNote, parent);
     }
 }
Ejemplo n.º 29
0
 public ScoreTieGlyph(global::alphatab.model.Note startNote, global::alphatab.model.Note endNote, global::alphatab.rendering.Glyph parent) : base(global::haxe.lang.EmptyObject.EMPTY)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.ScoreTieGlyph.__hx_ctor_alphatab_rendering_glyphs_ScoreTieGlyph(this, startNote, endNote, parent);
     }
 }
Ejemplo n.º 30
0
 public static void __hx_ctor_alphatab_rendering_glyphs_TieGlyph(global::alphatab.rendering.glyphs.TieGlyph __temp_me201, global::alphatab.model.Note startNote, global::alphatab.model.Note endNote, global::alphatab.rendering.Glyph parent)
 {
     unchecked
     {
         global::alphatab.rendering.Glyph.__hx_ctor_alphatab_rendering_Glyph(__temp_me201, new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true));
         __temp_me201._startNote = startNote;
         __temp_me201._endNote   = endNote;
         __temp_me201._parent    = parent;
     }
 }
Ejemplo n.º 31
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1542788809:
					{
						this._parent = ((global::alphatab.rendering.Glyph) (@value) );
						return @value;
					}
					
					
					case 1692871406:
					{
						this._endNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 1570770229:
					{
						this._startNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}