public override void DoLayout() { base.DoLayout(); var symbolHeight = 0f; switch (_type) { case VibratoType.Slight: _symbol = MusicFontSymbol.WaveHorizontalSlight; _symbolSize = SlightWaveSize * _scale; _symbolOffset = SlightWaveOffset * _scale; symbolHeight = 6 * _scale; break; case VibratoType.Wide: _symbol = MusicFontSymbol.WaveHorizontalWide; _symbolSize = 10 * _scale; _symbolOffset = 7 * _scale; symbolHeight = 10 * _scale; break; } Height = symbolHeight * Scale; }
public void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } //_buffer += "<text x=\""; //_buffer += x; //_buffer += "\" y=\""; //_buffer += y + GetSvgBaseLineOffset(); //_buffer += "\" style=\"font:"; //_buffer += Resources.MusicFont.ToCssString(); //_buffer += "; fill:"; //_buffer += Color.ToRgbaString(); //_buffer += ";\" "; //_buffer += " dominant-baseline=\"top\" text-anchor=\"start\""; //_buffer += ">&#x"; //_buffer += Std.ToHexString((int)symbol); //_buffer += ";</text>\n"; //if (symbol == MusicFontSymbol.None) //{ // return; //} SvgRenderer glyph = new SvgRenderer(MusicFont.SymbolLookup[symbol], scale, scale); glyph.Paint(x, y, this); }
public void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } SvgRenderer glyph = new SvgRenderer(MusicFont.SymbolLookup[symbol], scale, scale); glyph.Paint(x, y, this); }
public void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } // for whatever reason the padding on GDI font rendering is a bit messed up, there is 1px padding on the left x += scale; _graphics.DrawString(Std.StringFromCharCode((int)symbol), GetMusicFont(scale), _brush, x, y, MusicFontFormat); }
public void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } using (var paint = CreatePaint()) { paint.Typeface = MusicFont; paint.TextSize = MusicFontSize * scale; _surface.Canvas.DrawText(Std.StringFromCharCode((int)symbol), x, y, paint); } }
public override void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } Buffer.Append("<svg x=\"" + (x - BlurCorrection) + "\" y=\"" + (y - BlurCorrection) + "\" class=\"at\" ><text style=\"fill:" + Color.RGBA + "; "); if (scale != 1) { Buffer.Append("font-size: " + (scale * 100) + "%"); } Buffer.Append("\" text-anchor=\"start\">&#" + (int)symbol + ";</text></svg>"); }
public void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } var baseLine = _context.textBaseline; var font = _context.font; _context.font = _musicFont.ToCssString(scale); _context.textBaseline = "middle"; _context.fillText(Std.StringFromCharCode((int)symbol), x, y); _context.textBaseline = baseLine; _context.font = font; }
public override void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { Buffer.Append("<g transform=\"translate(" + ((int)x - BlurCorrection) + " " + ((int)y - BlurCorrection) + ")\" class=\"at\" ><text"); //Buffer.Append("<svg x=\"" + ((int) x - BlurCorrection) + "\" y=\"" + ((int) y - BlurCorrection) + // "\" class=\"at\" >"); if (scale != 1) { Buffer.Append(" style=\"font-size: " + (scale * 100) + "%\""); } if (Color.RGBA != Model.Color.BlackRgb) { Buffer.Append(" fill=\"" + Color.RGBA + "\""); } //Buffer.Append(">&#" + (int)symbol + ";</text></svg>"); Buffer.Append(">&#" + (int)symbol + ";</text></g>"); }
public override void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } Buffer.Append("<g transform=\"translate(" + ((int)x - BlurCorrection) + " " + ((int)y - BlurCorrection) + ")\" class=\"at\" ><text"); if (scale != 1) { Buffer.Append(" style=\"font-size: " + (scale * 100) + "%; stroke:none\""); } else { Buffer.Append(" style=\"stroke:none\""); } if (Color.RGBA != Model.Color.BlackRgb) { Buffer.Append(" fill=\"" + Color.RGBA + "\""); } Buffer.Append(">&#" + (int)symbol + ";</text></g>"); }
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); } }
public abstract void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol);
public void FillMusicFontSymbol(float x, float y, float scale, MusicFontSymbol symbol) { if (symbol == MusicFontSymbol.None) { return; } var baseLine = _context.textBaseline; var font = _context.font; _context.font = _musicFont.ToCssString(scale); _context.textBaseline = "middle"; _context.fillText(Std.StringFromCharCode((int) symbol), x, y); _context.textBaseline = baseLine; _context.font = font; }
public MusicFontGlyph(float x, float y, float scale, MusicFontSymbol symbol) : base(x, y) { _scale = scale; _symbol = symbol; }
public MusicFontGlyph(float x, float y, float glyphScale, MusicFontSymbol symbol) : base(x, y) { GlyphScale = glyphScale; _symbol = symbol; }