I am seeing a weird fill behavior on some of the Path
s I am drawing to a Canvas
in Android. When the Path
has a stroke and a fill (Paint
style Paint.Style.FILL_AND_STROKE
) and the Path
is sharply curved, the Path
s stroke renders correctly but the fill only fills a portion of the total path. See image below...
To validate that it's an Android Canvas
rendering issue and not my Path
creation I have exported an svg based on the same Path
s and it does not have the same fill issues.
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="2" viewBox="0 0 3588 1782"><path fill="#000000" stroke="#000000" stroke-width="3.0" stroke-linecap="round" stroke-linejoin="round" d="M1092,1192C1087,1195,1091,1195,1072,1200L1081,1180C1082,1185,1096,1185,1092,1192ZM1072,1200C1062,1199,1048,1199,1030,1190L1039,1170C1057,1172,1071,1179,1081,1180ZM1030,1190C1011,1184,991,1174,962,1154L971,1144C1001,1157,1021,1164,1039,1170ZM962,1154C932,1137,900,1112,873,1020L882,1011C909,1103,941,1127,971,1144ZM873,1020C845,928,872,760,925,624L934,633C881,769,855,918,882,1011ZM925,624C978,488,1038,413,1102,364L1111,373C1047,422,988,497,934,633ZM1102,364C1165,315,1217,312,1252,418L1243,428C1226,321,1174,325,1111,373ZM1252,418C1278,525,1243,752,1198,979L1189,970C1233,743,1269,534,1243,428ZM1198,979C1154,1205,1139,1388,1157,1432L1148,1441C1130,1379,1145,1196,1189,970ZM1157,1432C1174,1486,1270,1468,1374,1354L1383,1363C1280,1477,1165,1495,1148,1441ZM1374,1354C1478,1240,1484,1155,1467,1141L1478,1131C1493,1164,1487,1250,1383,1363ZM1467,1141C1450,1117,1370,1253,1329,1415L1319,1406C1361,1244,1462,1108,1478,1131ZM1329,1415C1287,1577,1310,1637,1393,1639L1384,1648C1301,1646,1278,1568,1319,1406ZM1393,1639C1476,1641,1540,1544,1550,1442L1559,1451C1549,1553,1467,1650,1384,1648ZM1550,1442C1560,1340,1554,1311,1547,1329L1536,1316C1564,1302,1569,1350,1559,1451ZM1547,1329C1529,1344,1508,1394,1519,1402L1498,1411C1499,1384,1518,1332,1536,1316ZM1519,1402C1524,1420,1548,1405,1586,1362L1595,1371C1557,1414,1502,1429,1498,1411ZM1586,1362C1624,1318,1643,1287,1646,1277L1662,1290C1652,1296,1633,1327,1595,1371ZM1646,1277C1653,1270,1667,1275,1673,1284L1654,1294C1657,1284,1668,1282,1662,1290ZM1673,1284C1674,1294,1673,1295,1691,1283L1701,1296C1664,1305,1655,1303,1654,1294ZM1691,1283C1719,1272,1755,1254,1795,1238L1804,1248C1764,1263,1728,1285,1701,1296ZM1795,1238C1836,1223,1881,1207,1933,1162L1942,1171C1890,1216,1845,1232,1804,1248ZM1933,1162C1984,1117,2035,1002,2024,883L2033,874C2044,1012,1994,1126,1942,1171ZM2024,883C2013,755,1951,666,1829,626L1839,617C1961,656,2022,746,2033,874ZM1829,626C1707,586,1602,628,1569,653L1560,644C1593,619,1717,577,1839,617ZM1569,653C1536,678,1576,649,1774,526L1784,535C1585,658,1526,668,1560,644ZM1774,526C1973,402,2113,289,2158,229L2167,238C2123,298,1982,412,1784,535ZM2158,229C2202,169,2106,200,1885,405L1875,396C2096,191,2211,178,2167,238ZM1885,405C1663,610,1543,754,1529,788L1519,779C1534,745,1654,601,1875,396ZM1529,788C1515,823,1668,744,1868,618L1878,628C1677,753,1505,813,1519,779ZM1868,618C2069,493,2157,432,2172,455L2145,446C2166,441,2078,502,1878,628ZM2172,455C2169,469,1981,683,1825,906L1815,897C1971,674,2142,460,2145,446ZM1825,906C1669,1128,1635,1219,1727,1219L1718,1228C1626,1210,1659,1119,1815,897ZM1727,1219C1818,1229,2060,1102,2214,978L2223,987C2069,1111,1809,1238,1718,1228ZM2214,978C2368,855,2415,789,2356,883L2347,874C2424,798,2377,864,2223,987ZM2356,883C2288,968,2168,1241,2138,1433L2129,1424C2159,1232,2278,959,2347,874ZM2138,1433C2108,1626,2166,1660,2323,1521L2332,1530C2157,1669,2099,1617,2129,1424ZM2323,1521C2489,1382,2589,1127,2598,1001L2607,1010C2598,1136,2498,1391,2332,1530ZM2598,1001C2607,875,2598,921,2582,1181L2573,1171C2589,912,2617,884,2607,1010ZM2582,1181C2566,1440,2598,1538,2680,1498L2689,1507C2589,1547,2557,1431,2573,1171ZM2680,1498C2772,1457,2856,1142,2794,760L2803,751C2865,1151,2781,1467,2689,1507ZM2794,760C2733,370,2707,271,2705,370L2696,361C2717,262,2742,360,2803,751ZM2705,370C2693,469,2695,628,2701,695L2701,695C2686,637,2684,460,2696,361ZM3260,322C3246,327,3181,325,3061,372L3051,363C3172,316,3256,309,3260,322ZM3061,372C2940,419,2859,486,2836,515L2827,506C2849,477,2931,409,3051,363ZM2836,515C2813,543,2838,532,2918,483L2927,492C2829,548,2804,534,2827,506ZM2918,483C3007,430,3063,373,3073,357L3089,373C3073,382,3016,439,2927,492ZM3073,357C3086,344,3072,460,3049,642L3040,633C3063,451,3102,360,3089,373ZM3049,642C3026,824,3059,928,3125,951L3116,960C3049,937,3017,815,3040,633ZM3125,951C3191,974,3214,857,3185,732L3194,723C3223,866,3182,983,3116,960ZM3185,732C3156,598,3101,567,3033,694L3024,684C3110,558,3165,589,3194,723ZM3033,694C2956,820,2969,1017,3069,1115L3060,1124C2959,1026,2946,811,3024,684ZM3069,1115C3170,1212,3268,1168,3318,992L3327,1001C3277,1178,3161,1221,3060,1124ZM3318,992C3369,815,3315,680,3187,654L3196,645C3324,671,3378,824,3327,1001ZM3187,654C3060,627,2882,848,2768,1059L2759,1050C2873,839,3069,618,3196,645ZM2768,1059C2654,1270,2637,1331,2731,1255L2740,1264C2627,1322,2645,1261,2759,1050ZM2731,1255C2834,1189,3035,951,3138,766L3147,775C3044,960,2843,1198,2740,1264ZM3138,766C3241,580,3208,536,2850,675L2841,665C3218,527,3250,589,3147,775ZM2850,675C2483,813,2160,1158,2027,1349L2018,1340C2151,1149,2474,803,2841,665ZM2027,1349C1894,1540,1901,1535,2147,1331L2156,1340C1890,1547,1885,1530,2018,1340ZM2147,1331C2404,1125,2783,765,3017,482L3026,491C2792,775,2413,1134,2156,1340ZM3017,482C3252,198,3302,123,3320,125L3309,140C3311,132,3261,207,3026,491Z"/></svg>
Any ideas on why this might be happening?