Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y index includes "NaN" value #12

Open
tkgka opened this issue Apr 29, 2022 · 2 comments
Open

Y index includes "NaN" value #12

tkgka opened this issue Apr 29, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tkgka
Copy link

tkgka commented Apr 29, 2022

Sample SVG:

<svg id="svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="564.2679900744417" viewBox="0, 0, 400,564.2679900744417">
  <g id="svgg">
    <path id="path0" d="M259.712 14.780 C 259.314 15.033,259.133 17.054,259.146 21.100 C 259.173 29.843,258.736 32.504,256.917 34.671 C 254.208 37.897,249.421 42.680,248.898 42.683 C 247.378 42.691,244.436 43.907,242.180 45.459 C 237.135 48.929,232.588 49.470,227.576 47.197 C 222.974 45.110,220.721 44.828,218.917 46.112 C 216.538 47.806,211.240 47.439,210.745 45.546 C 210.461 44.460,210.396 44.466,206.452 45.918 C 203.193 47.117,199.648 47.328,196.529 46.510 C 193.177 45.630,191.624 46.074,189.831 48.425 C 187.958 50.881,185.696 50.796,182.134 48.139 C 180.528 46.941,178.928 46.154,178.099 46.154 C 176.194 46.154,171.564 47.158,170.993 47.696 C 170.252 48.392,166.959 48.215,164.831 47.363 C 163.004 46.632,162.782 46.647,160.982 47.611 C 158.722 48.823,157.178 48.916,156.328 47.891 C 155.457 46.842,154.466 46.966,154.084 48.172 C 153.905 48.735,153.101 49.946,152.297 50.862 C 151.424 51.856,151.042 52.654,151.348 52.843 C 151.630 53.018,151.861 54.026,151.861 55.085 C 151.861 56.974,151.891 57.005,153.474 56.775 C 154.361 56.645,155.321 56.715,155.606 56.930 C 156.232 57.400,158.809 63.308,158.809 64.273 C 158.809 64.649,159.346 65.582,160.003 66.345 L 161.196 67.733 162.287 66.746 C 162.886 66.203,163.695 65.144,164.083 64.393 C 164.648 63.300,165.135 63.027,166.514 63.027 L 168.238 63.027 168.238 66.021 C 168.238 68.223,168.042 69.089,167.494 69.299 C 166.221 69.788,166.671 70.412,168.550 70.764 C 169.709 70.982,170.438 71.432,170.593 72.028 C 170.874 73.100,172.208 73.290,172.208 72.257 C 172.208 71.261,174.868 70.471,178.225 70.471 C 181.829 70.471,182.267 71.143,183.051 77.878 C 183.678 83.263,183.763 83.357,187.978 83.367 C 191.312 83.375,192.549 84.525,191.791 86.914 C 191.533 87.726,191.775 87.841,193.727 87.841 L 195.958 87.841 196.987 90.589 C 198.755 95.317,198.330 96.531,193.717 99.920 C 190.571 102.231,190.367 102.550,189.833 105.994 C 189.599 107.509,189.715 108.180,190.293 108.661 C 191.548 109.702,191.279 112.402,189.826 113.354 C 188.137 114.461,188.263 114.882,190.447 115.421 C 192.242 115.865,192.303 115.951,192.181 117.866 C 191.903 122.237,191.757 123.362,191.359 124.215 C 190.797 125.422,191.217 125.713,192.966 125.329 C 193.834 125.138,194.544 124.609,194.692 124.041 C 195.279 121.797,198.411 122.758,201.973 126.275 L 205.211 129.473 209.677 130.070 C 213.267 130.550,214.339 130.890,215.136 131.806 C 215.682 132.433,216.665 133.014,217.319 133.098 C 220.495 133.505,219.739 137.469,216.485 137.469 C 214.967 137.469,214.249 137.817,212.903 139.206 C 211.802 140.342,211.479 140.943,211.969 140.943 C 215.791 140.943,216.164 146.002,212.901 153.581 C 210.323 159.570,209.910 162.248,211.197 164.638 C 212.113 166.339,212.111 166.371,210.809 169.990 L 209.500 173.631 210.405 176.021 C 211.872 179.897,215.654 181.137,219.589 179.031 C 220.127 178.743,221.552 178.545,222.756 178.590 C 226.294 178.724,227.411 176.288,225.504 172.599 C 224.667 170.980,225.425 169.792,227.806 168.992 C 228.224 168.852,228.819 168.066,229.128 167.247 C 230.168 164.492,234.357 165.912,235.234 169.317 C 236.474 174.126,236.757 174.690,237.930 174.690 C 240.125 174.690,242.133 173.617,243.143 171.904 C 244.138 170.219,244.179 170.203,245.601 170.938 C 246.868 171.594,247.121 171.596,247.649 170.961 C 247.980 170.562,249.018 169.761,249.956 169.181 L 251.662 168.127 254.622 169.954 C 257.378 171.655,257.767 171.759,260.245 171.449 C 263.047 171.099,263.200 171.180,263.699 173.273 C 263.981 174.455,263.717 174.776,261.043 176.499 C 257.831 178.568,257.707 178.738,258.773 179.623 C 259.328 180.084,259.840 180.022,261.131 179.339 C 264.379 177.621,269.720 178.353,270.210 180.584 C 270.964 184.018,273.969 184.890,277.979 182.838 C 279.139 182.245,279.381 182.278,280.158 183.137 C 281.802 184.953,286.232 187.097,288.341 187.097 C 289.690 187.097,291.635 187.746,294.293 189.082 C 296.464 190.174,298.791 191.067,299.463 191.067 C 300.136 191.067,300.824 191.290,300.993 191.563 C 301.540 192.450,302.309 192.087,301.993 191.091 C 301.598 189.847,302.522 186.398,303.458 185.621 C 304.859 184.459,310.174 187.079,310.174 188.933 C 310.174 191.343,315.373 190.232,315.903 187.708 C 316.550 184.631,317.950 183.953,320.831 185.321 C 321.739 185.752,323.491 186.104,324.723 186.104 C 325.956 186.104,327.039 186.293,327.130 186.524 C 327.575 187.652,330.025 187.620,330.032 186.486 C 330.052 183.619,334.487 182.898,336.794 185.387 C 337.412 186.055,338.208 186.601,338.562 186.602 C 338.916 186.603,339.645 187.259,340.182 188.060 C 342.013 190.794,345.409 191.082,345.409 188.504 C 345.409 186.829,348.406 182.073,350.012 181.200 C 350.825 180.758,352.108 179.895,352.864 179.280 C 353.619 178.666,354.583 178.164,355.005 178.164 C 356.178 178.164,356.348 177.486,355.558 175.962 C 355.156 175.188,354.839 173.217,354.839 171.496 C 354.839 168.020,353.676 163.907,352.367 162.751 C 351.886 162.327,351.342 161.503,351.157 160.921 C 350.944 160.250,350.330 159.806,349.480 159.708 C 348.486 159.593,348.094 159.236,347.966 158.327 C 347.871 157.652,347.480 156.653,347.097 156.107 C 346.715 155.561,346.402 154.606,346.402 153.984 C 346.402 153.264,345.320 151.772,343.424 149.876 C 340.917 147.369,340.447 146.623,340.447 145.158 C 340.447 143.477,339.975 142.815,337.369 140.839 C 335.804 139.652,333.499 134.531,333.499 132.241 C 333.499 130.634,333.280 130.019,332.630 129.805 C 331.532 129.443,328.994 127.176,327.891 125.572 C 327.311 124.728,327.047 123.344,327.047 121.140 L 327.047 117.936 320.678 111.697 C 317.174 108.266,313.437 104.342,312.373 102.978 C 311.309 101.613,309.603 99.522,308.581 98.331 C 307.559 97.140,306.591 95.465,306.429 94.609 C 306.229 93.554,305.507 92.602,304.185 91.656 C 301.600 89.805,300.001 87.632,298.496 83.928 C 297.813 82.247,295.725 78.922,293.857 76.540 C 287.859 68.893,286.737 67.047,286.569 64.555 C 286.459 62.922,286.128 62.091,285.392 61.602 C 284.714 61.152,284.367 60.387,284.367 59.344 C 284.367 58.264,283.674 56.815,282.170 54.747 C 280.578 52.560,279.827 50.942,279.446 48.880 C 278.896 45.904,277.547 43.389,273.689 38.149 C 271.594 35.303,271.400 34.808,271.585 32.768 C 271.759 30.844,271.554 30.195,270.156 28.248 C 269.209 26.927,268.386 25.055,268.194 23.781 C 267.414 18.605,262.274 13.150,259.712 14.780 " stroke="none" fill="#000000" fill-rule="evenodd"></path>
  </g>
