diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-11 12:33:10 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-11 12:33:10 -0500 |
| commit | 5655787c1ac9ceedbd78c6c853a7cded33a22d49 (patch) | |
| tree | efb58d6a215a227f09aa0ce95c97891718d05d6e /Emby.Drawing.Net/PlayedIndicatorDrawer.cs | |
| parent | 13ec531b142bb95bc599dc8efcc9e204f14e3e03 (diff) | |
update portable projects
Diffstat (limited to 'Emby.Drawing.Net/PlayedIndicatorDrawer.cs')
| -rw-r--r-- | Emby.Drawing.Net/PlayedIndicatorDrawer.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Emby.Drawing.Net/PlayedIndicatorDrawer.cs b/Emby.Drawing.Net/PlayedIndicatorDrawer.cs new file mode 100644 index 000000000..53683e6f4 --- /dev/null +++ b/Emby.Drawing.Net/PlayedIndicatorDrawer.cs @@ -0,0 +1,32 @@ +using System.Drawing; + +namespace Emby.Drawing.Net +{ + public class PlayedIndicatorDrawer + { + private const int IndicatorHeight = 40; + public const int IndicatorWidth = 40; + private const int FontSize = 40; + private const int OffsetFromTopRightCorner = 10; + + public void DrawPlayedIndicator(Graphics graphics, Size imageSize) + { + var x = imageSize.Width - IndicatorWidth - OffsetFromTopRightCorner; + + using (var backdroundBrush = new SolidBrush(Color.FromArgb(225, 82, 181, 75))) + { + graphics.FillEllipse(backdroundBrush, x, OffsetFromTopRightCorner, IndicatorWidth, IndicatorHeight); + + x = imageSize.Width - 45 - OffsetFromTopRightCorner; + + using (var font = new Font("Webdings", FontSize, FontStyle.Regular, GraphicsUnit.Pixel)) + { + using (var fontBrush = new SolidBrush(Color.White)) + { + graphics.DrawString("a", font, fontBrush, x, OffsetFromTopRightCorner - 2); + } + } + } + } + } +} |
