Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-demo.git] / resources / scripts / background-color.json
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 {
18   "stage": [
19     // A TextView with a red background
20     {
21       "type": "TextView",
22       "text": "Hello World",
23       "parent-origin": "TOP_CENTER",
24       "anchor-point": "TOP_CENTER",
25       "background-color": [1, 0, 0, 1],
26       "size": [400, 150, 1]
27     },
28
29     // A container with a yellow background
30     {
31       "type": "Control",
32       "relayout-enabled": false,
33       "parent-origin": "CENTER",
34       "anchor-point": "BOTTOM_CENTER",
35       "background-color": [1, 1, 0, 1],
36       "size": [400, 150, 1]
37     },
38
39     // A container with an image
40     {
41       "type": "Control",
42       "relayout-enabled": false,
43       "parent-origin": "CENTER",
44       "anchor-point": "TOP_CENTER",
45       "size": [400, 150, 1],
46       "background-image": {
47         "image": {
48           "filename": "{DALI_IMAGE_DIR}button-background.png"
49         }
50       }
51     },
52
53     // A container with the same image blended in with a blue background
54     {
55       "type": "Control",
56       "relayout-enabled": false,
57       "parent-origin": "BOTTOM_CENTER",
58       "anchor-point": "BOTTOM_CENTER",
59       "size": [400, 150, 1],
60       "background-color": [0, 0, 1, 1],
61       "background-image": {
62         "image": {
63           "filename": "{DALI_IMAGE_DIR}button-background.png"
64         }
65       }
66     }
67   ]
68 }