AlphaTab.Rendering.Utils.MasterBarBounds.FindBeatAtPos C# (CSharp) Method

FindBeatAtPos() public method

public FindBeatAtPos ( float x, float y ) : Beat
x float
y float
return AlphaTab.Model.Beat
        public Beat FindBeatAtPos(float x, float y)
        {
            BeatBounds beat = null;
            for (int i = 0; i < Bars.Count; i++)
            {
                var b = Bars[i].FindBeatAtPos(x);
                if (b != null && (beat == null || beat.RealBounds.X < b.RealBounds.X))
                {
                    beat = b;
                }
            }
            return beat == null ? null : beat.Beat;
        }