Пример #1
0
        void DrawBoxBounds(FastBitmap bmp, Rectangle r)
        {
            const int border = 1;
            int       y1 = r.Y - border, y2 = y1 + Height + border;

            r.X     -= border;
            r.Height = border; r.Width += border * 2;
            r.Y      = y1;
            Drawer2DExt.Clear(bmp, r, boundsTop);
            r.Y = y2;
            Drawer2DExt.Clear(bmp, r, boundsBottom);

            r.Y     = y1;
            r.Width = border; r.Height = y2 - y1;
            Gradient.Vertical(bmp, r, boundsTop, boundsBottom);
            r.X += Width + border;
            Gradient.Vertical(bmp, r, boundsTop, boundsBottom);
        }
        public void RedrawBackground(FastBitmap dst)
        {
            if (Window.Minimised)
            {
                return;
            }
            Rectangle rect = new Rectangle(X + border, Y + border, Width - border * 2, Height - border * 2);

            if (Window.ClassicBackground)
            {
                FastColour foreCol = Active ? new FastColour(126, 136, 191) : new FastColour(111, 111, 111);
                Drawer2DExt.DrawNoise(dst, rect, foreCol, 8);
            }
            else
            {
                FastColour foreCol = Active ? LauncherSkin.ButtonForeActiveCol : LauncherSkin.ButtonForeCol;
                Drawer2DExt.FastClear(dst, rect, foreCol);
            }
        }
Пример #3
0
 void Clear(FastBitmap bmp, FastColour col,
            int x, int y, int width, int height)
 {
     Drawer2DExt.Clear(bmp, new Rectangle(x, y, width, height), col);
 }