コード例 #1
0
        public void SetLine(CLine Line)
        {
            _Notes.Clear();

            _width = 0f;
            foreach (CNote note in Line.Notes)
            {
                SNote n = new SNote();

                n.Text      = note.Text;
                n.StartBeat = note.StartBeat;
                n.EndBeat   = note.EndBeat;
                n.Duration  = note.Duration;
                n.Type      = note.NoteType;

                _Text.Text  = note.Text;
                _Text.Style = EStyle.Bold;

                if (n.Type == ENoteType.Freestyle)
                {
                    _Text.Style = EStyle.BoldItalic;
                }

                RectangleF rect = CDraw.GetTextBounds(_Text);
                _width += rect.Width;
                _Notes.Add(n);
            }
        }
コード例 #2
0
ファイル: CLyric.cs プロジェクト: hessbe/Vocaluxe
        public void SetLine(CLine Line)
        {
            _Notes.Clear();

            _width = 0f;
            foreach (CNote note in Line.Notes)
            {
                SNote n = new SNote();

                n.Text = note.Text;
                n.StartBeat = note.StartBeat;
                n.EndBeat = note.EndBeat;
                n.Duration = note.Duration;
                n.Type = note.NoteType;

                _Text.Text = note.Text;
                _Text.Style = EStyle.Bold;

                if (n.Type == ENoteType.Freestyle)
                    _Text.Style = EStyle.BoldItalic;

                RectangleF rect = CDraw.GetTextBounds(_Text);
                _width += rect.Width;
                _Notes.Add(n);
            }
        }