private static void DrawTextInternal( Gdi32.HDC hdc, ReadOnlySpan <char> text, Font?font, Rectangle bounds, Color foreColor, Gdi32.QUALITY fontQuality, Color backColor, TextFormatFlags flags) { using var hfont = GdiCache.GetHFONT(font, fontQuality, hdc); hdc.DrawText(text, hfont, bounds, foreColor, flags, backColor); }
internal static void DrawTextInternal( Gdi32.HDC hdc, string?text, Font?font, Rectangle bounds, Color foreColor, Gdi32.QUALITY fontQuality, Color backColor, User32.DT flags) { using var hfont = GdiCache.GetHFONT(font, fontQuality); hdc.DrawText(text, hfont, bounds, foreColor, flags, backColor); }