public static void FinalizeBeforeShutdown() { if (!(!Program.Config.EnableDirectWrite || fallback)) { DirectWriteTextRenderer.FinalizeBeforeShutdown(); } }
public static void DrawText(Graphics graphics, string text, Font font, Point pt, Color foreColor, Color backColor) { Retry: try { if (!Program.Config.EnableDirectWrite || fallback) { TextRenderer.DrawText(graphics, text, font, pt, foreColor, backColor); } else { DirectWriteTextRenderer.DrawText(graphics, text, font, pt, foreColor, backColor); } } catch (FileNotFoundException exception) { if (Fallback()) { goto Retry; } ShowError(exception); throw; } }
public static Size MeasureText(string text, Font font) { Retry: try { if (!Program.Config.EnableDirectWrite || fallback) { return(TextRenderer.MeasureText(text, font)); } else { return(DirectWriteTextRenderer.MeasureText(text, font)); } } catch (FileNotFoundException exception) { if (Fallback()) { goto Retry; } ShowError(exception); throw; } }
public static Size MeasureText(Graphics graphics, string text, Font font, Size proposedSize, TextFormatFlags flags) { Retry: try { if (!Program.Config.EnableDirectWrite || fallback) { return(TextRenderer.MeasureText(graphics, text, font, proposedSize, flags)); } else { return(DirectWriteTextRenderer.MeasureText(graphics, text, font, proposedSize, flags)); } } catch (FileNotFoundException exception) { if (Fallback()) { goto Retry; } ShowError(exception); throw; } }
public static void DrawText(Graphics graphics, string text, Font font, Rectangle bounds, Color foreColor, TextFormatFlags flags) { Retry: try { if (!Program.Config.EnableDirectWrite || fallback) { TextRenderer.DrawText(graphics, text, font, bounds, foreColor, flags); } else { DirectWriteTextRenderer.DrawText(graphics, text, font, bounds, foreColor, flags); } } catch (FileNotFoundException exception) { if (Fallback()) { goto Retry; } ShowError(exception); throw; } }