2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 // A TextLabel with a red background
22 "drawMode": "OVERLAY_2D",
23 "text": "Hello World",
24 "parentOrigin": "TOP_CENTER",
25 "anchorPoint": "TOP_CENTER",
27 "horizontalAlignment": "CENTER",
28 "verticalAlignment": "CENTER",
29 "widthResizePolicy":"FILL_TO_PARENT",
30 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
31 "sizeModeFactor": [1,0.25,1],
33 "rendererType": "color",
34 "blendColor": [1, 0, 0, 1]
38 // A control with a yellow background
41 "relayoutEnabled": false,
42 "parentOrigin": "CENTER",
43 "anchorPoint": "BOTTOM_CENTER",
44 "widthResizePolicy":"FILL_TO_PARENT",
45 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
46 "sizeModeFactor": [1,0.25,1],
48 "rendererType": "color",
49 "blendColor": [1, 1, 0, 1]
53 // A control with an image
56 "relayoutEnabled": false,
57 "parentOrigin": "CENTER",
58 "anchorPoint": "TOP_CENTER",
59 "widthResizePolicy":"FILL_TO_PARENT",
60 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
61 "sizeModeFactor": [1,0.25,1],
63 "rendererType": "image",
64 "imageUrl": "{DEMO_IMAGE_DIR}button-background.png"
68 // A control with a gradient
71 "relayoutEnabled": false,
72 "parentOrigin": "BOTTOM_CENTER",
73 "anchorPoint": "BOTTOM_CENTER",
74 "widthResizePolicy":"FILL_TO_PARENT",
75 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
76 "sizeModeFactor": [1,0.25,1],
78 "rendererType": "gradient",
79 "center": [ 0.5, 0.5 ],
81 "stopOffset": [ 0.0, 0.3, 0.6, 0.8, 1.0 ],
83 [ 0.5, 0.78, 0.76, 1.0 ],
84 [ 0.77, 0.78, 0.28, 0.48 ],
85 [ 0.84, 0.15, 0.55, 0.75 ],
86 [ 0.5, 0.78, 0.76, 0.59 ],
87 [ 1.0, 1.0, 0.0, 1.0 ]