public override void DrawString(string text, double x, double y) { if (_textPrinter != null) { _textPrinter.DrawString(text, x, y); } }
public override void DrawString(string text, double x, double y) { if (_textPriner == null) { return; } //-------------------------------- _textPriner.DrawString(text, x, y); }
public static void DrawString(this ITextPrinter textPrinter, string text, double left, double top) { #if DEBUG if (text == null) { return; } #endif char[] textBuffer = text.ToCharArray(); textPrinter.DrawString(textBuffer, 0, textBuffer.Length, left, top); }
public static void DrawString(this ITextPrinter textPrinter, string text, double left, double top) { #if DEBUG if (text == null) { return; } #endif //TODO: review here!!! //Do Not alloc new char[] //plan: use Span<T> or some ptr to string char[] textBuffer = text.ToCharArray(); textPrinter.DrawString(textBuffer, 0, textBuffer.Length, left, top); }
public static void DrawString(this ITextPrinter textPrinter, string text, double x, double y) { char[] textBuffer = text.ToCharArray(); textPrinter.DrawString(textBuffer, 0, textBuffer.Length, x, y); }