private void ShowName(Graphics xgr, SizeF size, StringFormat fmt, int y, int x) { int pc = XYPC[y][x].PC; string sf = NoteName.GetNoteNameOrSolfa(pc, P.F.Keys[P.F.CurrentBBT.Ticks]); Font font = (ScaleNotes[pc]) ? DiatonicFont : ChromaticFont; Brush fontbrush = (ScaleNotes[pc]) ? DiatonicFontBrush : ChromaticFontBrush; clsXYPC xypc = XYPC[y][x]; PointF loc = new PointF(xypc.XPos - Radius, xypc.YPos - Radius); RectangleF rectf = new RectangleF(loc, size); //xgr.DrawRectangle(new Pen(Color.Green, 3), loc.X, loc.Y, size.Width, size.Height); xgr.DrawString(sf, font, fontbrush, rectf, fmt); }
private void ShowNodeTxt(Graphics xgr, SizeF size, StringFormat fmt, int y, int x) { clsXYPC xypc = XYPC[y][x]; int pc = xypc.PC; int pcsf = (pc - P.frmSC.Play.TransposeKB).Mod12(); //int pcshow = (P.frmSC.optShowSolfa.Checked) ? pcsf : pc; //* kbtrans applied to key by GetNoteNameOrSolfa string txt = NoteName.GetNoteNameOrSolfa(pc, P.F.Keys[P.F.CurrentBBT.Ticks, kbtrans: true]); Font font = (ScaleNotes[pc]) ? DiatonicFont : ChromaticFont; Brush fontbrush = (ScaleNotes[pc]) ? P.ColorsTonnetz["Diatonic Note"].Br : P.ColorsTonnetz["Chromatic Note"].Br; PointF loc = new PointF(xypc.XPos - Radius, xypc.YPos - Radius); RectangleF rectf = new RectangleF(loc, size); //xgr.DrawRectangle(new Pen(Color.Green, 3), loc.X, loc.Y, size.Width, size.Height); xgr.DrawString(txt, font, fontbrush, rectf, fmt); }