Commit 2be05b9c270cf1d0f369aa4239f01a751ee934e5

Authored by Adeel Kazmi
1 parent c3af97e8

Added SVG image to background JSON

Change-Id: I1fe304f892aa92108cbb07a46368eb267b97f9e0
resources/scripts/background.json
... ... @@ -26,15 +26,30 @@
26 26 "pointSize": 20,
27 27 "horizontalAlignment": "CENTER",
28 28 "verticalAlignment": "CENTER",
29   - "widthResizePolicy":"FILL_TO_PARENT",
  29 + "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
30 30 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
31   - "sizeModeFactor": [ 1.0, 0.33, 1 ],
  31 + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
32 32 "background":{
33 33 "rendererType": "color",
34 34 "blendColor": [ 0.8, 0, 0.2, 1 ]
35 35 }
36 36 },
37 37  
  38 + // A control with an SVG image
  39 + {
  40 + "type": "Control",
  41 + "relayoutEnabled": false,
  42 + "parentOrigin": "TOP_RIGHT",
  43 + "anchorPoint": "TOP_RIGHT",
  44 + "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
  45 + "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
  46 + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
  47 + "background": {
  48 + "rendererType": "svg",
  49 + "imageUrl": "{DEMO_IMAGE_DIR}Kid1.svg"
  50 + }
  51 + },
  52 +
38 53 // A control with a border
39 54 {
40 55 "type": "Control",
... ... @@ -43,7 +58,7 @@
43 58 "anchorPoint": "CENTER_LEFT",
44 59 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
45 60 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
46   - "sizeModeFactor": [ 0.5, 0.33, 1],
  61 + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
47 62 "background": {
48 63 "rendererType" : "border",
49 64 "borderColor" : [ 0.5, 0.5, 0.5, 1 ],
... ... @@ -51,7 +66,7 @@
51 66 }
52 67 },
53 68  
54   - // A control with an image
  69 + // A control with a JPG image
55 70 {
56 71 "type": "Control",
57 72 "relayoutEnabled": false,
... ... @@ -59,7 +74,7 @@
59 74 "anchorPoint": "CENTER_RIGHT",
60 75 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
61 76 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
62   - "sizeModeFactor": [ 0.5, 0.33, 1 ],
  77 + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
63 78 "background": {
64 79 "rendererType": "image",
65 80 "imageUrl": "{DEMO_IMAGE_DIR}gallery-large-9.jpg"
... ... @@ -74,7 +89,7 @@
74 89 "anchorPoint": "BOTTOM_LEFT",
75 90 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
76 91 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
77   - "sizeModeFactor": [ 0.5, 0.33, 1 ],
  92 + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
78 93 "background":{
79 94 "rendererType": "color",
80 95 "blendColor": [ 1, 1, 0, 1 ]
... ... @@ -89,7 +104,7 @@
89 104 "anchorPoint": "BOTTOM_RIGHT",
90 105 "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT",
91 106 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
92   - "sizeModeFactor": [ 0.5, 0.33, 1.0 ],
  107 + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
93 108 "background": {
94 109 "rendererType" : "gradient",
95 110 "startPosition" : [ -0.5, -0.5 ],
... ...