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 color background
22 "drawMode": "OVERLAY_2D",
23 "text": "Hello World",
24 "parentOrigin": "TOP_LEFT",
25 "anchorPoint": "TOP_LEFT",
27 "horizontalAlignment": "CENTER",
28 "verticalAlignment": "CENTER",
29 "widthResizePolicy":"FILL_TO_PARENT",
30 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
31 "sizeModeFactor": [ 1.0, 0.33, 1 ],
33 "rendererType": "color",
34 "blendColor": [ 0.8, 0, 0.2, 1 ]
38 // A control with a border
41 "relayoutEnabled": false,
42 "parentOrigin": "CENTER_LEFT",
43 "anchorPoint": "CENTER_LEFT",
44 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
45 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
46 "sizeModeFactor": [ 0.5, 0.33, 1],
48 "rendererType" : "border",
49 "borderColor" : [ 0.5, 0.5, 0.5, 1 ],
54 // A control with an image
57 "relayoutEnabled": false,
58 "parentOrigin": "CENTER_RIGHT",
59 "anchorPoint": "CENTER_RIGHT",
60 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
61 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
62 "sizeModeFactor": [ 0.5, 0.33, 1 ],
64 "rendererType": "image",
65 "imageUrl": "{DEMO_IMAGE_DIR}gallery-large-9.jpg"
69 // A control with a yellow background
72 "relayoutEnabled": false,
73 "parentOrigin": "BOTTOM_LEFT",
74 "anchorPoint": "BOTTOM_LEFT",
75 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
76 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
77 "sizeModeFactor": [ 0.5, 0.33, 1 ],
79 "rendererType": "color",
80 "blendColor": [ 1, 1, 0, 1 ]
84 // A control with a gradient
87 "relayoutEnabled": false,
88 "parentOrigin": "BOTTOM_RIGHT",
89 "anchorPoint": "BOTTOM_RIGHT",
90 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
91 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
92 "sizeModeFactor": [ 0.5, 0.33, 1.0 ],
94 "rendererType" : "gradient",
95 "startPosition" : [ -0.5, -0.5 ],
96 "endPosition": [ 0.5, 0.5 ],
98 [ 1.0, 0.0, 0.0, 1.0 ],
99 [ 1.0, 0.25, 0.0, 1.0 ],
100 [ 1.0, 0.5, 0.0, 1.0 ],
101 [ 1.0, 0.75, 0.0, 1.0 ],
102 [ 1.0, 1.0, 0.0, 1.0 ]
104 "stopOffset" : [ 0, 0.25, 0.5, 0.75, 1.0 ]