Support alpha to Background
[platform/core/csapi/tizenfx.git] / ElmSharpTest / TC / BackgroundTest2.cs
1 using System;
2 using ElmSharp;
3
4 namespace ElmSharp.Test
5 {
6     public class BackgroundTest2 : TestCaseBase
7     {
8         public override string TestName => "BackgroundTest2";
9         public override string TestDescription => "To test basic operation of Background";
10
11         public override void Run(Window window)
12         {
13             Background bg1 = new Background(window)
14             {
15                 Color = Color.Orange
16             };
17
18             Background bg2 = new Background(window)
19             {
20                 Color = new Color(60, 128, 255, 100)
21             };
22             Show(bg1, 0, 0, 500, 500);
23             Show(bg2, 100, 100, 500, 500);
24
25             Console.WriteLine("bg1.Color : {0}", bg1.Color.ToString());
26             Console.WriteLine("bg2.Color : {0}", bg2.Color.ToString());
27         }
28
29         void Show(Background bg, int x, int y, int w, int h)
30         {
31             bg.Move(x, y);
32             bg.Resize(w, h);
33             bg.Show();
34         }
35     }
36 }