private void PianoWindow_TrackPaint(object sender, VocalUtau.DirectUI.DrawUtils.TrackDrawUtils utils) { List <PitchObject>[] PitchArray = getPitchObjLists(); foreach (List <PitchObject> PitchObjList in PitchArray) { utils.DrawPitchLine(PitchObjList, Color.Red); } /* * List<PitchObject> PitchObjList=getShownPitchLine(); * utils.DrawPitchLine(PitchObjList, Color.Red); */ switch (PitchDragingStatus) { case PitchDragingType.DrawLine: utils.DrawPitchLine(PitchMathUtils.CalcLineSilk(PitchStP1, PitchTmpP0), Color.DarkCyan); break; case PitchDragingType.DrawGraphJ: utils.DrawPitchLine(PitchMathUtils.CalcGraphJ(PitchStP1, PitchTmpP0), Color.DarkCyan); break; case PitchDragingType.DrawGraphR: utils.DrawPitchLine(PitchMathUtils.CalcGraphR(PitchStP1, PitchTmpP0), Color.DarkCyan); break; case PitchDragingType.DrawGraphS: utils.DrawPitchLine(PitchMathUtils.CalcGraphS(PitchStP1, PitchTmpP0), Color.DarkCyan); break; case PitchDragingType.EarseArea: if (PitchStP1 != null && PitchTmpP0 != null) { PitchView.BlockDia PitchDia = new PitchView.BlockDia(); PitchDia.setStartPoint(PitchStP1.Tick, PitchStP1.PitchValue.NoteNumber); PitchDia.setEndPoint(PitchTmpP0.Tick, PitchTmpP0.PitchValue.NoteNumber); utils.DrawDia(PitchDia.TickStart, PitchDia.TickEnd, PitchDia.TopNoteNum, PitchDia.BottomNoteNum); } break; } if (_HandleEvents) { switch (_PitchToolsStatus) { case PitchView.PitchDragingType.DrawLine: utils.DrawString(new Point(utils.ClipRectangle.Width - 210, 35), Color.FromArgb(60, 0, 0, 0), "Pitch Draw Line", 25, FontStyle.Bold); break; case PitchView.PitchDragingType.DrawGraphJ: utils.DrawString(new Point(utils.ClipRectangle.Width - 170, 35), Color.FromArgb(60, 0, 0, 0), "Pitch Draw J", 25, FontStyle.Bold); break; case PitchView.PitchDragingType.DrawGraphR: utils.DrawString(new Point(utils.ClipRectangle.Width - 170, 35), Color.FromArgb(60, 0, 0, 0), "Pitch Draw R", 25, FontStyle.Bold); break; case PitchView.PitchDragingType.DrawGraphS: utils.DrawString(new Point(utils.ClipRectangle.Width - 170, 35), Color.FromArgb(60, 0, 0, 0), "Pitch Draw S", 25, FontStyle.Bold); break; case PitchView.PitchDragingType.EarseArea: utils.DrawString(new Point(utils.ClipRectangle.Width - 160, 35), Color.FromArgb(60, 0, 0, 0), "Pitch Earse", 25, FontStyle.Bold); break; } } }
private void PianoWindow_TrackPaint(object sender, VocalUtau.DirectUI.DrawUtils.TrackDrawUtils utils) { long mt = PianoWindow.MaxShownTick; long nt = PianoWindow.MinShownTick; int Sfx = PartsObject.NoteCompiler.FindTickIndex(nt, 0, NoteList.Count); for (int i = 0; i < NoteList.Count; i++) { NoteObject PN = NoteList[i]; if (PN.Tick >= mt) { break; } if (PN.Tick + PN.Length < nt) { continue; } utils.DrawNote(PN, (NoteSelectIndexs.IndexOf(i) > -1)?Color.Green:Color.SkyBlue); } if (NoteDias.Count != 0) { foreach (BlockDia NoteDia in NoteDias) { if (NoteDia.TickEnd - NoteDia.TickStart >= 32) { utils.DrawDia(NoteDia.TickStart, NoteDia.TickEnd, NoteDia.TopNoteNum, NoteDia.BottomNoteNum); } } } if (_HandleEvents) { switch (_NoteToolsStatus) { case NoteToolsType.Add: utils.DrawString(new Point(utils.ClipRectangle.Width - 160, 35), Color.FromArgb(60, 0, 0, 0), "Note Add", 25, FontStyle.Bold); break; case NoteToolsType.Select: utils.DrawString(new Point(utils.ClipRectangle.Width - 160, 35), Color.FromArgb(60, 0, 0, 0), "Note Select", 25, FontStyle.Bold); break; } } }