diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-07 00:47:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-07 00:47:06 -0500 |
| commit | c986340c02cb0b7fe06569d25a1b5d1c8375f7f6 (patch) | |
| tree | 4971c970bbdb797cc5b3da2d8bae506231b173a5 /Emby.Drawing.Net/UnplayedCountIndicator.cs | |
| parent | 76b647e0a8eddd65dc9c4de7b887a3faf6e12bcc (diff) | |
| parent | 0b804629b85498370c882f5562dfc7acd84bfd11 (diff) | |
Merge pull request #419 from jellyfin/dev
Master 10.0.0
Diffstat (limited to 'Emby.Drawing.Net/UnplayedCountIndicator.cs')
| -rw-r--r-- | Emby.Drawing.Net/UnplayedCountIndicator.cs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/Emby.Drawing.Net/UnplayedCountIndicator.cs b/Emby.Drawing.Net/UnplayedCountIndicator.cs deleted file mode 100644 index a38abeb32..000000000 --- a/Emby.Drawing.Net/UnplayedCountIndicator.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Drawing; - -namespace Emby.Drawing.Net -{ - public class UnplayedCountIndicator - { - private const int IndicatorHeight = 41; - public const int IndicatorWidth = 41; - private const int OffsetFromTopRightCorner = 10; - - public void DrawUnplayedCountIndicator(Graphics graphics, Size imageSize, int count) - { - var x = imageSize.Width - IndicatorWidth - OffsetFromTopRightCorner; - - using (var backdroundBrush = new SolidBrush(Color.FromArgb(225, 82, 181, 75))) - { - graphics.FillEllipse(backdroundBrush, x, OffsetFromTopRightCorner, IndicatorWidth, IndicatorHeight); - - var text = count.ToString(); - - x = imageSize.Width - IndicatorWidth - OffsetFromTopRightCorner; - var y = OffsetFromTopRightCorner + 6; - var fontSize = 24; - - if (text.Length == 1) - { - x += 10; - } - else if (text.Length == 2) - { - x += 3; - } - else if (text.Length == 3) - { - x += 1; - y += 1; - fontSize = 20; - } - - using (var font = new Font("Sans-Serif", fontSize, FontStyle.Regular, GraphicsUnit.Pixel)) - { - using (var fontBrush = new SolidBrush(Color.White)) - { - graphics.DrawString(text, font, fontBrush, x, y); - } - } - } - } - } -} |
