diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-03 21:29:48 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-03 21:29:48 +0100 |
| commit | d15af6eb35c782b0f150fc67bf0f2b0566d86edc (patch) | |
| tree | e5c38d9294f2f97fb25d1aa9e7d19a8e3a65eb08 /Emby.Drawing.Net/PercentPlayedDrawer.cs | |
| parent | 86275bcc55cfe6cf6798d152a53f79c6f7811b52 (diff) | |
Removed all old and unused ImageEncoders.
Remove solution platform cruft.
Diffstat (limited to 'Emby.Drawing.Net/PercentPlayedDrawer.cs')
| -rw-r--r-- | Emby.Drawing.Net/PercentPlayedDrawer.cs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/Emby.Drawing.Net/PercentPlayedDrawer.cs b/Emby.Drawing.Net/PercentPlayedDrawer.cs deleted file mode 100644 index fac15ba47..000000000 --- a/Emby.Drawing.Net/PercentPlayedDrawer.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Drawing; - -namespace Emby.Drawing.Net -{ - public class PercentPlayedDrawer - { - private const int IndicatorHeight = 8; - - public void Process(Graphics graphics, Size imageSize, double percent) - { - var y = imageSize.Height - IndicatorHeight; - - using (var backdroundBrush = new SolidBrush(Color.FromArgb(225, 0, 0, 0))) - { - const int innerX = 0; - var innerY = y; - var innerWidth = imageSize.Width; - var innerHeight = imageSize.Height; - - graphics.FillRectangle(backdroundBrush, innerX, innerY, innerWidth, innerHeight); - - using (var foregroundBrush = new SolidBrush(Color.FromArgb(82, 181, 75))) - { - double foregroundWidth = innerWidth; - foregroundWidth *= percent; - foregroundWidth /= 100; - - graphics.FillRectangle(foregroundBrush, innerX, innerY, Convert.ToInt32(Math.Round(foregroundWidth)), innerHeight); - } - } - } - } -} |
