private FormattedText GetFormatted(string s) { var formattedLine = FormattedTextHelper.GetFormattedText(s, FontStyle, FontSize, TextBrush); HighlightTextService.HighlightText(formattedLine); return(formattedLine); }
public static Point GetPointToClickOn(int str, int chr, IList <string> text) { var y = str * (Settings.LineInterval + Settings.FontSize); var x = FormattedTextHelper.GetWidth( text[str].Substring(0, chr), Settings.FontStyle, Settings.FontSize); return(new Point(x * PixelCoefficient, y * PixelCoefficient)); }