aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-01 13:26:31 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-01 13:26:31 -0500
commitb9d17c9bc765a0c59d81db6277300a6860bf8421 (patch)
tree8a7c538cb73c27b7e06f0055ce4f0bb45175e7aa /MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs
parent88b638fbd69ed99bde7065f66af433b015977cb7 (diff)
add more methods to file system interface
Diffstat (limited to 'MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs b/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs
new file mode 100644
index 000000000..7be187396
--- /dev/null
+++ b/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs
@@ -0,0 +1,32 @@
+using System.Drawing;
+
+namespace MediaBrowser.Server.Implementations.Drawing
+{
+ public class PlayedIndicatorDrawer
+ {
+ private const int IndicatorHeight = 50;
+ public const int IndicatorWidth = 50;
+ private const int FontSize = 50;
+ 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 - 55 - 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);
+ }
+ }
+ }
+ }
+ }
+}