aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Drawing/WatchedIndicatorDrawer.cs
blob: c889db30443defc58e57306bb8d063918e6d461e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Drawing;

namespace MediaBrowser.Server.Implementations.Drawing
{
    public class WatchedIndicatorDrawer
    {
        private const int IndicatorHeight = 50;
        public const int IndicatorWidth = 50;
        private const int FontSize = 50;

        public void Process(Graphics graphics, Size imageSize)
        {
            var x = imageSize.Width - IndicatorWidth;

            using (var backdroundBrush = new SolidBrush(Color.FromArgb(225, 204, 51, 51)))
            {
                graphics.FillRectangle(backdroundBrush, x, 0, IndicatorWidth, IndicatorHeight);

                const string text = "a";

                x = imageSize.Width - 55;

                using (var font = new Font("Webdings", FontSize, FontStyle.Regular, GraphicsUnit.Pixel))
                {
                    using (var fontBrush = new SolidBrush(Color.White))
                    {
                        graphics.DrawString(text, font, fontBrush, x, -2);
                    }
                }
            }

        }
    }
}