AlphaTab.Rendering.Glyphs.VoiceContainerGlyph.ScaleToForce C# (CSharp) 메소드

ScaleToForce() 개인적인 메소드

private ScaleToForce ( float force ) : void
force float
리턴 void
        private void ScaleToForce(float force)
        {
            Width = Renderer.LayoutingInfo.CalculateVoiceWidth(force);
            var positions = Renderer.LayoutingInfo.BuildOnTimePositions(force);
            for (int i = 0, j = BeatGlyphs.Count; i < j; i++)
            {
                var time = BeatGlyphs[i].Beat.AbsoluteStart;
                BeatGlyphs[i].X = positions[time] - BeatGlyphs[i].OnTimeX;

                // size always previousl glyph after we know the position
                // of the next glyph
                if (i > 0)
                {
                    var beatWidth = BeatGlyphs[i].X - BeatGlyphs[i - 1].X;
                    BeatGlyphs[i - 1].ScaleToWidth(beatWidth);
                }

                // for the last glyph size based on the full width
                if (i == j - 1)
                {
                    float beatWidth = Width - BeatGlyphs[BeatGlyphs.Count - 1].X;
                    BeatGlyphs[i].ScaleToWidth(beatWidth);
                }
            }
        }