Commit 2be05b9c270cf1d0f369aa4239f01a751ee934e5
1 parent
c3af97e8
Added SVG image to background JSON
Change-Id: I1fe304f892aa92108cbb07a46368eb267b97f9e0
Showing
1 changed file
with
22 additions
and
7 deletions
resources/scripts/background.json
| @@ -26,15 +26,30 @@ | @@ -26,15 +26,30 @@ | ||
| 26 | "pointSize": 20, | 26 | "pointSize": 20, |
| 27 | "horizontalAlignment": "CENTER", | 27 | "horizontalAlignment": "CENTER", |
| 28 | "verticalAlignment": "CENTER", | 28 | "verticalAlignment": "CENTER", |
| 29 | - "widthResizePolicy":"FILL_TO_PARENT", | 29 | + "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 30 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 30 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 31 | - "sizeModeFactor": [ 1.0, 0.33, 1 ], | 31 | + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], |
| 32 | "background":{ | 32 | "background":{ |
| 33 | "rendererType": "color", | 33 | "rendererType": "color", |
| 34 | "blendColor": [ 0.8, 0, 0.2, 1 ] | 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 | // A control with a border | 53 | // A control with a border |
| 39 | { | 54 | { |
| 40 | "type": "Control", | 55 | "type": "Control", |
| @@ -43,7 +58,7 @@ | @@ -43,7 +58,7 @@ | ||
| 43 | "anchorPoint": "CENTER_LEFT", | 58 | "anchorPoint": "CENTER_LEFT", |
| 44 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 59 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 45 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 60 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 46 | - "sizeModeFactor": [ 0.5, 0.33, 1], | 61 | + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], |
| 47 | "background": { | 62 | "background": { |
| 48 | "rendererType" : "border", | 63 | "rendererType" : "border", |
| 49 | "borderColor" : [ 0.5, 0.5, 0.5, 1 ], | 64 | "borderColor" : [ 0.5, 0.5, 0.5, 1 ], |
| @@ -51,7 +66,7 @@ | @@ -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 | "type": "Control", | 71 | "type": "Control", |
| 57 | "relayoutEnabled": false, | 72 | "relayoutEnabled": false, |
| @@ -59,7 +74,7 @@ | @@ -59,7 +74,7 @@ | ||
| 59 | "anchorPoint": "CENTER_RIGHT", | 74 | "anchorPoint": "CENTER_RIGHT", |
| 60 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 75 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 61 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 76 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 62 | - "sizeModeFactor": [ 0.5, 0.33, 1 ], | 77 | + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], |
| 63 | "background": { | 78 | "background": { |
| 64 | "rendererType": "image", | 79 | "rendererType": "image", |
| 65 | "imageUrl": "{DEMO_IMAGE_DIR}gallery-large-9.jpg" | 80 | "imageUrl": "{DEMO_IMAGE_DIR}gallery-large-9.jpg" |
| @@ -74,7 +89,7 @@ | @@ -74,7 +89,7 @@ | ||
| 74 | "anchorPoint": "BOTTOM_LEFT", | 89 | "anchorPoint": "BOTTOM_LEFT", |
| 75 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 90 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 76 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 91 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 77 | - "sizeModeFactor": [ 0.5, 0.33, 1 ], | 92 | + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], |
| 78 | "background":{ | 93 | "background":{ |
| 79 | "rendererType": "color", | 94 | "rendererType": "color", |
| 80 | "blendColor": [ 1, 1, 0, 1 ] | 95 | "blendColor": [ 1, 1, 0, 1 ] |
| @@ -89,7 +104,7 @@ | @@ -89,7 +104,7 @@ | ||
| 89 | "anchorPoint": "BOTTOM_RIGHT", | 104 | "anchorPoint": "BOTTOM_RIGHT", |
| 90 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 105 | "widthResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 91 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 106 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 92 | - "sizeModeFactor": [ 0.5, 0.33, 1.0 ], | 107 | + "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], |
| 93 | "background": { | 108 | "background": { |
| 94 | "rendererType" : "gradient", | 109 | "rendererType" : "gradient", |
| 95 | "startPosition" : [ -0.5, -0.5 ], | 110 | "startPosition" : [ -0.5, -0.5 ], |