Skip to content

Commit ede2864

Browse files
committed
GraphicsPath quickfix
1 parent f09b29e commit ede2864

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

TS3AudioBot/MainBot.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,9 +1607,8 @@ private void GenerateStatusImage(object sender, EventArgs e)
16071607
using (var bmp = thumresult.Value)
16081608
{
16091609
using (var graphics = Graphics.FromImage(bmp))
1610+
using (var gp = new System.Drawing.Drawing2D.GraphicsPath())
16101611
{
1611-
var gp = new System.Drawing.Drawing2D.GraphicsPath();
1612-
16131612
gp.AddString("Now playing: " + startEvent.ResourceData.ResourceTitle,
16141613
FontFamily.GenericSansSerif, 0, 15,
16151614
new RectangleF(0, 0, bmp.Width, bmp.Height), avatarTextFormat);
@@ -1618,7 +1617,7 @@ private void GenerateStatusImage(object sender, EventArgs e)
16181617
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
16191618
graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
16201619
graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
1621-
1620+
16221621
graphics.DrawPath(avatarTextOutline, gp);
16231622
graphics.FillPath(Brushes.White, gp);
16241623
}

0 commit comments

Comments
 (0)