Ejemplo n.º 1
0
 public static void __hx_ctor_alphatab_rendering_utils_BeamingHelper(global::alphatab.rendering.utils.BeamingHelper __temp_me268, global::alphatab.model.Track track)
 {
     unchecked
     {
         __temp_me268.beats  = new global::haxe.root.Array <object>();
         __temp_me268._track = track;
         __temp_me268._beatLineXPositions = new global::haxe.ds.IntMap <object>();
         __temp_me268.maxDuration         = global::alphatab.model.Duration.Whole;
     }
 }
Ejemplo n.º 2
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 958687736:
                {
                    this.restGlyph = ((global::alphatab.rendering.glyphs.RestGlyph)(@value));
                    return(@value);
                }


                case 1648762369:
                {
                    this.noteHeads = ((global::alphatab.rendering.glyphs.ScoreNoteChordGlyph)(@value));
                    return(@value);
                }


                case 909570:
                {
                    this._ties = ((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.º 3
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.º 4
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.isEmpty))
                {
                    if (!(this.container.beat.isRest()))
                    {
                        this.noteHeads               = new global::alphatab.rendering.glyphs.ScoreNoteChordGlyph(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))));
                        this.noteHeads.beat          = this.container.beat;
                        this.noteHeads.beamingHelper = this.beamingHelper;
                        this.noteLoop(new global::alphatab.rendering.glyphs.ScoreBeatGlyph_doLayout_80__Fun(((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g)))))));
                        this.addGlyph(this.noteHeads);
                        {
                            int _g1 = 0;
                            int _g2 = this.container.beat.dots;
                            while ((_g1 < _g2))
                            {
                                int i = _g1++;
                                global::haxe.root.Array <object> @group = new global::haxe.root.Array <object>(new object[] { new global::alphatab.rendering.glyphs.GlyphGroup(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(default(global::haxe.root.Array <object>))))))) });
                                this.noteLoop(new global::alphatab.rendering.glyphs.ScoreBeatGlyph_doLayout_91__Fun(((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g))))), ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@group)))))));
                                this.addGlyph(((global::alphatab.rendering.glyphs.GlyphGroup)(@group[0])));
                            }
                        }
                    }
                    else
                    {
                        int line   = 0;
                        int offset = 0;
                        {
                            global::alphatab.model.Duration _g3 = this.container.beat.duration;
                            switch (global::haxe.root.Type.enumIndex(_g3))
                            {
                            case 0:
                            {
                                line = 4;
                                break;
                            }


                            case 1:
                            {
                                line = 5;
                                break;
                            }


                            case 2:
                            {
                                line   = 7;
                                offset = -2;
                                break;
                            }


                            case 3:
                            {
                                line = 8;
                                break;
                            }


                            case 4:
                            {
                                line = 8;
                                break;
                            }


                            case 5:
                            {
                                line = 8;
                                break;
                            }


                            case 6:
                            {
                                line = 8;
                                break;
                            }
                            }
                        }

                        global::alphatab.rendering.ScoreBarRenderer sr = default(global::alphatab.rendering.ScoreBarRenderer);
                        sr = ((global::alphatab.rendering.ScoreBarRenderer)(this.renderer));
                        int y = sr.getScoreY(line, new global::haxe.lang.Null <int>(offset, true));
                        this.addGlyph(new global::alphatab.rendering.glyphs.RestGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(y, true), ((global::alphatab.model.Duration)(this.container.beat.duration))));
                    }
                }

                base.doLayout();
                if ((this.noteHeads != default(global::alphatab.rendering.glyphs.ScoreNoteChordGlyph)))
                {
                    this.noteHeads.updateBeamingHelper(this.x);
                }
            }
        }
Ejemplo n.º 5
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.isEmpty) ) 
				{
					if ( ! (this.container.beat.isRest()) ) 
					{
						this.noteHeads = new global::alphatab.rendering.glyphs.ScoreNoteChordGlyph(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
						this.noteHeads.beat = this.container.beat;
						this.noteHeads.beamingHelper = this.beamingHelper;
						this.noteLoop(new global::alphatab.rendering.glyphs.ScoreBeatGlyph_doLayout_80__Fun(((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (_g) ))) )));
						this.addGlyph(this.noteHeads);
						{
							int _g1 = 0;
							int _g2 = this.container.beat.dots;
							while (( _g1 < _g2 ))
							{
								int i = _g1++;
								global::haxe.root.Array<object> @group = new global::haxe.root.Array<object>(new object[]{new global::alphatab.rendering.glyphs.GlyphGroup(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (default(global::haxe.root.Array<object>)) ))) ))});
								this.noteLoop(new global::alphatab.rendering.glyphs.ScoreBeatGlyph_doLayout_91__Fun(((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (_g) ))) ), ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@group) ))) )));
								this.addGlyph(((global::alphatab.rendering.glyphs.GlyphGroup) (@group[0]) ));
							}
							
						}
						
					}
					 else 
					{
						int line = 0;
						int offset = 0;
						{
							global::alphatab.model.Duration _g3 = this.container.beat.duration;
							switch (global::haxe.root.Type.enumIndex(_g3))
							{
								case 0:
								{
									line = 4;
									break;
								}
								
								
								case 1:
								{
									line = 5;
									break;
								}
								
								
								case 2:
								{
									line = 7;
									offset = -2;
									break;
								}
								
								
								case 3:
								{
									line = 8;
									break;
								}
								
								
								case 4:
								{
									line = 8;
									break;
								}
								
								
								case 5:
								{
									line = 8;
									break;
								}
								
								
								case 6:
								{
									line = 8;
									break;
								}
								
								
							}
							
						}
						
						global::alphatab.rendering.ScoreBarRenderer sr = default(global::alphatab.rendering.ScoreBarRenderer);
						sr = ((global::alphatab.rendering.ScoreBarRenderer) (this.renderer) );
						int y = sr.getScoreY(line, new global::haxe.lang.Null<int>(offset, true));
						this.addGlyph(new global::alphatab.rendering.glyphs.RestGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(y, true), ((global::alphatab.model.Duration) (this.container.beat.duration) )));
					}
					
				}
				
				base.doLayout();
				if (( this.noteHeads != default(global::alphatab.rendering.glyphs.ScoreNoteChordGlyph) )) 
				{
					this.noteHeads.updateBeamingHelper(this.x);
				}
				
			}
		}
