private void DrawText(string text, float locX, float locY, D2D1.Brush fg, D2D1.Brush bg, string font = "", float size = 0)
{
using (TextFormat = new DW.TextFormat(DWFactory, font == "" ? Config.CooldownBarTextFont : font, size == 0 ? Config.CooldownBarTextFontSize : size)) {
TextFormat.WordWrapping = DW.WordWrapping.NoWrap;
using (DW.TextLayout TextLayout = new DW.TextLayout(DWFactory, text, TextFormat, 500, 500)) {
using (TextBrush = new TextBrush(fg, bg)) {
using (TextRenderer = new TextRenderer(Render, TextBrush)) {
TextLayout.SetDrawingEffect(TextBrush, new DW.TextRange(10, 20));
TextLayout.Draw(TextRenderer, locX, locY);
}
}
}
}
}