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

SetPreBeatSize() public method

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

Usage Example

Esempio n. 1
0
 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);
 }