Ejemplo n.º 6
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 958687736:
					{
						this.restGlyph = ((global::alphatab.rendering.glyphs.RestGlyph) (@value) );
						return @value;
					}
					
					
					case 1648762369:
					{
						this.noteHeads = ((global::alphatab.rendering.glyphs.ScoreNoteChordGlyph) (@value) );
						return @value;
					}
					
					
					case 909570:
					{
						this._ties = ((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.º 7
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1708501536:
					{
						this._startSpacing = ((bool) (@value) );
						return @value;
					}
					
					
					case 544876244:
					{
						this._currentTupletHelper = ((global::alphatab.rendering.utils.TupletHelper) (@value) );
						return @value;
					}
					
					
					case 430913175:
					{
						this._currentBeamHelper = ((global::alphatab.rendering.utils.BeamingHelper) (@value) );
						return @value;
					}
					
					
					case 411825530:
					{
						this._tupletHelpers = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 20078838:
					{
						this._beamHelperLookup = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 1848890263:
					{
						this._beamHelpers = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 662803912:
					{
						this.accidentalHelper = ((global::alphatab.rendering.utils.AccidentalHelper) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Ejemplo n.º 8
0
		public virtual   void createVoiceGlyphs(global::alphatab.model.Voice v)
		{
			unchecked 
			{
				this._currentBeamHelper = default(global::alphatab.rendering.utils.BeamingHelper);
				this._beamHelpers.push(new global::haxe.root.Array<object>());
				this._beamHelperLookup.push(new global::haxe.ds.IntMap<object>());
				this._tupletHelpers.push(new global::haxe.root.Array<object>());
				{
					int _g = 0;
					global::haxe.root.Array<object> _g1 = v.beats;
					while (( _g < _g1.length ))
					{
						global::alphatab.model.Beat b = ((global::alphatab.model.Beat) (_g1[_g]) );
						 ++ _g;
						bool newBeamingHelper = false;
						if ( ! (b.isRest()) ) 
						{
							if (( ( this._currentBeamHelper == default(global::alphatab.rendering.utils.BeamingHelper) ) ||  ! (this._currentBeamHelper.checkBeat(b))  )) 
							{
								this._currentBeamHelper = new global::alphatab.rendering.utils.BeamingHelper(((global::alphatab.model.Track) (this._bar.track) ));
								this._currentBeamHelper.checkBeat(b);
								((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (this._beamHelpers[v.index]) ))) ).push(this._currentBeamHelper);
								newBeamingHelper = true;
							}
							
						}
						
						if ((  ! ((( ( b.tupletDenominator == -1 ) && ( b.tupletNumerator == -1 ) )))  &&  ! ((( ( b.tupletDenominator == 1 ) && ( b.tupletNumerator == 1 ) )))  )) 
						{
							global::alphatab.model.Beat previousBeat = b.previousBeat;
							if (( ( previousBeat != default(global::alphatab.model.Beat) ) && ( previousBeat.voice != b.voice ) )) 
							{
								previousBeat = default(global::alphatab.model.Beat);
							}
							
							if (( newBeamingHelper && ( this._currentTupletHelper != default(global::alphatab.rendering.utils.TupletHelper) ) )) 
							{
								this._currentTupletHelper.finish();
							}
							
							if (( ( ( previousBeat == default(global::alphatab.model.Beat) ) || ( this._currentTupletHelper == default(global::alphatab.rendering.utils.TupletHelper) ) ) ||  ! (this._currentTupletHelper.check(b))  )) 
							{
								this._currentTupletHelper = new global::alphatab.rendering.utils.TupletHelper(((int) (v.index) ));
								this._currentTupletHelper.check(b);
								((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (this._tupletHelpers[v.index]) ))) ).push(this._currentTupletHelper);
							}
							
						}
						
						global::alphatab.rendering.glyphs.ScoreBeatContainerGlyph container = new global::alphatab.rendering.glyphs.ScoreBeatContainerGlyph(((global::alphatab.model.Beat) (b) ));
						container.preNotes = new global::alphatab.rendering.glyphs.ScoreBeatPreNotesGlyph();
						container.onNotes = new global::alphatab.rendering.glyphs.ScoreBeatGlyph();
						(((global::alphatab.rendering.glyphs.ScoreBeatGlyph) (container.onNotes) )).beamingHelper = this._currentBeamHelper;
						container.postNotes = new global::alphatab.rendering.glyphs.ScoreBeatPostNotesGlyph();
						((global::haxe.ds.IntMap<object>) (global::haxe.ds.IntMap<object>.__hx_cast<object>(((global::haxe.ds.IntMap) (this._beamHelperLookup[v.index]) ))) ).@set(b.index, this._currentBeamHelper);
						this.addBeatGlyph(container);
					}
					
				}
				
				this._currentBeamHelper = default(global::alphatab.rendering.utils.BeamingHelper);
			}
		}