Exemple #1
0
        public override void DrawWindowBackground(Canvas2D canvas, Color color, float x, float y, float w, float h)
        {
            var bottomColor = Color.Lerp(color, Color.Black, 0.5f);

            canvas.SetLinearGradientFill(new Vector2(x, y), new Vector2(x, y + h), new GradientStop(0, color), new GradientStop(1, bottomColor));
            canvas.FillRectangle(x, y, w, h);
            canvas.SetLinearGradientFill(new Vector2(x + 5, y + 5), new Vector2(x - 5, y + h - 5), new GradientStop(0, Color.Transparent), new GradientStop(0.2f, Color.Transparent), new GradientStop(1f, new Color(1, 1, 1, 0.2f)));
            canvas.FillRectangle(x + 5, y + 5, w - 10, h - 10);
        }
Exemple #2
0
 public override void DrawWindowTopBar(Canvas2D canvas, float x, float y, float w, float h)
 {
     canvas.SetLinearGradientFill(new Vector2(x + 8, y + 8), new Vector2(x + w - 8, y + 8), new GradientStop(0, new Color(0f,0f,0f, 0.5f)), new GradientStop(1, new Color(0f,0f,0f, 0.2f)));
     canvas.FillRectangle(x + 8, y + 8, w - 16, h - 16);
 }
Exemple #3
0
 public override void DrawWindowShadow(Canvas2D canvas, float x, float y, float w, float h)
 {
     canvas.SetLinearGradientFill(new Vector2(x + 5, y + 5), new Vector2(x + 5, y + h + 5), new GradientStop(0, new Color(0, 0, 0, 0.3f)), new GradientStop(1, new Color(0, 0, 0, 0.1f)));
     canvas.FillRectangle(x + 5, y + 5, w, h);
 }