public void FillMusicFontSymbols( double x, double y, double scale, IList <MusicFontSymbol> symbols, bool centerAtPosition = false) { var s = ""; foreach (var symbol in symbols) { if (symbol != MusicFontSymbol.None) { s += String.FromCharCode((double)symbol); } } using (var paint = CreatePaint()) { paint.Typeface = MusicFont; paint.TextSize = (float)(MusicFontSize * scale); if (centerAtPosition) { paint.TextAlign = SKTextAlign.Center; } _surface.Canvas.DrawText(s, (float)x, (float)y, paint); } }
public void FillMusicFontSymbol( double x, double y, double scale, MusicFontSymbol symbol, bool centerAtPosition = false) { if (symbol == MusicFontSymbol.None) { return; } using (var paint = CreatePaint()) { paint.Typeface = MusicFont; paint.TextSize = (float)(MusicFontSize * scale); if (centerAtPosition) { paint.TextAlign = SKTextAlign.Center; } _surface.Canvas.DrawText(String.FromCharCode((double)symbol), (float)x, (float)y, paint); } }