caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <div height="0" hidden="true"> |
caryclark | 6f726ad | 2014-10-28 10:33:09 -0700 | [diff] [blame] | 4 | <div id="fuzz763_34974"> |
| 5 | RunTestSet [fuzz763_34974] |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 6 | |
caryclark | 6f726ad | 2014-10-28 10:33:09 -0700 | [diff] [blame] | 7 | {{-52.806778,14.1473942}, {-52.8073196,14.1453686}}, |
| 8 | {{-52.8073196,14.1453686}, {-52.8075829,14.1443863}}, |
| 9 | {{-52.8075829,14.1443863}, {-52.8071823,14.1458902}, {-52.806778,14.1473942}}, |
| 10 | {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}}, |
| 11 | {{-41.0792313,5.14750481}, {-38.2160263,6.80086899}, {-37.356041,9.99111366}}, |
| 12 | {{-37.356041,9.99111366}, {-37.3550873,9.99464893}}, |
| 13 | {{-37.3550873,9.99464893}, {-37.3536377,10.000042}, {-37.3521919,10.0054388}}, |
| 14 | {{-37.3521919,10.0054388}, {-37.3521843,10.0054626}}, |
| 15 | {{-37.3521843,10.0054626}, {-37.3518105,10.006875}}, |
| 16 | {{-37.3518105,10.006875}, {-37.3516197,10.0075779}, {-37.351429,10.0082846}}, |
| 17 | {{-37.351429,10.0082846}, {-37.3465042,10.0266895}, {-37.3404655,10.049655}}, |
| 18 | {{-37.3404655,10.049655}, {-36.5053596,13.2268972}, {-38.1512413,16.0773964}}, |
| 19 | {{-38.1512413,16.0773964}, {-39.8082047,18.9470901}, {-43.0090332,19.8046188}}, |
| 20 | {{-43.0090332,19.8046188}, {-46.2098618,20.6621513}, {-49.0795555,19.005188}}, |
| 21 | {{-49.0795555,19.005188}, {-51.9483566,17.3487415}, {-52.8062439,14.1493912}}, |
| 22 | {{-52.8062439,14.1493912}, {-51.9485931,17.3501873}, {-49.0788383,19.0070419}}, |
| 23 | {{-49.0788383,19.0070419}, {-46.2090836,20.6638966}, {-43.0082855,19.8062439}}, |
| 24 | {{-43.0082855,19.8062439}, {-39.8074875,18.948595}, {-38.1506348,16.0788383}}, |
| 25 | {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}}, |
| 26 | {{-52.8077469,14.1437778}, {-53.6643143,10.9437943}, {-52.0076561,8.07487679}}, |
| 27 | {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}}, |
caryclark | 19eb3b2 | 2014-07-18 05:08:14 -0700 | [diff] [blame] | 28 | op union |
caryclark | 6f726ad | 2014-10-28 10:33:09 -0700 | [diff] [blame] | 29 | {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}}, |
| 30 | {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}}, |
| 31 | {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}}, |
| 32 | {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}}, |
| 33 | {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}}, |
| 34 | {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}}, |
| 35 | {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}}, |
| 36 | {{-43.0097923,19.8029671}, {-46.2106552,20.6603737}, {-49.0802841,19.0032997}}, |
| 37 | debugShowQuadIntersection wtTs[0]=1 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} {{-41.0792313,5.14750481}} wnTs[0]=0 {{-41.0792313,5.14750481}, {-38.2160263,6.80086899}, {-37.356041,9.99111366}} |
| 38 | debugShowQuadIntersection wtTs[0]=0 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} {{-47.1497231,4.34783936}} wnTs[0]=1 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} |
| 39 | debugShowQuadLineIntersection wtTs[0]=1 {{-41.0792313,5.14750481}, {-38.2160263,6.80086899}, {-37.356041,9.99111366}} {{-37.356041,9.99111366}} wnTs[0]=0 {{-37.356041,9.99111366}, {-37.3550873,9.99464893}} |
| 40 | debugShowQuadLineIntersection wtTs[0]=0 {{-37.3550873,9.99464893}, {-37.3536377,10.000042}, {-37.3521919,10.0054388}} {{-37.3550873,9.99464893}} wnTs[0]=1 {{-37.356041,9.99111366}, {-37.3550873,9.99464893}} |
| 41 | debugShowQuadLineIntersection wtTs[0]=1 {{-37.3550873,9.99464893}, {-37.3536377,10.000042}, {-37.3521919,10.0054388}} {{-37.3521919,10.0054388}} wnTs[0]=0 {{-37.3521919,10.0054388}, {-37.3521843,10.0054626}} |
| 42 | debugShowLineIntersection wtTs[0]=1 {{-37.3521919,10.0054388}, {-37.3521843,10.0054626}} {{-37.3521843,10.0054626}} wnTs[0]=0 {{-37.3521843,10.0054626}, {-37.3518105,10.006875}} |
| 43 | debugShowQuadLineIntersection wtTs[0]=0 {{-37.3518105,10.006875}, {-37.3516197,10.0075779}, {-37.351429,10.0082846}} {{-37.3518105,10.006875}} wnTs[0]=1 {{-37.3521843,10.0054626}, {-37.3518105,10.006875}} |
| 44 | debugShowQuadIntersection wtTs[0]=1 {{-37.3518105,10.006875}, {-37.3516197,10.0075779}, {-37.351429,10.0082846}} {{-37.351429,10.0082846}} wnTs[0]=0 {{-37.351429,10.0082846}, {-37.3465042,10.0266895}, {-37.3404655,10.049655}} |
| 45 | debugShowQuadIntersection wtTs[0]=1 {{-37.351429,10.0082846}, {-37.3465042,10.0266895}, {-37.3404655,10.049655}} {{-37.3404655,10.049655}} wnTs[0]=0 {{-37.3404655,10.049655}, {-36.5053596,13.2268972}, {-38.1512413,16.0773964}} |
| 46 | debugShowQuadIntersection wtTs[0]=1 {{-37.3404655,10.049655}, {-36.5053596,13.2268972}, {-38.1512413,16.0773964}} {{-38.1512413,16.0773964}} wnTs[0]=0 {{-38.1512413,16.0773964}, {-39.8082047,18.9470901}, {-43.0090332,19.8046188}} |
| 47 | debugShowQuadLineIntersection no intersect {{-37.3404655,10.049655}, {-36.5053596,13.2268972}, {-38.1512413,16.0773964}} {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 48 | debugShowQuadIntersection wtTs[0]=1 {{-38.1512413,16.0773964}, {-39.8082047,18.9470901}, {-43.0090332,19.8046188}} {{-43.0090332,19.8046188}} wnTs[0]=0 {{-43.0090332,19.8046188}, {-46.2098618,20.6621513}, {-49.0795555,19.005188}} |
| 49 | debugShowQuadIntersection no intersect {{-38.1512413,16.0773964}, {-39.8082047,18.9470901}, {-43.0090332,19.8046188}} {{-49.0788383,19.0070419}, {-46.2090836,20.6638966}, {-43.0082855,19.8062439}} |
| 50 | debugShowQuadIntersection no intersect {{-38.1512413,16.0773964}, {-39.8082047,18.9470901}, {-43.0090332,19.8046188}} {{-43.0082855,19.8062439}, {-39.8074875,18.948595}, {-38.1506348,16.0788383}} |
| 51 | debugShowQuadLineIntersection wtTs[0]=0.000220493714 {{-38.1512413,16.0773964}, {-39.8082047,18.9470901}, {-43.0090332,19.8046188}} {{-38.1519737,16.078661}} wnTs[0]=9.12398e-05 {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 52 | debugShowQuadIntersection wtTs[0]=1 {{-43.0090332,19.8046188}, {-46.2098618,20.6621513}, {-49.0795555,19.005188}} {{-49.0795555,19.005188}} wnTs[0]=0 {{-49.0795555,19.005188}, {-51.9483566,17.3487415}, {-52.8062439,14.1493912}} |
| 53 | debugShowQuadIntersection no intersect {{-43.0090332,19.8046188}, {-46.2098618,20.6621513}, {-49.0795555,19.005188}} {{-52.8062439,14.1493912}, {-51.9485931,17.3501873}, {-49.0788383,19.0070419}} |
| 54 | debugShowQuadIntersection no intersect {{-43.0090332,19.8046188}, {-46.2098618,20.6621513}, {-49.0795555,19.005188}} {{-49.0788383,19.0070419}, {-46.2090836,20.6638966}, {-43.0082855,19.8062439}} |
| 55 | debugShowQuadIntersection wtTs[0]=1 {{-49.0795555,19.005188}, {-51.9483566,17.3487415}, {-52.8062439,14.1493912}} {{-52.8062439,14.1493912}} wnTs[0]=0 {{-52.8062439,14.1493912}, {-51.9485931,17.3501873}, {-49.0788383,19.0070419}} |
| 56 | debugShowQuadLineIntersection no intersect {{-49.0795555,19.005188}, {-51.9483566,17.3487415}, {-52.8062439,14.1493912}} {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 57 | debugShowQuadIntersection wtTs[0]=1 {{-52.8062439,14.1493912}, {-51.9485931,17.3501873}, {-49.0788383,19.0070419}} {{-49.0788383,19.0070419}} wnTs[0]=0 {{-49.0788383,19.0070419}, {-46.2090836,20.6638966}, {-43.0082855,19.8062439}} |
| 58 | debugShowQuadLineIntersection no intersect {{-52.8062439,14.1493912}, {-51.9485931,17.3501873}, {-49.0788383,19.0070419}} {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 59 | debugShowQuadIntersection wtTs[0]=1 {{-49.0788383,19.0070419}, {-46.2090836,20.6638966}, {-43.0082855,19.8062439}} {{-43.0082855,19.8062439}} wnTs[0]=0 {{-43.0082855,19.8062439}, {-39.8074875,18.948595}, {-38.1506348,16.0788383}} |
| 60 | debugShowQuadLineIntersection wtTs[0]=1 {{-43.0082855,19.8062439}, {-39.8074875,18.948595}, {-38.1506348,16.0788383}} {{-38.1506348,16.0788383}} wnTs[0]=0 {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 61 | debugShowQuadLineIntersection wtTs[0]=0 {{-52.8077469,14.1437778}, {-53.6643143,10.9437943}, {-52.0076561,8.07487679}} {{-52.8077469,14.1437778}} wnTs[0]=1 {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 62 | debugShowQuadIntersection wtTs[0]=1 {{-52.8077469,14.1437778}, {-53.6643143,10.9437943}, {-52.0076561,8.07487679}} {{-52.0076561,8.07487679}} wnTs[0]=0 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} |
| 63 | debugShowQuadIntersection wtTs[0]=0 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} {{-47.1497231,4.34783936}} wnTs[0]=1 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} |
| 64 | debugShowQuadIntersection wtTs[0]=0 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} {{-47.1497231,4.34783936}} wtTs[1]=1 {{-41.0792313,5.14750481}} wnTs[0]=0 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} wnTs[1]=1 |
| 65 | debugShowQuadIntersection wtTs[0]=1 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} {{-41.0792313,5.14750481}} wnTs[0]=0 {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}} |
| 66 | debugShowQuadIntersection wtTs[0]=0 {{-41.0792313,5.14750481}, {-38.2160263,6.80086899}, {-37.356041,9.99111366}} {{-41.0792313,5.14750481}} wnTs[0]=1 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} |
| 67 | debugShowQuadIntersection wtTs[0]=0 {{-41.0792313,5.14750481}, {-38.2160263,6.80086899}, {-37.356041,9.99111366}} {{-41.0792313,5.14750481}} wtTs[1]=1 {{-37.356041,9.99111366}} wnTs[0]=0 {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}} wnTs[1]=0.997761104 |
| 68 | debugShowQuadLineIntersection no intersect {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}} {{-37.356041,9.99111366}, {-37.3550873,9.99464893}} |
| 69 | debugShowQuadIntersection wtTs[0]=0 {{-37.3550873,9.99464893}, {-37.3536377,10.000042}, {-37.3521919,10.0054388}} {{-37.3550873,9.99464893}} wtTs[1]=1 {{-37.3521919,10.0054388}} wnTs[0]=0.998314 {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}} wnTs[1]=1 |
| 70 | debugShowQuadIntersection wtTs[0]=1 {{-37.3550873,9.99464893}, {-37.3536377,10.000042}, {-37.3521919,10.0054388}} {{-37.3521919,10.0054388}} wnTs[0]=0 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} |
| 71 | debugShowQuadLineIntersection wtTs[0]=1 {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}} {{-37.3521919,10.0054388}} wnTs[0]=0 {{-37.3521919,10.0054388}, {-37.3521843,10.0054626}} |
| 72 | debugShowQuadLineIntersection wtTs[0]=0 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} {{-37.3521919,10.0054388}} wnTs[0]=0 {{-37.3521919,10.0054388}, {-37.3521843,10.0054626}} |
| 73 | debugShowQuadLineIntersection wtTs[0]=6.52854381e-05 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} {{-37.3520813,10.0058565}} wnTs[0]=0.279027 {{-37.3521843,10.0054626}, {-37.3518105,10.006875}} |
| 74 | debugShowQuadIntersection wtTs[0]=0 {{-37.3518105,10.006875}, {-37.3516197,10.0075779}, {-37.351429,10.0082846}} {{-37.3518105,10.006875}} wtTs[1]=1 {{-37.351429,10.0082846}} wnTs[0]=0.00022423 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} wnTs[1]=0.000444585761 |
| 75 | debugShowQuadIntersection wtTs[0]=0.28665555 {{-37.351429,10.0082846}, {-37.3465042,10.0266895}, {-37.3404655,10.049655}} {{-37.3485146,10.0192108}} wnTs[0]=0.00215162 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} |
| 76 | debugShowQuadIntersection wtTs[0]=0.0019584472 {{-37.3404655,10.049655}, {-36.5053596,13.2268972}, {-38.1512413,16.0773964}} {{-37.337204,10.0620985}} wnTs[0]=0.00885383 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} |
| 77 | debugShowQuadIntersection no intersect {{-38.1512413,16.0773964}, {-39.8082047,18.9470901}, {-43.0090332,19.8046188}} {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}} |
| 78 | debugShowQuadIntersection no intersect {{-43.0090332,19.8046188}, {-46.2098618,20.6621513}, {-49.0795555,19.005188}} {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}} |
| 79 | debugShowQuadIntersection no intersect {{-43.0090332,19.8046188}, {-46.2098618,20.6621513}, {-49.0795555,19.005188}} {{-43.0097923,19.8029671}, {-46.2106552,20.6603737}, {-49.0802841,19.0032997}} |
| 80 | debugShowQuadIntersection no intersect {{-49.0795555,19.005188}, {-51.9483566,17.3487415}, {-52.8062439,14.1493912}} {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} |
| 81 | debugShowQuadIntersection no intersect {{-49.0795555,19.005188}, {-51.9483566,17.3487415}, {-52.8062439,14.1493912}} {{-43.0097923,19.8029671}, {-46.2106552,20.6603737}, {-49.0802841,19.0032997}} |
| 82 | debugShowQuadIntersection no intersect {{-52.8062439,14.1493912}, {-51.9485931,17.3501873}, {-49.0788383,19.0070419}} {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} |
| 83 | debugShowQuadIntersection no intersect {{-52.8062439,14.1493912}, {-51.9485931,17.3501873}, {-49.0788383,19.0070419}} {{-43.0097923,19.8029671}, {-46.2106552,20.6603737}, {-49.0802841,19.0032997}} |
| 84 | debugShowQuadIntersection no intersect {{-49.0788383,19.0070419}, {-46.2090836,20.6638966}, {-43.0082855,19.8062439}} {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}} |
| 85 | debugShowQuadIntersection no intersect {{-49.0788383,19.0070419}, {-46.2090836,20.6638966}, {-43.0082855,19.8062439}} {{-43.0097923,19.8029671}, {-46.2106552,20.6603737}, {-49.0802841,19.0032997}} |
| 86 | debugShowQuadIntersection no intersect {{-43.0082855,19.8062439}, {-39.8074875,18.948595}, {-38.1506348,16.0788383}} {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}} |
| 87 | debugShowQuadLineIntersection no intersect {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 88 | debugShowQuadLineIntersection wtTs[0]=0.000248459946 {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} {{-52.8077469,14.1437778}} wnTs[0]=1 {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 89 | debugShowQuadLineIntersection no intersect {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 90 | debugShowQuadLineIntersection wtTs[0]=0.000444403399 {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}} {{-38.1533356,16.0784817}} wnTs[0]=0.00018431 {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 91 | debugShowQuadIntersection wtTs[0]=0 {{-52.8077469,14.1437778}, {-53.6643143,10.9437943}, {-52.0076561,8.07487679}} {{-52.8077469,14.1437778}} wtTs[1]=1 {{-52.0076561,8.07487679}} wnTs[0]=0.000248538 {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} wnTs[1]=1 |
| 92 | debugShowQuadIntersection wtTs[0]=1 {{-52.8077469,14.1437778}, {-53.6643143,10.9437943}, {-52.0076561,8.07487679}} {{-52.0076561,8.07487679}} wnTs[0]=0 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} |
| 93 | debugShowQuadIntersection wtTs[0]=0 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} {{-52.0076561,8.07487679}} wnTs[0]=1 {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} |
| 94 | debugShowQuadIntersection wtTs[0]=0 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} {{-52.0076561,8.07487679}} wtTs[1]=1 {{-47.1497231,4.34783936}} wnTs[0]=0 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} wnTs[1]=1 |
| 95 | debugShowQuadIntersection wtTs[0]=1 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} {{-47.1497231,4.34783936}} wnTs[0]=0 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} |
| 96 | debugShowLineIntersection no intersect {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} {{-52.806778,14.1473942}, {-52.8073196,14.1453686}} |
| 97 | debugShowLineIntersection no intersect {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} {{-52.8073196,14.1453686}, {-52.8075829,14.1443863}} |
| 98 | debugShowQuadLineIntersection no intersect {{-52.8075829,14.1443863}, {-52.8071823,14.1458902}, {-52.806778,14.1473942}} {{-38.1506348,16.0788383}, {-52.8077469,14.1437778}} |
| 99 | debugShowQuadIntersection wtTs[0]=1 {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} {{-52.8073196,14.1453686}} wnTs[0]=0 {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} |
| 100 | debugShowQuadIntersection wtTs[0]=0 {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} {{-49.0802841,19.0032997}} wnTs[0]=1 {{-43.0097923,19.8029671}, {-46.2106552,20.6603737}, {-49.0802841,19.0032997}} |
| 101 | debugShowQuadIntersection wtTs[0]=1 {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} {{-52.0076561,8.07487679}} wnTs[0]=0 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} |
| 102 | debugShowQuadIntersection wtTs[0]=1 {{-52.0076561,8.07487679}, {-50.3505821,5.20524597}, {-47.1497231,4.34783936}} {{-47.1497231,4.34783936}} wnTs[0]=0 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} |
| 103 | debugShowQuadIntersection wtTs[0]=1 {{-47.1497231,4.34783936}, {-43.9488602,3.49043274}, {-41.0792313,5.14750481}} {{-41.0792313,5.14750481}} wnTs[0]=0 {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}} |
| 104 | debugShowQuadIntersection wtTs[0]=1 {{-41.0792313,5.14750481}, {-38.2096024,6.80457878}, {-37.3521919,10.0054388}} {{-37.3521919,10.0054388}} wnTs[0]=0 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} |
| 105 | debugShowQuadIntersection wtTs[0]=1 {{-37.3521919,10.0054388}, {-36.4947891,13.2063007}, {-38.1518631,16.0759315}} {{-38.1518631,16.0759315}} wnTs[0]=0 {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}} |
| 106 | debugShowQuadIntersection wtTs[0]=1 {{-38.1518631,16.0759315}, {-39.8089333,18.9455605}, {-43.0097923,19.8029671}} {{-43.0097923,19.8029671}} wnTs[0]=0 {{-43.0097923,19.8029671}, {-46.2106552,20.6603737}, {-49.0802841,19.0032997}} |
| 107 | debugShowQuadLineIntersection wtTs[0]=1 {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} {{-52.8073196,14.1453686}} wnTs[0]=1 {{-52.806778,14.1473942}, {-52.8073196,14.1453686}} |
| 108 | debugShowQuadLineIntersection wtTs[0]=1 {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} {{-52.8073196,14.1453686}} wnTs[0]=0 {{-52.8073196,14.1453686}, {-52.8075829,14.1443863}} |
| 109 | debugShowQuadIntersection no intersect {{-49.0802841,19.0032997}, {-51.949913,17.3462276}, {-52.8073196,14.1453686}} {{-52.8075829,14.1443863}, {-52.8071823,14.1458902}, {-52.806778,14.1473942}} |
| 110 | debugShowQuadLineIntersection wtTs[0]=0 {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} {{-52.8073196,14.1453686}} wnTs[0]=1 {{-52.806778,14.1473942}, {-52.8073196,14.1453686}} |
| 111 | debugShowQuadLineIntersection wtTs[0]=0 {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} {{-52.8073196,14.1453686}} wnTs[0]=0 {{-52.8073196,14.1453686}, {-52.8075829,14.1443863}} |
| 112 | debugShowQuadIntersection no intersect {{-52.8073196,14.1453686}, {-53.6647263,10.9445057}, {-52.0076561,8.07487679}} {{-52.8075829,14.1443863}, {-52.8071823,14.1458902}, {-52.806778,14.1473942}} |
| 113 | debugShowLineIntersection wtTs[0]=1 {{-52.806778,14.1473942}, {-52.8073196,14.1453686}} {{-52.8073196,14.1453686}} wnTs[0]=0 {{-52.8073196,14.1453686}, {-52.8075829,14.1443863}} |
| 114 | debugShowQuadLineIntersection wtTs[0]=1 {{-52.8075829,14.1443863}, {-52.8071823,14.1458902}, {-52.806778,14.1473942}} {{-52.806778,14.1473942}} wnTs[0]=0 {{-52.806778,14.1473942}, {-52.8073196,14.1453686}} |
| 115 | debugShowQuadLineIntersection wtTs[0]=0 {{-52.8075829,14.1443863}, {-52.8071823,14.1458902}, {-52.806778,14.1473942}} {{-52.8075829,14.1443863}} wnTs[0]=1 {{-52.8073196,14.1453686}, {-52.8075829,14.1443863}} |
| 116 | debugShowTs - id=3 [o=23,20 t=0 -47.1497231,4.34783936 w=1 o=0] [o=25,4 t=1 -41.0792313,5.14750481 w=1 o=0] |
| 117 | debugShowTs o id=24 [o=23,20 t=0 -47.1497231,4.34783936 w=1 o=0] [o=25,4 t=1 -41.0792313,5.14750481 w=1 o=0] operand |
| 118 | debugShowTs + id=3 [o=23,20 t=0 -47.1497231,4.34783936 w=1 o=0] [o=25,4 t=1 -41.0792313,5.14750481 w=1 o=0] |
| 119 | debugShowTs o id=24 [o=23,20 t=0 -47.1497231,4.34783936 w=1 o=0] [o=25,4 t=1 -41.0792313,5.14750481 w=1 o=0] operand |
| 120 | debugShowTs - id=4 [o=24,3 t=0 -41.0792313,5.14750481 w=1 o=0] [o=5 t=1 -37.356041,9.99111366 w=1 o=0] |
| 121 | debugShowTs o id=25 [o=24,3 t=0 -41.0792313,5.14750481 w=1 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] operand |
| 122 | addTPair addTPair this=25 0.997761104 other=4 1 |
| 123 | addTPair id=25 lower=2 upper=2 other=4 oLower=2 oUpper=3 |
| 124 | debugShowTs + id=4 [o=24,3 t=0 -41.0792313,5.14750481 w=1 o=0] [o=25,5 t=1 -37.356041,9.99111366 w=1 o=0] |
| 125 | debugShowTs o id=25 [o=24,3 t=0 -41.0792313,5.14750481 w=1 o=0] [o=4 t=0.998 -37.356041,9.99111366 w=1 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] operand |
| 126 | debugShowTs - id=6 [o=5 t=0 -37.3550873,9.99464893 w=1 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] |
| 127 | debugShowTs o id=25 [o=24,3 t=0 -41.0792313,5.14750481 w=1 o=0] [o=4 t=0.998 -37.356041,9.99111366 w=1 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] operand |
| 128 | addTPair addTPair this=6 0 other=25 0.998313921 |
| 129 | addTPair id=6 lower=0 upper=1 other=25 oLower=3 oUpper=3 |
| 130 | debugShowTs + id=6 [o=25,5 t=0 -37.3550873,9.99464893 w=1 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] |
| 131 | debugShowTs o id=25 [o=24,3 t=0 -41.0792313,5.14750481 w=1 o=0] [o=4 t=0.998 -37.356041,9.99111366 w=1 o=0] [o=6 t=0.998 -37.3550873,9.99464893 w=1 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] operand |
| 132 | debugShowTs - id=9 [o=8 t=0 -37.3518105,10.006875 w=1 o=0] [o=10 t=1 -37.351429,10.0082846 w=1 o=0] |
| 133 | debugShowTs o id=26 [o=25,7,6 t=0 -37.3521919,10.0054388 w=1 o=0] [o=8 t=6.53e-05 -37.3520813,10.0058565 w=1 o=0] [o=10 t=0.00215 -37.3485146,10.0192108 w=1 o=0] [o=11 t=0.00885 -37.337204,10.0620985 w=1 o=0] [o=27 t=1 -38.1518631,16.0759315 w=1 o=0] operand |
| 134 | addTPair addTPair this=9 0 other=26 0.000224230097 |
| 135 | addTPair id=9 lower=0 upper=1 other=26 oLower=4 oUpper=4 |
| 136 | addTPair addTPair this=26 0.000444585761 other=9 1 |
| 137 | addTPair id=26 lower=5 upper=5 other=9 oLower=2 oUpper=3 |
| 138 | debugShowTs + id=9 [o=26,8 t=0 -37.3518105,10.006875 w=1 o=0] [o=26,10 t=1 -37.351429,10.0082846 w=1 o=0] |
| 139 | debugShowTs o id=26 [o=25,7,6 t=0 -37.3521919,10.0054388 w=1 o=0] [o=8 t=6.53e-05 -37.3520813,10.0058565 w=1 o=0] [o=9 t=0.000224 -37.3518105,10.006875 w=1 o=0] [o=9 t=0.000445 -37.351429,10.0082846 w=1 o=0] [o=10 t=0.00215 -37.3485146,10.0192108 w=1 o=0] [o=11 t=0.00885 -37.337204,10.0620985 w=1 o=0] [o=27 t=1 -38.1518631,16.0759315 w=1 o=0] operand |
| 140 | debugShowTs - id=19 [o=18 t=0 -52.8077469,14.1437778 w=1 o=0] [o=23,20 t=1 -52.0076561,8.07487679 w=1 o=0] |
| 141 | debugShowTs o id=22 [o=1,0,21 t=0 -52.8073196,14.1453686 w=1 o=0] [o=18 t=0.000248 -52.8077469,14.1437778 w=1 o=0] [o=23,20 t=1 -52.0076561,8.07487679 w=1 o=0] operand |
| 142 | addTPair addTPair this=19 0 other=22 0.000248537956 |
| 143 | addTPair id=19 lower=0 upper=1 other=22 oLower=3 oUpper=4 |
| 144 | debugShowTs + id=19 [o=22,18 t=0 -52.8077469,14.1437778 w=1 o=0] [o=23,20 t=1 -52.0076561,8.07487679 w=1 o=0] |
| 145 | debugShowTs o id=22 [o=1,0,21 t=0 -52.8073196,14.1453686 w=1 o=0] [o=18 t=0.000248 -52.8077469,14.1437778 w=1 o=0] [o=19 t=0.000249 -52.8077469,14.1437778 w=1 o=0] [o=23,20 t=1 -52.0076561,8.07487679 w=1 o=0] operand |
| 146 | debugShowTs - id=20 [o=22,19 t=0 -52.0076561,8.07487679 w=1 o=0] [o=24,3 t=1 -47.1497231,4.34783936 w=1 o=0] |
| 147 | debugShowTs o id=23 [o=22,19 t=0 -52.0076561,8.07487679 w=1 o=0] [o=24,3 t=1 -47.1497231,4.34783936 w=1 o=0] operand |
| 148 | debugShowTs + id=20 [o=22,19 t=0 -52.0076561,8.07487679 w=1 o=0] [o=24,3 t=1 -47.1497231,4.34783936 w=1 o=0] |
| 149 | debugShowTs o id=23 [o=22,19 t=0 -52.0076561,8.07487679 w=1 o=0] [o=24,3 t=1 -47.1497231,4.34783936 w=1 o=0] operand |
| 150 | calcCoincidentWinding count=6 |
| 151 | debugShowTs p id=3 [o=23,20 t=0 -47.1497231,4.34783936 w=1 o=1] [o=25,4 t=1 -41.0792313,5.14750481 w=1 o=0] |
| 152 | debugShowTs o id=24 [o=23,20 t=0 -47.1497231,4.34783936 w=0 o=0] [o=25,4 t=1 -41.0792313,5.14750481 w=1 o=0] operand done |
| 153 | debugShowTs p id=4 [o=24,3 t=0 -41.0792313,5.14750481 w=1 o=1] [o=25,5 t=1 -37.356041,9.99111366 w=1 o=0] |
| 154 | debugShowTs o id=25 [o=24,3 t=0 -41.0792313,5.14750481 w=0 o=0] [o=4 t=0.998 -37.356041,9.99111366 w=1 o=0] [o=6 t=0.998 -37.3550873,9.99464893 w=1 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] operand |
| 155 | debugShowTs p id=6 [o=25,5 t=0 -37.3550873,9.99464893 w=1 o=1] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] |
| 156 | debugShowTs o id=25 [o=24,3 t=0 -41.0792313,5.14750481 w=0 o=0] [o=4 t=0.998 -37.356041,9.99111366 w=1 o=0] [o=6 t=0.998 -37.3550873,9.99464893 w=0 o=0] [o=26,7 t=1 -37.3521919,10.0054388 w=1 o=0] operand |
| 157 | debugShowTs p id=9 [o=26,8 t=0 -37.3518105,10.006875 w=1 o=1] [o=26,10 t=1 -37.351429,10.0082846 w=1 o=0] |
| 158 | debugShowTs o id=26 [o=25,7,6 t=0 -37.3521919,10.0054388 w=1 o=0] [o=8 t=6.53e-05 -37.3520813,10.0058565 w=1 o=0] [o=9 t=0.000224 -37.3518105,10.006875 w=0 o=0] [o=9 t=0.000445 -37.351429,10.0082846 w=1 o=0] [o=10 t=0.00215 -37.3485146,10.0192108 w=1 o=0] [o=11 t=0.00885 -37.337204,10.0620985 w=1 o=0] [o=27 t=1 -38.1518631,16.0759315 w=1 o=0] operand |
| 159 | debugShowTs p id=19 [o=22,18 t=0 -52.8077469,14.1437778 w=1 o=1] [o=23,20 t=1 -52.0076561,8.07487679 w=1 o=0] |
| 160 | debugShowTs o id=22 [o=1,0,21 t=0 -52.8073196,14.1453686 w=1 o=0] [o=18 t=0.000248 -52.8077469,14.1437778 w=0 o=0] [o=19 t=0.000249 -52.8077469,14.1437778 w=0 o=0] [o=23,20 t=1 -52.0076561,8.07487679 w=1 o=0] operand |
| 161 | debugShowTs p id=20 [o=22,19 t=0 -52.0076561,8.07487679 w=1 o=1] [o=24,3 t=1 -47.1497231,4.34783936 w=1 o=0] |
| 162 | debugShowTs o id=23 [o=22,19 t=0 -52.0076561,8.07487679 w=0 o=0] [o=24,3 t=1 -47.1497231,4.34783936 w=1 o=0] operand done |
| 163 | checkEnds id=4 missing t=0 other=25 otherT=0 pt=(-41.0792313,5.14750481) |
| 164 | addTPair addTPair this=4 0 other=25 0 |
| 165 | addTPair id=4 lower=0 upper=2 other=25 oLower=0 oUpper=2 |
| 166 | checkEnds id=6 missing t=1 other=25 otherT=1 pt=(-37.3521919,10.0054388) |
| 167 | addTPair addTPair this=6 1 other=25 1 |
| 168 | addTPair id=6 lower=2 upper=4 other=25 oLower=5 oUpper=7 |
| 169 | checkEnds id=10 missing t=0 other=26 otherT=0.000444585761 pt=(-37.351429,10.0082846) |
| 170 | addTPair addTPair this=10 0 other=26 0.000444585761 |
| 171 | addTPair id=10 lower=0 upper=1 other=26 oLower=5 oUpper=6 |
| 172 | checkEnds id=19 missing t=1 other=22 otherT=1 pt=(-52.0076561,8.07487679) |
| 173 | addTPair addTPair this=19 1 other=22 1 |
| 174 | addTPair id=19 lower=2 upper=4 other=22 oLower=5 oUpper=7 |
| 175 | checkEnds id=25 missing t=0.997761104 other=5 otherT=0 pt=(-37.356041,9.99111366) |
| 176 | checkEnds id=25 missing t=0.998313921 other=5 otherT=1 pt=(-37.3550873,9.99464893) |
| 177 | addTPair addTPair this=25 0.997761104 other=5 0 |
| 178 | addTPair id=25 lower=3 upper=4 other=5 oLower=0 oUpper=1 |
| 179 | addTPair addTPair this=25 0.998313921 other=5 1 |
| 180 | addTPair id=25 lower=5 upper=6 other=5 oLower=2 oUpper=3 |
| 181 | checkEnds id=26 missing t=0.000224230097 other=8 otherT=1 pt=(-37.3518105,10.006875) |
| 182 | addTPair addTPair this=26 0.000224230097 other=8 1 |
| 183 | addTPair id=26 lower=4 upper=5 other=8 oLower=2 oUpper=3 |
| 184 | addTPair addTPair this=3 1 other=24 1 |
| 185 | addTPair id=3 lower=2 upper=4 other=24 oLower=2 oUpper=4 |
| 186 | addTPair addTPair duplicate this=3 1 other=24 1 |
| 187 | addTPair addTPair this=23 0 other=20 0 |
| 188 | addTPair id=23 lower=0 upper=2 other=20 oLower=0 oUpper=2 |
| 189 | addTPair addTPair duplicate this=20 0 other=23 0 |
| 190 | joinCoincidence count=6 |
| 191 | sortAngles [3] tStart=0 [1] |
| 192 | sortAngles [3] tStart=1 [4] |
| 193 | sortAngles [4] tStart=1 [3] |
| 194 | after [4/2] 9/9 tStart=1 tEnd=0 < [5/1] 25/25 tStart=0 tEnd=1 < [25/1] 25/25 tStart=0.997761104 tEnd=0.998313921 T 11 |
| 195 | sortAngles [5] tStart=1 [2] |
| 196 | after [5/2] 9/9 tStart=1 tEnd=0 < [6/1] 25/25 tStart=0 tEnd=1 < [25/2] 9/9 tStart=0.998313921 tEnd=0.997761104 T 5 |
| 197 | sortAngles [6] tStart=1 [3] |
| 198 | after [6/2] 9/9 tStart=1 tEnd=0 < [7/1] 25/25 tStart=0 tEnd=1 < [26/1] 25/25 tStart=0 tEnd=6.52854381e-05 F 11 |
| 199 | sortAngles [8] tStart=0.279027473 [1] |
| 200 | after [8/1] 9/9 tStart=0.279027473 tEnd=0 < [26/2] 9/9 tStart=6.52854381e-05 tEnd=0 < [8/2] 25/25 tStart=0.279027473 tEnd=1 T 12 |
| 201 | after [8/1] 9/9 tStart=0.279027473 tEnd=0 < [26/3] 25/25 tStart=6.52854381e-05 tEnd=0.000224230097 < [26/2] 9/9 tStart=6.52854381e-05 tEnd=0 F 5 |
| 202 | after [26/2] 9/9 tStart=6.52854381e-05 tEnd=0 < [26/3] 25/25 tStart=6.52854381e-05 tEnd=0.000224230097 < [8/2] 25/25 tStart=0.279027473 tEnd=1 T 11 |
| 203 | sortAngles [8] tStart=1 [2] |
| 204 | after [8/3] 9/9 tStart=1 tEnd=0.279027473 < [9/1] 25/25 tStart=0 tEnd=1 < [26/4] 9/9 tStart=0.000224230097 tEnd=6.52854381e-05 F 5 |
| 205 | sortAngles [9] tStart=1 [2] |
| 206 | after [9/2] 9/9 tStart=1 tEnd=0 < [10/1] 25/25 tStart=0 tEnd=0.28665555 < [26/5] 25/25 tStart=0.000444585761 tEnd=0.00215162348 F 11 |
| 207 | sortAngles [10] tStart=0.28665555 [2] |
| 208 | after [10/2] 9/9 tStart=0.28665555 tEnd=0 < [26/6] 9/9 tStart=0.00215162348 tEnd=0.000444585761 < [10/3] 25/25 tStart=0.28665555 tEnd=1 T 12 |
| 209 | after [10/2] 9/9 tStart=0.28665555 tEnd=0 < [26/7] 25/25 tStart=0.00215162348 tEnd=0.0088538298 < [26/6] 9/9 tStart=0.00215162348 tEnd=0.000444585761 F 5 |
| 210 | after [26/6] 9/9 tStart=0.00215162348 tEnd=0.000444585761 < [26/7] 25/25 tStart=0.00215162348 tEnd=0.0088538298 < [10/3] 25/25 tStart=0.28665555 tEnd=1 F 11 |
| 211 | after [10/3] 25/25 tStart=0.28665555 tEnd=1 < [26/7] 25/25 tStart=0.00215162348 tEnd=0.0088538298 < [10/2] 9/9 tStart=0.28665555 tEnd=0 T 12 |
| 212 | sortAngles [11] tStart=0.0019584472 [1] |
| 213 | after [11/1] 9/9 tStart=0.0019584472 tEnd=0 < [26/8] 9/9 tStart=0.0088538298 tEnd=0.00215162348 < [11/2] 25/21 tStart=0.0019584472 tEnd=1 T 12 |
| 214 | after [11/1] 9/9 tStart=0.0019584472 tEnd=0 < [26/9] 25/21 tStart=0.0088538298 tEnd=1 < [26/8] 9/9 tStart=0.0088538298 tEnd=0.00215162348 F 5 |
| 215 | after [26/8] 9/9 tStart=0.0088538298 tEnd=0.00215162348 < [26/9] 25/21 tStart=0.0088538298 tEnd=1 < [11/2] 25/21 tStart=0.0019584472 tEnd=1 T 11 |
| 216 | sortAngles [12] tStart=0.000220493714 [1] |
| 217 | after [12/1] 5/5 tStart=0.000220493714 tEnd=0 < [18/1] 29/29 tStart=9.12397966e-05 tEnd=0 < [12/2] 21/17 tStart=0.000220493714 tEnd=1 F 4 |
| 218 | after [12/1] 5/5 tStart=0.000220493714 tEnd=0 < [18/2] 13/13 tStart=9.12397966e-05 tEnd=0.00018431002 < [12/2] 21/17 tStart=0.000220493714 tEnd=1 T 4 |
| 219 | sortAngles [18] tStart=0.00018431002 [2] |
| 220 | after [18/3] 29/29 tStart=0.00018431002 tEnd=9.12397966e-05 < [27/1] 5/5 tStart=0.000444403399 tEnd=0 < [18/4] 13/13 tStart=0.00018431002 tEnd=1 T 4 |
| 221 | after [18/3] 29/29 tStart=0.00018431002 tEnd=9.12397966e-05 < [27/2] 21/17 tStart=0.000444403399 tEnd=1 < [27/1] 5/5 tStart=0.000444403399 tEnd=0 F 4 |
| 222 | after [27/1] 5/5 tStart=0.000444403399 tEnd=0 < [27/2] 21/17 tStart=0.000444403399 tEnd=1 < [18/4] 13/13 tStart=0.00018431002 tEnd=1 F 4 |
| 223 | after [18/4] 13/13 tStart=0.00018431002 tEnd=1 < [27/2] 21/17 tStart=0.000444403399 tEnd=1 < [18/3] 29/29 tStart=0.00018431002 tEnd=9.12397966e-05 T 4 |
| 224 | sortAngles [18] tStart=1 [3] |
| 225 | after [18/5] 29/29 tStart=1 tEnd=0.00018431002 < [19/1] 9/5 tStart=0 tEnd=1 < [22/2] 25/25 tStart=0.000248459946 tEnd=0 T 4 |
| 226 | sortAngles [19] tStart=1 [4] |
| 227 | sortAngles [21] tStart=1 [1] |
| 228 | after [21/1] 25/25 tStart=1 tEnd=0 < [0/1] 25/25 tStart=1 tEnd=0 < [1/1] 9/9 tStart=0 tEnd=1 F 12 |
| 229 | after [21/1] 25/25 tStart=1 tEnd=0 < [22/1] 9/9 tStart=0 tEnd=0.000248459946 < [1/1] 9/9 tStart=0 tEnd=1 F 11 |
| 230 | after [1/1] 9/9 tStart=0 tEnd=1 < [22/1] 9/9 tStart=0 tEnd=0.000248459946 < [0/1] 25/25 tStart=1 tEnd=0 T 12 |
| 231 | debugShowActiveSpans id=3 (-47.1497231,4.34783936 -43.9488602,3.49043274 -41.0792313,5.14750481) t=0 (-47.1497231,4.34783936) tEnd=1 other=23 otherT=1 otherIndex=4 windSum=? windValue=1 oppValue=1 |
| 232 | debugShowActiveSpans id=4 (-41.0792313,5.14750481 -38.2160263,6.80086899 -37.356041,9.99111366) t=0 (-41.0792313,5.14750481) tEnd=1 other=25 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=1 |
| 233 | debugShowActiveSpans id=5 (-37.356041,9.99111366 -37.3550873,9.99464893) t=0 (-37.356041,9.99111366) tEnd=1 other=25 otherT=0.997761104 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 234 | debugShowActiveSpans id=6 (-37.3550873,9.99464893 -37.3536377,10.000042 -37.3521919,10.0054388) t=0 (-37.3550873,9.99464893) tEnd=1 other=25 otherT=0.998313921 otherIndex=6 windSum=? windValue=1 oppValue=1 |
| 235 | debugShowActiveSpans id=7 (-37.3521919,10.0054388 -37.3521843,10.0054626) t=0 (-37.3521919,10.0054388) tEnd=1 other=26 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 236 | debugShowActiveSpans id=8 (-37.3521843,10.0054626 -37.3518105,10.006875) t=0 (-37.3521843,10.0054626) tEnd=0.279027473 other=7 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 237 | debugShowActiveSpans id=8 (-37.3521843,10.0054626 -37.3518105,10.006875) t=0.279027473 (-37.3520813,10.0058565) tEnd=1 other=26 otherT=6.52854381e-05 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 238 | debugShowActiveSpans id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 (-37.3518105,10.006875) tEnd=1 other=26 otherT=0.000224230097 otherIndex=5 windSum=? windValue=1 oppValue=1 |
| 239 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 (-37.351429,10.0082846) tEnd=0.28665555 other=26 otherT=0.000444585761 otherIndex=6 windSum=? windValue=1 oppValue=0 |
| 240 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 (-37.3485146,10.0192108) tEnd=1 other=26 otherT=0.00215162348 otherIndex=8 windSum=? windValue=1 oppValue=0 |
| 241 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 (-37.3404655,10.049655) tEnd=0.0019584472 other=10 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 242 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 (-37.337204,10.0620985) tEnd=1 other=26 otherT=0.0088538298 otherIndex=9 windSum=? windValue=1 oppValue=0 |
| 243 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 (-38.1512413,16.0773964) tEnd=0.000220493714 other=11 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 244 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 (-38.1519737,16.078661) tEnd=1 other=18 otherT=9.12397966e-05 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 245 | debugShowActiveSpans id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 (-43.0090332,19.8046188) tEnd=1 other=12 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 246 | debugShowActiveSpans id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 (-49.0795555,19.005188) tEnd=1 other=13 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 247 | debugShowActiveSpans id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 (-52.8062439,14.1493912) tEnd=1 other=14 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 248 | debugShowActiveSpans id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 (-49.0788383,19.0070419) tEnd=1 other=15 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 249 | debugShowActiveSpans id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 (-43.0082855,19.8062439) tEnd=1 other=16 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 250 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 (-38.1506348,16.0788383) tEnd=9.12397966e-05 other=17 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 251 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 (-38.1519737,16.078661) tEnd=0.00018431002 other=12 otherT=0.000220493714 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 252 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 (-38.1533356,16.0784817) tEnd=1 other=27 otherT=0.000444403399 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 253 | debugShowActiveSpans id=19 (-52.8077469,14.1437778 -53.6643143,10.9437943 -52.0076561,8.07487679) t=0 (-52.8077469,14.1437778) tEnd=1 other=22 otherT=0.000248459946 otherIndex=4 windSum=? windValue=1 oppValue=1 |
| 254 | debugShowActiveSpans id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 (-52.0076561,8.07487679) tEnd=1 other=23 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=1 |
| 255 | debugShowActiveSpans id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 (-49.0802841,19.0032997) tEnd=1 other=28 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 256 | debugShowActiveSpans id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 (-52.8073196,14.1453686) tEnd=0.000248459946 other=1 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 257 | debugShowActiveSpans id=25 (-41.0792313,5.14750481 -38.2096024,6.80457878 -37.3521919,10.0054388) t=0.997761104 (-37.356041,9.99111366) tEnd=0.998313921 other=5 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0 |
| 258 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0 (-37.3521919,10.0054388) tEnd=6.52854381e-05 other=25 otherT=1 otherIndex=8 windSum=? windValue=1 oppValue=0 |
| 259 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=6.52854381e-05 (-37.3520813,10.0058565) tEnd=0.000224230097 other=8 otherT=0.279027473 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 260 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 (-37.351429,10.0082846) tEnd=0.00215162348 other=10 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0 |
| 261 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 (-37.3485146,10.0192108) tEnd=0.0088538298 other=10 otherT=0.28665555 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 262 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 (-37.337204,10.0620985) tEnd=1 other=11 otherT=0.0019584472 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 263 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 (-38.1518631,16.0759315) tEnd=0.000444403399 other=26 otherT=1 otherIndex=10 windSum=? windValue=1 oppValue=0 |
| 264 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 (-38.1533356,16.0784817) tEnd=1 other=18 otherT=0.00018431002 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 265 | debugShowActiveSpans id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 (-43.0097923,19.8029671) tEnd=1 other=27 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 266 | debugShowActiveSpans id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 (-52.806778,14.1473942) tEnd=1 other=2 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 267 | debugShowActiveSpans id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 (-52.8073196,14.1453686) tEnd=1 other=0 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 268 | debugShowActiveSpans id=2 (-52.8075829,14.1443863 -52.8071823,14.1458902 -52.806778,14.1473942) t=0 (-52.8075829,14.1443863) tEnd=1 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 269 | findTop |
| 270 | dumpOne [3/2] next=4/1 sect=13/13 s=1 [4] e=0 [1] sgn=1 windVal=1 windSum=? oppVal=1 oppSum=? |
| 271 | dumpOne [4/1] next=3/2 sect=29/25 s=0 [0] e=1 [3] sgn=-1 windVal=1 windSum=? oppVal=1 oppSum=? stop |
| 272 | markWinding id=3 (-47.1497231,4.34783936 -43.9488602,3.49043274 -41.0792313,5.14750481) t=0 [0] (-47.1497231,4.34783936) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 273 | markWinding id=3 (-47.1497231,4.34783936 -43.9488602,3.49043274 -41.0792313,5.14750481) t=0 [1] (-47.1497231,4.34783936) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 274 | nextChase mismatched signs |
| 275 | markWinding id=4 (-41.0792313,5.14750481 -38.2160263,6.80086899 -37.356041,9.99111366) t=0 [0] (-41.0792313,5.14750481) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 276 | markWinding id=4 (-41.0792313,5.14750481 -38.2160263,6.80086899 -37.356041,9.99111366) t=0 [1] (-41.0792313,5.14750481) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 277 | markWinding id=4 (-41.0792313,5.14750481 -38.2160263,6.80086899 -37.356041,9.99111366) t=0 [2] (-41.0792313,5.14750481) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 278 | markWinding id=3 (-47.1497231,4.34783936 -43.9488602,3.49043274 -41.0792313,5.14750481) t=0 [0] (-47.1497231,4.34783936) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 279 | markWinding id=3 (-47.1497231,4.34783936 -43.9488602,3.49043274 -41.0792313,5.14750481) t=0 [1] (-47.1497231,4.34783936) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 280 | nextChase mismatched signs |
| 281 | activeOp id=3 t=0 tEnd=1 op=union miFrom=1 miTo=0 suFrom=1 suTo=0 result=1 |
| 282 | nextChase mismatched signs |
| 283 | findNextOp simple |
| 284 | markDoneBinary id=3 (-47.1497231,4.34783936 -43.9488602,3.49043274 -41.0792313,5.14750481) t=0 [0] (-47.1497231,4.34783936) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 285 | markDoneBinary id=3 (-47.1497231,4.34783936 -43.9488602,3.49043274 -41.0792313,5.14750481) t=0 [1] (-47.1497231,4.34783936) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 286 | bridgeOp current id=3 from=(-47.1497231,4.34783936) to=(-41.0792313,5.14750481) |
| 287 | path.moveTo(-47.1497231,4.34783936); |
| 288 | path.quadTo(-43.9488602,3.49043274, -41.0792313,5.14750481); |
| 289 | markWinding id=5 (-37.356041,9.99111366 -37.3550873,9.99464893) t=0 [0] (-37.356041,9.99111366) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 290 | markWinding id=5 (-37.356041,9.99111366 -37.3550873,9.99464893) t=0 [1] (-37.356041,9.99111366) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 291 | markAngle last id=5 windSum=? small=0 |
| 292 | markWinding id=25 (-41.0792313,5.14750481 -38.2096024,6.80457878 -37.3521919,10.0054388) t=0.997761104 [3] (-37.356041,9.99111366) tEnd=0.997761104 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 293 | markWinding id=25 (-41.0792313,5.14750481 -38.2096024,6.80457878 -37.3521919,10.0054388) t=0.997761104 [4] (-37.356041,9.99111366) tEnd=0.998313921 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 294 | markAngle last id=25 windSum=? small=0 |
| 295 | findNextOp |
| 296 | dumpOne [4/2] next=5/1 sect=9/9 s=1 [4] e=0 [2] sgn=1 windVal=1 windSum=-1 oppVal=1 oppSum=-1 |
| 297 | dumpOne [5/1] next=25/1 sect=25/25 s=0 [0] e=1 [2] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 |
| 298 | dumpOne [25/1] next=4/2 sect=25/25 s=0.997761104 [3] e=0.998313921 [5] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 operand |
| 299 | activeOp id=5 t=0 tEnd=1 op=union miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 |
| 300 | markDoneBinary id=5 (-37.356041,9.99111366 -37.3550873,9.99464893) t=0 [0] (-37.356041,9.99111366) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 301 | markDoneBinary id=5 (-37.356041,9.99111366 -37.3550873,9.99464893) t=0 [1] (-37.356041,9.99111366) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 302 | findNextOp chase.append id=5 windSum=-2147483647 small=0 |
| 303 | activeOp id=25 t=0.997761104 tEnd=0.998313921 op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1 |
| 304 | findNextOp chase.append id=25 windSum=-2147483647 small=0 |
| 305 | markDoneBinary id=4 (-41.0792313,5.14750481 -38.2160263,6.80086899 -37.356041,9.99111366) t=0 [0] (-41.0792313,5.14750481) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 306 | markDoneBinary id=4 (-41.0792313,5.14750481 -38.2160263,6.80086899 -37.356041,9.99111366) t=0 [1] (-41.0792313,5.14750481) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 307 | markDoneBinary id=4 (-41.0792313,5.14750481 -38.2160263,6.80086899 -37.356041,9.99111366) t=0 [2] (-41.0792313,5.14750481) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 308 | findNextOp from:[4] to:[25] start=3 end=5 |
| 309 | bridgeOp current id=4 from=(-41.0792313,5.14750481) to=(-37.356041,9.99111366) |
| 310 | path.quadTo(-38.2160263,6.80086899, -37.356041,9.99111366); |
| 311 | markWinding id=6 (-37.3550873,9.99464893 -37.3536377,10.000042 -37.3521919,10.0054388) t=0 [0] (-37.3550873,9.99464893) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 312 | markWinding id=6 (-37.3550873,9.99464893 -37.3536377,10.000042 -37.3521919,10.0054388) t=0 [1] (-37.3550873,9.99464893) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 313 | markAngle last id=6 windSum=? small=0 |
| 314 | findNextOp |
| 315 | dumpOne [25/2] next=5/2 sect=9/9 s=0.998313921 [5] e=0.997761104 [3] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 operand |
| 316 | dumpOne [5/2] next=6/1 sect=9/9 s=1 [3] e=0 [1] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 done |
| 317 | dumpOne [6/1] next=25/2 sect=25/25 s=0 [0] e=1 [2] sgn=-1 windVal=1 windSum=-1 oppVal=1 oppSum=-1 |
| 318 | activeOp id=5 t=1 tEnd=0 op=union miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 |
| 319 | activeOp id=6 t=0 tEnd=1 op=union miFrom=1 miTo=0 suFrom=1 suTo=0 result=1 |
| 320 | findNextOp chase.append id=6 windSum=-2147483647 small=0 |
| 321 | markDoneBinary id=25 (-41.0792313,5.14750481 -38.2096024,6.80457878 -37.3521919,10.0054388) t=0.997761104 [3] (-37.356041,9.99111366) tEnd=0.997761104 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 322 | markDoneBinary id=25 (-41.0792313,5.14750481 -38.2096024,6.80457878 -37.3521919,10.0054388) t=0.997761104 [4] (-37.356041,9.99111366) tEnd=0.998313921 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 323 | findNextOp from:[25] to:[6] start=0 end=2 |
| 324 | bridgeOp current id=25 from=(-37.356041,9.99111366) to=(-37.3550873,9.99464893) |
| 325 | path.quadTo(-37.3555641,9.99288082, -37.3550873,9.99464893); |
| 326 | markWinding id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0 [0] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 327 | markWinding id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0 [1] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 328 | markWinding id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0 [2] (-37.3521919,10.0054388) tEnd=6.52854381e-05 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 329 | markAngle last id=26 windSum=? small=0 |
| 330 | markWinding id=7 (-37.3521919,10.0054388 -37.3521843,10.0054626) t=0 [0] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 331 | markWinding id=7 (-37.3521919,10.0054388 -37.3521843,10.0054626) t=0 [1] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 332 | markWinding id=7 (-37.3521919,10.0054388 -37.3521843,10.0054626) t=0 [2] (-37.3521919,10.0054388) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 333 | markWinding id=8 (-37.3521843,10.0054626 -37.3518105,10.006875) t=0 [0] (-37.3521843,10.0054626) tEnd=0.279027473 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 334 | markAngle last id=8 windSum=? small=0 |
| 335 | findNextOp |
| 336 | dumpOne [6/2] next=26/1 sect=9/9 s=1 [4] e=0 [1] sgn=1 windVal=1 windSum=-1 oppVal=1 oppSum=-1 |
| 337 | dumpOne [26/1] next=7/1 sect=25/25 s=0 [0] e=6.52854381e-05 [3] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 operand |
| 338 | dumpOne [7/1] next=6/2 sect=25/25 s=0 [0] e=1 [3] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 339 | activeOp id=26 t=0 tEnd=6.52854381e-05 op=union miFrom=1 miTo=1 suFrom=1 suTo=0 result=0 |
| 340 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0 [0] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 341 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0 [1] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 342 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0 [2] (-37.3521919,10.0054388) tEnd=6.52854381e-05 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 343 | findNextOp chase.append id=26 windSum=-2147483647 small=0 |
| 344 | activeOp id=7 t=0 tEnd=1 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 345 | findNextOp chase.append id=8 windSum=-2147483647 small=0 |
| 346 | markDoneBinary id=6 (-37.3550873,9.99464893 -37.3536377,10.000042 -37.3521919,10.0054388) t=0 [0] (-37.3550873,9.99464893) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 347 | markDoneBinary id=6 (-37.3550873,9.99464893 -37.3536377,10.000042 -37.3521919,10.0054388) t=0 [1] (-37.3550873,9.99464893) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 348 | findNextOp from:[6] to:[7] start=0 end=3 |
| 349 | bridgeOp current id=6 from=(-37.3550873,9.99464893) to=(-37.3521919,10.0054388) |
| 350 | path.quadTo(-37.3536377,10.000042, -37.3521919,10.0054388); |
| 351 | findNextOp simple |
| 352 | markDoneBinary id=7 (-37.3521919,10.0054388 -37.3521843,10.0054626) t=0 [0] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 353 | markDoneBinary id=7 (-37.3521919,10.0054388 -37.3521843,10.0054626) t=0 [1] (-37.3521919,10.0054388) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 354 | markDoneBinary id=7 (-37.3521919,10.0054388 -37.3521843,10.0054626) t=0 [2] (-37.3521919,10.0054388) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 355 | bridgeOp current id=7 from=(-37.3521919,10.0054388) to=(-37.3521843,10.0054626) |
| 356 | findNextOp |
| 357 | dumpOne [8/1] next=26/2 sect=9/9 s=0.279027473 [1] e=0 [0] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 358 | dumpOne [26/2] next=26/3 sect=9/9 s=6.52854381e-05 [3] e=0 [0] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 done operand |
| 359 | dumpOne [26/3] next=8/2 sect=25/25 s=6.52854381e-05 [3] e=0.000224230097 [4] sgn=-1 windVal=1 windSum=? unorderable operand |
| 360 | dumpOne [8/2] next=8/1 sect=25/25 s=0.279027473 [1] e=1 [2] sgn=-1 windVal=1 windSum=? unorderable |
| 361 | activeOp id=26 t=6.52854381e-05 tEnd=0 op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0 |
| 362 | activeOp id=26 t=6.52854381e-05 tEnd=0.000224230097 op=union miFrom=1 miTo=1 suFrom=1 suTo=0 result=0 |
| 363 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=6.52854381e-05 [3] (-37.3520813,10.0058565) tEnd=0.000224230097 newWindSum=-2147483647 newOppSum=-2147483647 oppSum=? windSum=? windValue=1 oppValue=0 |
| 364 | activeOp id=8 t=0.279027473 tEnd=1 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 365 | markDoneBinary id=8 (-37.3521843,10.0054626 -37.3518105,10.006875) t=0 [0] (-37.3521843,10.0054626) tEnd=0.279027473 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 366 | findNextOp from:[8] to:[8] start=1 end=2 |
| 367 | bridgeOp current id=8 from=(-37.3521843,10.0054626) to=(-37.3520813,10.0058565) |
| 368 | path.lineTo(-37.3521843,10.0054626); |
| 369 | findNextOp |
| 370 | dumpOne [8/3] next=26/4 sect=9/9 s=1 [3] e=0.279027473 [1] sgn=1 windVal=1 windSum=? |
| 371 | dumpOne [26/4] next=9/1 sect=9/9 s=0.000224230097 [4] e=6.52854381e-05 [3] sgn=1 windVal=1 windSum=? done operand |
| 372 | dumpOne [9/1] next=8/3 sect=25/25 s=0 [0] e=1 [2] sgn=-1 windVal=1 windSum=? oppVal=1 oppSum=? |
| 373 | markDoneBinary id=8 (-37.3521843,10.0054626 -37.3518105,10.006875) t=0.279027473 [1] (-37.3520813,10.0058565) tEnd=1 newWindSum=-2147483647 newOppSum=-2147483647 oppSum=? windSum=? windValue=1 oppValue=0 |
| 374 | path.lineTo(-37.3520813,10.0058565); |
| 375 | debugShowActiveSpans id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 (-37.3518105,10.006875) tEnd=1 other=26 otherT=0.000224230097 otherIndex=5 windSum=? windValue=1 oppValue=1 |
| 376 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 (-37.351429,10.0082846) tEnd=0.28665555 other=26 otherT=0.000444585761 otherIndex=6 windSum=? windValue=1 oppValue=0 |
| 377 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 (-37.3485146,10.0192108) tEnd=1 other=26 otherT=0.00215162348 otherIndex=8 windSum=? windValue=1 oppValue=0 |
| 378 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 (-37.3404655,10.049655) tEnd=0.0019584472 other=10 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 379 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 (-37.337204,10.0620985) tEnd=1 other=26 otherT=0.0088538298 otherIndex=9 windSum=? windValue=1 oppValue=0 |
| 380 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 (-38.1512413,16.0773964) tEnd=0.000220493714 other=11 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 381 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 (-38.1519737,16.078661) tEnd=1 other=18 otherT=9.12397966e-05 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 382 | debugShowActiveSpans id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 (-43.0090332,19.8046188) tEnd=1 other=12 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 383 | debugShowActiveSpans id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 (-49.0795555,19.005188) tEnd=1 other=13 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 384 | debugShowActiveSpans id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 (-52.8062439,14.1493912) tEnd=1 other=14 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 385 | debugShowActiveSpans id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 (-49.0788383,19.0070419) tEnd=1 other=15 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 386 | debugShowActiveSpans id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 (-43.0082855,19.8062439) tEnd=1 other=16 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 387 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 (-38.1506348,16.0788383) tEnd=9.12397966e-05 other=17 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 388 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 (-38.1519737,16.078661) tEnd=0.00018431002 other=12 otherT=0.000220493714 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 389 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 (-38.1533356,16.0784817) tEnd=1 other=27 otherT=0.000444403399 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 390 | debugShowActiveSpans id=19 (-52.8077469,14.1437778 -53.6643143,10.9437943 -52.0076561,8.07487679) t=0 (-52.8077469,14.1437778) tEnd=1 other=22 otherT=0.000248459946 otherIndex=4 windSum=? windValue=1 oppValue=1 |
| 391 | debugShowActiveSpans id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 (-52.0076561,8.07487679) tEnd=1 other=23 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=1 |
| 392 | debugShowActiveSpans id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 (-49.0802841,19.0032997) tEnd=1 other=28 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 393 | debugShowActiveSpans id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 (-52.8073196,14.1453686) tEnd=0.000248459946 other=1 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 394 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 (-37.351429,10.0082846) tEnd=0.00215162348 other=10 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0 |
| 395 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 (-37.3485146,10.0192108) tEnd=0.0088538298 other=10 otherT=0.28665555 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 396 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 (-37.337204,10.0620985) tEnd=1 other=11 otherT=0.0019584472 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 397 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 (-38.1518631,16.0759315) tEnd=0.000444403399 other=26 otherT=1 otherIndex=10 windSum=? windValue=1 oppValue=0 |
| 398 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 (-38.1533356,16.0784817) tEnd=1 other=18 otherT=0.00018431002 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 399 | debugShowActiveSpans id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 (-43.0097923,19.8029671) tEnd=1 other=27 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 400 | debugShowActiveSpans id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 (-52.806778,14.1473942) tEnd=1 other=2 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 401 | debugShowActiveSpans id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 (-52.8073196,14.1453686) tEnd=1 other=0 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 402 | debugShowActiveSpans id=2 (-52.8075829,14.1443863 -52.8071823,14.1458902 -52.806778,14.1473942) t=0 (-52.8075829,14.1443863) tEnd=1 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 403 | findTop |
| 404 | dumpOne [3/1] next=20/2 sect=1/29 s=0 [0] e=1 [2] sgn=-1 windVal=1 windSum=-1 oppVal=1 oppSum=-1 done |
| 405 | dumpOne [20/2] next=3/1 sect=17/17 s=1 [4] e=0 [2] sgn=1 windVal=1 windSum=? oppVal=1 oppSum=? |
| 406 | markWinding id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 [1] (-52.0076561,8.07487679) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 407 | markWinding id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 [0] (-52.0076561,8.07487679) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 408 | markWinding id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 [2] (-52.0076561,8.07487679) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 409 | nextChase mismatched signs |
| 410 | markAngle last id=20 windSum=-1 small=0 |
| 411 | activeOp id=20 t=0 tEnd=1 op=union miFrom=1 miTo=0 suFrom=1 suTo=0 result=1 |
| 412 | nextChase mismatched signs |
| 413 | findNextOp simple |
| 414 | markDoneBinary id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 [1] (-52.0076561,8.07487679) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 415 | markDoneBinary id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 [0] (-52.0076561,8.07487679) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 416 | markDoneBinary id=20 (-52.0076561,8.07487679 -50.3505821,5.20524597 -47.1497231,4.34783936) t=0 [2] (-52.0076561,8.07487679) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 417 | bridgeOp current id=20 from=(-52.0076561,8.07487679) to=(-47.1497231,4.34783936) |
| 418 | path.moveTo(-52.0076561,8.07487679); |
| 419 | path.quadTo(-50.3505821,5.20524597, -47.1497231,4.34783936); |
| 420 | debugShowActiveSpans id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 (-37.3518105,10.006875) tEnd=1 other=26 otherT=0.000224230097 otherIndex=5 windSum=? windValue=1 oppValue=1 |
| 421 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 (-37.351429,10.0082846) tEnd=0.28665555 other=26 otherT=0.000444585761 otherIndex=6 windSum=? windValue=1 oppValue=0 |
| 422 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 (-37.3485146,10.0192108) tEnd=1 other=26 otherT=0.00215162348 otherIndex=8 windSum=? windValue=1 oppValue=0 |
| 423 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 (-37.3404655,10.049655) tEnd=0.0019584472 other=10 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 424 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 (-37.337204,10.0620985) tEnd=1 other=26 otherT=0.0088538298 otherIndex=9 windSum=? windValue=1 oppValue=0 |
| 425 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 (-38.1512413,16.0773964) tEnd=0.000220493714 other=11 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 426 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 (-38.1519737,16.078661) tEnd=1 other=18 otherT=9.12397966e-05 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 427 | debugShowActiveSpans id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 (-43.0090332,19.8046188) tEnd=1 other=12 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 428 | debugShowActiveSpans id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 (-49.0795555,19.005188) tEnd=1 other=13 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 429 | debugShowActiveSpans id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 (-52.8062439,14.1493912) tEnd=1 other=14 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 430 | debugShowActiveSpans id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 (-49.0788383,19.0070419) tEnd=1 other=15 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 431 | debugShowActiveSpans id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 (-43.0082855,19.8062439) tEnd=1 other=16 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 432 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 (-38.1506348,16.0788383) tEnd=9.12397966e-05 other=17 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 433 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 (-38.1519737,16.078661) tEnd=0.00018431002 other=12 otherT=0.000220493714 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 434 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 (-38.1533356,16.0784817) tEnd=1 other=27 otherT=0.000444403399 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 435 | debugShowActiveSpans id=19 (-52.8077469,14.1437778 -53.6643143,10.9437943 -52.0076561,8.07487679) t=0 (-52.8077469,14.1437778) tEnd=1 other=22 otherT=0.000248459946 otherIndex=4 windSum=? windValue=1 oppValue=1 |
| 436 | debugShowActiveSpans id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 (-49.0802841,19.0032997) tEnd=1 other=28 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 437 | debugShowActiveSpans id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 (-52.8073196,14.1453686) tEnd=0.000248459946 other=1 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 438 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 (-37.351429,10.0082846) tEnd=0.00215162348 other=10 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0 |
| 439 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 (-37.3485146,10.0192108) tEnd=0.0088538298 other=10 otherT=0.28665555 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 440 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 (-37.337204,10.0620985) tEnd=1 other=11 otherT=0.0019584472 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 441 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 (-38.1518631,16.0759315) tEnd=0.000444403399 other=26 otherT=1 otherIndex=10 windSum=? windValue=1 oppValue=0 |
| 442 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 (-38.1533356,16.0784817) tEnd=1 other=18 otherT=0.00018431002 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 443 | debugShowActiveSpans id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 (-43.0097923,19.8029671) tEnd=1 other=27 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 444 | debugShowActiveSpans id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 (-52.806778,14.1473942) tEnd=1 other=2 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 445 | debugShowActiveSpans id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 (-52.8073196,14.1453686) tEnd=1 other=0 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 446 | debugShowActiveSpans id=2 (-52.8075829,14.1443863 -52.8071823,14.1458902 -52.806778,14.1473942) t=0 (-52.8075829,14.1443863) tEnd=1 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 447 | findTop |
| 448 | dumpOne [20/1] next=19/2 sect=5/1 s=0 [0] e=1 [3] sgn=-1 windVal=1 windSum=-1 oppVal=1 oppSum=-1 done |
| 449 | dumpOne [19/2] next=20/1 sect=21/21 s=1 [4] e=0 [1] sgn=1 windVal=1 windSum=? oppVal=1 oppSum=? stop |
| 450 | markWinding id=19 (-52.8077469,14.1437778 -53.6643143,10.9437943 -52.0076561,8.07487679) t=0 [0] (-52.8077469,14.1437778) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 451 | markWinding id=19 (-52.8077469,14.1437778 -53.6643143,10.9437943 -52.0076561,8.07487679) t=0 [1] (-52.8077469,14.1437778) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 452 | markAngle last id=19 windSum=-1 small=0 |
| 453 | activeOp id=19 t=0 tEnd=1 op=union miFrom=1 miTo=0 suFrom=1 suTo=0 result=1 |
| 454 | nextChase mismatched signs |
| 455 | findNextOp simple |
| 456 | markDoneBinary id=19 (-52.8077469,14.1437778 -53.6643143,10.9437943 -52.0076561,8.07487679) t=0 [0] (-52.8077469,14.1437778) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 457 | markDoneBinary id=19 (-52.8077469,14.1437778 -53.6643143,10.9437943 -52.0076561,8.07487679) t=0 [1] (-52.8077469,14.1437778) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 458 | bridgeOp current id=19 from=(-52.8077469,14.1437778) to=(-52.0076561,8.07487679) |
| 459 | path.moveTo(-52.8077469,14.1437778); |
| 460 | path.quadTo(-53.6643143,10.9437943, -52.0076561,8.07487679); |
| 461 | debugShowActiveSpans id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 (-37.3518105,10.006875) tEnd=1 other=26 otherT=0.000224230097 otherIndex=5 windSum=? windValue=1 oppValue=1 |
| 462 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 (-37.351429,10.0082846) tEnd=0.28665555 other=26 otherT=0.000444585761 otherIndex=6 windSum=? windValue=1 oppValue=0 |
| 463 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 (-37.3485146,10.0192108) tEnd=1 other=26 otherT=0.00215162348 otherIndex=8 windSum=? windValue=1 oppValue=0 |
| 464 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 (-37.3404655,10.049655) tEnd=0.0019584472 other=10 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 465 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 (-37.337204,10.0620985) tEnd=1 other=26 otherT=0.0088538298 otherIndex=9 windSum=? windValue=1 oppValue=0 |
| 466 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 (-38.1512413,16.0773964) tEnd=0.000220493714 other=11 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 467 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 (-38.1519737,16.078661) tEnd=1 other=18 otherT=9.12397966e-05 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 468 | debugShowActiveSpans id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 (-43.0090332,19.8046188) tEnd=1 other=12 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 469 | debugShowActiveSpans id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 (-49.0795555,19.005188) tEnd=1 other=13 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 470 | debugShowActiveSpans id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 (-52.8062439,14.1493912) tEnd=1 other=14 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 471 | debugShowActiveSpans id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 (-49.0788383,19.0070419) tEnd=1 other=15 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 472 | debugShowActiveSpans id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 (-43.0082855,19.8062439) tEnd=1 other=16 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 473 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 (-38.1506348,16.0788383) tEnd=9.12397966e-05 other=17 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 474 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 (-38.1519737,16.078661) tEnd=0.00018431002 other=12 otherT=0.000220493714 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 475 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 (-38.1533356,16.0784817) tEnd=1 other=27 otherT=0.000444403399 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 476 | debugShowActiveSpans id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 (-49.0802841,19.0032997) tEnd=1 other=28 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 477 | debugShowActiveSpans id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 (-52.8073196,14.1453686) tEnd=0.000248459946 other=1 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 478 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 (-37.351429,10.0082846) tEnd=0.00215162348 other=10 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0 |
| 479 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 (-37.3485146,10.0192108) tEnd=0.0088538298 other=10 otherT=0.28665555 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 480 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 (-37.337204,10.0620985) tEnd=1 other=11 otherT=0.0019584472 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 481 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 (-38.1518631,16.0759315) tEnd=0.000444403399 other=26 otherT=1 otherIndex=10 windSum=? windValue=1 oppValue=0 |
| 482 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 (-38.1533356,16.0784817) tEnd=1 other=18 otherT=0.00018431002 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 483 | debugShowActiveSpans id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 (-43.0097923,19.8029671) tEnd=1 other=27 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 484 | debugShowActiveSpans id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 (-52.806778,14.1473942) tEnd=1 other=2 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 485 | debugShowActiveSpans id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 (-52.8073196,14.1453686) tEnd=1 other=0 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 486 | debugShowActiveSpans id=2 (-52.8075829,14.1443863 -52.8071823,14.1458902 -52.806778,14.1473942) t=0 (-52.8075829,14.1443863) tEnd=1 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 487 | findTop |
| 488 | dumpOne [8/3] next=26/4 sect=9/9 s=1 [3] e=0.279027473 [1] sgn=1 windVal=1 windSum=? done |
| 489 | dumpOne [26/4] next=9/1 sect=9/9 s=0.000224230097 [4] e=6.52854381e-05 [3] sgn=1 windVal=1 windSum=? done operand |
| 490 | dumpOne [9/1] next=8/3 sect=25/25 s=0 [0] e=1 [2] sgn=-1 windVal=1 windSum=? oppVal=1 oppSum=? stop |
| 491 | findTop swap=0 inflections=0 serpentine=0 controlledbyends=0 monotonic=1 |
| 492 | FindSortableTop current=9 index=2 endIndex=0 tHit=0.1 hitDx=0 try=0 vert=0 |
| 493 | initWinding id=9 oldWinding=0 hitDx=0 dx=+ windVal=1 winding=-1 oppWind=-1 |
| 494 | markWinding id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 [0] (-37.3518105,10.006875) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 495 | markWinding id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 [1] (-37.3518105,10.006875) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=1 |
| 496 | markWinding id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 [0] (-37.3518105,10.006875) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 497 | markWinding id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 [1] (-37.3518105,10.006875) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 498 | activeOp id=9 t=1 tEnd=0 op=union miFrom=0 miTo=1 suFrom=0 suTo=1 result=1 |
| 499 | markAngle last id=8 windSum=? small=0 |
| 500 | markAngle last id=26 windSum=? small=0 |
| 501 | findNextOp |
| 502 | dumpOne [9/1] next=8/3 sect=25/25 s=0 [0] e=1 [2] sgn=-1 windVal=1 windSum=-1 oppVal=1 oppSum=-1 stop |
| 503 | dumpOne [8/3] next=26/4 sect=9/9 s=1 [3] e=0.279027473 [1] sgn=1 windVal=1 windSum=? done |
| 504 | dumpOne [26/4] next=9/1 sect=9/9 s=0.000224230097 [4] e=6.52854381e-05 [3] sgn=1 windVal=1 windSum=? done operand |
| 505 | activeOp id=8 t=1 tEnd=0.279027473 op=union miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 |
| 506 | activeOp id=26 t=0.000224230097 tEnd=6.52854381e-05 op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0 |
| 507 | markDoneBinary id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 [0] (-37.3518105,10.006875) tEnd=0 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 508 | markDoneBinary id=9 (-37.3518105,10.006875 -37.3516197,10.0075779 -37.351429,10.0082846) t=0 [1] (-37.3518105,10.006875) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=1 |
| 509 | findNextOp from:[9] to:[8] start=3 end=1 |
| 510 | bridgeOp current id=9 from=(-37.351429,10.0082846) to=(-37.3518105,10.006875) |
| 511 | path.moveTo(-37.351429,10.0082846); |
| 512 | path.quadTo(-37.3516197,10.0075779, -37.3518105,10.006875); |
| 513 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 (-37.351429,10.0082846) tEnd=0.28665555 other=26 otherT=0.000444585761 otherIndex=6 windSum=? windValue=1 oppValue=0 |
| 514 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 (-37.3485146,10.0192108) tEnd=1 other=26 otherT=0.00215162348 otherIndex=8 windSum=? windValue=1 oppValue=0 |
| 515 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 (-37.3404655,10.049655) tEnd=0.0019584472 other=10 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 516 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 (-37.337204,10.0620985) tEnd=1 other=26 otherT=0.0088538298 otherIndex=9 windSum=? windValue=1 oppValue=0 |
| 517 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 (-38.1512413,16.0773964) tEnd=0.000220493714 other=11 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 518 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 (-38.1519737,16.078661) tEnd=1 other=18 otherT=9.12397966e-05 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 519 | debugShowActiveSpans id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 (-43.0090332,19.8046188) tEnd=1 other=12 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 520 | debugShowActiveSpans id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 (-49.0795555,19.005188) tEnd=1 other=13 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 521 | debugShowActiveSpans id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 (-52.8062439,14.1493912) tEnd=1 other=14 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 522 | debugShowActiveSpans id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 (-49.0788383,19.0070419) tEnd=1 other=15 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 523 | debugShowActiveSpans id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 (-43.0082855,19.8062439) tEnd=1 other=16 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 524 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 (-38.1506348,16.0788383) tEnd=9.12397966e-05 other=17 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 525 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 (-38.1519737,16.078661) tEnd=0.00018431002 other=12 otherT=0.000220493714 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 526 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 (-38.1533356,16.0784817) tEnd=1 other=27 otherT=0.000444403399 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 527 | debugShowActiveSpans id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 (-49.0802841,19.0032997) tEnd=1 other=28 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 528 | debugShowActiveSpans id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 (-52.8073196,14.1453686) tEnd=0.000248459946 other=1 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 529 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 (-37.351429,10.0082846) tEnd=0.00215162348 other=10 otherT=0 otherIndex=0 windSum=? windValue=1 oppValue=0 |
| 530 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 (-37.3485146,10.0192108) tEnd=0.0088538298 other=10 otherT=0.28665555 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 531 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 (-37.337204,10.0620985) tEnd=1 other=11 otherT=0.0019584472 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 532 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 (-38.1518631,16.0759315) tEnd=0.000444403399 other=26 otherT=1 otherIndex=10 windSum=? windValue=1 oppValue=0 |
| 533 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 (-38.1533356,16.0784817) tEnd=1 other=18 otherT=0.00018431002 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 534 | debugShowActiveSpans id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 (-43.0097923,19.8029671) tEnd=1 other=27 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 535 | debugShowActiveSpans id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 (-52.806778,14.1473942) tEnd=1 other=2 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 536 | debugShowActiveSpans id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 (-52.8073196,14.1453686) tEnd=1 other=0 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 537 | debugShowActiveSpans id=2 (-52.8075829,14.1443863 -52.8071823,14.1458902 -52.806778,14.1473942) t=0 (-52.8075829,14.1443863) tEnd=1 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 538 | findTop |
| 539 | dumpOne [9/2] next=26/5 sect=9/9 s=1 [3] e=0 [1] sgn=1 windVal=1 windSum=-1 oppVal=1 oppSum=-1 done |
| 540 | dumpOne [26/5] next=10/1 sect=25/25 s=0.000444585761 [6] e=0.00215162348 [8] sgn=-1 windVal=1 windSum=? operand stop |
| 541 | dumpOne [10/1] next=9/2 sect=25/25 s=0 [0] e=0.28665555 [2] sgn=-1 windVal=1 windSum=? |
| 542 | findTop swap=0 inflections=0 serpentine=0 controlledbyends=0 monotonic=1 |
| 543 | markWinding id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 [0] (-37.351429,10.0082846) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 544 | markWinding id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 [1] (-37.351429,10.0082846) tEnd=0.28665555 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 545 | markAngle last id=10 windSum=? small=0 |
| 546 | markWinding id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 [6] (-37.351429,10.0082846) tEnd=0.000444585761 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 547 | markWinding id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 [7] (-37.351429,10.0082846) tEnd=0.00215162348 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 548 | markAngle last id=26 windSum=? small=0 |
| 549 | activeOp id=26 t=0.00215162348 tEnd=0.000444585761 op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0 |
| 550 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 [6] (-37.351429,10.0082846) tEnd=0.000444585761 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 551 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.000444585761 [7] (-37.351429,10.0082846) tEnd=0.00215162348 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 552 | bridgeOp chase.append id=26 windSum=-1 small=0 |
| 553 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 (-37.351429,10.0082846) tEnd=0.28665555 other=26 otherT=0.000444585761 otherIndex=6 windSum=-1 windValue=1 oppValue=0 |
| 554 | debugShowActiveSpans id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 (-37.3485146,10.0192108) tEnd=1 other=26 otherT=0.00215162348 otherIndex=8 windSum=? windValue=1 oppValue=0 |
| 555 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 (-37.3404655,10.049655) tEnd=0.0019584472 other=10 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 556 | debugShowActiveSpans id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 (-37.337204,10.0620985) tEnd=1 other=26 otherT=0.0088538298 otherIndex=9 windSum=? windValue=1 oppValue=0 |
| 557 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 (-38.1512413,16.0773964) tEnd=0.000220493714 other=11 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 558 | debugShowActiveSpans id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 (-38.1519737,16.078661) tEnd=1 other=18 otherT=9.12397966e-05 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 559 | debugShowActiveSpans id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 (-43.0090332,19.8046188) tEnd=1 other=12 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 560 | debugShowActiveSpans id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 (-49.0795555,19.005188) tEnd=1 other=13 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 561 | debugShowActiveSpans id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 (-52.8062439,14.1493912) tEnd=1 other=14 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 562 | debugShowActiveSpans id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 (-49.0788383,19.0070419) tEnd=1 other=15 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 563 | debugShowActiveSpans id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 (-43.0082855,19.8062439) tEnd=1 other=16 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 564 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 (-38.1506348,16.0788383) tEnd=9.12397966e-05 other=17 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 565 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 (-38.1519737,16.078661) tEnd=0.00018431002 other=12 otherT=0.000220493714 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 566 | debugShowActiveSpans id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 (-38.1533356,16.0784817) tEnd=1 other=27 otherT=0.000444403399 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 567 | debugShowActiveSpans id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 (-49.0802841,19.0032997) tEnd=1 other=28 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 568 | debugShowActiveSpans id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 (-52.8073196,14.1453686) tEnd=0.000248459946 other=1 otherT=0 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 569 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 (-37.3485146,10.0192108) tEnd=0.0088538298 other=10 otherT=0.28665555 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 570 | debugShowActiveSpans id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 (-37.337204,10.0620985) tEnd=1 other=11 otherT=0.0019584472 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 571 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 (-38.1518631,16.0759315) tEnd=0.000444403399 other=26 otherT=1 otherIndex=10 windSum=? windValue=1 oppValue=0 |
| 572 | debugShowActiveSpans id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 (-38.1533356,16.0784817) tEnd=1 other=18 otherT=0.00018431002 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 573 | debugShowActiveSpans id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 (-43.0097923,19.8029671) tEnd=1 other=27 otherT=1 otherIndex=2 windSum=? windValue=1 oppValue=0 |
| 574 | debugShowActiveSpans id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 (-52.806778,14.1473942) tEnd=1 other=2 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 575 | debugShowActiveSpans id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 (-52.8073196,14.1453686) tEnd=1 other=0 otherT=1 otherIndex=1 windSum=? windValue=1 oppValue=0 |
| 576 | debugShowActiveSpans id=2 (-52.8075829,14.1443863 -52.8071823,14.1458902 -52.806778,14.1473942) t=0 (-52.8075829,14.1443863) tEnd=1 other=1 otherT=1 otherIndex=3 windSum=? windValue=1 oppValue=0 |
| 577 | activeOp id=10 t=0 tEnd=0.28665555 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 578 | markWinding id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 [2] (-37.3485146,10.0192108) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 579 | markWinding id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 [0] (-37.3404655,10.049655) tEnd=0.0019584472 newWindSum=-1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 580 | markAngle last id=11 windSum=? small=0 |
| 581 | markWinding id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 [8] (-37.3485146,10.0192108) tEnd=0.0088538298 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 582 | markAngle last id=26 windSum=? small=0 |
| 583 | findNextOp |
| 584 | dumpOne [10/2] next=26/6 sect=9/9 s=0.28665555 [2] e=0 [0] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 585 | dumpOne [26/6] next=10/3 sect=9/9 s=0.00215162348 [8] e=0.000444585761 [6] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 done operand |
| 586 | dumpOne [10/3] next=26/7 sect=25/25 s=0.28665555 [2] e=1 [3] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 |
| 587 | dumpOne [26/7] next=10/2 sect=25/25 s=0.00215162348 [8] e=0.0088538298 [9] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 operand |
| 588 | activeOp id=26 t=0.00215162348 tEnd=0.000444585761 op=union miFrom=1 miTo=1 suFrom=0 suTo=1 result=0 |
| 589 | activeOp id=10 t=0.28665555 tEnd=1 op=union miFrom=1 miTo=0 suFrom=1 suTo=1 result=0 |
| 590 | markDoneBinary id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0.28665555 [2] (-37.3485146,10.0192108) tEnd=1 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 591 | markDoneBinary id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0 [0] (-37.3404655,10.049655) tEnd=0.0019584472 newWindSum=-1 newOppSum=-1 oppSum=-1 windSum=-1 windValue=1 oppValue=0 |
| 592 | findNextOp chase.append id=11 windSum=-2147483647 small=0 |
| 593 | activeOp id=26 t=0.00215162348 tEnd=0.0088538298 op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1 |
| 594 | findNextOp chase.append id=26 windSum=-2147483647 small=0 |
| 595 | markDoneBinary id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 [0] (-37.351429,10.0082846) tEnd=0 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 596 | markDoneBinary id=10 (-37.351429,10.0082846 -37.3465042,10.0266895 -37.3404655,10.049655) t=0 [1] (-37.351429,10.0082846) tEnd=0.28665555 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 597 | findNextOp from:[10] to:[26] start=8 end=9 |
| 598 | bridgeOp current id=10 from=(-37.351429,10.0082846) to=(-37.3485146,10.0192108) |
| 599 | path.moveTo(-37.351429,10.0082846); |
| 600 | path.quadTo(-37.3500175,10.0135603, -37.3485146,10.0192108); |
| 601 | markWinding id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 [9] (-37.337204,10.0620985) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 602 | markWinding id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 [0] (-38.1518631,16.0759315) tEnd=0.000444403399 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 603 | markAngle last id=27 windSum=? small=0 |
| 604 | markWinding id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 [1] (-37.337204,10.0620985) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 605 | markWinding id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 [0] (-38.1512413,16.0773964) tEnd=0.000220493714 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 606 | markAngle last id=12 windSum=? small=0 |
| 607 | findNextOp |
| 608 | dumpOne [26/8] next=26/9 sect=9/9 s=0.0088538298 [9] e=0.00215162348 [8] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 operand |
| 609 | dumpOne [26/9] next=11/2 sect=25/21 s=0.0088538298 [9] e=1 [10] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 operand |
| 610 | dumpOne [11/2] next=11/1 sect=25/21 s=0.0019584472 [1] e=1 [2] sgn=-1 windVal=1 windSum=1 oppVal=0 oppSum=0 |
| 611 | dumpOne [11/1] next=26/8 sect=9/9 s=0.0019584472 [1] e=0 [0] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 done |
| 612 | activeOp id=26 t=0.0088538298 tEnd=1 op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1 |
| 613 | findNextOp chase.append id=27 windSum=-2147483647 small=0 |
| 614 | activeOp id=11 t=0.0019584472 tEnd=1 op=union miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 |
| 615 | findNextOp chase.append id=12 windSum=-2147483647 small=0 |
| 616 | activeOp id=11 t=0.0019584472 tEnd=0 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 617 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.00215162348 [8] (-37.3485146,10.0192108) tEnd=0.0088538298 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 618 | findNextOp from:[26] to:[26] start=9 end=10 |
| 619 | bridgeOp current id=26 from=(-37.3485146,10.0192108) to=(-37.337204,10.0620985) |
| 620 | path.quadTo(-37.3427315,10.0409307, -37.337204,10.0620985); |
| 621 | findNextOp simple |
| 622 | markDoneBinary id=26 (-37.3521919,10.0054388 -36.4947891,13.2063007 -38.1518631,16.0759315) t=0.0088538298 [9] (-37.337204,10.0620985) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 623 | bridgeOp current id=26 from=(-37.337204,10.0620985) to=(-38.1518631,16.0759315) |
| 624 | path.quadTo(-36.5094604,13.2317066, -38.1518631,16.0759315); |
| 625 | markWinding id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 [2] (-38.1533356,16.0784817) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 626 | markAngle last id=18 windSum=? small=0 |
| 627 | markWinding id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 [1] (-38.1533356,16.0784817) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 628 | markWinding id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 [0] (-43.0097923,19.8029671) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 629 | markWinding id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 [0] (-49.0802841,19.0032997) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 630 | markAngle last id=21 windSum=? small=0 |
| 631 | markWinding id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 [1] (-38.1519737,16.078661) tEnd=0.00018431002 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 632 | markAngle last id=18 windSum=1 small=0 |
| 633 | findNextOp |
| 634 | dumpOne [27/1] next=18/4 sect=5/5 s=0.000444403399 [1] e=0 [0] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 operand |
| 635 | dumpOne [18/4] next=27/2 sect=13/13 s=0.00018431002 [2] e=1 [3] sgn=-1 windVal=1 windSum=1 oppVal=0 oppSum=-1 |
| 636 | dumpOne [27/2] next=18/3 sect=21/17 s=0.000444403399 [1] e=1 [2] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=1 operand |
| 637 | dumpOne [18/3] next=27/1 sect=29/29 s=0.00018431002 [2] e=9.12397966e-05 [1] sgn=1 windVal=1 windSum=1 oppVal=0 oppSum=0 |
| 638 | activeOp id=18 t=0.00018431002 tEnd=1 op=union miFrom=0 miTo=1 suFrom=1 suTo=1 result=0 |
| 639 | markDoneBinary id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0.00018431002 [2] (-38.1533356,16.0784817) tEnd=1 newWindSum=1 newOppSum=-1 oppSum=-1 windSum=1 windValue=1 oppValue=0 |
| 640 | findNextOp chase.append id=18 windSum=-2147483647 small=0 |
| 641 | activeOp id=27 t=0.000444403399 tEnd=1 op=union miFrom=1 miTo=1 suFrom=1 suTo=0 result=0 |
| 642 | markDoneBinary id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0.000444403399 [1] (-38.1533356,16.0784817) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 oppValue=0 |
| 643 | markDoneBinary id=28 (-43.0097923,19.8029671 -46.2106552,20.6603737 -49.0802841,19.0032997) t=0 [0] (-43.0097923,19.8029671) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 oppValue=0 |
| 644 | markDoneBinary id=21 (-49.0802841,19.0032997 -51.949913,17.3462276 -52.8073196,14.1453686) t=0 [0] (-49.0802841,19.0032997) tEnd=1 newWindSum=-1 newOppSum=1 oppSum=1 windSum=-1 windValue=1 oppValue=0 |
| 645 | findNextOp chase.append id=21 windSum=-2147483647 small=0 |
| 646 | activeOp id=18 t=0.00018431002 tEnd=9.12397966e-05 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 647 | findNextOp chase.append id=18 windSum=1 small=0 |
| 648 | markDoneBinary id=27 (-38.1518631,16.0759315 -39.8089333,18.9455605 -43.0097923,19.8029671) t=0 [0] (-38.1518631,16.0759315) tEnd=0.000444403399 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 649 | findNextOp from:[27] to:[18] start=2 end=1 |
| 650 | bridgeOp current id=27 from=(-38.1518631,16.0759315) to=(-38.1533356,16.0784817) |
| 651 | path.quadTo(-38.1525993,16.0772076, -38.1533356,16.0784817); |
| 652 | markWinding id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 [1] (-38.1519737,16.078661) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 653 | markWinding id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 [0] (-43.0090332,19.8046188) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 654 | markWinding id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 [0] (-49.0795555,19.005188) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 655 | markWinding id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 [0] (-52.8062439,14.1493912) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 656 | markWinding id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 [0] (-49.0788383,19.0070419) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 657 | markWinding id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 [0] (-43.0082855,19.8062439) tEnd=1 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 658 | markWinding id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 [0] (-38.1506348,16.0788383) tEnd=9.12397966e-05 newWindSum=2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 659 | markAngle last id=18 windSum=1 small=0 |
| 660 | findNextOp |
| 661 | dumpOne [18/2] next=12/2 sect=13/13 s=9.12397966e-05 [1] e=0.00018431002 [2] sgn=-1 windVal=1 windSum=1 oppVal=0 oppSum=0 |
| 662 | dumpOne [12/2] next=18/1 sect=21/17 s=0.000220493714 [1] e=1 [2] sgn=-1 windVal=1 windSum=2 oppVal=0 oppSum=0 |
| 663 | dumpOne [18/1] next=12/1 sect=29/29 s=9.12397966e-05 [1] e=0 [0] sgn=1 windVal=1 windSum=2 oppVal=0 oppSum=0 |
| 664 | dumpOne [12/1] next=18/2 sect=5/5 s=0.000220493714 [1] e=0 [0] sgn=1 windVal=1 windSum=1 oppVal=0 oppSum=0 |
| 665 | activeOp id=12 t=0.000220493714 tEnd=1 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 666 | activeOp id=18 t=9.12397966e-05 tEnd=0 op=union miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 |
| 667 | activeOp id=12 t=0.000220493714 tEnd=0 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 668 | markDoneBinary id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=9.12397966e-05 [1] (-38.1519737,16.078661) tEnd=0.00018431002 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0 |
| 669 | findNextOp from:[18] to:[12] start=1 end=2 |
| 670 | bridgeOp current id=18 from=(-38.1533356,16.0784817) to=(-38.1519737,16.078661) |
| 671 | findNextOp simple |
| 672 | markDoneBinary id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0.000220493714 [1] (-38.1519737,16.078661) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 oppValue=0 |
| 673 | bridgeOp current id=12 from=(-38.1519737,16.078661) to=(-43.0090332,19.8046188) |
| 674 | path.lineTo(-38.1519737,16.078661); |
| 675 | path.quadTo(-39.8089142,18.947279, -43.0090332,19.8046188); |
| 676 | findNextOp simple |
| 677 | markDoneBinary id=13 (-43.0090332,19.8046188 -46.2098618,20.6621513 -49.0795555,19.005188) t=0 [0] (-43.0090332,19.8046188) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 oppValue=0 |
| 678 | bridgeOp current id=13 from=(-43.0090332,19.8046188) to=(-49.0795555,19.005188) |
| 679 | path.quadTo(-46.2098618,20.6621513, -49.0795555,19.005188); |
| 680 | findNextOp simple |
| 681 | markDoneBinary id=14 (-49.0795555,19.005188 -51.9483566,17.3487415 -52.8062439,14.1493912) t=0 [0] (-49.0795555,19.005188) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 oppValue=0 |
| 682 | bridgeOp current id=14 from=(-49.0795555,19.005188) to=(-52.8062439,14.1493912) |
| 683 | path.quadTo(-51.9483566,17.3487415, -52.8062439,14.1493912); |
| 684 | findNextOp simple |
| 685 | markDoneBinary id=15 (-52.8062439,14.1493912 -51.9485931,17.3501873 -49.0788383,19.0070419) t=0 [0] (-52.8062439,14.1493912) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 oppValue=0 |
| 686 | bridgeOp current id=15 from=(-52.8062439,14.1493912) to=(-49.0788383,19.0070419) |
| 687 | path.quadTo(-51.9485931,17.3501873, -49.0788383,19.0070419); |
| 688 | findNextOp simple |
| 689 | markDoneBinary id=16 (-49.0788383,19.0070419 -46.2090836,20.6638966 -43.0082855,19.8062439) t=0 [0] (-49.0788383,19.0070419) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 oppValue=0 |
| 690 | bridgeOp current id=16 from=(-49.0788383,19.0070419) to=(-43.0082855,19.8062439) |
| 691 | path.quadTo(-46.2090836,20.6638966, -43.0082855,19.8062439); |
| 692 | findNextOp simple |
| 693 | markDoneBinary id=17 (-43.0082855,19.8062439 -39.8074875,18.948595 -38.1506348,16.0788383) t=0 [0] (-43.0082855,19.8062439) tEnd=1 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 oppValue=0 |
| 694 | bridgeOp current id=17 from=(-43.0082855,19.8062439) to=(-38.1506348,16.0788383) |
| 695 | path.quadTo(-39.8074875,18.948595, -38.1506348,16.0788383); |
| 696 | findNextOp |
| 697 | dumpOne [18/1] next=12/1 sect=29/29 s=9.12397966e-05 [1] e=0 [0] sgn=1 windVal=1 windSum=2 oppVal=0 oppSum=0 |
| 698 | dumpOne [12/1] next=18/2 sect=5/5 s=0.000220493714 [1] e=0 [0] sgn=1 windVal=1 windSum=1 oppVal=0 oppSum=0 |
| 699 | dumpOne [18/2] next=12/2 sect=13/13 s=9.12397966e-05 [1] e=0.00018431002 [2] sgn=-1 windVal=1 windSum=1 oppVal=0 oppSum=0 done |
| 700 | dumpOne [12/2] next=18/1 sect=21/17 s=0.000220493714 [1] e=1 [2] sgn=-1 windVal=1 windSum=2 oppVal=0 oppSum=0 done |
| 701 | activeOp id=12 t=0.000220493714 tEnd=0 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 702 | activeOp id=18 t=9.12397966e-05 tEnd=0.00018431002 op=union miFrom=0 miTo=1 suFrom=0 suTo=0 result=1 |
| 703 | activeOp id=12 t=0.000220493714 tEnd=1 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 704 | markDoneBinary id=18 (-38.1506348,16.0788383 -52.8077469,14.1437778) t=0 [0] (-38.1506348,16.0788383) tEnd=9.12397966e-05 newWindSum=2 newOppSum=0 oppSum=0 windSum=2 windValue=1 oppValue=0 |
| 705 | findNextOp from:[18] to:[12] start=1 end=0 |
| 706 | bridgeOp current id=18 from=(-38.1506348,16.0788383) to=(-38.1519737,16.078661) |
| 707 | findNextOp simple |
| 708 | markDoneBinary id=12 (-38.1512413,16.0773964 -39.8082047,18.9470901 -43.0090332,19.8046188) t=0 [0] (-38.1512413,16.0773964) tEnd=0.000220493714 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0 |
| 709 | bridgeOp current id=12 from=(-38.1519737,16.078661) to=(-38.1512413,16.0773964) |
| 710 | path.lineTo(-38.1519737,16.078661); |
| 711 | path.quadTo(-38.1516075,16.0780296, -38.1512413,16.0773964); |
| 712 | findNextOp |
| 713 | dumpOne [11/2] next=11/1 sect=25/21 s=0.0019584472 [1] e=1 [2] sgn=-1 windVal=1 windSum=1 oppVal=0 oppSum=0 |
| 714 | dumpOne [11/1] next=26/8 sect=9/9 s=0.0019584472 [1] e=0 [0] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=-1 done |
| 715 | dumpOne [26/8] next=26/9 sect=9/9 s=0.0088538298 [9] e=0.00215162348 [8] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 done operand |
| 716 | dumpOne [26/9] next=11/2 sect=25/21 s=0.0088538298 [9] e=1 [10] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 done operand |
| 717 | activeOp id=11 t=0.0019584472 tEnd=0 op=union miFrom=1 miTo=0 suFrom=0 suTo=0 result=1 |
| 718 | activeOp id=26 t=0.0088538298 tEnd=0.00215162348 op=union miFrom=0 miTo=0 suFrom=0 suTo=1 result=1 |
| 719 | activeOp id=26 t=0.0088538298 tEnd=1 op=union miFrom=0 miTo=0 suFrom=1 suTo=0 result=1 |
| 720 | markDoneBinary id=11 (-37.3404655,10.049655 -36.5053596,13.2268972 -38.1512413,16.0773964) t=0.0019584472 [1] (-37.337204,10.0620985) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0 |
| 721 | findNextOp from:[11] to:[26] start=9 end=10 |
| 722 | bridgeOp current id=11 from=(-38.1512413,16.0773964) to=(-37.337204,10.0620985) |
| 723 | path.quadTo(-36.5085831,13.23248, -37.337204,10.0620985); |
| 724 | markWinding id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 [0] (-52.8073196,14.1453686) tEnd=0 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 725 | markWinding id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 [1] (-52.8073196,14.1453686) tEnd=0 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 726 | markWinding id=1 (-52.8073196,14.1453686 -52.8075829,14.1443863) t=0 [2] (-52.8073196,14.1453686) tEnd=1 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 727 | markWinding id=2 (-52.8075829,14.1443863 -52.8071823,14.1458902 -52.806778,14.1473942) t=0 [0] (-52.8075829,14.1443863) tEnd=1 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 728 | markWinding id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 [0] (-52.806778,14.1473942) tEnd=1 newWindSum=2 newOppSum=-1 oppSum=? windSum=? windValue=1 oppValue=0 |
| 729 | markAngle last id=0 windSum=? small=0 |
| 730 | markWinding id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 [0] (-52.8073196,14.1453686) tEnd=0 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 oppValue=0 |
| 731 | markWinding id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 [1] (-52.8073196,14.1453686) tEnd=0 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 oppValue=0 |
| 732 | markWinding id=22 (-52.8073196,14.1453686 -53.6647263,10.9445057 -52.0076561,8.07487679) t=0 [2] (-52.8073196,14.1453686) tEnd=0.000248459946 newWindSum=-1 newOppSum=2 oppSum=? windSum=? windValue=1 oppValue=0 |
| 733 | markAngle last id=22 windSum=? small=0 |
| 734 | markWinding id=0 (-52.806778,14.1473942 -52.8073196,14.1453686) t=0 [0] (-52.806778,14.1473942) tEnd=1 newWindSum=2 newOppSum=0 oppSum=-1 windSum=2 windValue=1 oppValue=0 |
| 735 | /puregit/src/pathops/SkOpSegment.cpp:4013: failed assertion "span->fOppSum == -0x7FFFFFFF || span->fOppSum == oppWinding" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 736 | </div> |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 737 | </div> |
| 738 | |
| 739 | <script type="text/javascript"> |
| 740 | |
| 741 | var testDivs = [ |
caryclark | 6f726ad | 2014-10-28 10:33:09 -0700 | [diff] [blame] | 742 | fuzz763_34974, |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 743 | ]; |
| 744 | |
| 745 | var decimal_places = 3; // make this 3 to show more precision |
| 746 | |
| 747 | var tests = []; |
| 748 | var testLines = []; |
| 749 | var testTitles = []; |
| 750 | var testIndex = 0; |
| 751 | var ctx; |
| 752 | |
| 753 | var xmin, xmax, focusXmin, focusXmax; |
| 754 | var ymin, ymax, focusYmin, focusYmax; |
| 755 | var scale; |
| 756 | var mouseX, mouseY; |
| 757 | var srcLeft, srcTop; |
| 758 | var screenWidth, screenHeight; |
| 759 | var drawnPts, drawnLines, drawnQuads, drawnCubics; |
| 760 | var curveT = 0; |
| 761 | |
| 762 | var pt_labels = 2; |
| 763 | var collect_bounds = false; |
| 764 | var control_lines = 0; |
| 765 | var curve_t = false; |
| 766 | var debug_xy = 1; |
| 767 | var focus_enabled = false; |
| 768 | var focus_on_selection = false; |
| 769 | var step_limit = 0; |
| 770 | var draw_active = false; |
| 771 | var draw_add = false; |
| 772 | var draw_angle = 0; |
| 773 | var draw_deriviatives = 0; |
| 774 | var draw_hints = false; |
| 775 | var draw_hodo = 0; |
| 776 | var draw_id = false; |
| 777 | var draw_intersection = 0; |
| 778 | var draw_intersectT = false; |
| 779 | var draw_legend = true; |
| 780 | var draw_log = false; |
| 781 | var draw_mark = false; |
| 782 | var draw_midpoint = false; |
| 783 | var draw_op = 0; |
| 784 | var draw_sequence = false; |
| 785 | var draw_sort = 0; |
| 786 | var draw_path = 3; |
| 787 | var draw_computed = 0; |
| 788 | var retina_scale = !!window.devicePixelRatio; |
| 789 | |
| 790 | var activeCount = 0; |
| 791 | var addCount = 0; |
| 792 | var angleCount = 0; |
| 793 | var opCount = 0; |
| 794 | var sectCount = 0; |
| 795 | var sortCount = 0; |
| 796 | var markCount = 0; |
| 797 | var activeMax = 0; |
| 798 | var addMax = 0; |
| 799 | var angleMax = 0; |
| 800 | var sectMax = 0; |
| 801 | var sectMax2 = 0; |
| 802 | var sortMax = 0; |
| 803 | var markMax = 0; |
| 804 | var opMax = 0; |
| 805 | var stepMax = 0; |
| 806 | var lastIndex = 0; |
| 807 | var hasPath = false; |
| 808 | var hasComputedPath = false; |
| 809 | |
| 810 | var firstActiveSpan = -1; |
| 811 | var logStart = -1; |
| 812 | var logRange = 0; |
| 813 | |
| 814 | var SPAN_ID = 0; |
| 815 | var SPAN_X1 = SPAN_ID + 1; |
| 816 | var SPAN_Y1 = SPAN_X1 + 1; |
| 817 | var SPAN_X2 = SPAN_Y1 + 1; |
| 818 | var SPAN_Y2 = SPAN_X2 + 1; |
| 819 | var SPAN_L_T = SPAN_Y2 + 1; |
| 820 | var SPAN_L_TX = SPAN_L_T + 1; |
| 821 | var SPAN_L_TY = SPAN_L_TX + 1; |
| 822 | var SPAN_L_TEND = SPAN_L_TY + 1; |
| 823 | var SPAN_L_OTHER = SPAN_L_TEND + 1; |
| 824 | var SPAN_L_OTHERT = SPAN_L_OTHER + 1; |
| 825 | var SPAN_L_OTHERI = SPAN_L_OTHERT + 1; |
| 826 | var SPAN_L_SUM = SPAN_L_OTHERI + 1; |
| 827 | var SPAN_L_VAL = SPAN_L_SUM + 1; |
| 828 | var SPAN_L_OPP = SPAN_L_VAL + 1; |
| 829 | |
| 830 | var SPAN_X3 = SPAN_Y2 + 1; |
| 831 | var SPAN_Y3 = SPAN_X3 + 1; |
| 832 | var SPAN_Q_T = SPAN_Y3 + 1; |
| 833 | var SPAN_Q_TX = SPAN_Q_T + 1; |
| 834 | var SPAN_Q_TY = SPAN_Q_TX + 1; |
| 835 | var SPAN_Q_TEND = SPAN_Q_TY + 1; |
| 836 | var SPAN_Q_OTHER = SPAN_Q_TEND + 1; |
| 837 | var SPAN_Q_OTHERT = SPAN_Q_OTHER + 1; |
| 838 | var SPAN_Q_OTHERI = SPAN_Q_OTHERT + 1; |
| 839 | var SPAN_Q_SUM = SPAN_Q_OTHERI + 1; |
| 840 | var SPAN_Q_VAL = SPAN_Q_SUM + 1; |
| 841 | var SPAN_Q_OPP = SPAN_Q_VAL + 1; |
| 842 | |
| 843 | var SPAN_X4 = SPAN_Y3 + 1; |
| 844 | var SPAN_Y4 = SPAN_X4 + 1; |
| 845 | var SPAN_C_T = SPAN_Y4 + 1; |
| 846 | var SPAN_C_TX = SPAN_C_T + 1; |
| 847 | var SPAN_C_TY = SPAN_C_TX + 1; |
| 848 | var SPAN_C_TEND = SPAN_C_TY + 1; |
| 849 | var SPAN_C_OTHER = SPAN_C_TEND + 1; |
| 850 | var SPAN_C_OTHERT = SPAN_C_OTHER + 1; |
| 851 | var SPAN_C_OTHERI = SPAN_C_OTHERT + 1; |
| 852 | var SPAN_C_SUM = SPAN_C_OTHERI + 1; |
| 853 | var SPAN_C_VAL = SPAN_C_SUM + 1; |
| 854 | var SPAN_C_OPP = SPAN_C_VAL + 1; |
| 855 | |
| 856 | var ACTIVE_LINE_SPAN = 1; |
| 857 | var ACTIVE_QUAD_SPAN = ACTIVE_LINE_SPAN + 1; |
| 858 | var ACTIVE_CUBIC_SPAN = ACTIVE_QUAD_SPAN + 1; |
| 859 | |
| 860 | var ADD_MOVETO = ACTIVE_CUBIC_SPAN + 1; |
| 861 | var ADD_LINETO = ADD_MOVETO + 1; |
| 862 | var ADD_QUADTO = ADD_LINETO + 1; |
| 863 | var ADD_CUBICTO = ADD_QUADTO + 1; |
| 864 | var ADD_CLOSE = ADD_CUBICTO + 1; |
| 865 | var ADD_FILL = ADD_CLOSE + 1; |
| 866 | |
| 867 | var PATH_LINE = ADD_FILL + 1; |
| 868 | var PATH_QUAD = PATH_LINE + 1; |
| 869 | var PATH_CUBIC = PATH_QUAD + 1; |
| 870 | |
| 871 | var INTERSECT_LINE = PATH_CUBIC + 1; |
| 872 | var INTERSECT_LINE_2 = INTERSECT_LINE + 1; |
| 873 | var INTERSECT_LINE_NO = INTERSECT_LINE_2 + 1; |
| 874 | var INTERSECT_QUAD_LINE = INTERSECT_LINE_NO + 1; |
| 875 | var INTERSECT_QUAD_LINE_2 = INTERSECT_QUAD_LINE + 1; |
| 876 | var INTERSECT_QUAD_LINE_NO = INTERSECT_QUAD_LINE_2 + 1; |
| 877 | var INTERSECT_QUAD = INTERSECT_QUAD_LINE_NO + 1; |
| 878 | var INTERSECT_QUAD_2 = INTERSECT_QUAD + 1; |
| 879 | var INTERSECT_QUAD_NO = INTERSECT_QUAD_2 + 1; |
| 880 | var INTERSECT_SELF_CUBIC = INTERSECT_QUAD_NO + 1; |
| 881 | var INTERSECT_SELF_CUBIC_NO = INTERSECT_SELF_CUBIC + 1; |
| 882 | var INTERSECT_CUBIC_LINE = INTERSECT_SELF_CUBIC_NO + 1; |
| 883 | var INTERSECT_CUBIC_LINE_2 = INTERSECT_CUBIC_LINE + 1; |
| 884 | var INTERSECT_CUBIC_LINE_3 = INTERSECT_CUBIC_LINE_2 + 1; |
| 885 | var INTERSECT_CUBIC_LINE_NO = INTERSECT_CUBIC_LINE_3 + 1; |
| 886 | var INTERSECT_CUBIC_QUAD = INTERSECT_CUBIC_LINE_NO + 1; |
| 887 | var INTERSECT_CUBIC_QUAD_2 = INTERSECT_CUBIC_QUAD + 1; |
| 888 | var INTERSECT_CUBIC_QUAD_3 = INTERSECT_CUBIC_QUAD_2 + 1; |
| 889 | var INTERSECT_CUBIC_QUAD_4 = INTERSECT_CUBIC_QUAD_3 + 1; |
| 890 | var INTERSECT_CUBIC_QUAD_NO = INTERSECT_CUBIC_QUAD_4 + 1; |
| 891 | var INTERSECT_CUBIC = INTERSECT_CUBIC_QUAD_NO + 1; |
| 892 | var INTERSECT_CUBIC_2 = INTERSECT_CUBIC + 1; |
| 893 | var INTERSECT_CUBIC_3 = INTERSECT_CUBIC_2 + 1; |
| 894 | var INTERSECT_CUBIC_4 = INTERSECT_CUBIC_3 + 1; |
| 895 | // FIXME: add cubic 5- 9 |
| 896 | var INTERSECT_CUBIC_NO = INTERSECT_CUBIC_4 + 1; |
| 897 | |
| 898 | var SORT_UNARY = INTERSECT_CUBIC_NO + 1; |
| 899 | var SORT_BINARY = SORT_UNARY + 1; |
| 900 | |
| 901 | var OP_DIFFERENCE = SORT_BINARY + 1; |
| 902 | var OP_INTERSECT = OP_DIFFERENCE + 1; |
| 903 | var OP_UNION = OP_INTERSECT + 1; |
| 904 | var OP_XOR = OP_UNION + 1; |
| 905 | |
| 906 | var MARK_LINE = OP_XOR + 1; |
| 907 | var MARK_QUAD = MARK_LINE + 1; |
| 908 | var MARK_CUBIC = MARK_QUAD + 1; |
| 909 | var MARK_DONE_LINE = MARK_CUBIC + 1; |
| 910 | var MARK_DONE_QUAD = MARK_DONE_LINE + 1; |
| 911 | var MARK_DONE_CUBIC = MARK_DONE_QUAD + 1; |
| 912 | var MARK_UNSORTABLE_LINE = MARK_DONE_CUBIC + 1; |
| 913 | var MARK_UNSORTABLE_QUAD = MARK_UNSORTABLE_LINE + 1; |
| 914 | var MARK_UNSORTABLE_CUBIC = MARK_UNSORTABLE_QUAD + 1; |
| 915 | var MARK_SIMPLE_LINE = MARK_UNSORTABLE_CUBIC + 1; |
| 916 | var MARK_SIMPLE_QUAD = MARK_SIMPLE_LINE + 1; |
| 917 | var MARK_SIMPLE_CUBIC = MARK_SIMPLE_QUAD + 1; |
| 918 | var MARK_SIMPLE_DONE_LINE = MARK_SIMPLE_CUBIC + 1; |
| 919 | var MARK_SIMPLE_DONE_QUAD = MARK_SIMPLE_DONE_LINE + 1; |
| 920 | var MARK_SIMPLE_DONE_CUBIC = MARK_SIMPLE_DONE_QUAD + 1; |
| 921 | var MARK_DONE_UNARY_LINE = MARK_SIMPLE_DONE_CUBIC + 1; |
| 922 | var MARK_DONE_UNARY_QUAD = MARK_DONE_UNARY_LINE + 1; |
| 923 | var MARK_DONE_UNARY_CUBIC = MARK_DONE_UNARY_QUAD + 1; |
| 924 | var MARK_ANGLE_LAST = MARK_DONE_UNARY_CUBIC + 1; |
| 925 | |
| 926 | var COMPUTED_SET_1 = MARK_ANGLE_LAST + 1; |
| 927 | var COMPUTED_SET_2 = COMPUTED_SET_1 + 1; |
| 928 | |
| 929 | var ANGLE_AFTER = COMPUTED_SET_2; |
| 930 | var ANGLE_AFTER2 = ANGLE_AFTER + 1; |
| 931 | |
| 932 | var ACTIVE_OP = ANGLE_AFTER2 + 1; |
| 933 | |
| 934 | var FRAG_TYPE_LAST = ACTIVE_OP; |
| 935 | |
| 936 | var REC_TYPE_UNKNOWN = -1; |
| 937 | var REC_TYPE_PATH = 0; |
| 938 | var REC_TYPE_SECT = 1; |
| 939 | var REC_TYPE_ACTIVE = 2; |
| 940 | var REC_TYPE_ADD = 3; |
| 941 | var REC_TYPE_SORT = 4; |
| 942 | var REC_TYPE_OP = 5; |
| 943 | var REC_TYPE_MARK = 6; |
| 944 | var REC_TYPE_COMPUTED = 7; |
| 945 | var REC_TYPE_COIN = 8; |
| 946 | var REC_TYPE_ANGLE = 9; |
| 947 | var REC_TYPE_ACTIVE_OP = 10; |
| 948 | var REC_TYPE_LAST = REC_TYPE_ACTIVE_OP; |
| 949 | |
| 950 | function strs_to_nums(strs) { |
| 951 | var result = []; |
| 952 | for (var idx = 1; idx < strs.length; ++idx) { |
| 953 | var str = strs[idx]; |
| 954 | var num = parseFloat(str); |
| 955 | if (isNaN(num)) { |
| 956 | result.push(str); |
| 957 | } else { |
| 958 | result.push(num); |
| 959 | } |
| 960 | } |
| 961 | return result; |
| 962 | } |
| 963 | |
| 964 | function filter_str_by(id, str, regex, array) { |
| 965 | if (regex.test(str)) { |
| 966 | var strs = regex.exec(str); |
| 967 | var result = strs_to_nums(strs); |
| 968 | array.push(id); |
| 969 | array.push(result); |
| 970 | return true; |
| 971 | } |
| 972 | return false; |
| 973 | } |
| 974 | |
| 975 | function construct_regexp2(pattern) { |
| 976 | var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); |
| 977 | escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); |
| 978 | escape = escape.replace(/CUBIC_VAL/g, "\\(P_VAL P_VAL P_VAL P_VAL\\)"); |
| 979 | escape = escape.replace(/QUAD_VAL/g, "\\(P_VAL P_VAL P_VAL\\)"); |
| 980 | escape = escape.replace(/LINE_VAL/g, "\\(P_VAL P_VAL\\)"); |
| 981 | escape = escape.replace(/FILL_TYPE/g, "SkPath::k[a-zA-Z]+_FillType"); |
| 982 | escape = escape.replace(/PT_VAL/g, "\\(P_VAL\\)"); |
| 983 | escape = escape.replace(/P_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?, ?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
| 984 | escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)"); |
| 985 | escape = escape.replace(/PATH/g, "pathB?"); |
| 986 | escape = escape.replace(/IDX/g, "(\\d+)"); |
| 987 | escape = escape.replace(/NUM/g, "(-?\\d+)"); |
| 988 | escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); |
| 989 | return new RegExp(escape, 'i'); |
| 990 | } |
| 991 | |
| 992 | function construct_regexp2c(pattern) { |
| 993 | var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); |
| 994 | escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); |
| 995 | escape = escape.replace(/CUBIC_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}"); |
| 996 | escape = escape.replace(/QUAD_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}"); |
| 997 | escape = escape.replace(/LINE_VAL/g, "(?:\\$\\d = )?\\{\\{P_VAL\\}, \\{P_VAL\\}\\}"); |
| 998 | escape = escape.replace(/FILL_TYPE/g, "SkPath::k[a-zA-Z]+_FillType"); |
| 999 | escape = escape.replace(/PT_VAL/g, "\\{\\{P_VAL\\}\\}"); |
| 1000 | escape = escape.replace(/P_VAL/g, "(?:f?[xX] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?,(?: f?[yY] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
| 1001 | escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)"); |
| 1002 | escape = escape.replace(/OPER/g, "[a-z]+"); |
| 1003 | escape = escape.replace(/PATH/g, "pathB?"); |
| 1004 | escape = escape.replace(/T_F/g, "([TF])"); |
| 1005 | escape = escape.replace(/IDX/g, "(\\d+)"); |
| 1006 | escape = escape.replace(/NUM/g, "(-?\\d+)"); |
| 1007 | escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); |
| 1008 | return new RegExp(escape, 'i'); |
| 1009 | } |
| 1010 | |
| 1011 | function match_regexp(str, lineNo, array, id, pattern) { |
| 1012 | var regex = construct_regexp2(pattern); |
| 1013 | if (filter_str_by(id, str, regex, array)) { |
| 1014 | return true; |
| 1015 | } |
| 1016 | regex = construct_regexp2c(pattern); |
| 1017 | return filter_str_by(id, str, regex, array); |
| 1018 | } |
| 1019 | |
| 1020 | function endsWith(str, suffix) { |
| 1021 | return str.indexOf(suffix, str.length - suffix.length) !== -1; |
| 1022 | } |
| 1023 | |
| 1024 | function parse_all(test) { |
| 1025 | var lines = test.match(/[^\r\n]+/g); |
| 1026 | var records = []; // a rec can be the original paths, a set of intersections, a set of active spans, a sort, or a path add |
| 1027 | var record = []; |
| 1028 | var recType = REC_TYPE_UNKNOWN; |
| 1029 | var lastLineNo; |
| 1030 | var moveX, moveY; |
| 1031 | for (var lineNo = 0; lineNo < lines.length; ++lineNo) { |
| 1032 | var line = lines[lineNo]; |
| 1033 | if (line.length == 0) { |
| 1034 | continue; |
| 1035 | } |
| 1036 | var opStart = "SkOpSegment::"; |
| 1037 | if (line.lastIndexOf(opStart, 0) === 0) { |
| 1038 | line = line.substr(opStart.length); |
| 1039 | } |
| 1040 | var angleStart = "SkOpAngle::"; |
| 1041 | if (line.lastIndexOf(angleStart, 0) === 0) { |
| 1042 | line = line.substr(angleStart.length); |
| 1043 | } |
| 1044 | var type = line.lastIndexOf("debugShowActiveSpans", 0) === 0 ? REC_TYPE_ACTIVE |
| 1045 | : line.lastIndexOf("debugShowTs", 0) === 0 ? REC_TYPE_COIN |
| 1046 | : line.lastIndexOf("debugShow", 0) === 0 ? REC_TYPE_SECT |
| 1047 | : line.lastIndexOf("activeOp", 0) === 0 ? REC_TYPE_ACTIVE_OP |
| 1048 | : line.lastIndexOf("computed", 0) === 0 ? REC_TYPE_COMPUTED |
| 1049 | : line.lastIndexOf("debugOne", 0) === 0 ? REC_TYPE_SORT |
| 1050 | : line.lastIndexOf("dumpOne", 0) === 0 ? REC_TYPE_SORT |
| 1051 | : line.lastIndexOf("pathB.", 0) === 0 ? REC_TYPE_ADD |
| 1052 | : line.lastIndexOf("path.", 0) === 0 ? REC_TYPE_ADD |
| 1053 | : line.lastIndexOf("after", 0) === 0 ? REC_TYPE_ANGLE |
| 1054 | : line.lastIndexOf("mark", 0) === 0 ? REC_TYPE_MARK |
| 1055 | : line.lastIndexOf(" {{", 0) === 0 ? REC_TYPE_COMPUTED |
| 1056 | : line.lastIndexOf("{{", 0) === 0 ? REC_TYPE_PATH |
| 1057 | : line.lastIndexOf("op", 0) === 0 ? REC_TYPE_OP |
| 1058 | : line.lastIndexOf("$", 0) === 0 ? REC_TYPE_PATH |
| 1059 | : REC_TYPE_UNKNOWN; |
| 1060 | if (recType != type || recType == REC_TYPE_ADD || recType == REC_TYPE_SECT |
| 1061 | || recType == REC_TYPE_ACTIVE_OP || recType == REC_TYPE_ANGLE) { |
| 1062 | if (recType != REC_TYPE_UNKNOWN) { |
| 1063 | records.push(recType); |
| 1064 | records.push(lastLineNo); |
| 1065 | records.push(record); |
| 1066 | } |
| 1067 | record = []; |
| 1068 | recType = type; |
| 1069 | lastLineNo = lineNo; |
| 1070 | } |
| 1071 | var found = false; |
| 1072 | switch (recType) { |
| 1073 | case REC_TYPE_ACTIVE: |
| 1074 | found = match_regexp(line, lineNo, record, ACTIVE_LINE_SPAN, "debugShowActiveSpans" + |
| 1075 | " id=IDX LINE_VAL t=T_VAL PT_VAL tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=NUM" |
| 1076 | ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" + |
| 1077 | " id=IDX QUAD_VAL t=T_VAL PT_VAL tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=NUM" |
| 1078 | ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" + |
| 1079 | " id=IDX CUBIC_VAL t=T_VAL PT_VAL tEnd=T_VAL other=IDX otherT=T_VAL otherIndex=IDX windSum=OPT windValue=IDX oppValue=NUM" |
| 1080 | ); |
| 1081 | break; |
| 1082 | case REC_TYPE_ACTIVE_OP: |
| 1083 | found = match_regexp(line, lineNo, record, ACTIVE_OP, "activeOp" + |
| 1084 | " id=IDX t=T_VAL tEnd=T_VAL op=OPER miFrom=NUM miTo=NUM suFrom=NUM suTo=NUM result=IDX" |
| 1085 | ); |
| 1086 | break; |
| 1087 | case REC_TYPE_ADD: |
| 1088 | if (match_regexp(line, lineNo, record, ADD_MOVETO, "PATH.moveTo(P_VAL);")) { |
| 1089 | moveX = record[1][0]; |
| 1090 | moveY = record[1][1]; |
| 1091 | found = true; |
| 1092 | } else if (match_regexp(line, lineNo, record, ADD_LINETO, "PATH.lineTo(P_VAL);")) { |
| 1093 | record[1].unshift(moveY); |
| 1094 | record[1].unshift(moveX); |
| 1095 | moveX = record[1][2]; |
| 1096 | moveY = record[1][3]; |
| 1097 | found = true; |
| 1098 | } else if (match_regexp(line, lineNo, record, ADD_QUADTO, "PATH.quadTo(P_VAL, P_VAL);")) { |
| 1099 | record[1].unshift(moveY); |
| 1100 | record[1].unshift(moveX); |
| 1101 | moveX = record[1][4]; |
| 1102 | moveY = record[1][5]; |
| 1103 | found = true; |
| 1104 | } else if (match_regexp(line, lineNo, record, ADD_CUBICTO, "PATH.cubicTo(P_VAL, P_VAL, P_VAL);")) { |
| 1105 | record[1].unshift(moveY); |
| 1106 | record[1].unshift(moveX); |
| 1107 | moveX = record[1][6]; |
| 1108 | moveY = record[1][7]; |
| 1109 | found = true; |
| 1110 | } else if (match_regexp(line, lineNo, record, ADD_FILL, "PATH.setFillType(FILL_TYPE);")) { |
| 1111 | found = true; |
| 1112 | } else { |
| 1113 | found = match_regexp(line, lineNo, record, ADD_CLOSE, "PATH.close();"); |
| 1114 | } |
| 1115 | break; |
| 1116 | case REC_TYPE_ANGLE: |
| 1117 | found = match_regexp(line, lineNo, record, ANGLE_AFTER, "after " + |
| 1118 | "id=IDX IDX/IDX tStart=T_VAL tEnd=T_VAL < id=IDX IDX/IDX tStart=T_VAL tEnd=T_VAL < id=IDX IDX/IDX tStart=T_VAL tEnd=T_VAL T_F IDX"); |
| 1119 | if (found) { |
| 1120 | break; |
| 1121 | } |
| 1122 | found = match_regexp(line, lineNo, record, ANGLE_AFTER2, "after " + |
| 1123 | "[IDX/IDX] NUM/NUM tStart=T_VAL tEnd=T_VAL < [IDX/IDX] NUM/NUM tStart=T_VAL tEnd=T_VAL < [IDX/IDX] NUM/NUM tStart=T_VAL tEnd=T_VAL T_F IDX"); |
| 1124 | break; |
| 1125 | case REC_TYPE_COIN: |
| 1126 | found = true; |
| 1127 | break; |
| 1128 | case REC_TYPE_COMPUTED: |
| 1129 | found = line == "computed quadratics given" |
| 1130 | || match_regexp(line, lineNo, record, COMPUTED_SET_1, "computed quadratics set 1" |
| 1131 | ) || match_regexp(line, lineNo, record, COMPUTED_SET_2, "computed quadratics set 2" |
| 1132 | ) || match_regexp(line, lineNo, record, PATH_QUAD, " QUAD_VAL," |
| 1133 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, " CUBIC_VAL," |
| 1134 | ); |
| 1135 | break; |
| 1136 | case REC_TYPE_PATH: |
| 1137 | found = match_regexp(line, lineNo, record, PATH_LINE, "LINE_VAL" |
| 1138 | ) || match_regexp(line, lineNo, record, PATH_QUAD, "QUAD_VAL" |
| 1139 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, "CUBIC_VAL" |
| 1140 | ); |
| 1141 | break; |
| 1142 | case REC_TYPE_SECT: |
| 1143 | found = match_regexp(line, lineNo, record, INTERSECT_LINE, "debugShowLineIntersection" + |
| 1144 | " wtTs[0]=T_VAL LINE_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1145 | ) || match_regexp(line, lineNo, record, INTERSECT_LINE_2, "debugShowLineIntersection" + |
| 1146 | " wtTs[0]=T_VAL LINE_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1147 | ) || match_regexp(line, lineNo, record, INTERSECT_LINE_NO, "debugShowLineIntersection" + |
| 1148 | " no intersect LINE_VAL LINE_VAL" |
| 1149 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE, "debugShowQuadLineIntersection" + |
| 1150 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1151 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_2, "debugShowQuadLineIntersection" + |
| 1152 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1153 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_NO, "debugShowQuadLineIntersection" + |
| 1154 | " no intersect QUAD_VAL LINE_VAL" |
| 1155 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD, "debugShowQuadIntersection" + |
| 1156 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL" |
| 1157 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_2, "debugShowQuadIntersection" + |
| 1158 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL" |
| 1159 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_NO, "debugShowQuadIntersection" + |
| 1160 | " no intersect QUAD_VAL QUAD_VAL" |
| 1161 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE, "debugShowCubicLineIntersection" + |
| 1162 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1163 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_2, "debugShowCubicLineIntersection" + |
| 1164 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1165 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_3, "debugShowCubicLineIntersection" + |
| 1166 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL" |
| 1167 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_NO, "debugShowCubicLineIntersection" + |
| 1168 | " no intersect CUBIC_VAL LINE_VAL" |
| 1169 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD, "debugShowCubicQuadIntersection" + |
| 1170 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL" |
| 1171 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_2, "debugShowCubicQuadIntersection" + |
| 1172 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL" |
| 1173 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_3, "debugShowCubicQuadIntersection" + |
| 1174 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL" |
| 1175 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_4, "debugShowCubicQuadIntersection" + |
| 1176 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL wtTs[3]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL wnTs[3]=T_VAL" |
| 1177 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_NO, "debugShowCubicQuadIntersection" + |
| 1178 | " no intersect CUBIC_VAL QUAD_VAL" |
| 1179 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC, "debugShowCubicIntersection" + |
| 1180 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL" |
| 1181 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_2, "debugShowCubicIntersection" + |
| 1182 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL" |
| 1183 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_3, "debugShowCubicIntersection" + |
| 1184 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL" |
| 1185 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_4, "debugShowCubicIntersection" + |
| 1186 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wtTs[2]=T_VAL PT_VAL wtTs[3]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL wnTs[3]=T_VAL" |
| 1187 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_NO, "debugShowCubicIntersection" + |
| 1188 | " no intersect CUBIC_VAL CUBIC_VAL" |
| 1189 | ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC, "debugShowCubicIntersection" + |
| 1190 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL" |
| 1191 | ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC_NO, "debugShowCubicIntersection" + |
| 1192 | " no self intersect CUBIC_VAL" |
| 1193 | ); |
| 1194 | break; |
| 1195 | case REC_TYPE_SORT: |
| 1196 | var hasDone = / done/.test(line); |
| 1197 | var hasUnorderable = / unorderable/.test(line); |
| 1198 | var hasSmall = / small/.test(line); |
| 1199 | var hasTiny = / tiny/.test(line); |
| 1200 | var hasOperand = / operand/.test(line); |
| 1201 | var hasStop = / stop/.test(line); |
| 1202 | line.replace(/[ a-z]+$/, ""); |
| 1203 | found = match_regexp(line, lineNo, record, SORT_UNARY, "debugOne" + |
| 1204 | " [IDX/IDX] next=IDX/IDX sect=IDX/IDX s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT" |
| 1205 | ) || match_regexp(line, lineNo, record, SORT_BINARY, "debugOne" + |
| 1206 | " [IDX/IDX] next=IDX/IDX sect=IDX/IDX s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT oppVal=IDX oppSum=OPT" |
| 1207 | ) || match_regexp(line, lineNo, record, SORT_UNARY, "dumpOne" + |
| 1208 | " [IDX/IDX] next=IDX/IDX sect=NUM/NUM s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT" |
| 1209 | ) || match_regexp(line, lineNo, record, SORT_BINARY, "dumpOne" + |
| 1210 | " [IDX/IDX] next=IDX/IDX sect=NUM/NUM s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT oppVal=IDX oppSum=OPT" |
| 1211 | ); |
| 1212 | if (found) { |
| 1213 | record[1].push(hasDone); |
| 1214 | record[1].push(hasUnorderable); |
| 1215 | record[1].push(hasSmall); |
| 1216 | record[1].push(hasTiny); |
| 1217 | record[1].push(hasOperand); |
| 1218 | record[1].push(hasStop); |
| 1219 | } |
| 1220 | break; |
| 1221 | case REC_TYPE_MARK: |
| 1222 | found = match_regexp(line, lineNo, record, MARK_LINE, "markWinding" + |
| 1223 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" |
| 1224 | ) || match_regexp(line, lineNo, record, MARK_QUAD, "markWinding" + |
| 1225 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" |
| 1226 | ) || match_regexp(line, lineNo, record, MARK_CUBIC, "markWinding" + |
| 1227 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" |
| 1228 | ) || match_regexp(line, lineNo, record, MARK_DONE_LINE, "markDoneBinary" + |
| 1229 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" |
| 1230 | ) || match_regexp(line, lineNo, record, MARK_DONE_QUAD, "markDoneBinary" + |
| 1231 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" |
| 1232 | ) || match_regexp(line, lineNo, record, MARK_DONE_CUBIC, "markDoneBinary" + |
| 1233 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=NUM oppSum=OPT windSum=OPT windValue=IDX" |
| 1234 | ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_LINE, "markUnsortable" + |
| 1235 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1236 | ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_QUAD, "markUnsortable" + |
| 1237 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1238 | ) || match_regexp(line, lineNo, record, MARK_UNSORTABLE_CUBIC, "markUnsortable" + |
| 1239 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1240 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_LINE, "markWinding" + |
| 1241 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1242 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_QUAD, "markWinding" + |
| 1243 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1244 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_CUBIC, "markWinding" + |
| 1245 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1246 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_DONE_LINE, "markDone" + |
| 1247 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1248 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_DONE_QUAD, "markDone" + |
| 1249 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1250 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_DONE_CUBIC, "markDone" + |
| 1251 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1252 | ) || match_regexp(line, lineNo, record, MARK_DONE_UNARY_LINE, "markDoneUnary" + |
| 1253 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1254 | ) || match_regexp(line, lineNo, record, MARK_DONE_UNARY_QUAD, "markDoneUnary" + |
| 1255 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1256 | ) || match_regexp(line, lineNo, record, MARK_DONE_UNARY_CUBIC, "markDoneUnary" + |
| 1257 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1258 | ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" + |
| 1259 | " last id=IDX windSum=OPT small=IDX"); |
| 1260 | break; |
| 1261 | case REC_TYPE_OP: |
| 1262 | if (line.lastIndexOf("oppSign oppSign=", 0) === 0 |
| 1263 | || line.lastIndexOf("operator<", 0) === 0) { |
| 1264 | found = true; |
| 1265 | break; |
| 1266 | } |
| 1267 | found = match_regexp(line, lineNo, record, OP_DIFFERENCE, "op difference" |
| 1268 | ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op intersect" |
| 1269 | ) || match_regexp(line, lineNo, record, OP_UNION, "op union" |
| 1270 | ) || match_regexp(line, lineNo, record, OP_XOR, "op xor" |
| 1271 | ); |
| 1272 | break; |
| 1273 | case REC_TYPE_UNKNOWN: |
| 1274 | found = true; |
| 1275 | break; |
| 1276 | } |
| 1277 | if (!found) { |
| 1278 | console.log(line + " [" + lineNo + "] of type " + type + " not found"); |
| 1279 | } |
| 1280 | } |
| 1281 | if (recType != REC_TYPE_UNKNOWN) { |
| 1282 | records.push(recType); |
| 1283 | records.push(lastLineNo); |
| 1284 | records.push(record); |
| 1285 | } |
| 1286 | if (records.length >= 1) { |
| 1287 | tests[testIndex] = records; |
| 1288 | testLines[testIndex] = lines; |
| 1289 | } |
| 1290 | } |
| 1291 | |
| 1292 | function init(test) { |
| 1293 | var canvas = document.getElementById('canvas'); |
| 1294 | if (!canvas.getContext) return; |
| 1295 | ctx = canvas.getContext('2d'); |
| 1296 | var resScale = retina_scale && window.devicePixelRatio ? window.devicePixelRatio : 1; |
| 1297 | var unscaledWidth = window.innerWidth - 20; |
| 1298 | var unscaledHeight = window.innerHeight - 20; |
| 1299 | screenWidth = unscaledWidth; |
| 1300 | screenHeight = unscaledHeight; |
| 1301 | canvas.width = unscaledWidth * resScale; |
| 1302 | canvas.height = unscaledHeight * resScale; |
| 1303 | canvas.style.width = unscaledWidth + 'px'; |
| 1304 | canvas.style.height = unscaledHeight + 'px'; |
| 1305 | if (resScale != 1) { |
| 1306 | ctx.scale(resScale, resScale); |
| 1307 | } |
| 1308 | xmin = Infinity; |
| 1309 | xmax = -Infinity; |
| 1310 | ymin = Infinity; |
| 1311 | ymax = -Infinity; |
| 1312 | hasPath = hasComputedPath = false; |
| 1313 | firstActiveSpan = -1; |
| 1314 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 1315 | var recType = test[tIndex]; |
| 1316 | if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { |
| 1317 | console.log("unknown rec type: " + recType); |
| 1318 | throw "stop execution"; |
| 1319 | } |
| 1320 | var records = test[tIndex + 2]; |
| 1321 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1322 | var fragType = records[recordIndex]; |
| 1323 | if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { |
| 1324 | console.log("unknown in range frag type: " + fragType); |
| 1325 | throw "stop execution"; |
| 1326 | } |
| 1327 | var frags = records[recordIndex + 1]; |
| 1328 | var first = 0; |
| 1329 | var last = -1; |
| 1330 | var first2 = 0; |
| 1331 | var last2 = 0; |
| 1332 | switch (recType) { |
| 1333 | case REC_TYPE_COMPUTED: |
| 1334 | if (fragType == COMPUTED_SET_1 || fragType == COMPUTED_SET_2) { |
| 1335 | break; |
| 1336 | } |
| 1337 | hasComputedPath = true; |
| 1338 | case REC_TYPE_PATH: |
| 1339 | switch (fragType) { |
| 1340 | case PATH_LINE: |
| 1341 | last = 4; |
| 1342 | break; |
| 1343 | case PATH_QUAD: |
| 1344 | last = 6; |
| 1345 | break; |
| 1346 | case PATH_CUBIC: |
| 1347 | last = 8; |
| 1348 | break; |
| 1349 | default: |
| 1350 | console.log("unknown " + (recType == REC_TYPE_PATH ? "REC_TYPE_PATH" |
| 1351 | : "REC_TYPE_COMPUTED") + " frag type:" + fragType); |
| 1352 | throw "stop execution"; |
| 1353 | } |
| 1354 | if (recType == REC_TYPE_PATH) { |
| 1355 | hasPath = true; |
| 1356 | } |
| 1357 | break; |
| 1358 | case REC_TYPE_ACTIVE: |
| 1359 | if (firstActiveSpan < 0) { |
| 1360 | firstActiveSpan = tIndex; |
| 1361 | } |
| 1362 | first = 1; |
| 1363 | switch (fragType) { |
| 1364 | case ACTIVE_LINE_SPAN: |
| 1365 | last = 5; |
| 1366 | break; |
| 1367 | case ACTIVE_QUAD_SPAN: |
| 1368 | last = 7; |
| 1369 | break; |
| 1370 | case ACTIVE_CUBIC_SPAN: |
| 1371 | last = 9; |
| 1372 | break; |
| 1373 | default: |
| 1374 | console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType); |
| 1375 | throw "stop execution"; |
| 1376 | } |
| 1377 | break; |
| 1378 | case REC_TYPE_ADD: |
| 1379 | switch (fragType) { |
| 1380 | case ADD_MOVETO: |
| 1381 | break; |
| 1382 | case ADD_LINETO: |
| 1383 | last = 4; |
| 1384 | break; |
| 1385 | case ADD_QUADTO: |
| 1386 | last = 6; |
| 1387 | break; |
| 1388 | case ADD_CUBICTO: |
| 1389 | last = 8; |
| 1390 | break; |
| 1391 | case ADD_CLOSE: |
| 1392 | case ADD_FILL: |
| 1393 | break; |
| 1394 | default: |
| 1395 | console.log("unknown REC_TYPE_ADD frag type: " + fragType); |
| 1396 | throw "stop execution"; |
| 1397 | } |
| 1398 | break; |
| 1399 | case REC_TYPE_SECT: |
| 1400 | switch (fragType) { |
| 1401 | case INTERSECT_LINE: |
| 1402 | first = 1; last = 5; first2 = 8; last2 = 12; |
| 1403 | break; |
| 1404 | case INTERSECT_LINE_2: |
| 1405 | first = 1; last = 5; first2 = 11; last2 = 15; |
| 1406 | break; |
| 1407 | case INTERSECT_LINE_NO: |
| 1408 | first = 0; last = 4; first2 = 4; last2 = 8; |
| 1409 | break; |
| 1410 | case INTERSECT_QUAD_LINE: |
| 1411 | first = 1; last = 7; first2 = 10; last2 = 14; |
| 1412 | break; |
| 1413 | case INTERSECT_QUAD_LINE_2: |
| 1414 | first = 1; last = 7; first2 = 13; last2 = 17; |
| 1415 | break; |
| 1416 | case INTERSECT_QUAD_LINE_NO: |
| 1417 | first = 0; last = 6; first2 = 6; last2 = 10; |
| 1418 | break; |
| 1419 | case INTERSECT_QUAD: |
| 1420 | first = 1; last = 7; first2 = 10; last2 = 16; |
| 1421 | break; |
| 1422 | case INTERSECT_QUAD_2: |
| 1423 | first = 1; last = 7; first2 = 13; last2 = 19; |
| 1424 | break; |
| 1425 | case INTERSECT_QUAD_NO: |
| 1426 | first = 0; last = 6; first2 = 6; last2 = 12; |
| 1427 | break; |
| 1428 | case INTERSECT_SELF_CUBIC: |
| 1429 | first = 1; last = 9; |
| 1430 | break; |
| 1431 | case INTERSECT_SELF_CUBIC_NO: |
| 1432 | first = 0; last = 8; |
| 1433 | break; |
| 1434 | case INTERSECT_CUBIC_LINE: |
| 1435 | first = 1; last = 9; first2 = 12; last2 = 16; |
| 1436 | break; |
| 1437 | case INTERSECT_CUBIC_LINE_2: |
| 1438 | first = 1; last = 9; first2 = 15; last2 = 19; |
| 1439 | break; |
| 1440 | case INTERSECT_CUBIC_LINE_3: |
| 1441 | first = 1; last = 9; first2 = 18; last2 = 22; |
| 1442 | break; |
| 1443 | case INTERSECT_CUBIC_LINE_NO: |
| 1444 | first = 0; last = 8; first2 = 8; last2 = 12; |
| 1445 | break; |
| 1446 | case INTERSECT_CUBIC_QUAD: |
| 1447 | first = 1; last = 9; first2 = 12; last2 = 18; |
| 1448 | break; |
| 1449 | case INTERSECT_CUBIC_QUAD_2: |
| 1450 | first = 1; last = 9; first2 = 15; last2 = 21; |
| 1451 | break; |
| 1452 | case INTERSECT_CUBIC_QUAD_3: |
| 1453 | first = 1; last = 9; first2 = 18; last2 = 24; |
| 1454 | break; |
| 1455 | case INTERSECT_CUBIC_QUAD_4: |
| 1456 | first = 1; last = 9; first2 = 21; last2 = 27; |
| 1457 | break; |
| 1458 | case INTERSECT_CUBIC_QUAD_NO: |
| 1459 | first = 0; last = 8; first2 = 8; last2 = 14; |
| 1460 | break; |
| 1461 | case INTERSECT_CUBIC: |
| 1462 | first = 1; last = 9; first2 = 12; last2 = 20; |
| 1463 | break; |
| 1464 | case INTERSECT_CUBIC_2: |
| 1465 | first = 1; last = 9; first2 = 15; last2 = 23; |
| 1466 | break; |
| 1467 | case INTERSECT_CUBIC_3: |
| 1468 | first = 1; last = 9; first2 = 18; last2 = 26; |
| 1469 | break; |
| 1470 | case INTERSECT_CUBIC_4: |
| 1471 | first = 1; last = 9; first2 = 21; last2 = 29; |
| 1472 | break; |
| 1473 | case INTERSECT_CUBIC_NO: |
| 1474 | first = 0; last = 8; first2 = 8; last2 = 16; |
| 1475 | break; |
| 1476 | default: |
| 1477 | console.log("unknown REC_TYPE_SECT frag type: " + fragType); |
| 1478 | throw "stop execution"; |
| 1479 | } |
| 1480 | break; |
| 1481 | default: |
| 1482 | continue; |
| 1483 | } |
| 1484 | for (var idx = first; idx < last; idx += 2) { |
| 1485 | xmin = Math.min(xmin, frags[idx]); |
| 1486 | xmax = Math.max(xmax, frags[idx]); |
| 1487 | ymin = Math.min(ymin, frags[idx + 1]); |
| 1488 | ymax = Math.max(ymax, frags[idx + 1]); |
| 1489 | } |
| 1490 | for (var idx = first2; idx < last2; idx += 2) { |
| 1491 | xmin = Math.min(xmin, frags[idx]); |
| 1492 | xmax = Math.max(xmax, frags[idx]); |
| 1493 | ymin = Math.min(ymin, frags[idx + 1]); |
| 1494 | ymax = Math.max(ymax, frags[idx + 1]); |
| 1495 | } |
| 1496 | } |
| 1497 | } |
| 1498 | var angleBounds = [Infinity, Infinity, -Infinity, -Infinity]; |
| 1499 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 1500 | var recType = test[tIndex]; |
| 1501 | var records = test[tIndex + 2]; |
| 1502 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1503 | var fragType = records[recordIndex]; |
| 1504 | var frags = records[recordIndex + 1]; |
| 1505 | switch (recType) { |
| 1506 | case REC_TYPE_ACTIVE_OP: |
| 1507 | if (!draw_op) { |
| 1508 | break; |
| 1509 | } |
| 1510 | { |
| 1511 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 1512 | curve_extremes(curve, angleBounds); |
| 1513 | } |
| 1514 | break; |
| 1515 | case REC_TYPE_ANGLE: |
| 1516 | if (!draw_angle) { |
| 1517 | break; |
| 1518 | } |
| 1519 | if (fragType == ANGLE_AFTER) { |
| 1520 | var curve = curvePartialByID(test, frags[0], frags[3], frags[4]); |
| 1521 | curve_extremes(curve, angleBounds); |
| 1522 | curve = curvePartialByID(test, frags[5], frags[8], frags[9]); |
| 1523 | curve_extremes(curve, angleBounds); |
| 1524 | curve = curvePartialByID(test, frags[10], frags[13], frags[14]); |
| 1525 | } else if (fragType == ANGLE_AFTER2) { |
| 1526 | var curve = curvePartialByID(test, frags[0], frags[4], frags[5]); |
| 1527 | curve_extremes(curve, angleBounds); |
| 1528 | curve = curvePartialByID(test, frags[6], frags[10], frags[11]); |
| 1529 | curve_extremes(curve, angleBounds); |
| 1530 | curve = curvePartialByID(test, frags[12], frags[16], frags[17]); |
| 1531 | } |
| 1532 | break; |
| 1533 | case REC_TYPE_SORT: |
| 1534 | if (!draw_sort) { |
| 1535 | break; |
| 1536 | } |
| 1537 | if (fragType == SORT_UNARY || fragType == SORT_BINARY) { |
| 1538 | var curve = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 1539 | curve_extremes(curve, angleBounds); |
| 1540 | } |
| 1541 | break; |
| 1542 | } |
| 1543 | } |
| 1544 | } |
| 1545 | xmin = Math.min(xmin, angleBounds[0]); |
| 1546 | ymin = Math.min(ymin, angleBounds[1]); |
| 1547 | xmax = Math.max(xmax, angleBounds[2]); |
| 1548 | ymax = Math.max(ymax, angleBounds[3]); |
| 1549 | setScale(xmin, xmax, ymin, ymax); |
| 1550 | if (hasPath == false && hasComputedPath == true && !draw_computed) { |
| 1551 | draw_computed = 3; // show both quadratics and cubics |
| 1552 | } |
| 1553 | if (hasPath == true && hasComputedPath == false && draw_computed) { |
| 1554 | draw_computed = 0; |
| 1555 | } |
| 1556 | } |
| 1557 | |
| 1558 | function curveByID(test, id) { |
| 1559 | var tIndex = firstActiveSpan; |
| 1560 | if (tIndex < 0) { |
| 1561 | return []; |
| 1562 | } |
| 1563 | while (tIndex < test.length) { |
| 1564 | var recType = test[tIndex]; |
| 1565 | if (recType != REC_TYPE_ACTIVE) { |
| 1566 | return []; |
| 1567 | } |
| 1568 | var records = test[tIndex + 2]; |
| 1569 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1570 | var fragType = records[recordIndex]; |
| 1571 | var frags = records[recordIndex + 1]; |
| 1572 | if (frags[0] == id) { |
| 1573 | switch (fragType) { |
| 1574 | case ACTIVE_LINE_SPAN: |
| 1575 | return [frags[1], frags[2], frags[3], frags[4]]; |
| 1576 | case ACTIVE_QUAD_SPAN: |
| 1577 | return [frags[1], frags[2], frags[3], frags[4], |
| 1578 | frags[5], frags[6]]; |
| 1579 | case ACTIVE_CUBIC_SPAN: |
| 1580 | return [frags[1], frags[2], frags[3], frags[4], |
| 1581 | frags[5], frags[6], frags[7], frags[8]]; |
| 1582 | } |
| 1583 | } |
| 1584 | } |
| 1585 | tIndex += 3; |
| 1586 | } |
| 1587 | return []; |
| 1588 | } |
| 1589 | |
| 1590 | function curvePartialByID(test, id, t0, t1) { |
| 1591 | var tIndex = firstActiveSpan; |
| 1592 | if (tIndex < 0) { |
| 1593 | return []; |
| 1594 | } |
| 1595 | while (tIndex < test.length) { |
| 1596 | var recType = test[tIndex]; |
| 1597 | if (recType != REC_TYPE_ACTIVE) { |
| 1598 | return []; |
| 1599 | } |
| 1600 | var records = test[tIndex + 2]; |
| 1601 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1602 | var fragType = records[recordIndex]; |
| 1603 | var frags = records[recordIndex + 1]; |
| 1604 | if (frags[0] == id) { |
| 1605 | switch (fragType) { |
| 1606 | case ACTIVE_LINE_SPAN: |
| 1607 | return linePartial(frags[1], frags[2], frags[3], frags[4], t0, t1); |
| 1608 | case ACTIVE_QUAD_SPAN: |
| 1609 | return quadPartial(frags[1], frags[2], frags[3], frags[4], |
| 1610 | frags[5], frags[6], t0, t1); |
| 1611 | case ACTIVE_CUBIC_SPAN: |
| 1612 | return cubicPartial(frags[1], frags[2], frags[3], frags[4], |
| 1613 | frags[5], frags[6], frags[7], frags[8], t0, t1); |
| 1614 | } |
| 1615 | } |
| 1616 | } |
| 1617 | tIndex += 3; |
| 1618 | } |
| 1619 | return []; |
| 1620 | } |
| 1621 | |
| 1622 | function idByCurve(test, frag, type) { |
| 1623 | var tIndex = firstActiveSpan; |
| 1624 | if (tIndex < 0) { |
| 1625 | return -1; |
| 1626 | } |
| 1627 | while (tIndex < test.length) { |
| 1628 | var recType = test[tIndex]; |
| 1629 | if (recType != REC_TYPE_ACTIVE) { |
| 1630 | return -1; |
| 1631 | } |
| 1632 | var records = test[tIndex + 2]; |
| 1633 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 1634 | var fragType = records[recordIndex]; |
| 1635 | var frags = records[recordIndex + 1]; |
| 1636 | switch (fragType) { |
| 1637 | case ACTIVE_LINE_SPAN: |
| 1638 | if (type != PATH_LINE) { |
| 1639 | continue; |
| 1640 | } |
| 1641 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 1642 | || frag[2] != frags[3] || frag[3] != frags[4]) { |
| 1643 | continue; |
| 1644 | } |
| 1645 | return frags[0]; |
| 1646 | case ACTIVE_QUAD_SPAN: |
| 1647 | if (type != PATH_QUAD) { |
| 1648 | continue; |
| 1649 | } |
| 1650 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 1651 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 1652 | || frag[4] != frags[5] || frag[5] != frags[6]) { |
| 1653 | continue; |
| 1654 | } |
| 1655 | return frags[0]; |
| 1656 | case ACTIVE_CUBIC_SPAN: |
| 1657 | if (type != PATH_CUBIC) { |
| 1658 | continue; |
| 1659 | } |
| 1660 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 1661 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 1662 | || frag[4] != frags[5] || frag[5] != frags[6] |
| 1663 | || frag[6] != frags[7] || frag[7] != frags[8]) { |
| 1664 | continue; |
| 1665 | } |
| 1666 | return frags[0]; |
| 1667 | } |
| 1668 | } |
| 1669 | ++tIndex; |
| 1670 | } |
| 1671 | return -1; |
| 1672 | } |
| 1673 | |
| 1674 | function curve_extremes(curve, bounds) { |
| 1675 | for (var index = 0; index < curve.length; index += 2) { |
| 1676 | var x = curve[index]; |
| 1677 | var y = curve[index + 1]; |
| 1678 | bounds[0] = Math.min(bounds[0], x); |
| 1679 | bounds[1] = Math.min(bounds[1], y); |
| 1680 | bounds[2] = Math.max(bounds[2], x); |
| 1681 | bounds[3] = Math.max(bounds[3], y); |
| 1682 | } |
| 1683 | } |
| 1684 | |
| 1685 | function setScale(x0, x1, y0, y1) { |
| 1686 | var srcWidth = x1 - x0; |
| 1687 | var srcHeight = y1 - y0; |
| 1688 | var usableWidth = screenWidth; |
| 1689 | var xDigits = Math.ceil(Math.log(Math.abs(xmax)) / Math.log(10)); |
| 1690 | var yDigits = Math.ceil(Math.log(Math.abs(ymax)) / Math.log(10)); |
| 1691 | usableWidth -= (xDigits + yDigits) * 10; |
| 1692 | usableWidth -= decimal_places * 10; |
| 1693 | if (draw_legend) { |
| 1694 | usableWidth -= 40; |
| 1695 | } |
| 1696 | var hscale = usableWidth / srcWidth; |
| 1697 | var vscale = screenHeight / srcHeight; |
| 1698 | scale = Math.min(hscale, vscale); |
| 1699 | var invScale = 1 / scale; |
| 1700 | var sxmin = x0 - invScale * 5; |
| 1701 | var symin = y0 - invScale * 10; |
| 1702 | var sxmax = x1 + invScale * (6 * decimal_places + 10); |
| 1703 | var symax = y1 + invScale * 10; |
| 1704 | srcWidth = sxmax - sxmin; |
| 1705 | srcHeight = symax - symin; |
| 1706 | hscale = usableWidth / srcWidth; |
| 1707 | vscale = screenHeight / srcHeight; |
| 1708 | scale = Math.min(hscale, vscale); |
| 1709 | srcLeft = sxmin; |
| 1710 | srcTop = symin; |
| 1711 | } |
| 1712 | |
| 1713 | function drawArc(curve, op, from, to) { |
| 1714 | var type = PATH_LINE + (curve.length / 2 - 2); |
| 1715 | var pt = pointAtT(curve, type, op ? 0.4 : 0.6); |
| 1716 | var dy = pt.y - curve[1]; |
| 1717 | var dx = pt.x - curve[0]; |
| 1718 | var dist = Math.sqrt(dy * dy + dx * dx); |
| 1719 | var _dist = dist * scale; |
| 1720 | var angle = Math.atan2(dy, dx); |
| 1721 | var _px = (curve[0] - srcLeft) * scale; |
| 1722 | var _py = (curve[1] - srcTop) * scale; |
| 1723 | var divisor = 4; |
| 1724 | var endDist; |
| 1725 | do { |
| 1726 | var ends = []; |
| 1727 | for (var index = -1; index <= 1; index += 2) { |
| 1728 | var px = Math.cos(index * Math.PI / divisor); |
| 1729 | var py = Math.sin(index * Math.PI / divisor); |
| 1730 | ends.push(px); |
| 1731 | ends.push(py); |
| 1732 | } |
| 1733 | var endDx = (ends[2] - ends[0]) * scale * dist; |
| 1734 | var endDy = (ends[3] - ends[1]) * scale * dist; |
| 1735 | endDist = Math.sqrt(endDx * endDx + endDy * endDy); |
| 1736 | if (endDist < 100) { |
| 1737 | break; |
| 1738 | } |
| 1739 | divisor *= 2; |
| 1740 | } while (true); |
| 1741 | if (endDist < 30) { |
| 1742 | return; |
| 1743 | } |
| 1744 | if (op) { |
| 1745 | divisor *= 2; |
| 1746 | } |
| 1747 | ctx.strokeStyle = op ? "rgba(210,0,45, 0.4)" : "rgba(90,90,90, 0.5)"; |
| 1748 | ctx.beginPath(); |
| 1749 | ctx.arc(_px, _py, _dist, angle - Math.PI / divisor, angle + Math.PI / divisor, false); |
| 1750 | ctx.stroke(); |
| 1751 | var saveAlign = ctx.textAlign; |
| 1752 | var saveStyle = ctx.fillStyle; |
| 1753 | var saveFont = ctx.font; |
| 1754 | ctx.textAlign = "center"; |
| 1755 | ctx.fillStyle = "black"; |
| 1756 | ctx.font = "normal 24px Arial"; |
| 1757 | divisor *= 0.8; |
| 1758 | for (var index = -1; index <= 1; index += 2) { |
| 1759 | var px = curve[0] + Math.cos(angle + index * Math.PI / divisor) * dist; |
| 1760 | var py = curve[1] + Math.sin(angle + index * Math.PI / divisor) * dist; |
| 1761 | var _px = (px - srcLeft) * scale; |
| 1762 | var _py = (py - srcTop) * scale; |
| 1763 | ctx.fillText(index < 0 ? to.toString() : from.toString(), _px, _py + 8); |
| 1764 | } |
| 1765 | ctx.textAlign = saveAlign; |
| 1766 | ctx.fillStyle = saveStyle; |
| 1767 | ctx.font = saveFont; |
| 1768 | } |
| 1769 | |
| 1770 | function drawPoint(px, py, end) { |
| 1771 | for (var pts = 0; pts < drawnPts.length; pts += 2) { |
| 1772 | var x = drawnPts[pts]; |
| 1773 | var y = drawnPts[pts + 1]; |
| 1774 | if (px == x && py == y) { |
| 1775 | return; |
| 1776 | } |
| 1777 | } |
| 1778 | drawnPts.push(px); |
| 1779 | drawnPts.push(py); |
| 1780 | var label = px.toFixed(decimal_places) + ", " + py.toFixed(decimal_places); |
| 1781 | var _px = (px - srcLeft) * scale; |
| 1782 | var _py = (py - srcTop) * scale; |
| 1783 | ctx.beginPath(); |
| 1784 | ctx.arc(_px, _py, 3, 0, Math.PI*2, true); |
| 1785 | ctx.closePath(); |
| 1786 | if (end) { |
| 1787 | ctx.fill(); |
| 1788 | } else { |
| 1789 | ctx.stroke(); |
| 1790 | } |
| 1791 | if (debug_xy) { |
| 1792 | ctx.textAlign = "left"; |
| 1793 | ctx.fillText(label, _px + 5, _py); |
| 1794 | } |
| 1795 | } |
| 1796 | |
| 1797 | function drawPoints(ptArray, curveType, drawControls) { |
| 1798 | var count = (curveType - PATH_LINE + 2) * 2; |
| 1799 | for (var idx = 0; idx < count; idx += 2) { |
| 1800 | if (!drawControls && idx != 0 && idx != count - 2) { |
| 1801 | continue; |
| 1802 | } |
| 1803 | drawPoint(ptArray[idx], ptArray[idx + 1], idx == 0 || idx == count - 2); |
| 1804 | } |
| 1805 | } |
| 1806 | |
| 1807 | function drawControlLines(curve, curveType, drawEnd) { |
| 1808 | if (curveType == PATH_LINE) { |
| 1809 | return; |
| 1810 | } |
| 1811 | ctx.strokeStyle = "rgba(0,0,0, 0.3)"; |
| 1812 | drawLine(curve[0], curve[1], curve[2], curve[3]); |
| 1813 | drawLine(curve[2], curve[3], curve[4], curve[5]); |
| 1814 | if (curveType == PATH_CUBIC) { |
| 1815 | drawLine(curve[4], curve[5], curve[6], curve[7]); |
| 1816 | if (drawEnd > 1) { |
| 1817 | drawLine(curve[6], curve[7], curve[0], curve[1]); |
| 1818 | if (drawEnd > 2) { |
| 1819 | drawLine(curve[0], curve[1], curve[4], curve[5]); |
| 1820 | drawLine(curve[6], curve[7], curve[2], curve[3]); |
| 1821 | } |
| 1822 | } |
| 1823 | } else if (drawEnd > 1) { |
| 1824 | drawLine(curve[4], curve[5], curve[0], curve[1]); |
| 1825 | } |
| 1826 | } |
| 1827 | |
| 1828 | function pointAtT(curve, curveType, t) { |
| 1829 | var xy = {}; |
| 1830 | switch (curveType) { |
| 1831 | case PATH_LINE: |
| 1832 | var a = 1 - t; |
| 1833 | var b = t; |
| 1834 | xy.x = a * curve[0] + b * curve[2]; |
| 1835 | xy.y = a * curve[1] + b * curve[3]; |
| 1836 | break; |
| 1837 | case PATH_QUAD: |
| 1838 | var one_t = 1 - t; |
| 1839 | var a = one_t * one_t; |
| 1840 | var b = 2 * one_t * t; |
| 1841 | var c = t * t; |
| 1842 | xy.x = a * curve[0] + b * curve[2] + c * curve[4]; |
| 1843 | xy.y = a * curve[1] + b * curve[3] + c * curve[5]; |
| 1844 | break; |
| 1845 | case PATH_CUBIC: |
| 1846 | var one_t = 1 - t; |
| 1847 | var one_t2 = one_t * one_t; |
| 1848 | var a = one_t2 * one_t; |
| 1849 | var b = 3 * one_t2 * t; |
| 1850 | var t2 = t * t; |
| 1851 | var c = 3 * one_t * t2; |
| 1852 | var d = t2 * t; |
| 1853 | xy.x = a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; |
| 1854 | xy.y = a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; |
| 1855 | break; |
| 1856 | } |
| 1857 | return xy; |
| 1858 | } |
| 1859 | |
| 1860 | function drawPointAtT(curve, curveType) { |
| 1861 | var x, y; |
| 1862 | var xy = pointAtT(curve, curveType, curveT); |
| 1863 | drawPoint(xy.x, xy.y, true); |
| 1864 | if (!draw_intersectT) { |
| 1865 | return; |
| 1866 | } |
| 1867 | ctx.fillStyle = "red"; |
| 1868 | drawTAtPointUp(xy.x, xy.y, curveT); |
| 1869 | } |
| 1870 | |
| 1871 | function drawTAtPointUp(px, py, t) { |
| 1872 | var label = t.toFixed(decimal_places); |
| 1873 | var _px = (px - srcLeft)* scale; |
| 1874 | var _py = (py - srcTop) * scale; |
| 1875 | ctx.fillText(label, _px + 5, _py - 10); |
| 1876 | } |
| 1877 | |
| 1878 | function drawTAtPointDown(px, py, t) { |
| 1879 | var label = t.toFixed(decimal_places); |
| 1880 | var _px = (px - srcLeft)* scale; |
| 1881 | var _py = (py - srcTop) * scale; |
| 1882 | ctx.fillText(label, _px + 5, _py + 10); |
| 1883 | } |
| 1884 | |
| 1885 | function alreadyDrawnLine(x1, y1, x2, y2) { |
| 1886 | if (collect_bounds) { |
| 1887 | if (focus_enabled) { |
| 1888 | focusXmin = Math.min(focusXmin, x1, x2); |
| 1889 | focusYmin = Math.min(focusYmin, y1, y2); |
| 1890 | focusXmax = Math.max(focusXmax, x1, x2); |
| 1891 | focusYmax = Math.max(focusYmax, y1, y2); |
| 1892 | } |
| 1893 | return true; |
| 1894 | } |
| 1895 | for (var pts = 0; pts < drawnLines.length; pts += 4) { |
| 1896 | if (x1 == drawnLines[pts] && y1 == drawnLines[pts + 1] |
| 1897 | && x2 == drawnLines[pts + 2] && y2 == drawnLines[pts + 3]) { |
| 1898 | return true; |
| 1899 | } |
| 1900 | } |
| 1901 | drawnLines.push(x1); |
| 1902 | drawnLines.push(y1); |
| 1903 | drawnLines.push(x2); |
| 1904 | drawnLines.push(y2); |
| 1905 | return false; |
| 1906 | } |
| 1907 | |
| 1908 | function drawLine(x1, y1, x2, y2) { |
| 1909 | if (alreadyDrawnLine(x1, y1, x2, y2)) { |
| 1910 | return; |
| 1911 | } |
| 1912 | ctx.beginPath(); |
| 1913 | ctx.moveTo((x1 - srcLeft) * scale, |
| 1914 | (y1 - srcTop) * scale); |
| 1915 | ctx.lineTo((x2 - srcLeft) * scale, |
| 1916 | (y2 - srcTop) * scale); |
| 1917 | ctx.stroke(); |
| 1918 | } |
| 1919 | |
| 1920 | function linePartial(x1, y1, x2, y2, t1, t2) { |
| 1921 | var dx = x1 - x2; |
| 1922 | var dy = y1 - y2; |
| 1923 | var array = [ |
| 1924 | x1 - t1 * dx, |
| 1925 | y1 - t1 * dy, |
| 1926 | x1 - t2 * dx, |
| 1927 | y1 - t2 * dy |
| 1928 | ]; |
| 1929 | return array; |
| 1930 | } |
| 1931 | |
| 1932 | function drawLinePartial(x1, y1, x2, y2, t1, t2) { |
| 1933 | var a = linePartial(x1, y1, x2, y2, t1, t2); |
| 1934 | var ax = a[0]; |
| 1935 | var ay = a[1]; |
| 1936 | var bx = a[2]; |
| 1937 | var by = a[3]; |
| 1938 | if (alreadyDrawnLine(ax, ay, bx, by)) { |
| 1939 | return; |
| 1940 | } |
| 1941 | ctx.beginPath(); |
| 1942 | ctx.moveTo((ax - srcLeft) * scale, |
| 1943 | (ay - srcTop) * scale); |
| 1944 | ctx.lineTo((bx - srcLeft) * scale, |
| 1945 | (by - srcTop) * scale); |
| 1946 | ctx.stroke(); |
| 1947 | } |
| 1948 | |
| 1949 | function alreadyDrawnQuad(x1, y1, x2, y2, x3, y3) { |
| 1950 | if (collect_bounds) { |
| 1951 | if (focus_enabled) { |
| 1952 | focusXmin = Math.min(focusXmin, x1, x2, x3); |
| 1953 | focusYmin = Math.min(focusYmin, y1, y2, y3); |
| 1954 | focusXmax = Math.max(focusXmax, x1, x2, x3); |
| 1955 | focusYmax = Math.max(focusYmax, y1, y2, y3); |
| 1956 | } |
| 1957 | return true; |
| 1958 | } |
| 1959 | for (var pts = 0; pts < drawnQuads.length; pts += 6) { |
| 1960 | if (x1 == drawnQuads[pts] && y1 == drawnQuads[pts + 1] |
| 1961 | && x2 == drawnQuads[pts + 2] && y2 == drawnQuads[pts + 3] |
| 1962 | && x3 == drawnQuads[pts + 4] && y3 == drawnQuads[pts + 5]) { |
| 1963 | return true; |
| 1964 | } |
| 1965 | } |
| 1966 | drawnQuads.push(x1); |
| 1967 | drawnQuads.push(y1); |
| 1968 | drawnQuads.push(x2); |
| 1969 | drawnQuads.push(y2); |
| 1970 | drawnQuads.push(x3); |
| 1971 | drawnQuads.push(y3); |
| 1972 | return false; |
| 1973 | } |
| 1974 | |
| 1975 | function drawQuad(x1, y1, x2, y2, x3, y3) { |
| 1976 | if (alreadyDrawnQuad(x1, y1, x2, y2, x3, y3)) { |
| 1977 | return; |
| 1978 | } |
| 1979 | ctx.beginPath(); |
| 1980 | ctx.moveTo((x1 - srcLeft) * scale, |
| 1981 | (y1 - srcTop) * scale); |
| 1982 | ctx.quadraticCurveTo((x2 - srcLeft) * scale, |
| 1983 | (y2 - srcTop) * scale, |
| 1984 | (x3 - srcLeft) * scale, |
| 1985 | (y3 - srcTop) * scale); |
| 1986 | ctx.stroke(); |
| 1987 | } |
| 1988 | |
| 1989 | function interp(A, B, t) { |
| 1990 | return A + (B - A) * t; |
| 1991 | } |
| 1992 | |
| 1993 | function interp_quad_coords(x1, x2, x3, t) |
| 1994 | { |
| 1995 | var ab = interp(x1, x2, t); |
| 1996 | var bc = interp(x2, x3, t); |
| 1997 | var abc = interp(ab, bc, t); |
| 1998 | return abc; |
| 1999 | } |
| 2000 | |
| 2001 | function quadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { |
| 2002 | var ax = interp_quad_coords(x1, x2, x3, t1); |
| 2003 | var ay = interp_quad_coords(y1, y2, y3, t1); |
| 2004 | var dx = interp_quad_coords(x1, x2, x3, (t1 + t2) / 2); |
| 2005 | var dy = interp_quad_coords(y1, y2, y3, (t1 + t2) / 2); |
| 2006 | var cx = interp_quad_coords(x1, x2, x3, t2); |
| 2007 | var cy = interp_quad_coords(y1, y2, y3, t2); |
| 2008 | var bx = 2*dx - (ax + cx)/2; |
| 2009 | var by = 2*dy - (ay + cy)/2; |
| 2010 | var array = [ |
| 2011 | ax, ay, bx, by, cx, cy |
| 2012 | ]; |
| 2013 | return array; |
| 2014 | } |
| 2015 | |
| 2016 | function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { |
| 2017 | var a = quadPartial(x1, y1, x2, y2, x3, y3, t1, t2); |
| 2018 | var ax = a[0]; |
| 2019 | var ay = a[1]; |
| 2020 | var bx = a[2]; |
| 2021 | var by = a[3]; |
| 2022 | var cx = a[4]; |
| 2023 | var cy = a[5]; |
| 2024 | if (alreadyDrawnQuad(ax, ay, bx, by, cx, cy)) { |
| 2025 | return; |
| 2026 | } |
| 2027 | ctx.beginPath(); |
| 2028 | ctx.moveTo((ax - srcLeft) * scale, |
| 2029 | (ay - srcTop) * scale); |
| 2030 | ctx.quadraticCurveTo((bx - srcLeft) * scale, |
| 2031 | (by - srcTop) * scale, |
| 2032 | (cx - srcLeft) * scale, |
| 2033 | (cy - srcTop) * scale); |
| 2034 | ctx.stroke(); |
| 2035 | } |
| 2036 | |
| 2037 | function alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4) { |
| 2038 | if (collect_bounds) { |
| 2039 | if (focus_enabled) { |
| 2040 | focusXmin = Math.min(focusXmin, x1, x2, x3, x4); |
| 2041 | focusYmin = Math.min(focusYmin, y1, y2, y3, y4); |
| 2042 | focusXmax = Math.max(focusXmax, x1, x2, x3, x4); |
| 2043 | focusYmax = Math.max(focusYmax, y1, y2, y3, y4); |
| 2044 | } |
| 2045 | return true; |
| 2046 | } |
| 2047 | for (var pts = 0; pts < drawnCubics.length; pts += 8) { |
| 2048 | if (x1 == drawnCubics[pts] && y1 == drawnCubics[pts + 1] |
| 2049 | && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3] |
| 2050 | && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5] |
| 2051 | && x4 == drawnCubics[pts + 6] && y4 == drawnCubics[pts + 7]) { |
| 2052 | return true; |
| 2053 | } |
| 2054 | } |
| 2055 | drawnCubics.push(x1); |
| 2056 | drawnCubics.push(y1); |
| 2057 | drawnCubics.push(x2); |
| 2058 | drawnCubics.push(y2); |
| 2059 | drawnCubics.push(x3); |
| 2060 | drawnCubics.push(y3); |
| 2061 | drawnCubics.push(x4); |
| 2062 | drawnCubics.push(y4); |
| 2063 | return false; |
| 2064 | } |
| 2065 | |
| 2066 | function drawCubic(x1, y1, x2, y2, x3, y3, x4, y4) { |
| 2067 | if (alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4)) { |
| 2068 | return; |
| 2069 | } |
| 2070 | ctx.beginPath(); |
| 2071 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2072 | (y1 - srcTop) * scale); |
| 2073 | ctx.bezierCurveTo((x2 - srcLeft) * scale, |
| 2074 | (y2 - srcTop) * scale, |
| 2075 | (x3 - srcLeft) * scale, |
| 2076 | (y3 - srcTop) * scale, |
| 2077 | (x4 - srcLeft) * scale, |
| 2078 | (y4 - srcTop) * scale); |
| 2079 | ctx.stroke(); |
| 2080 | } |
| 2081 | |
| 2082 | function interp_cubic_coords(x1, x2, x3, x4, t) |
| 2083 | { |
| 2084 | var ab = interp(x1, x2, t); |
| 2085 | var bc = interp(x2, x3, t); |
| 2086 | var cd = interp(x3, x4, t); |
| 2087 | var abc = interp(ab, bc, t); |
| 2088 | var bcd = interp(bc, cd, t); |
| 2089 | var abcd = interp(abc, bcd, t); |
| 2090 | return abcd; |
| 2091 | } |
| 2092 | |
| 2093 | function cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 2094 | var ax = interp_cubic_coords(x1, x2, x3, x4, t1); |
| 2095 | var ay = interp_cubic_coords(y1, y2, y3, y4, t1); |
| 2096 | var ex = interp_cubic_coords(x1, x2, x3, x4, (t1*2+t2)/3); |
| 2097 | var ey = interp_cubic_coords(y1, y2, y3, y4, (t1*2+t2)/3); |
| 2098 | var fx = interp_cubic_coords(x1, x2, x3, x4, (t1+t2*2)/3); |
| 2099 | var fy = interp_cubic_coords(y1, y2, y3, y4, (t1+t2*2)/3); |
| 2100 | var dx = interp_cubic_coords(x1, x2, x3, x4, t2); |
| 2101 | var dy = interp_cubic_coords(y1, y2, y3, y4, t2); |
| 2102 | var mx = ex * 27 - ax * 8 - dx; |
| 2103 | var my = ey * 27 - ay * 8 - dy; |
| 2104 | var nx = fx * 27 - ax - dx * 8; |
| 2105 | var ny = fy * 27 - ay - dy * 8; |
| 2106 | var bx = (mx * 2 - nx) / 18; |
| 2107 | var by = (my * 2 - ny) / 18; |
| 2108 | var cx = (nx * 2 - mx) / 18; |
| 2109 | var cy = (ny * 2 - my) / 18; |
| 2110 | var array = [ |
| 2111 | ax, ay, bx, by, cx, cy, dx, dy |
| 2112 | ]; |
| 2113 | return array; |
| 2114 | } |
| 2115 | |
| 2116 | function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 2117 | var a = cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); |
| 2118 | var ax = a[0]; |
| 2119 | var ay = a[1]; |
| 2120 | var bx = a[2]; |
| 2121 | var by = a[3]; |
| 2122 | var cx = a[4]; |
| 2123 | var cy = a[5]; |
| 2124 | var dx = a[6]; |
| 2125 | var dy = a[7]; |
| 2126 | if (alreadyDrawnCubic(ax, ay, bx, by, cx, cy, dx, dy)) { |
| 2127 | return; |
| 2128 | } |
| 2129 | ctx.beginPath(); |
| 2130 | ctx.moveTo((ax - srcLeft) * scale, |
| 2131 | (ay - srcTop) * scale); |
| 2132 | ctx.bezierCurveTo((bx - srcLeft) * scale, |
| 2133 | (by - srcTop) * scale, |
| 2134 | (cx - srcLeft) * scale, |
| 2135 | (cy - srcTop) * scale, |
| 2136 | (dx - srcLeft) * scale, |
| 2137 | (dy - srcTop) * scale); |
| 2138 | ctx.stroke(); |
| 2139 | } |
| 2140 | |
| 2141 | function drawCurve(c) { |
| 2142 | switch (c.length) { |
| 2143 | case 4: |
| 2144 | drawLine(c[0], c[1], c[2], c[3]); |
| 2145 | break; |
| 2146 | case 6: |
| 2147 | drawQuad(c[0], c[1], c[2], c[3], c[4], c[5]); |
| 2148 | break; |
| 2149 | case 8: |
| 2150 | drawCubic(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7]); |
| 2151 | break; |
| 2152 | } |
| 2153 | } |
| 2154 | |
| 2155 | function boundsWidth(pts) { |
| 2156 | var min = pts[0]; |
| 2157 | var max = pts[0]; |
| 2158 | for (var idx = 2; idx < pts.length; idx += 2) { |
| 2159 | min = Math.min(min, pts[idx]); |
| 2160 | max = Math.max(max, pts[idx]); |
| 2161 | } |
| 2162 | return max - min; |
| 2163 | } |
| 2164 | |
| 2165 | function boundsHeight(pts) { |
| 2166 | var min = pts[1]; |
| 2167 | var max = pts[1]; |
| 2168 | for (var idx = 3; idx < pts.length; idx += 2) { |
| 2169 | min = Math.min(min, pts[idx]); |
| 2170 | max = Math.max(max, pts[idx]); |
| 2171 | } |
| 2172 | return max - min; |
| 2173 | } |
| 2174 | |
| 2175 | function tangent(pts) { |
| 2176 | var dx = pts[2] - pts[0]; |
| 2177 | var dy = pts[3] - pts[1]; |
| 2178 | if (dx == 0 && dy == 0 && pts.length > 4) { |
| 2179 | dx = pts[4] - pts[0]; |
| 2180 | dy = pts[5] - pts[1]; |
| 2181 | if (dx == 0 && dy == 0 && pts.length > 6) { |
| 2182 | dx = pts[6] - pts[0]; |
| 2183 | dy = pts[7] - pts[1]; |
| 2184 | } |
| 2185 | } |
| 2186 | return Math.atan2(-dy, dx); |
| 2187 | } |
| 2188 | |
| 2189 | function hodograph(cubic) { |
| 2190 | var hodo = []; |
| 2191 | hodo[0] = 3 * (cubic[2] - cubic[0]); |
| 2192 | hodo[1] = 3 * (cubic[3] - cubic[1]); |
| 2193 | hodo[2] = 3 * (cubic[4] - cubic[2]); |
| 2194 | hodo[3] = 3 * (cubic[5] - cubic[3]); |
| 2195 | hodo[4] = 3 * (cubic[6] - cubic[4]); |
| 2196 | hodo[5] = 3 * (cubic[7] - cubic[5]); |
| 2197 | return hodo; |
| 2198 | } |
| 2199 | |
| 2200 | function hodograph2(cubic) { |
| 2201 | var quad = hodograph(cubic); |
| 2202 | var hodo = []; |
| 2203 | hodo[0] = 2 * (quad[2] - quad[0]); |
| 2204 | hodo[1] = 2 * (quad[3] - quad[1]); |
| 2205 | hodo[2] = 2 * (quad[4] - quad[2]); |
| 2206 | hodo[3] = 2 * (quad[5] - quad[3]); |
| 2207 | return hodo; |
| 2208 | } |
| 2209 | |
| 2210 | function quadraticRootsReal(A, B, C, s) { |
| 2211 | if (A == 0) { |
| 2212 | if (B == 0) { |
| 2213 | s[0] = 0; |
| 2214 | return C == 0; |
| 2215 | } |
| 2216 | s[0] = -C / B; |
| 2217 | return 1; |
| 2218 | } |
| 2219 | /* normal form: x^2 + px + q = 0 */ |
| 2220 | var p = B / (2 * A); |
| 2221 | var q = C / A; |
| 2222 | var p2 = p * p; |
| 2223 | if (p2 < q) { |
| 2224 | return 0; |
| 2225 | } |
| 2226 | var sqrt_D = 0; |
| 2227 | if (p2 > q) { |
| 2228 | sqrt_D = sqrt(p2 - q); |
| 2229 | } |
| 2230 | s[0] = sqrt_D - p; |
| 2231 | s[1] = -sqrt_D - p; |
| 2232 | return 1 + s[0] != s[1]; |
| 2233 | } |
| 2234 | |
| 2235 | function add_valid_ts(s, realRoots, t) { |
| 2236 | var foundRoots = 0; |
| 2237 | for (var index = 0; index < realRoots; ++index) { |
| 2238 | var tValue = s[index]; |
| 2239 | if (tValue >= 0 && tValue <= 1) { |
| 2240 | for (var idx2 = 0; idx2 < foundRoots; ++idx2) { |
| 2241 | if (t[idx2] != tValue) { |
| 2242 | t[foundRoots++] = tValue; |
| 2243 | } |
| 2244 | } |
| 2245 | } |
| 2246 | } |
| 2247 | return foundRoots; |
| 2248 | } |
| 2249 | |
| 2250 | function quadraticRootsValidT(a, b, c, t) { |
| 2251 | var s = []; |
| 2252 | var realRoots = quadraticRootsReal(A, B, C, s); |
| 2253 | var foundRoots = add_valid_ts(s, realRoots, t); |
| 2254 | return foundRoots != 0; |
| 2255 | } |
| 2256 | |
| 2257 | function find_cubic_inflections(cubic, tValues) { |
| 2258 | var Ax = src[2] - src[0]; |
| 2259 | var Ay = src[3] - src[1]; |
| 2260 | var Bx = src[4] - 2 * src[2] + src[0]; |
| 2261 | var By = src[5] - 2 * src[3] + src[1]; |
| 2262 | var Cx = src[6] + 3 * (src[2] - src[4]) - src[0]; |
| 2263 | var Cy = src[7] + 3 * (src[3] - src[5]) - src[1]; |
| 2264 | return quadraticRootsValidT(Bx * Cy - By * Cx, (Ax * Cy - Ay * Cx), |
| 2265 | Ax * By - Ay * Bx, tValues); |
| 2266 | } |
| 2267 | |
| 2268 | function dxy_at_t(curve, type, t) { |
| 2269 | var dxy = {}; |
| 2270 | if (type == PATH_QUAD) { |
| 2271 | var a = t - 1; |
| 2272 | var b = 1 - 2 * t; |
| 2273 | var c = t; |
| 2274 | dxy.x = a * curve[0] + b * curve[2] + c * curve[4]; |
| 2275 | dxy.y = a * curve[1] + b * curve[3] + c * curve[5]; |
| 2276 | } else if (type == PATH_CUBIC) { |
| 2277 | var one_t = 1 - t; |
| 2278 | var a = curve[0]; |
| 2279 | var b = curve[2]; |
| 2280 | var c = curve[4]; |
| 2281 | var d = curve[6]; |
| 2282 | dxy.x = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); |
| 2283 | a = curve[1]; |
| 2284 | b = curve[3]; |
| 2285 | c = curve[5]; |
| 2286 | d = curve[7]; |
| 2287 | dxy.y = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); |
| 2288 | } |
| 2289 | return dxy; |
| 2290 | } |
| 2291 | |
| 2292 | function drawLabel(num, px, py) { |
| 2293 | ctx.beginPath(); |
| 2294 | ctx.arc(px, py, 8, 0, Math.PI*2, true); |
| 2295 | ctx.closePath(); |
| 2296 | ctx.strokeStyle = "rgba(0,0,0, 0.4)"; |
| 2297 | ctx.lineWidth = num == 0 || num == 3 ? 2 : 1; |
| 2298 | ctx.stroke(); |
| 2299 | ctx.fillStyle = "black"; |
| 2300 | ctx.font = "normal 10px Arial"; |
| 2301 | // ctx.rotate(0.001); |
| 2302 | ctx.fillText(num, px - 2, py + 3); |
| 2303 | // ctx.rotate(-0.001); |
| 2304 | } |
| 2305 | |
| 2306 | function drawLabelX(ymin, num, loc) { |
| 2307 | var px = (loc - srcLeft) * scale; |
| 2308 | var py = (ymin - srcTop) * scale - 20; |
| 2309 | drawLabel(num, px, py); |
| 2310 | } |
| 2311 | |
| 2312 | function drawLabelY(xmin, num, loc) { |
| 2313 | var px = (xmin - srcLeft) * scale - 20; |
| 2314 | var py = (loc - srcTop) * scale; |
| 2315 | drawLabel(num, px, py); |
| 2316 | } |
| 2317 | |
| 2318 | function drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY) { |
| 2319 | ctx.beginPath(); |
| 2320 | ctx.moveTo(hx, hy - 100); |
| 2321 | ctx.lineTo(hx, hy); |
| 2322 | ctx.strokeStyle = hMinY < 0 ? "green" : "blue"; |
| 2323 | ctx.stroke(); |
| 2324 | ctx.beginPath(); |
| 2325 | ctx.moveTo(hx, hy); |
| 2326 | ctx.lineTo(hx, hy + 100); |
| 2327 | ctx.strokeStyle = hMaxY > 0 ? "green" : "blue"; |
| 2328 | ctx.stroke(); |
| 2329 | ctx.beginPath(); |
| 2330 | ctx.moveTo(hx - 100, hy); |
| 2331 | ctx.lineTo(hx, hy); |
| 2332 | ctx.strokeStyle = hMinX < 0 ? "green" : "blue"; |
| 2333 | ctx.stroke(); |
| 2334 | ctx.beginPath(); |
| 2335 | ctx.moveTo(hx, hy); |
| 2336 | ctx.lineTo(hx + 100, hy); |
| 2337 | ctx.strokeStyle = hMaxX > 0 ? "green" : "blue"; |
| 2338 | ctx.stroke(); |
| 2339 | } |
| 2340 | |
| 2341 | function scalexy(x, y, mag) { |
| 2342 | var length = Math.sqrt(x * x + y * y); |
| 2343 | return mag / length; |
| 2344 | } |
| 2345 | |
| 2346 | function drawArrow(x, y, dx, dy) { |
| 2347 | var dscale = scalexy(dx, dy, 1 / scale * 100); |
| 2348 | dx *= dscale; |
| 2349 | dy *= dscale; |
| 2350 | ctx.beginPath(); |
| 2351 | ctx.moveTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 2352 | x += dx; |
| 2353 | y += dy; |
| 2354 | ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 2355 | dx /= 10; |
| 2356 | dy /= 10; |
| 2357 | ctx.lineTo((x - dy - srcLeft) * scale, (y + dx - srcTop) * scale); |
| 2358 | ctx.lineTo((x + dx * 2 - srcLeft) * scale, (y + dy * 2 - srcTop) * scale); |
| 2359 | ctx.lineTo((x + dy - srcLeft) * scale, (y - dx - srcTop) * scale); |
| 2360 | ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 2361 | ctx.strokeStyle = "rgba(0,75,0, 0.4)"; |
| 2362 | ctx.stroke(); |
| 2363 | } |
| 2364 | |
| 2365 | function x_at_t(curve, t) { |
| 2366 | var one_t = 1 - t; |
| 2367 | if (curve.length == 4) { |
| 2368 | return one_t * curve[0] + t * curve[2]; |
| 2369 | } |
| 2370 | var one_t2 = one_t * one_t; |
| 2371 | var t2 = t * t; |
| 2372 | if (curve.length == 6) { |
| 2373 | return one_t2 * curve[0] + 2 * one_t * t * curve[2] + t2 * curve[4]; |
| 2374 | } |
| 2375 | var a = one_t2 * one_t; |
| 2376 | var b = 3 * one_t2 * t; |
| 2377 | var c = 3 * one_t * t2; |
| 2378 | var d = t2 * t; |
| 2379 | return a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; |
| 2380 | } |
| 2381 | |
| 2382 | function y_at_t(curve, t) { |
| 2383 | var one_t = 1 - t; |
| 2384 | if (curve.length == 4) { |
| 2385 | return one_t * curve[1] + t * curve[3]; |
| 2386 | } |
| 2387 | var one_t2 = one_t * one_t; |
| 2388 | var t2 = t * t; |
| 2389 | if (curve.length == 6) { |
| 2390 | return one_t2 * curve[1] + 2 * one_t * t * curve[3] + t2 * curve[5]; |
| 2391 | } |
| 2392 | var a = one_t2 * one_t; |
| 2393 | var b = 3 * one_t2 * t; |
| 2394 | var c = 3 * one_t * t2; |
| 2395 | var d = t2 * t; |
| 2396 | return a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; |
| 2397 | } |
| 2398 | |
| 2399 | function drawOrder(curve, label) { |
| 2400 | var px = x_at_t(curve, 0.75); |
| 2401 | var py = y_at_t(curve, 0.75); |
| 2402 | var _px = (px - srcLeft) * scale; |
| 2403 | var _py = (py - srcTop) * scale; |
| 2404 | ctx.beginPath(); |
| 2405 | ctx.arc(_px, _py, 15, 0, Math.PI * 2, true); |
| 2406 | ctx.closePath(); |
| 2407 | ctx.fillStyle = "white"; |
| 2408 | ctx.fill(); |
| 2409 | if (label == 'L') { |
| 2410 | ctx.strokeStyle = "rgba(255,0,0, 1)"; |
| 2411 | ctx.fillStyle = "rgba(255,0,0, 1)"; |
| 2412 | } else { |
| 2413 | ctx.strokeStyle = "rgba(0,0,255, 1)"; |
| 2414 | ctx.fillStyle = "rgba(0,0,255, 1)"; |
| 2415 | } |
| 2416 | ctx.stroke(); |
| 2417 | ctx.font = "normal 16px Arial"; |
| 2418 | ctx.textAlign = "center"; |
| 2419 | ctx.fillText(label, _px, _py + 5); |
| 2420 | ctx.font = "normal 10px Arial"; |
| 2421 | } |
| 2422 | |
| 2423 | function drawID(curve, id) { |
| 2424 | var px = x_at_t(curve, 0.5); |
| 2425 | var py = y_at_t(curve, 0.5); |
| 2426 | var _px = (px - srcLeft) * scale; |
| 2427 | var _py = (py - srcTop) * scale; |
| 2428 | draw_id_at(id, _px, _py); |
| 2429 | } |
| 2430 | |
| 2431 | function draw_id_at(id, _px, _py) { |
| 2432 | ctx.beginPath(); |
| 2433 | ctx.arc(_px, _py, 15, 0, Math.PI * 2, true); |
| 2434 | ctx.closePath(); |
| 2435 | ctx.fillStyle = "white"; |
| 2436 | ctx.fill(); |
| 2437 | ctx.strokeStyle = "rgba(127,127,0, 1)"; |
| 2438 | ctx.fillStyle = "rgba(127,127,0, 1)"; |
| 2439 | ctx.stroke(); |
| 2440 | ctx.font = "normal 16px Arial"; |
| 2441 | ctx.textAlign = "center"; |
| 2442 | ctx.fillText(id, _px, _py + 5); |
| 2443 | ctx.font = "normal 10px Arial"; |
| 2444 | } |
| 2445 | |
| 2446 | function drawLinePartialID(id, x1, y1, x2, y2, t1, t2) { |
| 2447 | var curve = [x1, y1, x2, y2]; |
| 2448 | drawCurvePartialID(id, curve, t1, t2); |
| 2449 | } |
| 2450 | |
| 2451 | function drawQuadPartialID(id, x1, y1, x2, y2, x3, y3, t1, t2) { |
| 2452 | var curve = [x1, y1, x2, y2, x3, y3]; |
| 2453 | drawCurvePartialID(id, curve, t1, t2); |
| 2454 | } |
| 2455 | |
| 2456 | function drawCubicPartialID(id, x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 2457 | var curve = [x1, y1, x2, y2, x3, y3, x4, y4]; |
| 2458 | drawCurvePartialID(id, curve, t1, t2); |
| 2459 | } |
| 2460 | |
| 2461 | function drawCurvePartialID(id, curve, t1, t2) { |
| 2462 | var px = x_at_t(curve, (t1 + t2) / 2); |
| 2463 | var py = y_at_t(curve, (t1 + t2) / 2); |
| 2464 | var _px = (px - srcLeft) * scale; |
| 2465 | var _py = (py - srcTop) * scale; |
| 2466 | draw_id_at(id, _px, _py); |
| 2467 | } |
| 2468 | |
| 2469 | function drawCurveSpecials(test, curve, type) { |
| 2470 | if (pt_labels) { |
| 2471 | drawPoints(curve, type, pt_labels == 2); |
| 2472 | } |
| 2473 | if (control_lines != 0) { |
| 2474 | drawControlLines(curve, type, control_lines); |
| 2475 | } |
| 2476 | if (curve_t) { |
| 2477 | drawPointAtT(curve, type); |
| 2478 | } |
| 2479 | if (draw_midpoint) { |
| 2480 | var mid = pointAtT(curve, type, 0.5); |
| 2481 | drawPoint(mid.x, mid.y, true); |
| 2482 | } |
| 2483 | if (draw_id) { |
| 2484 | var id = idByCurve(test, curve, type); |
| 2485 | if (id >= 0) { |
| 2486 | drawID(curve, id); |
| 2487 | } |
| 2488 | } |
| 2489 | if (type == PATH_LINE) { |
| 2490 | return; |
| 2491 | } |
| 2492 | if (draw_deriviatives > 0) { |
| 2493 | var d = dxy_at_t(curve, type, 0); |
| 2494 | drawArrow(curve[0], curve[1], d.x, d.y); |
| 2495 | if (draw_deriviatives == 2) { |
| 2496 | d = dxy_at_t(curve, type, 1); |
| 2497 | if (type == PATH_CUBIC) { |
| 2498 | drawArrow(curve[6], curve[7], d.x, d.y); |
| 2499 | } else { |
| 2500 | drawArrow(curve[4], curve[5], d.x, d.y); |
| 2501 | } |
| 2502 | } |
| 2503 | if (draw_midpoint) { |
| 2504 | var mid = pointAtT(curve, type, 0.5); |
| 2505 | d = dxy_at_t(curve, type, 0.5); |
| 2506 | drawArrow(mid.x, mid.y, d.x, d.y); |
| 2507 | } |
| 2508 | } |
| 2509 | if (type != PATH_CUBIC) { |
| 2510 | return; |
| 2511 | } |
| 2512 | if (draw_hodo == 1 || draw_hodo == 2) { |
| 2513 | var hodo = hodograph(curve); |
| 2514 | var hMinX = Math.min(0, hodo[0], hodo[2], hodo[4]); |
| 2515 | var hMinY = Math.min(0, hodo[1], hodo[3], hodo[5]); |
| 2516 | var hMaxX = Math.max(0, hodo[0], hodo[2], hodo[4]); |
| 2517 | var hMaxY = Math.max(0, hodo[1], hodo[3], hodo[5]); |
| 2518 | var hScaleX = hMaxX - hMinX > 0 ? screenWidth / (hMaxX - hMinX) : 1; |
| 2519 | var hScaleY = hMaxY - hMinY > 0 ? screenHeight / (hMaxY - hMinY) : 1; |
| 2520 | var hUnit = Math.min(hScaleX, hScaleY); |
| 2521 | hUnit /= 2; |
| 2522 | var hx = xoffset - hMinX * hUnit; |
| 2523 | var hy = yoffset - hMinY * hUnit; |
| 2524 | ctx.moveTo(hx + hodo[0] * hUnit, hy + hodo[1] * hUnit); |
| 2525 | ctx.quadraticCurveTo( |
| 2526 | hx + hodo[2] * hUnit, hy + hodo[3] * hUnit, |
| 2527 | hx + hodo[4] * hUnit, hy + hodo[5] * hUnit); |
| 2528 | ctx.strokeStyle = "red"; |
| 2529 | ctx.stroke(); |
| 2530 | if (draw_hodo == 1) { |
| 2531 | drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY); |
| 2532 | } |
| 2533 | } |
| 2534 | if (draw_hodo == 3) { |
| 2535 | var hodo = hodograph2(curve); |
| 2536 | var hMinX = Math.min(0, hodo[0], hodo[2]); |
| 2537 | var hMinY = Math.min(0, hodo[1], hodo[3]); |
| 2538 | var hMaxX = Math.max(0, hodo[0], hodo[2]); |
| 2539 | var hMaxY = Math.max(0, hodo[1], hodo[3]); |
| 2540 | var hScaleX = hMaxX - hMinX > 0 ? screenWidth / (hMaxX - hMinX) : 1; |
| 2541 | var hScaleY = hMaxY - hMinY > 0 ? screenHeight / (hMaxY - hMinY) : 1; |
| 2542 | var hUnit = Math.min(hScaleX, hScaleY); |
| 2543 | hUnit /= 2; |
| 2544 | var hx = xoffset - hMinX * hUnit; |
| 2545 | var hy = yoffset - hMinY * hUnit; |
| 2546 | ctx.moveTo(hx + hodo[0] * hUnit, hy + hodo[1] * hUnit); |
| 2547 | ctx.lineTo(hx + hodo[2] * hUnit, hy + hodo[3] * hUnit); |
| 2548 | ctx.strokeStyle = "red"; |
| 2549 | ctx.stroke(); |
| 2550 | drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY); |
| 2551 | } |
| 2552 | if (draw_sequence) { |
| 2553 | var ymin = Math.min(curve[1], curve[3], curve[5], curve[7]); |
| 2554 | for (var i = 0; i < 8; i+= 2) { |
| 2555 | drawLabelX(ymin, i >> 1, curve[i]); |
| 2556 | } |
| 2557 | var xmin = Math.min(curve[0], curve[2], curve[4], curve[6]); |
| 2558 | for (var i = 1; i < 8; i+= 2) { |
| 2559 | drawLabelY(xmin, i >> 1, curve[i]); |
| 2560 | } |
| 2561 | } |
| 2562 | } |
| 2563 | |
| 2564 | function logCurves(test) { |
| 2565 | for (curves in test) { |
| 2566 | var curve = test[curves]; |
| 2567 | dumpCurve(curve); |
| 2568 | } |
| 2569 | } |
| 2570 | |
| 2571 | function curveToString(curve) { |
| 2572 | var str = "{{"; |
| 2573 | for (i = 0; i < curve.length; i += 2) { |
| 2574 | str += curve[i].toFixed(decimal_places) + "," + curve[i + 1].toFixed(decimal_places); |
| 2575 | if (i < curve.length - 2) { |
| 2576 | str += "}, {"; |
| 2577 | } |
| 2578 | } |
| 2579 | str += "}}"; |
| 2580 | return str; |
| 2581 | } |
| 2582 | |
| 2583 | function dumpCurve(curve) { |
| 2584 | console.log(curveToString(curve)); |
| 2585 | } |
| 2586 | |
| 2587 | function draw(test, lines, title) { |
| 2588 | ctx.fillStyle = "rgba(0,0,0, 0.1)"; |
| 2589 | ctx.font = "normal 50px Arial"; |
| 2590 | ctx.textAlign = "left"; |
| 2591 | ctx.fillText(title, 50, 50); |
| 2592 | ctx.font = "normal 10px Arial"; |
| 2593 | ctx.lineWidth = "1.001"; "0.999"; |
| 2594 | var secondPath = test.length; |
| 2595 | var closeCount = 0; |
| 2596 | logStart = -1; |
| 2597 | logRange = 0; |
| 2598 | // find last active rec type at this step |
| 2599 | var curType = test[0]; |
| 2600 | var curStep = 0; |
| 2601 | var hasOp = false; |
| 2602 | var lastActive = 0; |
| 2603 | var lastAdd = 0; |
| 2604 | var lastSect = 0; |
| 2605 | var lastSort = 0; |
| 2606 | var lastMark = 0; |
| 2607 | activeCount = 0; |
| 2608 | addCount = 0; |
| 2609 | angleCount = 0; |
| 2610 | opCount = 0; |
| 2611 | sectCount = 0; |
| 2612 | sortCount = 0; |
| 2613 | markCount = 0; |
| 2614 | activeMax = 0; |
| 2615 | addMax = 0; |
| 2616 | angleMax = 0; |
| 2617 | opMax = 0; |
| 2618 | sectMax = 0; |
| 2619 | sectMax2 = 0; |
| 2620 | sortMax = 0; |
| 2621 | markMax = 0; |
| 2622 | lastIndex = test.length - 3; |
| 2623 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 2624 | var recType = test[tIndex]; |
| 2625 | if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { |
| 2626 | console.log("unknown rec type: " + recType); |
| 2627 | throw "stop execution"; |
| 2628 | } |
| 2629 | // if (curType == recType && curType != REC_TYPE_ADD) { |
| 2630 | // continue; |
| 2631 | // } |
| 2632 | var inStepRange = step_limit == 0 || curStep < step_limit; |
| 2633 | curType = recType; |
| 2634 | if (recType == REC_TYPE_OP) { |
| 2635 | hasOp = true; |
| 2636 | continue; |
| 2637 | } |
| 2638 | if (recType == REC_TYPE_UNKNOWN) { |
| 2639 | // these types do not advance step |
| 2640 | continue; |
| 2641 | } |
| 2642 | var bumpStep = false; |
| 2643 | var records = test[tIndex + 2]; |
| 2644 | var fragType = records[0]; |
| 2645 | if (recType == REC_TYPE_ADD) { |
| 2646 | if (records.length != 2) { |
| 2647 | console.log("expect only two elements: " + records.length); |
| 2648 | throw "stop execution"; |
| 2649 | } |
| 2650 | if (fragType == ADD_MOVETO || fragType == ADD_CLOSE) { |
| 2651 | continue; |
| 2652 | } |
| 2653 | ++addMax; |
| 2654 | if (!draw_add || !inStepRange) { |
| 2655 | continue; |
| 2656 | } |
| 2657 | lastAdd = tIndex; |
| 2658 | ++addCount; |
| 2659 | bumpStep = true; |
| 2660 | } |
| 2661 | if (recType == REC_TYPE_PATH && hasOp) { |
| 2662 | secondPath = tIndex; |
| 2663 | } |
| 2664 | if (recType == REC_TYPE_ACTIVE) { |
| 2665 | ++activeMax; |
| 2666 | if (!draw_active || !inStepRange) { |
| 2667 | continue; |
| 2668 | } |
| 2669 | lastActive = tIndex; |
| 2670 | ++activeCount; |
| 2671 | bumpStep = true; |
| 2672 | } |
| 2673 | if (recType == REC_TYPE_ACTIVE_OP) { |
| 2674 | ++opMax; |
| 2675 | if (!draw_op || !inStepRange) { |
| 2676 | continue; |
| 2677 | } |
| 2678 | lastOp = tIndex; |
| 2679 | ++opCount; |
| 2680 | bumpStep = true; |
| 2681 | } |
| 2682 | if (recType == REC_TYPE_ANGLE) { |
| 2683 | ++angleMax; |
| 2684 | if (!draw_angle || !inStepRange) { |
| 2685 | continue; |
| 2686 | } |
| 2687 | lastAngle = tIndex; |
| 2688 | ++angleCount; |
| 2689 | bumpStep = true; |
| 2690 | } |
| 2691 | if (recType == REC_TYPE_SECT) { |
| 2692 | if (records.length != 2) { |
| 2693 | console.log("expect only two elements: " + records.length); |
| 2694 | throw "stop execution"; |
| 2695 | } |
| 2696 | ++sectMax; |
| 2697 | var sectBump = 1; |
| 2698 | switch (fragType) { |
| 2699 | case INTERSECT_LINE: |
| 2700 | case INTERSECT_QUAD_LINE: |
| 2701 | case INTERSECT_QUAD: |
| 2702 | case INTERSECT_SELF_CUBIC: |
| 2703 | case INTERSECT_CUBIC_LINE: |
| 2704 | case INTERSECT_CUBIC_QUAD: |
| 2705 | case INTERSECT_CUBIC: |
| 2706 | sectBump = 1; |
| 2707 | break; |
| 2708 | case INTERSECT_LINE_2: |
| 2709 | case INTERSECT_QUAD_LINE_2: |
| 2710 | case INTERSECT_QUAD_2: |
| 2711 | case INTERSECT_CUBIC_LINE_2: |
| 2712 | case INTERSECT_CUBIC_QUAD_2: |
| 2713 | case INTERSECT_CUBIC_2: |
| 2714 | sectBump = 2; |
| 2715 | break; |
| 2716 | case INTERSECT_LINE_NO: |
| 2717 | case INTERSECT_QUAD_LINE_NO: |
| 2718 | case INTERSECT_QUAD_NO: |
| 2719 | case INTERSECT_SELF_CUBIC_NO: |
| 2720 | case INTERSECT_CUBIC_LINE_NO: |
| 2721 | case INTERSECT_CUBIC_QUAD_NO: |
| 2722 | case INTERSECT_CUBIC_NO: |
| 2723 | sectBump = 0; |
| 2724 | break; |
| 2725 | case INTERSECT_CUBIC_LINE_3: |
| 2726 | case INTERSECT_CUBIC_QUAD_3: |
| 2727 | case INTERSECT_CUBIC_3: |
| 2728 | sectBump = 3; |
| 2729 | break; |
| 2730 | case INTERSECT_CUBIC_QUAD_4: |
| 2731 | case INTERSECT_CUBIC_4: |
| 2732 | sectBump = 4; |
| 2733 | break; |
| 2734 | default: |
| 2735 | console.log("missing case " + records.length); |
| 2736 | throw "stop execution"; |
| 2737 | } |
| 2738 | sectMax2 += sectBump; |
| 2739 | if (draw_intersection <= 1 || !inStepRange) { |
| 2740 | continue; |
| 2741 | } |
| 2742 | lastSect = tIndex; |
| 2743 | sectCount += sectBump; |
| 2744 | bumpStep = true; |
| 2745 | } |
| 2746 | if (recType == REC_TYPE_SORT) { |
| 2747 | ++sortMax; |
| 2748 | if (!draw_sort || !inStepRange) { |
| 2749 | continue; |
| 2750 | } |
| 2751 | lastSort = tIndex; |
| 2752 | ++sortCount; |
| 2753 | bumpStep = true; |
| 2754 | } |
| 2755 | if (recType == REC_TYPE_MARK) { |
| 2756 | ++markMax; |
| 2757 | if (!draw_mark || !inStepRange) { |
| 2758 | continue; |
| 2759 | } |
| 2760 | lastMark = tIndex; |
| 2761 | ++markCount; |
| 2762 | bumpStep = true; |
| 2763 | } |
| 2764 | if (bumpStep) { |
| 2765 | lastIndex = tIndex; |
| 2766 | logStart = test[tIndex + 1]; |
| 2767 | logRange = records.length / 2; |
| 2768 | ++curStep; |
| 2769 | } |
| 2770 | } |
| 2771 | stepMax = (draw_add ? addMax : 0) |
| 2772 | + (draw_active ? activeMax : 0) |
| 2773 | + (draw_op ? opMax : 0) |
| 2774 | + (draw_angle ? angleMax : 0) |
| 2775 | + (draw_sort ? sortMax : 0) |
| 2776 | + (draw_mark ? markMax : 0) |
| 2777 | + (draw_intersection == 2 ? sectMax : draw_intersection == 3 ? sectMax2 : 0); |
| 2778 | if (stepMax == 0) { |
| 2779 | stepMax = addMax + activeMax + angleMax + opMax + sortMax + markMax; |
| 2780 | } |
| 2781 | drawnPts = []; |
| 2782 | drawnLines = []; |
| 2783 | drawnQuads = []; |
| 2784 | drawnCubics = []; |
| 2785 | focusXmin = focusYmin = Infinity; |
| 2786 | focusXmax = focusYmax = -Infinity; |
| 2787 | var pathIndex = 0; |
| 2788 | var opLetter = 'S'; |
| 2789 | for (var tIndex = lastIndex; tIndex >= 0; tIndex -= 3) { |
| 2790 | var recType = test[tIndex]; |
| 2791 | var records = test[tIndex + 2]; |
| 2792 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 2793 | var fragType = records[recordIndex]; |
| 2794 | if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { |
| 2795 | console.log("unknown in range frag type: " + fragType); |
| 2796 | throw "stop execution"; |
| 2797 | } |
| 2798 | var frags = records[recordIndex + 1]; |
| 2799 | focus_enabled = false; |
| 2800 | switch (recType) { |
| 2801 | case REC_TYPE_COMPUTED: |
| 2802 | if (draw_computed == 0) { |
| 2803 | continue; |
| 2804 | } |
| 2805 | ctx.lineWidth = 1; |
| 2806 | ctx.strokeStyle = pathIndex == 0 ? "black" : "red"; |
| 2807 | ctx.fillStyle = "blue"; |
| 2808 | var drawThis = false; |
| 2809 | switch (fragType) { |
| 2810 | case PATH_QUAD: |
| 2811 | if ((draw_computed & 5) == 1 || ((draw_computed & 4) != 0 |
| 2812 | && (draw_computed & 1) == pathIndex)) { |
| 2813 | drawQuad(frags[0], frags[1], frags[2], frags[3], |
| 2814 | frags[4], frags[5]); |
| 2815 | drawThis = true; |
| 2816 | } |
| 2817 | break; |
| 2818 | case PATH_CUBIC: |
| 2819 | if ((draw_computed & 6) == 2 || ((draw_computed & 4) != 0 |
| 2820 | && (draw_computed & 1) != pathIndex)) { |
| 2821 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
| 2822 | frags[4], frags[5], frags[6], frags[7]); |
| 2823 | drawThis = true; |
| 2824 | } |
| 2825 | ++pathIndex; |
| 2826 | break; |
| 2827 | case COMPUTED_SET_1: |
| 2828 | pathIndex = 0; |
| 2829 | break; |
| 2830 | case COMPUTED_SET_2: |
| 2831 | pathIndex = 1; |
| 2832 | break; |
| 2833 | default: |
| 2834 | console.log("unknown REC_TYPE_COMPUTED frag type: " + fragType); |
| 2835 | throw "stop execution"; |
| 2836 | } |
| 2837 | if (!drawThis || collect_bounds) { |
| 2838 | break; |
| 2839 | } |
| 2840 | drawCurveSpecials(test, frags, fragType); |
| 2841 | break; |
| 2842 | case REC_TYPE_PATH: |
| 2843 | if (!draw_path) { |
| 2844 | continue; |
| 2845 | } |
| 2846 | var firstPath = tIndex < secondPath; |
| 2847 | if ((draw_path & (firstPath ? 1 : 2)) == 0) { |
| 2848 | continue; |
| 2849 | } |
| 2850 | ctx.lineWidth = 1; |
| 2851 | ctx.strokeStyle = firstPath ? "black" : "red"; |
| 2852 | ctx.fillStyle = "blue"; |
| 2853 | switch (fragType) { |
| 2854 | case PATH_LINE: |
| 2855 | drawLine(frags[0], frags[1], frags[2], frags[3]); |
| 2856 | break; |
| 2857 | case PATH_QUAD: |
| 2858 | drawQuad(frags[0], frags[1], frags[2], frags[3], |
| 2859 | frags[4], frags[5]); |
| 2860 | break; |
| 2861 | case PATH_CUBIC: |
| 2862 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
| 2863 | frags[4], frags[5], frags[6], frags[7]); |
| 2864 | break; |
| 2865 | default: |
| 2866 | console.log("unknown REC_TYPE_PATH frag type: " + fragType); |
| 2867 | throw "stop execution"; |
| 2868 | } |
| 2869 | if (collect_bounds) { |
| 2870 | break; |
| 2871 | } |
| 2872 | drawCurveSpecials(test, frags, fragType); |
| 2873 | break; |
| 2874 | case REC_TYPE_OP: |
| 2875 | switch (fragType) { |
| 2876 | case OP_INTERSECT: opLetter = 'I'; break; |
| 2877 | case OP_DIFFERENCE: opLetter = 'D'; break; |
| 2878 | case OP_UNION: opLetter = 'U'; break; |
| 2879 | case OP_XOR: opLetter = 'X'; break; |
| 2880 | default: |
| 2881 | console.log("unknown REC_TYPE_OP frag type: " + fragType); |
| 2882 | throw "stop execution"; |
| 2883 | } |
| 2884 | break; |
| 2885 | case REC_TYPE_ACTIVE: |
| 2886 | if (!draw_active || (step_limit > 0 && tIndex < lastActive)) { |
| 2887 | continue; |
| 2888 | } |
| 2889 | var x1 = frags[SPAN_X1]; |
| 2890 | var y1 = frags[SPAN_Y1]; |
| 2891 | var x2 = frags[SPAN_X2]; |
| 2892 | var y2 = frags[SPAN_Y2]; |
| 2893 | var x3, y3, x3, y4, t1, t2; |
| 2894 | ctx.lineWidth = 3; |
| 2895 | ctx.strokeStyle = "rgba(0,0,255, 0.3)"; |
| 2896 | focus_enabled = true; |
| 2897 | switch (fragType) { |
| 2898 | case ACTIVE_LINE_SPAN: |
| 2899 | t1 = frags[SPAN_L_T]; |
| 2900 | t2 = frags[SPAN_L_TEND]; |
| 2901 | drawLinePartial(x1, y1, x2, y2, t1, t2); |
| 2902 | if (draw_id) { |
| 2903 | drawLinePartialID(frags[0], x1, y1, x2, y2, t1, t2); |
| 2904 | } |
| 2905 | break; |
| 2906 | case ACTIVE_QUAD_SPAN: |
| 2907 | x3 = frags[SPAN_X3]; |
| 2908 | y3 = frags[SPAN_Y3]; |
| 2909 | t1 = frags[SPAN_Q_T]; |
| 2910 | t2 = frags[SPAN_Q_TEND]; |
| 2911 | drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2); |
| 2912 | if (draw_id) { |
| 2913 | drawQuadPartialID(frags[0], x1, y1, x2, y2, x3, y3, t1, t2); |
| 2914 | } |
| 2915 | break; |
| 2916 | case ACTIVE_CUBIC_SPAN: |
| 2917 | x3 = frags[SPAN_X3]; |
| 2918 | y3 = frags[SPAN_Y3]; |
| 2919 | x4 = frags[SPAN_X4]; |
| 2920 | y4 = frags[SPAN_Y4]; |
| 2921 | t1 = frags[SPAN_C_T]; |
| 2922 | t2 = frags[SPAN_C_TEND]; |
| 2923 | drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); |
| 2924 | if (draw_id) { |
| 2925 | drawCubicPartialID(frags[0], x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); |
| 2926 | } |
| 2927 | break; |
| 2928 | default: |
| 2929 | console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType); |
| 2930 | throw "stop execution"; |
| 2931 | } |
| 2932 | break; |
| 2933 | case REC_TYPE_ACTIVE_OP: |
| 2934 | if (!draw_op || (step_limit > 0 && tIndex < lastOp)) { |
| 2935 | continue; |
| 2936 | } |
| 2937 | focus_enabled = true; |
| 2938 | ctx.lineWidth = 3; |
| 2939 | var activeSpan = frags[7] == "1"; |
| 2940 | ctx.strokeStyle = activeSpan ? "rgba(45,160,0, 0.3)" : "rgba(255,45,0, 0.5)"; |
| 2941 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 2942 | drawCurve(curve); |
| 2943 | if (draw_op > 1) { |
| 2944 | drawArc(curve, false, frags[3], frags[4]); |
| 2945 | drawArc(curve, true, frags[5], frags[6]); |
| 2946 | } |
| 2947 | break; |
| 2948 | case REC_TYPE_ADD: |
| 2949 | if (!draw_add) { |
| 2950 | continue; |
| 2951 | } |
| 2952 | ctx.lineWidth = 3; |
| 2953 | ctx.strokeStyle = closeCount == 0 ? "rgba(0,0,255, 0.3)" |
| 2954 | : closeCount == 1 ? "rgba(0,127,0, 0.3)" |
| 2955 | : closeCount == 2 ? "rgba(0,127,127, 0.3)" |
| 2956 | : closeCount == 3 ? "rgba(127,127,0, 0.3)" |
| 2957 | : "rgba(127,0,127, 0.3)"; |
| 2958 | focus_enabled = true; |
| 2959 | switch (fragType) { |
| 2960 | case ADD_MOVETO: |
| 2961 | break; |
| 2962 | case ADD_LINETO: |
| 2963 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 2964 | drawLine(frags[0], frags[1], frags[2], frags[3]); |
| 2965 | } |
| 2966 | break; |
| 2967 | case ADD_QUADTO: |
| 2968 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 2969 | drawQuad(frags[0], frags[1], frags[2], frags[3], frags[4], frags[5]); |
| 2970 | } |
| 2971 | break; |
| 2972 | case ADD_CUBICTO: |
| 2973 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 2974 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
| 2975 | frags[4], frags[5], frags[6], frags[7]); |
| 2976 | } |
| 2977 | break; |
| 2978 | case ADD_CLOSE: |
| 2979 | ++closeCount; |
| 2980 | break; |
| 2981 | case ADD_FILL: |
| 2982 | break; |
| 2983 | default: |
| 2984 | console.log("unknown REC_TYPE_ADD frag type: " + fragType); |
| 2985 | throw "stop execution"; |
| 2986 | } |
| 2987 | break; |
| 2988 | case REC_TYPE_ANGLE: |
| 2989 | if (!draw_angle || (step_limit > 0 && tIndex < lastAngle)) { |
| 2990 | continue; |
| 2991 | } |
| 2992 | if (fragType != ANGLE_AFTER && fragType != ANGLE_AFTER2) { |
| 2993 | continue; |
| 2994 | } |
| 2995 | focus_enabled = true; |
| 2996 | ctx.lineWidth = 3; |
| 2997 | ctx.strokeStyle = "rgba(127,45,127, 0.3)"; |
| 2998 | var leftCurve, midCurve, rightCurve; |
| 2999 | if (fragType == ANGLE_AFTER) { |
| 3000 | leftCurve = curvePartialByID(test, frags[0], frags[3], frags[4]); |
| 3001 | midCurve = curvePartialByID(test, frags[5], frags[8], frags[9]); |
| 3002 | rightCurve = curvePartialByID(test, frags[10], frags[13], frags[14]); |
| 3003 | } else { |
| 3004 | leftCurve = curvePartialByID(test, frags[0], frags[4], frags[5]); |
| 3005 | midCurve = curvePartialByID(test, frags[6], frags[10], frags[11]); |
| 3006 | rightCurve = curvePartialByID(test, frags[12], frags[16], frags[17]); |
| 3007 | } |
| 3008 | drawCurve(leftCurve); |
| 3009 | drawCurve(rightCurve); |
| 3010 | var inBetween = frags[fragType == ANGLE_AFTER ? 15 : 18] == "T"; |
| 3011 | ctx.strokeStyle = inBetween ? "rgba(0,160,45, 0.3)" : "rgba(255,0,45, 0.5)"; |
| 3012 | drawCurve(midCurve); |
| 3013 | if (draw_angle > 1) { |
| 3014 | drawOrder(leftCurve, 'L'); |
| 3015 | drawOrder(rightCurve, 'R'); |
| 3016 | } |
| 3017 | break; |
| 3018 | case REC_TYPE_SECT: |
| 3019 | if (!draw_intersection) { |
| 3020 | continue; |
| 3021 | } |
| 3022 | if (draw_intersection != 1 && (step_limit > 0 && tIndex < lastSect)) { |
| 3023 | continue; |
| 3024 | } |
| 3025 | // draw_intersection == 1 : show all |
| 3026 | // draw_intersection == 2 : step == 0 ? show all : show intersection line #step |
| 3027 | // draw_intersection == 3 : step == 0 ? show all : show intersection #step |
| 3028 | ctx.lineWidth = 1; |
| 3029 | ctx.strokeStyle = "rgba(0,0,255, 0.3)"; |
| 3030 | ctx.fillStyle = "blue"; |
| 3031 | focus_enabled = true; |
| 3032 | var f = []; |
| 3033 | var c1s; |
| 3034 | var c1l; |
| 3035 | var c2s; |
| 3036 | var c2l; |
| 3037 | switch (fragType) { |
| 3038 | case INTERSECT_LINE: |
| 3039 | f.push(5, 6, 0, 7); |
| 3040 | c1s = 1; c1l = 4; c2s = 8; c2l = 4; |
| 3041 | break; |
| 3042 | case INTERSECT_LINE_2: |
| 3043 | f.push(5, 6, 0, 10); |
| 3044 | f.push(8, 9, 7, 15); |
| 3045 | c1s = 1; c1l = 4; c2s = 11; c2l = 4; |
| 3046 | break; |
| 3047 | case INTERSECT_LINE_NO: |
| 3048 | c1s = 0; c1l = 4; c2s = 4; c2l = 4; |
| 3049 | break; |
| 3050 | case INTERSECT_QUAD_LINE: |
| 3051 | f.push(7, 8, 0, 9); |
| 3052 | c1s = 1; c1l = 6; c2s = 10; c2l = 4; |
| 3053 | break; |
| 3054 | case INTERSECT_QUAD_LINE_2: |
| 3055 | f.push(7, 8, 0, 12); |
| 3056 | f.push(10, 11, 9, 17); |
| 3057 | c1s = 1; c1l = 6; c2s = 13; c2l = 4; |
| 3058 | break; |
| 3059 | case INTERSECT_QUAD_LINE_NO: |
| 3060 | c1s = 0; c1l = 6; c2s = 6; c2l = 4; |
| 3061 | break; |
| 3062 | case INTERSECT_QUAD: |
| 3063 | f.push(7, 8, 0, 9); |
| 3064 | c1s = 1; c1l = 6; c2s = 10; c2l = 6; |
| 3065 | break; |
| 3066 | case INTERSECT_QUAD_2: |
| 3067 | f.push(7, 8, 0, 12); |
| 3068 | f.push(10, 11, 9, 19); |
| 3069 | c1s = 1; c1l = 6; c2s = 13; c2l = 6; |
| 3070 | break; |
| 3071 | case INTERSECT_QUAD_NO: |
| 3072 | c1s = 0; c1l = 6; c2s = 6; c2l = 6; |
| 3073 | break; |
| 3074 | case INTERSECT_SELF_CUBIC: |
| 3075 | f.push(9, 10, 0, 11); |
| 3076 | c1s = 1; c1l = 8; c2s = 0; c2l = 0; |
| 3077 | break; |
| 3078 | case INTERSECT_SELF_CUBIC_NO: |
| 3079 | c1s = 0; c1l = 8; c2s = 0; c2l = 0; |
| 3080 | break; |
| 3081 | case INTERSECT_CUBIC_LINE: |
| 3082 | f.push(9, 10, 0, 11); |
| 3083 | c1s = 1; c1l = 8; c2s = 12; c2l = 4; |
| 3084 | break; |
| 3085 | case INTERSECT_CUBIC_LINE_2: |
| 3086 | f.push(9, 10, 0, 14); |
| 3087 | f.push(12, 13, 11, 19); |
| 3088 | c1s = 1; c1l = 8; c2s = 15; c2l = 4; |
| 3089 | break; |
| 3090 | case INTERSECT_CUBIC_LINE_3: |
| 3091 | f.push(9, 10, 0, 17); |
| 3092 | f.push(12, 13, 11, 22); |
| 3093 | f.push(15, 16, 14, 23); |
| 3094 | c1s = 1; c1l = 8; c2s = 18; c2l = 4; |
| 3095 | break; |
| 3096 | case INTERSECT_CUBIC_QUAD_NO: |
| 3097 | c1s = 0; c1l = 8; c2s = 8; c2l = 6; |
| 3098 | break; |
| 3099 | case INTERSECT_CUBIC_QUAD: |
| 3100 | f.push(9, 10, 0, 11); |
| 3101 | c1s = 1; c1l = 8; c2s = 12; c2l = 6; |
| 3102 | break; |
| 3103 | case INTERSECT_CUBIC_QUAD_2: |
| 3104 | f.push(9, 10, 0, 14); |
| 3105 | f.push(12, 13, 11, 21); |
| 3106 | c1s = 1; c1l = 8; c2s = 15; c2l = 6; |
| 3107 | break; |
| 3108 | case INTERSECT_CUBIC_QUAD_3: |
| 3109 | f.push(9, 10, 0, 17); |
| 3110 | f.push(12, 13, 11, 24); |
| 3111 | f.push(15, 16, 14, 25); |
| 3112 | c1s = 1; c1l = 8; c2s = 18; c2l = 6; |
| 3113 | break; |
| 3114 | case INTERSECT_CUBIC_QUAD_4: |
| 3115 | f.push(9, 10, 0, 20); |
| 3116 | f.push(12, 13, 11, 27); |
| 3117 | f.push(15, 16, 14, 28); |
| 3118 | f.push(18, 19, 17, 29); |
| 3119 | c1s = 1; c1l = 8; c2s = 21; c2l = 6; |
| 3120 | break; |
| 3121 | case INTERSECT_CUBIC_LINE_NO: |
| 3122 | c1s = 0; c1l = 8; c2s = 8; c2l = 4; |
| 3123 | break; |
| 3124 | case INTERSECT_CUBIC: |
| 3125 | f.push(9, 10, 0, 11); |
| 3126 | c1s = 1; c1l = 8; c2s = 12; c2l = 8; |
| 3127 | break; |
| 3128 | case INTERSECT_CUBIC_2: |
| 3129 | f.push(9, 10, 0, 14); |
| 3130 | f.push(12, 13, 11, 23); |
| 3131 | c1s = 1; c1l = 8; c2s = 15; c2l = 8; |
| 3132 | break; |
| 3133 | case INTERSECT_CUBIC_3: |
| 3134 | f.push(9, 10, 0, 17); |
| 3135 | f.push(12, 13, 11, 26); |
| 3136 | f.push(15, 16, 14, 27); |
| 3137 | c1s = 1; c1l = 8; c2s = 18; c2l = 8; |
| 3138 | break; |
| 3139 | case INTERSECT_CUBIC_4: |
| 3140 | f.push(9, 10, 0, 20); |
| 3141 | f.push(12, 13, 11, 29); |
| 3142 | f.push(15, 16, 14, 30); |
| 3143 | f.push(18, 19, 17, 31); |
| 3144 | c1s = 1; c1l = 8; c2s = 21; c2l = 8; |
| 3145 | break; |
| 3146 | case INTERSECT_CUBIC_NO: |
| 3147 | c1s = 0; c1l = 8; c2s = 8; c2l = 8; |
| 3148 | break; |
| 3149 | default: |
| 3150 | console.log("unknown REC_TYPE_SECT frag type: " + fragType); |
| 3151 | throw "stop execution"; |
| 3152 | } |
| 3153 | if (draw_intersection != 1) { |
| 3154 | var id = -1; |
| 3155 | var curve; |
| 3156 | switch (c1l) { |
| 3157 | case 4: |
| 3158 | drawLine(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]); |
| 3159 | if (draw_id) { |
| 3160 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]]; |
| 3161 | id = idByCurve(test, curve, PATH_LINE); |
| 3162 | } |
| 3163 | break; |
| 3164 | case 6: |
| 3165 | drawQuad(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3166 | frags[c1s + 4], frags[c1s + 5]); |
| 3167 | if (draw_id) { |
| 3168 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3169 | frags[c1s + 4], frags[c1s + 5]]; |
| 3170 | id = idByCurve(test, curve, PATH_QUAD); |
| 3171 | } |
| 3172 | break; |
| 3173 | case 8: |
| 3174 | drawCubic(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3175 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]); |
| 3176 | if (draw_id) { |
| 3177 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 3178 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]]; |
| 3179 | id = idByCurve(test, curve, PATH_CUBIC); |
| 3180 | } |
| 3181 | break; |
| 3182 | } |
| 3183 | if (id >= 0) { |
| 3184 | drawID(curve, id); |
| 3185 | } |
| 3186 | id = -1; |
| 3187 | switch (c2l) { |
| 3188 | case 0: |
| 3189 | break; |
| 3190 | case 4: |
| 3191 | drawLine(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]); |
| 3192 | if (draw_id) { |
| 3193 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]]; |
| 3194 | id = idByCurve(test, curve, PATH_LINE); |
| 3195 | } |
| 3196 | break; |
| 3197 | case 6: |
| 3198 | drawQuad(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3199 | frags[c2s + 4], frags[c2s + 5]); |
| 3200 | if (draw_id) { |
| 3201 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3202 | frags[c2s + 4], frags[c2s + 5]]; |
| 3203 | id = idByCurve(test, curve, PATH_QUAD); |
| 3204 | } |
| 3205 | break; |
| 3206 | case 8: |
| 3207 | drawCubic(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3208 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]); |
| 3209 | if (draw_id) { |
| 3210 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 3211 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]]; |
| 3212 | id = idByCurve(test, curve, PATH_CUBIC); |
| 3213 | } |
| 3214 | break; |
| 3215 | } |
| 3216 | if (id >= 0) { |
| 3217 | drawID(curve, id); |
| 3218 | } |
| 3219 | } |
| 3220 | if (collect_bounds) { |
| 3221 | break; |
| 3222 | } |
| 3223 | for (var idx = 0; idx < f.length; idx += 4) { |
| 3224 | if (draw_intersection != 3 || idx == lastSect - tIndex) { |
| 3225 | drawPoint(frags[f[idx]], frags[f[idx + 1]], true); |
| 3226 | } |
| 3227 | } |
| 3228 | if (!draw_intersectT) { |
| 3229 | break; |
| 3230 | } |
| 3231 | ctx.fillStyle = "red"; |
| 3232 | for (var idx = 0; idx < f.length; idx += 4) { |
| 3233 | if (draw_intersection != 3 || idx == lastSect - tIndex) { |
| 3234 | drawTAtPointUp(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 2]]); |
| 3235 | drawTAtPointDown(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 3]]); |
| 3236 | } |
| 3237 | } |
| 3238 | break; |
| 3239 | case REC_TYPE_SORT: |
| 3240 | if (!draw_sort || (step_limit > 0 && tIndex < lastSort)) { |
| 3241 | continue; |
| 3242 | } |
| 3243 | ctx.lineWidth = 3; |
| 3244 | ctx.strokeStyle = "rgba(127,127,0, 0.5)"; |
| 3245 | focus_enabled = true; |
| 3246 | switch (fragType) { |
| 3247 | case SORT_UNARY: |
| 3248 | case SORT_BINARY: |
| 3249 | var curve = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 3250 | drawCurve(curve); |
| 3251 | break; |
| 3252 | default: |
| 3253 | console.log("unknown REC_TYPE_SORT frag type: " + fragType); |
| 3254 | throw "stop execution"; |
| 3255 | } |
| 3256 | break; |
| 3257 | case REC_TYPE_MARK: |
| 3258 | if (!draw_mark || (step_limit > 0 && tIndex < lastMark)) { |
| 3259 | continue; |
| 3260 | } |
| 3261 | ctx.lineWidth = 3; |
| 3262 | ctx.strokeStyle = fragType >= MARK_DONE_LINE ? |
| 3263 | "rgba(127,0,127, 0.5)" : "rgba(127,127,0, 0.5)"; |
| 3264 | focus_enabled = true; |
| 3265 | switch (fragType) { |
| 3266 | case MARK_LINE: |
| 3267 | case MARK_DONE_LINE: |
| 3268 | case MARK_UNSORTABLE_LINE: |
| 3269 | case MARK_SIMPLE_LINE: |
| 3270 | case MARK_SIMPLE_DONE_LINE: |
| 3271 | case MARK_DONE_UNARY_LINE: |
| 3272 | drawLinePartial(frags[1], frags[2], frags[3], frags[4], |
| 3273 | frags[5], frags[9]); |
| 3274 | if (draw_id) { |
| 3275 | drawLinePartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 3276 | frags[5], frags[9]); |
| 3277 | } |
| 3278 | break; |
| 3279 | case MARK_QUAD: |
| 3280 | case MARK_DONE_QUAD: |
| 3281 | case MARK_UNSORTABLE_QUAD: |
| 3282 | case MARK_SIMPLE_QUAD: |
| 3283 | case MARK_SIMPLE_DONE_QUAD: |
| 3284 | case MARK_DONE_UNARY_QUAD: |
| 3285 | drawQuadPartial(frags[1], frags[2], frags[3], frags[4], |
| 3286 | frags[5], frags[6], frags[7], frags[11]); |
| 3287 | if (draw_id) { |
| 3288 | drawQuadPartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 3289 | frags[5], frags[6], frags[7], frags[11]); |
| 3290 | } |
| 3291 | break; |
| 3292 | case MARK_CUBIC: |
| 3293 | case MARK_DONE_CUBIC: |
| 3294 | case MARK_UNSORTABLE_CUBIC: |
| 3295 | case MARK_SIMPLE_CUBIC: |
| 3296 | case MARK_SIMPLE_DONE_CUBIC: |
| 3297 | case MARK_DONE_UNARY_CUBIC: |
| 3298 | drawCubicPartial(frags[1], frags[2], frags[3], frags[4], |
| 3299 | frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); |
| 3300 | if (draw_id) { |
| 3301 | drawCubicPartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 3302 | frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); |
| 3303 | } |
| 3304 | break; |
| 3305 | case MARK_ANGLE_LAST: |
| 3306 | // FIXME: ignored for now |
| 3307 | break; |
| 3308 | default: |
| 3309 | console.log("unknown REC_TYPE_MARK frag type: " + fragType); |
| 3310 | throw "stop execution"; |
| 3311 | } |
| 3312 | break; |
| 3313 | default: |
| 3314 | continue; |
| 3315 | } |
| 3316 | } |
| 3317 | switch (recType) { |
| 3318 | case REC_TYPE_SORT: |
| 3319 | if (!draw_sort || (step_limit > 0 && tIndex < lastSort)) { |
| 3320 | break; |
| 3321 | } |
| 3322 | var angles = []; // use tangent lines to describe arcs |
| 3323 | var windFrom = []; |
| 3324 | var windTo = []; |
| 3325 | var opp = []; |
| 3326 | var minXY = Number.MAX_VALUE; |
| 3327 | var partial; |
| 3328 | focus_enabled = true; |
| 3329 | var someUnsortable = false; |
| 3330 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 3331 | var fragType = records[recordIndex]; |
| 3332 | var frags = records[recordIndex + 1]; |
| 3333 | var unsortable = (fragType == SORT_UNARY && frags[14]) || |
| 3334 | (fragType == SORT_BINARY && frags[16]); |
| 3335 | someUnsortable |= unsortable; |
| 3336 | switch (fragType) { |
| 3337 | case SORT_UNARY: |
| 3338 | case SORT_BINARY: |
| 3339 | partial = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 3340 | break; |
| 3341 | default: |
| 3342 | console.log("unknown REC_TYPE_SORT frag type: " + fragType); |
| 3343 | throw "stop execution"; |
| 3344 | } |
| 3345 | var dx = boundsWidth(partial); |
| 3346 | var dy = boundsHeight(partial); |
| 3347 | minXY = Math.min(minXY, dx * dx + dy * dy); |
| 3348 | if (collect_bounds) { |
| 3349 | continue; |
| 3350 | } |
| 3351 | angles.push(tangent(partial)); |
| 3352 | var from = frags[12]; |
| 3353 | var to = frags[12]; |
| 3354 | var sgn = frags[10]; |
| 3355 | if (sgn < 0) { |
| 3356 | from -= frags[11]; |
| 3357 | } else if (sgn > 0) { |
| 3358 | to -= frags[11]; |
| 3359 | } |
| 3360 | windFrom.push(from + (unsortable ? "!" : "")); |
| 3361 | windTo.push(to + (unsortable ? "!" : "")); |
| 3362 | opp.push(fragType == SORT_BINARY); |
| 3363 | if (draw_sort == 1) { |
| 3364 | drawOrder(partial, frags[12]); |
| 3365 | } else { |
| 3366 | drawOrder(partial, (recordIndex / 2) + 1); |
| 3367 | } |
| 3368 | } |
| 3369 | var radius = Math.sqrt(minXY) / 2 * scale; |
| 3370 | radius = Math.min(50, radius); |
| 3371 | var scaledRadius = radius / scale; |
| 3372 | var centerX = partial[0]; |
| 3373 | var centerY = partial[1]; |
| 3374 | if (collect_bounds) { |
| 3375 | if (focus_enabled) { |
| 3376 | focusXmin = Math.min(focusXmin, centerX - scaledRadius); |
| 3377 | focusYmin = Math.min(focusYmin, centerY - scaledRadius); |
| 3378 | focusXmax = Math.max(focusXmax, centerX + scaledRadius); |
| 3379 | focusYmax = Math.max(focusYmax, centerY + scaledRadius); |
| 3380 | } |
| 3381 | break; |
| 3382 | } |
| 3383 | break; |
| 3384 | default: |
| 3385 | break; |
| 3386 | } |
| 3387 | } |
| 3388 | if (collect_bounds) { |
| 3389 | return; |
| 3390 | } |
| 3391 | if (draw_log && logStart >= 0) { |
| 3392 | ctx.font = "normal 10px Arial"; |
| 3393 | ctx.textAlign = "left"; |
| 3394 | ctx.beginPath(); |
| 3395 | var top = screenHeight - 20 - (logRange + 2) * 10; |
| 3396 | ctx.rect(50, top, screenWidth - 100, (logRange + 2) * 10); |
| 3397 | ctx.fillStyle = "white"; |
| 3398 | ctx.fill(); |
| 3399 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 3400 | if (logStart > 0) { |
| 3401 | ctx.fillText(lines[logStart - 1], 50, top + 8); |
| 3402 | } |
| 3403 | ctx.fillStyle = "black"; |
| 3404 | for (var idx = 0; idx < logRange; ++idx) { |
| 3405 | ctx.fillText(lines[logStart + idx], 50, top + 18 + 10 * idx); |
| 3406 | } |
| 3407 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 3408 | if (logStart + logRange < lines.length) { |
| 3409 | ctx.fillText(lines[logStart + logRange], 50, top + 18 + 10 * logRange); |
| 3410 | } |
| 3411 | } |
| 3412 | if (draw_legend) { |
| 3413 | var pos = 0; |
| 3414 | var drawSomething = draw_add | draw_active | draw_sort | draw_mark; |
| 3415 | // drawBox(pos++, "yellow", "black", opLetter, true, ''); |
| 3416 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_intersection > 1 ? sectCount : sectMax2, draw_intersection, intersectionKey); |
| 3417 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_add ? addCount : addMax, draw_add, addKey); |
| 3418 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_active ? activeCount : activeMax, draw_active, activeKey); |
| 3419 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_angle ? angleCount : angleMax, draw_angle, angleKey); |
| 3420 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_op ? opCount : opMax, draw_op, opKey); |
| 3421 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_sort ? sortCount : sortMax, draw_sort, sortKey); |
| 3422 | drawBox(pos++, "rgba(127,0,127, 0.3)", "black", draw_mark ? markCount : markMax, draw_mark, markKey); |
| 3423 | drawBox(pos++, "black", "white", |
| 3424 | (new Array('P', 'P1', 'P2', 'P'))[draw_path], draw_path != 0, pathKey); |
| 3425 | drawBox(pos++, "rgba(0,63,0, 0.7)", "white", |
| 3426 | (new Array('Q', 'Q', 'C', 'QC', 'Qc', 'Cq'))[draw_computed], |
| 3427 | draw_computed != 0, computedKey); |
| 3428 | drawBox(pos++, "green", "black", step_limit, drawSomething, ''); |
| 3429 | drawBox(pos++, "green", "black", stepMax, drawSomething, ''); |
| 3430 | drawBox(pos++, "rgba(255,0,0, 0.6)", "black", lastIndex, drawSomething & draw_log, ''); |
| 3431 | drawBox(pos++, "rgba(255,0,0, 0.6)", "black", test.length - 1, drawSomething & draw_log, ''); |
| 3432 | if (curve_t) { |
| 3433 | drawCurveTControl(); |
| 3434 | } |
| 3435 | ctx.font = "normal 20px Arial"; |
| 3436 | ctx.fillStyle = "rgba(0,0,0, 0.3)"; |
| 3437 | ctx.textAlign = "right"; |
| 3438 | ctx.fillText(scale.toFixed(decimal_places) + 'x' , screenWidth - 10, screenHeight - 5); |
| 3439 | } |
| 3440 | if (draw_hints) { |
| 3441 | ctx.font = "normal 10px Arial"; |
| 3442 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 3443 | ctx.textAlign = "right"; |
| 3444 | var y = 4; |
| 3445 | ctx.fillText("control lines : " + controlLinesKey, ctx.screenWidthwidth - 10, pos * 50 + y++ * 10); |
| 3446 | ctx.fillText("curve t : " + curveTKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3447 | ctx.fillText("deriviatives : " + deriviativesKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3448 | ctx.fillText("intersect t : " + intersectTKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3449 | ctx.fillText("hodo : " + hodoKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3450 | ctx.fillText("log : " + logKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3451 | ctx.fillText("log curve : " + logCurvesKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3452 | ctx.fillText("mid point : " + midpointKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3453 | ctx.fillText("points : " + ptsKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3454 | ctx.fillText("sequence : " + sequenceKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3455 | ctx.fillText("xy : " + xyKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 3456 | } |
| 3457 | } |
| 3458 | |
| 3459 | function drawBox(y, backC, foreC, str, enable, label) { |
| 3460 | ctx.beginPath(); |
| 3461 | ctx.fillStyle = backC; |
| 3462 | ctx.rect(screenWidth - 40, y * 50 + 10, 40, 30); |
| 3463 | ctx.fill(); |
| 3464 | ctx.font = "normal 16px Arial"; |
| 3465 | ctx.fillStyle = foreC; |
| 3466 | ctx.textAlign = "center"; |
| 3467 | ctx.fillText(str, screenWidth - 20, y * 50 + 32); |
| 3468 | if (!enable) { |
| 3469 | ctx.fillStyle = "rgba(255,255,255, 0.5)"; |
| 3470 | ctx.fill(); |
| 3471 | } |
| 3472 | if (label != '') { |
| 3473 | ctx.font = "normal 9px Arial"; |
| 3474 | ctx.fillStyle = "black"; |
| 3475 | ctx.fillText(label, screenWidth - 47, y * 50 + 40); |
| 3476 | } |
| 3477 | } |
| 3478 | |
| 3479 | function drawCurveTControl() { |
| 3480 | ctx.lineWidth = 2; |
| 3481 | ctx.strokeStyle = "rgba(0,0,0, 0.3)"; |
| 3482 | ctx.beginPath(); |
| 3483 | ctx.rect(screenWidth - 80, 40, 28, screenHeight - 80); |
| 3484 | ctx.stroke(); |
| 3485 | var ty = 40 + curveT * (screenHeight - 80); |
| 3486 | ctx.beginPath(); |
| 3487 | ctx.moveTo(screenWidth - 80, ty); |
| 3488 | ctx.lineTo(screenWidth - 85, ty - 5); |
| 3489 | ctx.lineTo(screenWidth - 85, ty + 5); |
| 3490 | ctx.lineTo(screenWidth - 80, ty); |
| 3491 | ctx.fillStyle = "rgba(0,0,0, 0.6)"; |
| 3492 | ctx.fill(); |
| 3493 | var num = curveT.toFixed(decimal_places); |
| 3494 | ctx.font = "normal 10px Arial"; |
| 3495 | ctx.textAlign = "left"; |
| 3496 | ctx.fillText(num, screenWidth - 78, ty); |
| 3497 | } |
| 3498 | |
| 3499 | function ptInTControl() { |
| 3500 | var e = window.event; |
| 3501 | var tgt = e.target || e.srcElement; |
| 3502 | var left = tgt.offsetLeft; |
| 3503 | var top = tgt.offsetTop; |
| 3504 | var x = (e.clientX - left); |
| 3505 | var y = (e.clientY - top); |
| 3506 | if (x < screenWidth - 80 || x > screenWidth - 50) { |
| 3507 | return false; |
| 3508 | } |
| 3509 | if (y < 40 || y > screenHeight - 80) { |
| 3510 | return false; |
| 3511 | } |
| 3512 | curveT = (y - 40) / (screenHeight - 120); |
| 3513 | if (curveT < 0 || curveT > 1) { |
| 3514 | throw "stop execution"; |
| 3515 | } |
| 3516 | return true; |
| 3517 | } |
| 3518 | |
| 3519 | function drawTop() { |
| 3520 | if (tests[testIndex] == null) { |
| 3521 | var str = testDivs[testIndex].textContent; |
| 3522 | parse_all(str); |
| 3523 | var title = testDivs[testIndex].id.toString(); |
| 3524 | testTitles[testIndex] = title; |
| 3525 | } |
| 3526 | init(tests[testIndex]); |
| 3527 | redraw(); |
| 3528 | } |
| 3529 | |
| 3530 | function redraw() { |
| 3531 | if (focus_on_selection) { |
| 3532 | collect_bounds = true; |
| 3533 | draw(tests[testIndex], testLines[testIndex], testTitles[testIndex]); |
| 3534 | collect_bounds = false; |
| 3535 | if (focusXmin < focusXmax && focusYmin < focusYmax) { |
| 3536 | setScale(focusXmin, focusXmax, focusYmin, focusYmax); |
| 3537 | } |
| 3538 | } |
| 3539 | ctx.beginPath(); |
| 3540 | ctx.fillStyle = "white"; |
| 3541 | ctx.rect(0, 0, screenWidth, screenHeight); |
| 3542 | ctx.fill(); |
| 3543 | draw(tests[testIndex], testLines[testIndex], testTitles[testIndex]); |
| 3544 | } |
| 3545 | |
| 3546 | function dumpCurvePartial(test, id, t0, t1) { |
| 3547 | var curve = curveByID(test, id); |
| 3548 | var name = ["line", "quad", "cubic"][curve.length / 2 - 2]; |
| 3549 | console.log("id=" + id + " " + name + "=" + curveToString(curve) |
| 3550 | + " t0=" + t0 + " t1=" + t1 |
| 3551 | + " partial=" + curveToString(curvePartialByID(test, id, t0, t1))); |
| 3552 | } |
| 3553 | |
| 3554 | function dumpAngleTest(test, id, t0, t1) { |
| 3555 | var curve = curveByID(test, id); |
| 3556 | console.log(" { {" + curveToString(curve) + "}, " |
| 3557 | + curve.length / 2 + ", " + t0 + ", " + t1 + ", {} }, //"); |
| 3558 | } |
| 3559 | |
| 3560 | function dumpLogToConsole() { |
| 3561 | if (logStart < 0) { |
| 3562 | return; |
| 3563 | } |
| 3564 | var test = tests[testIndex]; |
| 3565 | var recType = REC_TYPE_UNKNOWN; |
| 3566 | var records; |
| 3567 | for (var index = 0; index < test.length; index += 3) { |
| 3568 | var lastLineNo = test[index + 1]; |
| 3569 | if (lastLineNo >= logStart && lastLineNo < logStart + logRange) { |
| 3570 | recType = test[index]; |
| 3571 | records = test[index + 2]; |
| 3572 | break; |
| 3573 | } |
| 3574 | } |
| 3575 | if (recType == REC_TYPE_UNKNOWN) { |
| 3576 | return; |
| 3577 | } |
| 3578 | var lines = testLines[testIndex]; |
| 3579 | for (var idx = 0; idx < logRange; ++idx) { |
| 3580 | var line = lines[logStart + idx]; |
| 3581 | console.log(line); |
| 3582 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 3583 | var fragType = records[recordIndex]; |
| 3584 | var frags = records[recordIndex + 1]; |
| 3585 | if (recType == REC_TYPE_ANGLE && fragType == ANGLE_AFTER) { |
| 3586 | dumpCurvePartial(test, frags[0], frags[3], frags[4]); |
| 3587 | dumpCurvePartial(test, frags[5], frags[8], frags[9]); |
| 3588 | dumpCurvePartial(test, frags[10], frags[13], frags[14]); |
| 3589 | console.log("\nstatic IntersectData intersectDataSet[] = {"); |
| 3590 | dumpAngleTest(test, frags[0], frags[3], frags[4]); |
| 3591 | dumpAngleTest(test, frags[5], frags[8], frags[9]); |
| 3592 | dumpAngleTest(test, frags[10], frags[13], frags[14]); |
| 3593 | console.log("};"); |
| 3594 | } else if (recType == REC_TYPE_ANGLE && fragType == ANGLE_AFTER2) { |
| 3595 | dumpCurvePartial(test, frags[0], frags[4], frags[5]); |
| 3596 | dumpCurvePartial(test, frags[6], frags[10], frags[11]); |
| 3597 | dumpCurvePartial(test, frags[12], frags[16], frags[17]); |
| 3598 | console.log("\nstatic IntersectData intersectDataSet[] = { //"); |
| 3599 | dumpAngleTest(test, frags[0], frags[4], frags[5]); |
| 3600 | dumpAngleTest(test, frags[6], frags[10], frags[11]); |
| 3601 | dumpAngleTest(test, frags[12], frags[16], frags[17]); |
| 3602 | console.log("}; //"); |
| 3603 | } |
| 3604 | } |
| 3605 | } |
| 3606 | } |
| 3607 | |
| 3608 | var activeKey = 'a'; |
| 3609 | var pathKey = 'b'; |
| 3610 | var pathBackKey = 'B'; |
| 3611 | var centerKey = 'c'; |
| 3612 | var addKey = 'd'; |
| 3613 | var deriviativesKey = 'f'; |
| 3614 | var angleKey = 'g'; |
| 3615 | var angleBackKey = 'G'; |
| 3616 | var hodoKey = 'h'; |
| 3617 | var intersectionKey = 'i'; |
| 3618 | var intersectionBackKey = 'I'; |
| 3619 | var sequenceKey = 'j'; |
| 3620 | var midpointKey = 'k'; |
| 3621 | var logKey = 'l'; |
| 3622 | var logToConsoleKey = 'L'; |
| 3623 | var markKey = 'm'; |
| 3624 | var sortKey = 'o'; |
| 3625 | var opKey = 'p'; |
| 3626 | var opBackKey = 'P'; |
| 3627 | var computedKey = 'q'; |
| 3628 | var computedBackKey = 'Q'; |
| 3629 | var stepKey = 's'; |
| 3630 | var stepBackKey = 'S'; |
| 3631 | var intersectTKey = 't'; |
| 3632 | var curveTKey = 'u'; |
| 3633 | var controlLinesBackKey = 'V'; |
| 3634 | var controlLinesKey = 'v'; |
| 3635 | var ptsKey = 'x'; |
| 3636 | var xyKey = 'y'; |
| 3637 | var logCurvesKey = 'z'; |
| 3638 | var focusKey = '`'; |
| 3639 | var idKey = '.'; |
| 3640 | var retinaKey = '\\'; |
| 3641 | |
| 3642 | function doKeyPress(evt) { |
| 3643 | var char = String.fromCharCode(evt.charCode); |
| 3644 | var focusWasOn = false; |
| 3645 | switch (char) { |
| 3646 | case '0': |
| 3647 | case '1': |
| 3648 | case '2': |
| 3649 | case '3': |
| 3650 | case '4': |
| 3651 | case '5': |
| 3652 | case '6': |
| 3653 | case '7': |
| 3654 | case '8': |
| 3655 | case '9': |
| 3656 | decimal_places = char - '0'; |
| 3657 | redraw(); |
| 3658 | break; |
| 3659 | case activeKey: |
| 3660 | draw_active ^= true; |
| 3661 | redraw(); |
| 3662 | break; |
| 3663 | case addKey: |
| 3664 | draw_add ^= true; |
| 3665 | redraw(); |
| 3666 | break; |
| 3667 | case angleKey: |
| 3668 | draw_angle = (draw_angle + 1) % 3; |
| 3669 | redraw(); |
| 3670 | break; |
| 3671 | case angleBackKey: |
| 3672 | draw_angle = (draw_angle + 2) % 3; |
| 3673 | redraw(); |
| 3674 | break; |
| 3675 | case centerKey: |
| 3676 | setScale(xmin, xmax, ymin, ymax); |
| 3677 | redraw(); |
| 3678 | break; |
| 3679 | case controlLinesBackKey: |
| 3680 | control_lines = (control_lines + 3) % 4; |
| 3681 | redraw(); |
| 3682 | break; |
| 3683 | case controlLinesKey: |
| 3684 | control_lines = (control_lines + 1) % 4; |
| 3685 | redraw(); |
| 3686 | break; |
| 3687 | case computedBackKey: |
| 3688 | draw_computed = (draw_computed + 5) % 6; |
| 3689 | redraw(); |
| 3690 | break; |
| 3691 | case computedKey: |
| 3692 | draw_computed = (draw_computed + 1) % 6; |
| 3693 | redraw(); |
| 3694 | break; |
| 3695 | case curveTKey: |
| 3696 | curve_t ^= true; |
| 3697 | if (curve_t) { |
| 3698 | draw_legend = true; |
| 3699 | } |
| 3700 | redraw(); |
| 3701 | break; |
| 3702 | case deriviativesKey: |
| 3703 | draw_deriviatives = (draw_deriviatives + 1) % 3; |
| 3704 | redraw(); |
| 3705 | break; |
| 3706 | case focusKey: |
| 3707 | focus_on_selection ^= true; |
| 3708 | setScale(xmin, xmax, ymin, ymax); |
| 3709 | redraw(); |
| 3710 | break; |
| 3711 | case hodoKey: |
| 3712 | draw_hodo = (draw_hodo + 1) % 4; |
| 3713 | redraw(); |
| 3714 | break; |
| 3715 | case idKey: |
| 3716 | draw_id ^= true; |
| 3717 | redraw(); |
| 3718 | break; |
| 3719 | case intersectionBackKey: |
| 3720 | draw_intersection = (draw_intersection + 3) % 4; |
| 3721 | redraw(); |
| 3722 | break; |
| 3723 | case intersectionKey: |
| 3724 | draw_intersection = (draw_intersection + 1) % 4; |
| 3725 | redraw(); |
| 3726 | break; |
| 3727 | case intersectTKey: |
| 3728 | draw_intersectT ^= true; |
| 3729 | redraw(); |
| 3730 | break; |
| 3731 | case logCurvesKey: |
| 3732 | logCurves(tests[testIndex]); |
| 3733 | break; |
| 3734 | case logKey: |
| 3735 | draw_log ^= true; |
| 3736 | redraw(); |
| 3737 | break; |
| 3738 | case logToConsoleKey: |
| 3739 | if (draw_log) { |
| 3740 | dumpLogToConsole(); |
| 3741 | } |
| 3742 | break; |
| 3743 | case markKey: |
| 3744 | draw_mark ^= true; |
| 3745 | redraw(); |
| 3746 | break; |
| 3747 | case midpointKey: |
| 3748 | draw_midpoint ^= true; |
| 3749 | redraw(); |
| 3750 | break; |
| 3751 | case opKey: |
| 3752 | draw_op = (draw_op + 1) % 3; |
| 3753 | redraw(); |
| 3754 | break; |
| 3755 | case opBackKey: |
| 3756 | draw_op = (draw_op + 2) % 3; |
| 3757 | redraw(); |
| 3758 | break; |
| 3759 | case pathKey: |
| 3760 | draw_path = (draw_path + 1) % 4; |
| 3761 | redraw(); |
| 3762 | break; |
| 3763 | case pathBackKey: |
| 3764 | draw_path = (draw_path + 3) % 4; |
| 3765 | redraw(); |
| 3766 | break; |
| 3767 | case ptsKey: |
| 3768 | pt_labels = (pt_labels + 1) % 3; |
| 3769 | redraw(); |
| 3770 | break; |
| 3771 | case retinaKey: |
| 3772 | retina_scale ^= true; |
| 3773 | drawTop(); |
| 3774 | break; |
| 3775 | case sequenceKey: |
| 3776 | draw_sequence ^= true; |
| 3777 | redraw(); |
| 3778 | break; |
| 3779 | case sortKey: |
| 3780 | draw_sort = (draw_sort + 1) % 3; |
| 3781 | drawTop(); |
| 3782 | break; |
| 3783 | case stepKey: |
| 3784 | step_limit++; |
| 3785 | if (step_limit > stepMax) { |
| 3786 | step_limit = stepMax; |
| 3787 | } |
| 3788 | redraw(); |
| 3789 | break; |
| 3790 | case stepBackKey: |
| 3791 | step_limit--; |
| 3792 | if (step_limit < 0) { |
| 3793 | step_limit = 0; |
| 3794 | } |
| 3795 | redraw(); |
| 3796 | break; |
| 3797 | case xyKey: |
| 3798 | debug_xy = (debug_xy + 1) % 3; |
| 3799 | redraw(); |
| 3800 | break; |
| 3801 | case '-': |
| 3802 | focusWasOn = focus_on_selection; |
| 3803 | if (focusWasOn) { |
| 3804 | focus_on_selection = false; |
| 3805 | scale /= 1.2; |
| 3806 | } else { |
| 3807 | scale /= 2; |
| 3808 | calcLeftTop(); |
| 3809 | } |
| 3810 | redraw(); |
| 3811 | focus_on_selection = focusWasOn; |
| 3812 | break; |
| 3813 | case '=': |
| 3814 | case '+': |
| 3815 | focusWasOn = focus_on_selection; |
| 3816 | if (focusWasOn) { |
| 3817 | focus_on_selection = false; |
| 3818 | scale *= 1.2; |
| 3819 | } else { |
| 3820 | scale *= 2; |
| 3821 | calcLeftTop(); |
| 3822 | } |
| 3823 | redraw(); |
| 3824 | focus_on_selection = focusWasOn; |
| 3825 | break; |
| 3826 | case '?': |
| 3827 | draw_hints ^= true; |
| 3828 | if (draw_hints && !draw_legend) { |
| 3829 | draw_legend = true; |
| 3830 | } |
| 3831 | redraw(); |
| 3832 | break; |
| 3833 | case '/': |
| 3834 | draw_legend ^= true; |
| 3835 | redraw(); |
| 3836 | break; |
| 3837 | } |
| 3838 | } |
| 3839 | |
| 3840 | function doKeyDown(evt) { |
| 3841 | var char = evt.keyCode; |
| 3842 | var preventDefault = false; |
| 3843 | switch (char) { |
| 3844 | case 37: // left arrow |
| 3845 | if (evt.shiftKey) { |
| 3846 | testIndex -= 9; |
| 3847 | } |
| 3848 | if (--testIndex < 0) |
| 3849 | testIndex = tests.length - 1; |
| 3850 | drawTop(); |
| 3851 | preventDefault = true; |
| 3852 | break; |
| 3853 | case 39: // right arrow |
| 3854 | if (evt.shiftKey) { |
| 3855 | testIndex += 9; |
| 3856 | } |
| 3857 | if (++testIndex >= tests.length) |
| 3858 | testIndex = 0; |
| 3859 | drawTop(); |
| 3860 | preventDefault = true; |
| 3861 | break; |
| 3862 | } |
| 3863 | if (preventDefault) { |
| 3864 | evt.preventDefault(); |
| 3865 | return false; |
| 3866 | } |
| 3867 | return true; |
| 3868 | } |
| 3869 | |
| 3870 | (function() { |
| 3871 | var hidden = "hidden"; |
| 3872 | |
| 3873 | // Standards: |
| 3874 | if (hidden in document) |
| 3875 | document.addEventListener("visibilitychange", onchange); |
| 3876 | else if ((hidden = "mozHidden") in document) |
| 3877 | document.addEventListener("mozvisibilitychange", onchange); |
| 3878 | else if ((hidden = "webkitHidden") in document) |
| 3879 | document.addEventListener("webkitvisibilitychange", onchange); |
| 3880 | else if ((hidden = "msHidden") in document) |
| 3881 | document.addEventListener("msvisibilitychange", onchange); |
| 3882 | // IE 9 and lower: |
| 3883 | else if ('onfocusin' in document) |
| 3884 | document.onfocusin = document.onfocusout = onchange; |
| 3885 | // All others: |
| 3886 | else |
| 3887 | window.onpageshow = window.onpagehide |
| 3888 | = window.onfocus = window.onblur = onchange; |
| 3889 | |
| 3890 | function onchange (evt) { |
| 3891 | var v = 'visible', h = 'hidden', |
| 3892 | evtMap = { |
| 3893 | focus:v, focusin:v, pageshow:v, blur:h, focusout:h, pagehide:h |
| 3894 | }; |
| 3895 | |
| 3896 | evt = evt || window.event; |
| 3897 | if (evt.type in evtMap) |
| 3898 | document.body.className = evtMap[evt.type]; |
| 3899 | else |
| 3900 | document.body.className = this[hidden] ? "hidden" : "visible"; |
| 3901 | } |
| 3902 | })(); |
| 3903 | |
| 3904 | function calcXY() { |
| 3905 | var e = window.event; |
| 3906 | var tgt = e.target || e.srcElement; |
| 3907 | var left = tgt.offsetLeft; |
| 3908 | var top = tgt.offsetTop; |
| 3909 | mouseX = (e.clientX - left) / scale + srcLeft; |
| 3910 | mouseY = (e.clientY - top) / scale + srcTop; |
| 3911 | } |
| 3912 | |
| 3913 | function calcLeftTop() { |
| 3914 | srcLeft = mouseX - screenWidth / 2 / scale; |
| 3915 | srcTop = mouseY - screenHeight / 2 / scale; |
| 3916 | } |
| 3917 | |
| 3918 | var disableClick = false; |
| 3919 | |
| 3920 | function handleMouseClick() { |
| 3921 | if (disableClick) { |
| 3922 | return; |
| 3923 | } |
| 3924 | if (!curve_t || !ptInTControl()) { |
| 3925 | calcXY(); |
| 3926 | calcLeftTop(); |
| 3927 | } |
| 3928 | redraw(); |
| 3929 | // if (!curve_t || !ptInTControl()) { |
| 3930 | // mouseX = screenWidth / 2 / scale + srcLeft; |
| 3931 | // mouseY = screenHeight / 2 / scale + srcTop; |
| 3932 | // } |
| 3933 | } |
| 3934 | |
| 3935 | function handleMouseOver() { |
| 3936 | calcXY(); |
| 3937 | if (debug_xy != 2) { |
| 3938 | return; |
| 3939 | } |
| 3940 | var num = mouseX.toFixed(decimal_places) + ", " + mouseY.toFixed(decimal_places); |
| 3941 | ctx.beginPath(); |
| 3942 | ctx.rect(300,100,num.length * 6,10); |
| 3943 | ctx.fillStyle="white"; |
| 3944 | ctx.fill(); |
| 3945 | ctx.font = "normal 10px Arial"; |
| 3946 | ctx.fillStyle="black"; |
| 3947 | ctx.textAlign = "left"; |
| 3948 | ctx.fillText(num, 300, 108); |
| 3949 | } |
| 3950 | |
| 3951 | function start() { |
| 3952 | for (var i = 0; i < testDivs.length; ++i) { |
| 3953 | tests[i] = null; |
| 3954 | } |
| 3955 | testIndex = 0; |
| 3956 | drawTop(); |
| 3957 | window.addEventListener('keypress', doKeyPress, true); |
| 3958 | window.addEventListener('keydown', doKeyDown, true); |
| 3959 | window.onresize = function() { |
| 3960 | drawTop(); |
| 3961 | } |
| 3962 | /* |
| 3963 | window.onpagehide = function() { |
| 3964 | disableClick = true; |
| 3965 | } |
| 3966 | */ |
| 3967 | window.onpageshow = function () { |
| 3968 | disableClick = false; |
| 3969 | } |
| 3970 | } |
| 3971 | |
| 3972 | </script> |
| 3973 | </head> |
| 3974 | |
| 3975 | <body onLoad="start();"> |
| 3976 | <canvas id="canvas" width="750" height="500" |
| 3977 | onmousemove="handleMouseOver()" |
| 3978 | onclick="handleMouseClick()" |
| 3979 | ></canvas > |
| 3980 | </body> |
| 3981 | </html> |