</svg>

Return value:

struct MyCustomShape: Shape {
    func path(in rect: CGRect) -> Path {
        var path = Path()
        let width = rect.size.width
        let height = rect.size.height
        path.move(to: CGPoint(x: 0.64928*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.64787*width, y: NaN*height), control1: CGPoint(x: 0.64829*width, y: NaN*height), control2: CGPoint(x: 0.64783*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.64229*width, y: NaN*height), control1: CGPoint(x: 0.64793*width, y: NaN*height), control2: CGPoint(x: 0.64684*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.62224*width, y: NaN*height), control1: CGPoint(x: 0.63552*width, y: NaN*height), control2: CGPoint(x: 0.62355*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.60545*width, y: NaN*height), control1: CGPoint(x: 0.61844*width, y: NaN*height), control2: CGPoint(x: 0.61109*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.56894*width, y: NaN*height), control1: CGPoint(x: 0.59284*width, y: NaN*height), control2: CGPoint(x: 0.58147*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.54729*width, y: NaN*height), control1: CGPoint(x: 0.55744*width, y: NaN*height), control2: CGPoint(x: 0.5518*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.52686*width, y: NaN*height), control1: CGPoint(x: 0.54135*width, y: NaN*height), control2: CGPoint(x: 0.5281*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.51613*width, y: NaN*height), control1: CGPoint(x: 0.52615*width, y: NaN*height), control2: CGPoint(x: 0.52599*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.49132*width, y: NaN*height), control1: CGPoint(x: 0.50798*width, y: NaN*height), control2: CGPoint(x: 0.49912*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.47458*width, y: NaN*height), control1: CGPoint(x: 0.48294*width, y: NaN*height), control2: CGPoint(x: 0.47906*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.45533*width, y: NaN*height), control1: CGPoint(x: 0.4699*width, y: NaN*height), control2: CGPoint(x: 0.46424*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.44525*width, y: NaN*height), control1: CGPoint(x: 0.45132*width, y: NaN*height), control2: CGPoint(x: 0.44732*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.42748*width, y: NaN*height), control1: CGPoint(x: 0.44048*width, y: NaN*height), control2: CGPoint(x: 0.42891*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.41208*width, y: NaN*height), control1: CGPoint(x: 0.42563*width, y: NaN*height), control2: CGPoint(x: 0.4174*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.40246*width, y: NaN*height), control1: CGPoint(x: 0.40751*width, y: NaN*height), control2: CGPoint(x: 0.40696*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.39082*width, y: NaN*height), control1: CGPoint(x: 0.39681*width, y: NaN*height), control2: CGPoint(x: 0.39294*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.38521*width, y: NaN*height), control1: CGPoint(x: 0.38864*width, y: NaN*height), control2: CGPoint(x: 0.38617*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.38074*width, y: NaN*height), control1: CGPoint(x: 0.38476*width, y: NaN*height), control2: CGPoint(x: 0.38275*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.37837*width, y: NaN*height), control1: CGPoint(x: 0.37856*width, y: NaN*height), control2: CGPoint(x: 0.37761*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.37965*width, y: NaN*height), control1: CGPoint(x: 0.37907*width, y: NaN*height), control2: CGPoint(x: 0.37965*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.38368*width, y: NaN*height), control1: CGPoint(x: 0.37965*width, y: NaN*height), control2: CGPoint(x: 0.37973*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.38901*width, y: NaN*height), control1: CGPoint(x: 0.3859*width, y: NaN*height), control2: CGPoint(x: 0.3883*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.39702*width, y: NaN*height), control1: CGPoint(x: 0.39058*width, y: NaN*height), control2: CGPoint(x: 0.39702*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.40001*width, y: NaN*height), control1: CGPoint(x: 0.39702*width, y: NaN*height), control2: CGPoint(x: 0.39837*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.40299*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.40572*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.41021*width, y: NaN*height), control1: CGPoint(x: 0.40721*width, y: NaN*height), control2: CGPoint(x: 0.40924*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.41629*width, y: NaN*height), control1: CGPoint(x: 0.41162*width, y: NaN*height), control2: CGPoint(x: 0.41284*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.42059*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.42059*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.41874*width, y: NaN*height), control1: CGPoint(x: 0.42059*width, y: NaN*height), control2: CGPoint(x: 0.42011*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.42138*width, y: NaN*height), control1: CGPoint(x: 0.41555*width, y: NaN*height), control2: CGPoint(x: 0.41668*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.42648*width, y: NaN*height), control1: CGPoint(x: 0.42427*width, y: NaN*height), control2: CGPoint(x: 0.42609*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.43052*width, y: NaN*height), control1: CGPoint(x: 0.42718*width, y: NaN*height), control2: CGPoint(x: 0.43052*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.44556*width, y: NaN*height), control1: CGPoint(x: 0.43052*width, y: NaN*height), control2: CGPoint(x: 0.43717*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.45763*width, y: NaN*height), control1: CGPoint(x: 0.45457*width, y: NaN*height), control2: CGPoint(x: 0.45567*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.46995*width, y: NaN*height), control1: CGPoint(x: 0.4592*width, y: NaN*height), control2: CGPoint(x: 0.45941*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.47948*width, y: NaN*height), control1: CGPoint(x: 0.47828*width, y: NaN*height), control2: CGPoint(x: 0.48137*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.48432*width, y: NaN*height), control1: CGPoint(x: 0.47883*width, y: NaN*height), control2: CGPoint(x: 0.47944*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.48989*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.49247*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.48429*width, y: NaN*height), control1: CGPoint(x: 0.49689*width, y: NaN*height), control2: CGPoint(x: 0.49583*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.47458*width, y: NaN*height), control1: CGPoint(x: 0.47643*width, y: NaN*height), control2: CGPoint(x: 0.47592*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.47573*width, y: NaN*height), control1: CGPoint(x: 0.474*width, y: NaN*height), control2: CGPoint(x: 0.47429*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.47456*width, y: NaN*height), control1: CGPoint(x: 0.47887*width, y: NaN*height), control2: CGPoint(x: 0.4782*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.47612*width, y: NaN*height), control1: CGPoint(x: 0.47034*width, y: NaN*height), control2: CGPoint(x: 0.47066*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.48045*width, y: NaN*height), control1: CGPoint(x: 0.4806*width, y: NaN*height), control2: CGPoint(x: 0.48076*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.4784*width, y: NaN*height), control1: CGPoint(x: 0.47976*width, y: NaN*height), control2: CGPoint(x: 0.47939*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.48242*width, y: NaN*height), control1: CGPoint(x: 0.47699*width, y: NaN*height), control2: CGPoint(x: 0.47804*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.48673*width, y: NaN*height), control1: CGPoint(x: 0.48458*width, y: NaN*height), control2: CGPoint(x: 0.48636*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.50493*width, y: NaN*height), control1: CGPoint(x: 0.4882*width, y: NaN*height), control2: CGPoint(x: 0.49603*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.51303*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.52419*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.53784*width, y: NaN*height), control1: CGPoint(x: 0.53317*width, y: NaN*height), control2: CGPoint(x: 0.53585*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.5433*width, y: NaN*height), control1: CGPoint(x: 0.5392*width, y: NaN*height), control2: CGPoint(x: 0.54166*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.54121*width, y: NaN*height), control1: CGPoint(x: 0.55124*width, y: NaN*height), control2: CGPoint(x: 0.54935*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.53226*width, y: NaN*height), control1: CGPoint(x: 0.53742*width, y: NaN*height), control2: CGPoint(x: 0.53562*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.52992*width, y: NaN*height), control1: CGPoint(x: 0.52951*width, y: NaN*height), control2: CGPoint(x: 0.5287*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.53225*width, y: NaN*height), control1: CGPoint(x: 0.53948*width, y: NaN*height), control2: CGPoint(x: 0.54041*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.52799*width, y: NaN*height), control1: CGPoint(x: 0.52581*width, y: NaN*height), control2: CGPoint(x: 0.52477*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.52702*width, y: NaN*height), control1: CGPoint(x: 0.53028*width, y: NaN*height), control2: CGPoint(x: 0.53028*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.52375*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.52601*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.54897*width, y: NaN*height), control1: CGPoint(x: 0.52968*width, y: NaN*height), control2: CGPoint(x: 0.53914*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.55689*width, y: NaN*height), control1: CGPoint(x: 0.55032*width, y: NaN*height), control2: CGPoint(x: 0.55388*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.56376*width, y: NaN*height), control1: CGPoint(x: 0.56573*width, y: NaN*height), control2: CGPoint(x: 0.56853*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.56951*width, y: NaN*height), control1: CGPoint(x: 0.56167*width, y: NaN*height), control2: CGPoint(x: 0.56356*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.57282*width, y: NaN*height), control1: CGPoint(x: 0.57056*width, y: NaN*height), control2: CGPoint(x: 0.57205*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.58808*width, y: NaN*height), control1: CGPoint(x: 0.57542*width, y: NaN*height), control2: CGPoint(x: 0.58589*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.59483*width, y: NaN*height), control1: CGPoint(x: 0.59118*width, y: NaN*height), control2: CGPoint(x: 0.59189*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.60786*width, y: NaN*height), control1: CGPoint(x: 0.60031*width, y: NaN*height), control2: CGPoint(x: 0.60533*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.614*width, y: NaN*height), control1: CGPoint(x: 0.61035*width, y: NaN*height), control2: CGPoint(x: 0.61045*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.61912*width, y: NaN*height), control1: CGPoint(x: 0.61717*width, y: NaN*height), control2: CGPoint(x: 0.6178*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.62489*width, y: NaN*height), control1: CGPoint(x: 0.61995*width, y: NaN*height), control2: CGPoint(x: 0.62255*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.62916*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.63655*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.65061*width, y: NaN*height), control1: CGPoint(x: 0.64344*width, y: NaN*height), control2: CGPoint(x: 0.64442*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.65925*width, y: NaN*height), control1: CGPoint(x: 0.65762*width, y: NaN*height), control2: CGPoint(x: 0.658*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.65261*width, y: NaN*height), control1: CGPoint(x: 0.65995*width, y: NaN*height), control2: CGPoint(x: 0.65929*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.64693*width, y: NaN*height), control1: CGPoint(x: 0.64458*width, y: NaN*height), control2: CGPoint(x: 0.64427*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.65283*width, y: NaN*height), control1: CGPoint(x: 0.64832*width, y: NaN*height), control2: CGPoint(x: 0.6496*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.67552*width, y: NaN*height), control1: CGPoint(x: 0.66095*width, y: NaN*height), control2: CGPoint(x: 0.6743*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.69495*width, y: NaN*height), control1: CGPoint(x: 0.67741*width, y: NaN*height), control2: CGPoint(x: 0.68492*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.70039*width, y: NaN*height), control1: CGPoint(x: 0.69785*width, y: NaN*height), control2: CGPoint(x: 0.69845*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.72085*width, y: NaN*height), control1: CGPoint(x: 0.70451*width, y: NaN*height), control2: CGPoint(x: 0.71558*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.73573*width, y: NaN*height), control1: CGPoint(x: 0.72423*width, y: NaN*height), control2: CGPoint(x: 0.72909*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.74866*width, y: NaN*height), control1: CGPoint(x: 0.74116*width, y: NaN*height), control2: CGPoint(x: 0.74698*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.75248*width, y: NaN*height), control1: CGPoint(x: 0.75034*width, y: NaN*height), control2: CGPoint(x: 0.75206*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.75498*width, y: NaN*height), control1: CGPoint(x: 0.75385*width, y: NaN*height), control2: CGPoint(x: 0.75577*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.75865*width, y: NaN*height), control1: CGPoint(x: 0.754*width, y: NaN*height), control2: CGPoint(x: 0.75631*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.77543*width, y: NaN*height), control1: CGPoint(x: 0.76215*width, y: NaN*height), control2: CGPoint(x: 0.77543*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.78976*width, y: NaN*height), control1: CGPoint(x: 0.77543*width, y: NaN*height), control2: CGPoint(x: 0.78843*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.80208*width, y: NaN*height), control1: CGPoint(x: 0.79138*width, y: NaN*height), control2: CGPoint(x: 0.79487*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.81181*width, y: NaN*height), control1: CGPoint(x: 0.80435*width, y: NaN*height), control2: CGPoint(x: 0.80873*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.81783*width, y: NaN*height), control1: CGPoint(x: 0.81489*width, y: NaN*height), control2: CGPoint(x: 0.8176*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.82508*width, y: NaN*height), control1: CGPoint(x: 0.81894*width, y: NaN*height), control2: CGPoint(x: 0.82506*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.84198*width, y: NaN*height), control1: CGPoint(x: 0.82513*width, y: NaN*height), control2: CGPoint(x: 0.83622*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.84641*width, y: NaN*height), control1: CGPoint(x: 0.84353*width, y: NaN*height), control2: CGPoint(x: 0.84552*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.85046*width, y: NaN*height), control1: CGPoint(x: 0.84729*width, y: NaN*height), control2: CGPoint(x: 0.84911*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.86352*width, y: NaN*height), control1: CGPoint(x: 0.85503*width, y: NaN*height), control2: CGPoint(x: 0.86352*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.87503*width, y: NaN*height), control1: CGPoint(x: 0.86352*width, y: NaN*height), control2: CGPoint(x: 0.87101*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.88216*width, y: NaN*height), control1: CGPoint(x: 0.87706*width, y: NaN*height), control2: CGPoint(x: 0.88027*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.88751*width, y: NaN*height), control1: CGPoint(x: 0.88405*width, y: NaN*height), control2: CGPoint(x: 0.88646*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.88889*width, y: NaN*height), control1: CGPoint(x: 0.89045*width, y: NaN*height), control2: CGPoint(x: 0.89087*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.8871*width, y: NaN*height), control1: CGPoint(x: 0.88789*width, y: NaN*height), control2: CGPoint(x: 0.8871*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.88092*width, y: NaN*height), control1: CGPoint(x: 0.8871*width, y: NaN*height), control2: CGPoint(x: 0.88419*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.87789*width, y: NaN*height), control1: CGPoint(x: 0.87972*width, y: NaN*height), control2: CGPoint(x: 0.87835*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.8737*width, y: NaN*height), control1: CGPoint(x: 0.87736*width, y: NaN*height), control2: CGPoint(x: 0.87582*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.86991*width, y: NaN*height), control1: CGPoint(x: 0.87121*width, y: NaN*height), control2: CGPoint(x: 0.87023*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.86774*width, y: NaN*height), control1: CGPoint(x: 0.86968*width, y: NaN*height), control2: CGPoint(x: 0.8687*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.866*width, y: NaN*height), control1: CGPoint(x: 0.86679*width, y: NaN*height), control2: CGPoint(x: 0.866*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.85856*width, y: NaN*height), control1: CGPoint(x: 0.866*width, y: NaN*height), control2: CGPoint(x: 0.8633*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.85112*width, y: NaN*height), control1: CGPoint(x: 0.85229*width, y: NaN*height), control2: CGPoint(x: 0.85112*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.84342*width, y: NaN*height), control1: CGPoint(x: 0.85112*width, y: NaN*height), control2: CGPoint(x: 0.84994*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.83375*width, y: NaN*height), control1: CGPoint(x: 0.83951*width, y: NaN*height), control2: CGPoint(x: 0.83375*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.83157*width, y: NaN*height), control1: CGPoint(x: 0.83375*width, y: NaN*height), control2: CGPoint(x: 0.8332*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.81973*width, y: NaN*height), control1: CGPoint(x: 0.82883*width, y: NaN*height), control2: CGPoint(x: 0.82249*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.81762*width, y: NaN*height), control1: CGPoint(x: 0.81828*width, y: NaN*height), control2: CGPoint(x: 0.81762*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.81762*width, y: NaN*height))
        path.addLine(to: CGPoint(x: 0.8017*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.78093*width, y: NaN*height), control1: CGPoint(x: 0.79293*width, y: NaN*height), control2: CGPoint(x: 0.78359*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.77145*width, y: NaN*height), control1: CGPoint(x: 0.77827*width, y: NaN*height), control2: CGPoint(x: 0.77401*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.76607*width, y: NaN*height), control1: CGPoint(x: 0.7689*width, y: NaN*height), control2: CGPoint(x: 0.76648*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.76046*width, y: NaN*height), control1: CGPoint(x: 0.76557*width, y: NaN*height), control2: CGPoint(x: 0.76377*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.74624*width, y: NaN*height), control1: CGPoint(x: 0.754*width, y: NaN*height), control2: CGPoint(x: 0.75*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.73464*width, y: NaN*height), control1: CGPoint(x: 0.74453*width, y: NaN*height), control2: CGPoint(x: 0.73931*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.71642*width, y: NaN*height), control1: CGPoint(x: 0.71965*width, y: NaN*height), control2: CGPoint(x: 0.71684*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.71348*width, y: NaN*height), control1: CGPoint(x: 0.71615*width, y: NaN*height), control2: CGPoint(x: 0.71532*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.71092*width, y: NaN*height), control1: CGPoint(x: 0.71179*width, y: NaN*height), control2: CGPoint(x: 0.71092*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.70543*width, y: NaN*height), control1: CGPoint(x: 0.71092*width, y: NaN*height), control2: CGPoint(x: 0.70918*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.69862*width, y: NaN*height), control1: CGPoint(x: 0.70144*width, y: NaN*height), control2: CGPoint(x: 0.69957*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.68422*width, y: NaN*height), control1: CGPoint(x: 0.69724*width, y: NaN*height), control2: CGPoint(x: 0.69387*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.67896*width, y: NaN*height), control1: CGPoint(x: 0.67898*width, y: NaN*height), control2: CGPoint(x: 0.6785*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.67539*width, y: NaN*height), control1: CGPoint(x: 0.6794*width, y: NaN*height), control2: CGPoint(x: 0.67888*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.67048*width, y: NaN*height), control1: CGPoint(x: 0.67302*width, y: NaN*height), control2: CGPoint(x: 0.67097*width, y: NaN*height))
        path.addCurve(to: CGPoint(x: 0.64928*width, y: NaN*height), control1: CGPoint(x: 0.66853*width, y: NaN*height), control2: CGPoint(x: 0.65568*width, y: NaN*height))
        return path
    }
}

because of the NaN, Xcode returns error

@tkgka tkgka changed the title Y index includ"NaN" Y index includes "NaN" value Apr 29, 2022
@bring-shrubbery bring-shrubbery added the bug Something isn't working label Apr 29, 2022
@bring-shrubbery bring-shrubbery self-assigned this Apr 29, 2022
@bring-shrubbery
Copy link
Owner

@tkgka This is most likely due to improper handling of absolute/relative coordinates on our part. Will take a look at this as soon as possible :)

@tkgka
Copy link
Author

tkgka commented May 2, 2022

thank you so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants