public override void DoLayout()
        {
            PreNotes.X         = 0;
            PreNotes.Index     = 0;
            PreNotes.Renderer  = Renderer;
            PreNotes.Container = this;
            PreNotes.DoLayout();

            OnNotes.X         = PreNotes.X + PreNotes.Width;
            OnNotes.Index     = 1;
            OnNotes.Renderer  = Renderer;
            OnNotes.Container = this;
            OnNotes.DoLayout();

            PostNotes.X         = OnNotes.X + OnNotes.Width;
            PostNotes.Index     = 2;
            PostNotes.Renderer  = Renderer;
            PostNotes.Container = this;
            PostNotes.DoLayout();

            var i = Beat.Notes.Count - 1;

            while (i >= 0)
            {
                CreateTies(Beat.Notes[i--]);
            }

            Width = CalculateWidth();
        }
예제 #2
0
        public override void DoLayout()
        {
            PreNotes.X         = 0;
            PreNotes.Renderer  = Renderer;
            PreNotes.Container = this;
            PreNotes.DoLayout();

            OnNotes.X         = PreNotes.X + PreNotes.Width;
            OnNotes.Renderer  = Renderer;
            OnNotes.Container = this;
            OnNotes.DoLayout();
            var i = Beat.Notes.Count - 1;

            while (i >= 0)
            {
                CreateTies(Beat.Notes[i--]);
            }

            MinWidth = PreNotes.Width + OnNotes.Width;
            if (!Beat.IsRest)
            {
                if (OnNotes.BeamingHelper.Beats.Count == 1)
                {
                    // make space for footer
                    if (Beat.Duration >= Duration.Eighth)
                    {
                        MinWidth += 20 * Scale;
                    }
                }
                else
                {
                    // ensure some space for small notes
                    switch (Beat.Duration)
                    {
                    case Duration.OneHundredTwentyEighth:
                    case Duration.TwoHundredFiftySixth:
                        MinWidth += 10 * Scale;
                        break;
                    }
                }
            }


            Width   = MinWidth;
            OnTimeX = OnNotes.X + OnNotes.Width / 2;
        }
예제 #3
0
        public override void DoLayout()
        {
            PreNotes.X         = 0;
            PreNotes.Renderer  = Renderer;
            PreNotes.Container = this;
            PreNotes.DoLayout();

            OnNotes.X         = PreNotes.X + PreNotes.Width;
            OnNotes.Renderer  = Renderer;
            OnNotes.Container = this;
            OnNotes.DoLayout();
            var i = Beat.Notes.Count - 1;

            while (i >= 0)
            {
                CreateTies(Beat.Notes[i--]);
            }

            UpdateWidth();
        }
예제 #4
0
        public override void DoLayout()
        {
            PreNotes.X         = 0;
            PreNotes.Renderer  = Renderer;
            PreNotes.Container = this;
            PreNotes.DoLayout();

            OnNotes.X         = PreNotes.X + PreNotes.Width;
            OnNotes.Renderer  = Renderer;
            OnNotes.Container = this;
            OnNotes.DoLayout();
            var i = Beat.Notes.Count - 1;

            while (i >= 0)
            {
                CreateTies(Beat.Notes[i--]);
            }

            MinWidth = PreNotes.Width + OnNotes.Width;
            Width    = MinWidth;
            OnTimeX  = OnNotes.X + OnNotes.Width / 2;
        }