AlphaTab.Rendering.Staves.BarLayoutingInfo.SetOnBeatSize C# (CSharp) Method

SetOnBeatSize() public method

public SetOnBeatSize ( Beat beat, float size ) : void
beat AlphaTab.Model.Beat
size float
return void
        public void SetOnBeatSize(Beat beat, float size)
        {
            if (!OnBeatSizes.ContainsKey(beat.Index) || OnBeatSizes[beat.Index] < size)
            {
                OnBeatSizes[beat.Index] = size;
            }
        }

Usage Example

 public void RegisterLayoutingInfo(BarLayoutingInfo layoutings)
 {
     var preBeatStretch = PreNotes.Width + OnNotes.Width / 2;
     layoutings.AddBeatSpring(Beat, MinWidth, preBeatStretch);
     // store sizes for special renderers like the EffectBarRenderer
     layoutings.SetPreBeatSize(Beat, PreNotes.Width);
     layoutings.SetOnBeatSize(Beat, OnNotes.Width);
 }