Issue
I need to create an Android drawable where the word oryx
is writting using the below vectors:
<glyph glyph-name="O" unicode="O" horiz-adv-x="657" d="M194 268q3 -35 8.5 -55.5t20 -40.5t43.5 -29t74 -9q35 0 60 11t37 25t19 34t8 30t1 22v10.5v16t-1 19.5t-3.5 22.5t-7 22.5t-11 22.5t-17 19.5t-23.5 16.5t-31.5 10.5t-40.5 4q-40 0 -68 -11t-41 -25.5t-20 -38t-7.5 -36.5t0.5 -33v-8zM45 277q-1 6 -1.5 16t3 39 t11.5 55.5t28 58.5t49.5 55t79.5 38.5t114 15.5q45 0 83 -7t65.5 -19t49 -30t35.5 -35.5t23.5 -41.5t14.5 -41.5t7 -41t2.5 -35.5t0 -30.5t-0.5 -20.5q0 -16 -1 -29t-6 -41t-14 -50t-28.5 -48t-46 -43.5t-69 -29.5t-95.5 -12q-55 0 -98 7t-73 18.5t-52.5 31.5t-36.5 41 t-23 52t-13.5 59.5t-7.5 67.5z"/>
<glyph glyph-name="R" unicode="R" horiz-adv-x="459" d="M412 555q-1 -2 0.5 -21t-0.5 -36.5t-8 -37.5t-24.5 -32t-47.5 -12q-42 0 -65 -3t-41 -15t-24 -34t-6 -60v-320q-18 13 -47.5 20.5t-50 11.5t-36.5 23.5t-16 56.5v268q0 6 0.5 16.5t3.5 29t10 37t21 38.5t34 35t51.5 25t70.5 10h99h35h11.5h29.5z"/>
<glyph glyph-name="Y" unicode="Y" horiz-adv-x="684" d="M275 27h134l-86 -189q-38 -41 -92 -41q-24 0 -41.5 12.5t-23.5 24.5l-6 13l110 219q-2 5 -4 11q-36 88 -97 207.5t-87.5 167.5t-42.5 76l16 5t32 9t39.5 3.5t44 -6.5t41.5 -24.5t34 -49.5q14 -40 39.5 -97t44.5 -95t19 -39q67 169 93 244q13 30 33.5 48.5t40.5 24t42.5 5 t38.5 -5t30.5 -9.5t15.5 -5q-87 -175 -168 -372q-16 -37 -38.5 -64t-42 -40.5t-45 -21.5t-40 -9.5t-34.5 -1.5z"/>
<glyph glyph-name="X" unicode="X" horiz-adv-x="648" d="M48 526q15 9 37 15.5t52 8t63 -13.5t59 -47q27 -33 72 -92q54 73 86 118q31 29 71 32.5t69 -10t40 -33.5q-40 -53 -173 -231q149 -199 182 -243q-11 -19 -40 -33t-69 -10.5t-71 32.5q-34 48 -95 130q-51 -67 -81 -104q-26 -32 -59 -47t-63 -13t-52 8t-37 15 q71 98 198 265q-119 157 -189 253z"/>
I created the file drawable/oryx.xml
and started with the below code trying to get the letter O
but nothing appeared when i used it in the layout file as: android:background="@drawable/oryx"
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="684dp"
android:width="684dp"
android:viewportWidth="684.0"
android:viewportHeight="684.0">
<group
android:name="rotationGroup"
android:pivotX="10.0"
android:pivotY="10.0"
android:rotation="0.0" >
<path
android:name="O"
android:fillColor="#FF000000"
android:pathData="M194 268q3 -35 8.5 -55.5t20 -40.5t43.5 -29t74 -9q35 0 60 11t37 25t19 34t8 30t1 22v10.5v16t-1 19.5t-3.5 22.5t-7 22.5t-11 22.5t-17 19.5t-23.5 16.5t-31.5 10.5t-40.5 4q-40 0 -68 -11t-41 -25.5t-20 -38t-7.5 -36.5t0.5 -33v-8zM45 277q-1 6 -1.5 16t3 39 t11.5 55.5t28 58.5t49.5 55t79.5 38.5t114 15.5q45 0 83 -7t65.5 -19t49 -30t35.5 -35.5t23.5 -41.5t14.5 -41.5t7 -41t2.5 -35.5t0 -30.5t-0.5 -20.5q0 -16 -1 -29t-6 -41t-14 -50t-28.5 -48t-46 -43.5t-69 -29.5t-95.5 -12q-55 0 -98 7t-73 18.5t-52.5 31.5t-36.5 41 t-23 52t-13.5 59.5t-7.5 67.5z"
android:fillAlpha=".3"/>
</group>
</vector>
Can any one help here. the output is required to be as below. thanks
Solution
Try this ,
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="3730dp"
android:height="1220dp"
android:viewportWidth="3730"
android:viewportHeight="1220">
<path
android:fillColor="#ed7d31"
android:strokeWidth="1"
android:pathData="M1716 1167 c-14 -15 -26 -34 -26 -44 0 -10 61 -90 135 -178 111 -132 135 -166 135
-192 0 -75 -71 -523 -100 -622 -13 -45 -3 -55 66 -70 108 -25 193 10 213 87 5 20
15 93 21 162 6 69 15 141 19 160 l7 34 93 -129 c52 -72 109 -150 127 -175 48 -66
114 -127 156 -145 59 -24 177 -16 212 16 4 4 -29 52 -74 106 -46 54 -159 196 -251
315 -168 216 -239 287 -321 323 l-33 14 33 1 c19 0 32 5 32 13 0 22 -219 286 -261
314 -29 19 -58 28 -99 31 -53 4 -61 2 -84 -21z" />
<path
android:fillColor="#000000"
android:strokeWidth="1"
android:pathData="M1052 881 c-87 -31 -117 -60 -108 -106 4 -16 43 -136 87 -265 90 -261 120 -317 208
-387 87 -68 150 -83 342 -83 121 0 161 3 165 13 7 18 -22 95 -51 137 -38 54 -73 70
-177 79 -102 8 -148 27 -175 68 -10 15 -59 149 -109 297 -50 148 -95 271 -100 272
-5 0 -42 -11 -82 -25z" />
<path
android:fillColor="#000000"
android:strokeWidth="1"
android:pathData="M2660 896 c-19 -7 -36 -19 -37 -27 -1 -8 92 -99 207 -204 115 -104 210 -193 210
-197 0 -3 -32 -84 -70 -180 -39 -95 -69 -182 -68 -193 4 -25 62 -43 141 -44 96 -1
140 34 192 156 l27 62 110 -99 c119 -108 154 -126 240 -118 26 3 58 12 72 22 47 30
35 55 -76 156 -57 52 -139 127 -182 168 l-79 74 73 180 74 181 -32 28 c-58 52 -165
65 -222 27 -27 -18 -42 -43 -73 -120 l-39 -97 -101 90 c-124 110 -197 149 -276 148
-31 0 -72 -6 -91 -13z" />
<path
android:fillColor="#000000"
android:strokeWidth="1"
android:pathData="M223 875 c-72 -16 -97 -28 -136 -64 -45 -41 -57 -73 -57 -151 0 -231 132 -460 319
-553 179 -90 445 -89 544 1 78 70 90 183 37 342 -47 139 -85 206 -165 286 -78 79
-147 117 -253 140 -83 17 -207 17 -289 -1z m311 -226 c37 -13 67 -34 89 -60 62 -72
102 -217 75 -269 -45 -86 -236 -77 -324 15 -65 67 -111 229 -82 285 27 51 147 65
242 29z" />
<path
android:fillColor="#ffffff"
android:strokeWidth="1"
android:pathData="M0 610 l0 -610 1865 0 1865 0 0 610 0 610 -1865 0 -1865 0 0 -610z m1878 539 c33
-17 69 -53 153 -158 l109 -136 -50 -3 c-66 -4 -65 -24 3 -45 97 -31 162 -91 324
-300 81 -106 192 -245 245 -309 l97 -116 -31 -11 c-45 -16 -123 -14 -166 5 -56 23
-92 63 -223 244 -160 221 -156 217 -168 205 -5 -5 -17 -82 -26 -170 -9 -88 -19
-175 -21 -194 -11 -73 -89 -105 -198 -80 -42 9 -55 16 -51 26 20 54 91 475 100 594
l6 84 -135 160 c-75 88 -136 168 -136 177 0 50 90 65 168 27z m-672 -491 c88 -267
112 -324 145 -355 37 -33 92 -53 151 -53 119 -1 173 -34 208 -127 11 -30 20 -56 20
-58 0 -3 -69 -5 -154 -5 -179 0 -244 15 -325 74 -80 59 -111 118 -200 376 -94 275
-96 283 -83 307 6 10 43 30 84 44 40 15 74 27 75 28 1 0 36 -104 79 -231z m1660
202 c32 -16 103 -68 157 -115 54 -48 104 -85 111 -82 8 3 31 49 52 102 29 75 44
100 65 111 51 26 153 13 200 -25 l23 -18 -75 -182 -74 -183 52 -46 c164 -148 323
-296 323 -301 -1 -27 -52 -51 -108 -51 -74 0 -108 18 -216 115 -57 52 -109 95 -115
95 -6 0 -29 -39 -52 -86 -50 -104 -76 -124 -164 -123 -33 0 -77 6 -97 12 l-37 12
75 184 c41 101 74 186 74 190 0 3 -95 94 -212 201 l-211 194 29 13 c54 23 135 16
200 -17z m-2354 -4 c101 -22 175 -62 243 -130 70 -70 110 -142 155 -276 63 -188 37
-305 -78 -358 -45 -20 -77 -26 -158 -30 -255 -11 -450 95 -551 300 -49 98 -73 199
-73 301 0 84 20 127 77 159 75 44 259 60 385 34z" />
<path
android:fillColor="#ffffff"
android:strokeWidth="1"
android:pathData="M344 679 c-53 -15 -79 -53 -78 -112 1 -140 92 -278 203 -311 102 -30 180 -17 231
39 20 21 25 37 25 79 -2 123 -88 257 -191 295 -57 22 -136 26 -190 10z" />
</vector>
Answered By - Kamil Ibadov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.