From ede28645b570182c3a88b55a4df23e3ec5a6bd4f Mon Sep 17 00:00:00 2001 From: Splamy Date: Wed, 19 Jul 2017 23:02:31 +0200 Subject: [PATCH] GraphicsPath quickfix --- TS3AudioBot/MainBot.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TS3AudioBot/MainBot.cs b/TS3AudioBot/MainBot.cs index c581b659..76599313 100644 --- a/TS3AudioBot/MainBot.cs +++ b/TS3AudioBot/MainBot.cs @@ -1607,9 +1607,8 @@ private void GenerateStatusImage(object sender, EventArgs e) using (var bmp = thumresult.Value) { using (var graphics = Graphics.FromImage(bmp)) + using (var gp = new System.Drawing.Drawing2D.GraphicsPath()) { - var gp = new System.Drawing.Drawing2D.GraphicsPath(); - gp.AddString("Now playing: " + startEvent.ResourceData.ResourceTitle, FontFamily.GenericSansSerif, 0, 15, new RectangleF(0, 0, bmp.Width, bmp.Height), avatarTextFormat); @@ -1618,7 +1617,7 @@ private void GenerateStatusImage(object sender, EventArgs e) graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; - + graphics.DrawPath(avatarTextOutline, gp); graphics.FillPath(Brushes.White, gp); }