Skip to content

Commit

Permalink
GraphicsPath quickfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Splamy committed Jul 19, 2017
1 parent f09b29e commit ede2864
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions TS3AudioBot/MainBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down

0 comments on commit ede2864

Please sign in to comment.