Artemis.Modules.Overlays.VolumeDisplay.VolumeBar.Draw C# (CSharp) Method

Draw() public method

public Draw ( Graphics g ) : void
g System.Drawing.Graphics
return void
        public void Draw(Graphics g)
        {
            var volumeRect = new KeyboardRectangle(_deviceManager.ActiveKeyboard, 0, 0, new List<Color>
            {
                ColorHelpers.ToDrawingColor(Settings.MainColor),
                ColorHelpers.ToDrawingColor(Settings.SecondaryColor)
            },
                LinearGradientMode.Horizontal)
            {
                Width = (int) (_deviceManager.ActiveKeyboard.Width*Scale/100.00*Volume),
                ContainedBrush = false
            };
            volumeRect.Draw(g);
        }
    }