caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <div height="0" hidden="true"> |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4 | |
caryclark | 6c3b9cd | 2016-09-26 05:36:58 -0700 | [diff] [blame] | 5 | Skia UnitTests: --match PathOpsSimplify$ --resourcePath resources/ SK_DEBUG |
| 6 | |
caryclark | 34efb70 | 2016-10-24 08:19:06 -0700 | [diff] [blame] | 7 | Skia UnitTests: --match Simplify$ --resourcePath resources\ SK_DEBUG |
| 8 | |
| 9 | <div id="simplifyTest_1"> |
| 10 | seg=1 {{{95.9684143f, 119.751823f}, {97.2032471f, 113.040466f}, {102.896156f, 108.083267f}}} |
| 11 | seg=2 {{{102.896156f, 108.083267f}, {102.896736f, 108.082771f}}} |
| 12 | seg=3 {{{102.896736f, 108.082771f}, {106.944885f, 104.564941f}, {113.029114f, 102.892998f}}} |
| 13 | seg=4 {{{113.029114f, 102.892998f}, {113.169701f, 102.868301f}}} |
| 14 | seg=5 {{{113.169701f, 102.868301f}, {122.958702f, 102.087303f}}} |
| 15 | seg=6 {{{122.958702f, 102.087303f}, {123.637985f, 102.405312f}}} |
| 16 | seg=7 {{{123.637985f, 102.405312f}, {125.172699f, 104.575714f}, {123.387383f, 106.91227f}}} |
| 17 | seg=8 {{{123.387383f, 106.91227f}, {122.784996f, 106.452003f}}} |
| 18 | seg=9 {{{122.784996f, 106.452003f}, {123.388428f, 106.910896f}}} |
| 19 | seg=10 {{{123.388428f, 106.910896f}, {123.365623f, 106.94088f}, {123.320007f, 107.000946f}}} |
| 20 | seg=11 {{{123.320007f, 107.000946f}, {117.109985f, 115.177612f}, {108.73912f, 118.758026f}}} |
| 21 | seg=12 {{{108.73912f, 118.758026f}, {108.557755f, 118.810059f}}} |
| 22 | seg=13 {{{108.557755f, 118.810059f}, {96.8307571f, 120.638062f}}} |
| 23 | seg=14 {{{96.8307571f, 120.638062f}, {95.9684143f, 119.751823f}}} |
| 24 | seg=15 {{{97.4595795f, 120.026184f}, {96.7139969f, 119.889008f}}} |
| 25 | seg=16 {{{96.7139969f, 119.889008f}, {96.5972366f, 119.139954f}}} |
| 26 | seg=17 {{{96.5972366f, 119.139954f}, {108.324234f, 117.311951f}}} |
| 27 | seg=18 {{{108.324234f, 117.311951f}, {108.440994f, 118.061005f}}} |
| 28 | seg=19 {{{108.440994f, 118.061005f}, {108.142868f, 117.363983f}}} |
| 29 | seg=20 {{{108.142868f, 117.363983f}, {116.14502f, 113.941284f}, {122.112564f, 106.083923f}}} |
| 30 | seg=21 {{{122.112564f, 106.083923f}, {122.158455f, 106.023499f}, {122.181564f, 105.993111f}}} |
| 31 | seg=22 {{{122.181564f, 105.993111f}, {122.18261f, 105.991737f}}} |
| 32 | seg=23 {{{122.18261f, 105.991737f}, {123.291138f, 104.540924f}, {122.400009f, 103.280693f}}} |
| 33 | seg=24 {{{122.400009f, 103.280693f}, {123.018997f, 102.843002f}}} |
| 34 | seg=25 {{{123.018997f, 102.843002f}, {123.079292f, 103.598701f}}} |
| 35 | seg=26 {{{123.079292f, 103.598701f}, {113.290291f, 104.3797f}}} |
| 36 | seg=27 {{{113.290291f, 104.3797f}, {113.229996f, 103.624001f}}} |
| 37 | seg=28 {{{113.229996f, 103.624001f}, {113.430878f, 104.355003f}}} |
| 38 | seg=29 {{{113.430878f, 104.355003f}, {107.679138f, 105.935608f}, {103.891258f, 109.227226f}}} |
| 39 | seg=30 {{{103.891258f, 109.227226f}, {103.393997f, 108.654999f}}} |
| 40 | seg=31 {{{103.393997f, 108.654999f}, {103.891838f, 109.22673f}}} |
| 41 | seg=32 {{{103.891838f, 109.22673f}, {98.5984497f, 113.835938f}, {97.4595795f, 120.026184f}}} |
| 42 | debugShowQuadLineIntersection wtTs[0]=1 {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{102.896156,108.083267}} wnTs[0]=0 {{{102.896156,108.083267}, {102.896736,108.082771}}} |
| 43 | debugShowQuadLineIntersection no intersect {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{{108.557755,118.810059}, {96.8307571,120.638062}}} |
| 44 | debugShowQuadLineIntersection wtTs[0]=0 {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{95.9684143,119.751823}} wnTs[0]=1 {{{96.8307571,120.638062}, {95.9684143,119.751823}}} |
| 45 | debugShowQuadLineIntersection wtTs[0]=0 {{{102.896736,108.082771}, {106.944885,104.564941}, {113.029114,102.892998}}} {{102.896736,108.082771}} wnTs[0]=1 {{{102.896156,108.083267}, {102.896736,108.082771}}} |
| 46 | debugShowQuadLineIntersection wtTs[0]=1 {{{102.896736,108.082771}, {106.944885,104.564941}, {113.029114,102.892998}}} {{113.029114,102.892998}} wnTs[0]=0 {{{113.029114,102.892998}, {113.169701,102.868301}}} |
| 47 | debugShowQuadIntersection no intersect {{{102.896736,108.082771}, {106.944885,104.564941}, {113.029114,102.892998}}} {{{123.320007,107.000946}, {117.109985,115.177612}, {108.73912,118.758026}}} |
| 48 | debugShowLineIntersection wtTs[0]=1 {{{113.029114,102.892998}, {113.169701,102.868301}}} {{113.169701,102.868301}} wnTs[0]=0 {{{113.169701,102.868301}, {122.958702,102.087303}}} |
| 49 | debugShowLineIntersection wtTs[0]=1 {{{113.169701,102.868301}, {122.958702,102.087303}}} {{122.958702,102.087303}} wnTs[0]=0 {{{122.958702,102.087303}, {123.637985,102.405312}}} |
| 50 | debugShowQuadLineIntersection wtTs[0]=0 {{{123.637985,102.405312}, {125.172699,104.575714}, {123.387383,106.91227}}} {{123.637985,102.405312}} wnTs[0]=1 {{{122.958702,102.087303}, {123.637985,102.405312}}} |
| 51 | debugShowQuadLineIntersection wtTs[0]=1 {{{123.637985,102.405312}, {125.172699,104.575714}, {123.387383,106.91227}}} {{123.387383,106.91227}} wnTs[0]=0 {{{123.387383,106.91227}, {122.784996,106.452003}}} |
| 52 | debugShowQuadLineIntersection no intersect {{{123.637985,102.405312}, {125.172699,104.575714}, {123.387383,106.91227}}} {{{122.784996,106.452003}, {123.388428,106.910896}}} |
| 53 | debugShowQuadIntersection wtTs[0]=0.999952051 {{{123.637985,102.405312}, {125.172699,104.575714}, {123.387383,106.91227}}} {{123.38755,106.912048}} wnTs[0]=0.0189869 {{{123.388428,106.910896}, {123.365623,106.94088}, {123.320007,107.000946}}} |
| 54 | SkOpSegment::addT insert t=0.999952051 segID=7 spanID=65 |
| 55 | SkOpSegment::addT insert t=0.0189869068 segID=10 spanID=66 |
| 56 | debugShowLineIntersection wtTs[0]=1 {{{123.387383,106.91227}, {122.784996,106.452003}}} {{122.784996,106.452003}} wnTs[0]=0 {{{122.784996,106.452003}, {123.388428,106.910896}}} |
| 57 | debugShowQuadLineIntersection no intersect {{{123.388428,106.910896}, {123.365623,106.94088}, {123.320007,107.000946}}} {{{123.387383,106.91227}, {122.784996,106.452003}}} |
| 58 | debugShowQuadLineIntersection wtTs[0]=0 {{{123.388428,106.910896}, {123.365623,106.94088}, {123.320007,107.000946}}} {{123.388428,106.910896}} wnTs[0]=1 {{{122.784996,106.452003}, {123.388428,106.910896}}} |
| 59 | debugShowQuadIntersection wtTs[0]=1 {{{123.388428,106.910896}, {123.365623,106.94088}, {123.320007,107.000946}}} {{123.320007,107.000946}} wnTs[0]=0 {{{123.320007,107.000946}, {117.109985,115.177612}, {108.73912,118.758026}}} |
| 60 | debugShowQuadLineIntersection wtTs[0]=1 {{{123.320007,107.000946}, {117.109985,115.177612}, {108.73912,118.758026}}} {{108.73912,118.758026}} wnTs[0]=0 {{{108.73912,118.758026}, {108.557755,118.810059}}} |
| 61 | debugShowLineIntersection wtTs[0]=1 {{{108.73912,118.758026}, {108.557755,118.810059}}} {{108.557755,118.810059}} wnTs[0]=0 {{{108.557755,118.810059}, {96.8307571,120.638062}}} |
| 62 | debugShowLineIntersection wtTs[0]=1 {{{108.557755,118.810059}, {96.8307571,120.638062}}} {{96.8307571,120.638062}} wnTs[0]=0 {{{96.8307571,120.638062}, {95.9684143,119.751823}}} |
| 63 | debugShowQuadLineIntersection no intersect {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{{96.7139969,119.889008}, {96.5972366,119.139954}}} |
| 64 | debugShowQuadLineIntersection no intersect {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{{96.5972366,119.139954}, {108.324234,117.311951}}} |
| 65 | debugShowQuadIntersection no intersect {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} |
| 66 | debugShowQuadIntersection no intersect {{{102.896736,108.082771}, {106.944885,104.564941}, {113.029114,102.892998}}} {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} |
| 67 | debugShowQuadIntersection no intersect {{{102.896736,108.082771}, {106.944885,104.564941}, {113.029114,102.892998}}} {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} |
| 68 | debugShowLineIntersection no intersect {{{113.169701,102.868301}, {122.958702,102.087303}}} {{{122.400009,103.280693}, {123.018997,102.843002}}} |
| 69 | debugShowQuadIntersection no intersect {{{123.320007,107.000946}, {117.109985,115.177612}, {108.73912,118.758026}}} {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} |
| 70 | debugShowQuadIntersection no intersect {{{123.320007,107.000946}, {117.109985,115.177612}, {108.73912,118.758026}}} {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} |
| 71 | debugShowLineIntersection no intersect {{{108.557755,118.810059}, {96.8307571,120.638062}}} {{{97.4595795,120.026184}, {96.7139969,119.889008}}} |
| 72 | debugShowLineIntersection no intersect {{{108.557755,118.810059}, {96.8307571,120.638062}}} {{{96.5972366,119.139954}, {108.324234,117.311951}}} |
| 73 | debugShowQuadLineIntersection no intersect {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} {{{108.557755,118.810059}, {96.8307571,120.638062}}} |
| 74 | debugShowLineIntersection no intersect {{{96.8307571,120.638062}, {95.9684143,119.751823}}} {{{97.4595795,120.026184}, {96.7139969,119.889008}}} |
| 75 | debugShowLineIntersection no intersect {{{96.8307571,120.638062}, {95.9684143,119.751823}}} {{{96.7139969,119.889008}, {96.5972366,119.139954}}} |
| 76 | debugShowLineIntersection wtTs[0]=1 {{{97.4595795,120.026184}, {96.7139969,119.889008}}} {{96.7139969,119.889008}} wnTs[0]=0 {{{96.7139969,119.889008}, {96.5972366,119.139954}}} |
| 77 | debugShowQuadLineIntersection wtTs[0]=1 {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} {{97.4595795,120.026184}} wnTs[0]=0 {{{97.4595795,120.026184}, {96.7139969,119.889008}}} |
| 78 | debugShowLineIntersection wtTs[0]=1 {{{96.7139969,119.889008}, {96.5972366,119.139954}}} {{96.5972366,119.139954}} wnTs[0]=0 {{{96.5972366,119.139954}, {108.324234,117.311951}}} |
| 79 | debugShowLineIntersection wtTs[0]=1 {{{96.5972366,119.139954}, {108.324234,117.311951}}} {{108.324234,117.311951}} wnTs[0]=0 {{{108.324234,117.311951}, {108.440994,118.061005}}} |
| 80 | debugShowLineIntersection no intersect {{{96.5972366,119.139954}, {108.324234,117.311951}}} {{{108.440994,118.061005}, {108.142868,117.363983}}} |
| 81 | debugShowQuadLineIntersection wtTs[0]=0.00542932628 {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} {{108.229698,117.326683}} wnTs[0]=0.991939 {{{96.5972366,119.139954}, {108.324234,117.311951}}} |
| 82 | SkOpSegment::addT insert t=0.991938827 segID=17 spanID=67 |
| 83 | SkOpSegment::addT insert t=0.00542932628 segID=20 spanID=68 |
| 84 | debugShowQuadLineIntersection wtTs[0]=0.913746799 {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} {{97.6869507,118.970093}} wnTs[0]=0.0929235 {{{96.5972366,119.139954}, {108.324234,117.311951}}} |
| 85 | SkOpSegment::addT insert t=0.0929234671 segID=17 spanID=69 |
| 86 | SkOpSegment::addT insert t=0.913746799 segID=32 spanID=70 |
| 87 | debugShowLineIntersection wtTs[0]=1 {{{108.324234,117.311951}, {108.440994,118.061005}}} {{108.440994,118.061005}} wnTs[0]=0 {{{108.440994,118.061005}, {108.142868,117.363983}}} |
| 88 | debugShowQuadLineIntersection no intersect {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} {{{108.324234,117.311951}, {108.440994,118.061005}}} |
| 89 | debugShowQuadLineIntersection wtTs[0]=0 {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} {{108.142868,117.363983}} wnTs[0]=1 {{{108.440994,118.061005}, {108.142868,117.363983}}} |
| 90 | debugShowQuadIntersection wtTs[0]=1 {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} {{122.112564,106.083923}} wnTs[0]=0 {{{122.112564,106.083923}, {122.158455,106.023499}, {122.181564,105.993111}}} |
| 91 | debugShowQuadIntersection no intersect {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} |
| 92 | debugShowQuadLineIntersection wtTs[0]=1 {{{122.112564,106.083923}, {122.158455,106.023499}, {122.181564,105.993111}}} {{122.181564,105.993111}} wnTs[0]=0 {{{122.181564,105.993111}, {122.18261,105.991737}}} |
| 93 | debugShowQuadLineIntersection wtTs[0]=0 {{{122.18261,105.991737}, {123.291138,104.540924}, {122.400009,103.280693}}} {{122.18261,105.991737}} wnTs[0]=1 {{{122.181564,105.993111}, {122.18261,105.991737}}} |
| 94 | debugShowQuadLineIntersection wtTs[0]=1 {{{122.18261,105.991737}, {123.291138,104.540924}, {122.400009,103.280693}}} {{122.400009,103.280693}} wnTs[0]=0 {{{122.400009,103.280693}, {123.018997,102.843002}}} |
| 95 | debugShowQuadLineIntersection wtTs[0]=0.860440414 {{{122.18261,105.991737}, {123.291138,104.540924}, {122.400009,103.280693}}} {{122.609795,103.636162}} wnTs[0]=0.0479619 {{{123.079292,103.598701}, {113.290291,104.3797}}} |
| 96 | SkOpSegment::addT insert t=0.860440414 segID=23 spanID=71 |
| 97 | SkOpSegment::addT insert t=0.0479619043 segID=26 spanID=72 |
| 98 | debugShowLineIntersection wtTs[0]=1 {{{122.400009,103.280693}, {123.018997,102.843002}}} {{123.018997,102.843002}} wnTs[0]=0 {{{123.018997,102.843002}, {123.079292,103.598701}}} |
| 99 | debugShowLineIntersection wtTs[0]=1 {{{123.018997,102.843002}, {123.079292,103.598701}}} {{123.079292,103.598701}} wnTs[0]=0 {{{123.079292,103.598701}, {113.290291,104.3797}}} |
| 100 | debugShowLineIntersection wtTs[0]=1 {{{123.079292,103.598701}, {113.290291,104.3797}}} {{113.290291,104.3797}} wnTs[0]=0 {{{113.290291,104.3797}, {113.229996,103.624001}}} |
| 101 | debugShowLineIntersection no intersect {{{123.079292,103.598701}, {113.290291,104.3797}}} {{{113.229996,103.624001}, {113.430878,104.355003}}} |
| 102 | debugShowQuadLineIntersection wtTs[0]=0.00597885639 {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} {{113.362167,104.373962}} wnTs[0]=0.992657 {{{123.079292,103.598701}, {113.290291,104.3797}}} |
| 103 | SkOpSegment::addT insert t=0.992657126 segID=26 spanID=73 |
| 104 | SkOpSegment::addT insert t=0.00597885639 segID=29 spanID=74 |
| 105 | debugShowLineIntersection wtTs[0]=1 {{{113.290291,104.3797}, {113.229996,103.624001}}} {{113.229996,103.624001}} wnTs[0]=0 {{{113.229996,103.624001}, {113.430878,104.355003}}} |
| 106 | debugShowQuadLineIntersection no intersect {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} {{{113.290291,104.3797}, {113.229996,103.624001}}} |
| 107 | debugShowQuadLineIntersection wtTs[0]=0 {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} {{113.430878,104.355003}} wnTs[0]=1 {{{113.229996,103.624001}, {113.430878,104.355003}}} |
| 108 | debugShowQuadLineIntersection wtTs[0]=1 {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} {{103.891258,109.227226}} wnTs[0]=0 {{{103.891258,109.227226}, {103.393997,108.654999}}} |
| 109 | debugShowQuadLineIntersection wtTs[0]=0.999923983 {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} {{103.891838,109.22673}} wnTs[0]=1 {{{103.393997,108.654999}, {103.891838,109.22673}}} |
| 110 | SkOpSegment::addT insert t=0.999923983 segID=29 spanID=75 |
| 111 | debugShowQuadIntersection wtTs[0]=0.999923983 {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} {{103.89183,109.226723}} wtTs[1]=1 {{103.891266,109.227234}} wnTs[0]=0 {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} wnTs[1]=5.43505489e-05 |
| 112 | SkOpSegment::addT insert t=5.43505489e-05 segID=32 spanID=76 |
| 113 | debugShowLineIntersection wtTs[0]=1 {{{103.891258,109.227226}, {103.393997,108.654999}}} {{103.393997,108.654999}} wnTs[0]=0 {{{103.393997,108.654999}, {103.891838,109.22673}}} |
| 114 | debugShowQuadLineIntersection no intersect {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} {{{103.891258,109.227226}, {103.393997,108.654999}}} |
| 115 | debugShowQuadLineIntersection wtTs[0]=0 {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} {{103.891838,109.22673}} wnTs[0]=1 {{{103.393997,108.654999}, {103.891838,109.22673}}} |
| 116 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 117 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 118 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 119 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 120 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 121 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 122 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 123 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 124 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 125 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 126 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 127 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 128 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 129 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 130 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 131 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 132 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 133 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 134 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 135 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 136 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 137 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 138 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 139 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 140 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 141 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 142 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 143 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 144 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 145 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 146 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 147 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 148 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 149 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 150 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 151 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 152 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 153 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 154 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 155 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 156 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 157 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 158 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 159 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 160 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 161 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 162 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 163 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 164 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 165 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 166 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 167 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 168 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 169 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 170 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 171 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 172 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 173 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 174 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 175 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 176 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 177 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 178 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 179 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 180 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 181 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 182 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 183 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 184 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 185 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 186 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 187 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 188 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 189 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 190 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 191 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 192 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 193 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 194 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 195 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 196 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 197 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 198 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 199 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 200 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 201 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 202 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 203 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 204 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 205 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 206 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 207 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 208 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 209 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 210 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 211 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 212 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 213 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 214 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 215 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 216 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 217 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 218 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 219 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 220 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 221 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 222 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 223 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 224 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 225 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 226 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 227 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 228 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 229 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 230 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 231 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 232 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 233 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 234 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 235 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 236 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 237 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 238 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 239 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 240 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 241 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 242 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 243 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 244 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 245 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 246 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 247 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 248 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 249 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 250 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 251 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 252 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 253 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 254 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 255 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 256 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 257 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 258 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 259 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 260 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 261 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 262 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 263 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 264 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 265 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 266 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 267 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 268 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 269 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 270 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 271 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 272 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 273 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 274 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 275 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 276 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 277 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 278 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 279 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 280 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 281 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 282 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 283 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 284 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 285 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 286 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 287 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 288 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 289 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 290 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 291 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 292 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 293 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 294 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 295 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 296 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 297 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 298 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 299 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 300 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 301 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 302 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 303 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 304 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 305 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 306 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 307 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 308 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 309 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 310 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 311 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 312 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 313 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 314 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 315 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 316 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 317 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 318 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 319 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 320 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 321 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 322 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 323 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 324 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 325 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 326 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 327 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 328 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 329 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 330 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 331 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 332 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 333 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 334 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 335 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 336 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 337 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 338 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 339 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 340 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 341 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 342 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 343 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 344 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 345 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 346 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 347 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 348 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 349 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 350 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 351 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 352 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 353 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 354 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 355 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 356 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 357 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 358 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 359 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 360 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 361 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 362 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 363 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 364 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 365 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 366 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 367 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 368 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 369 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 370 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 371 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 372 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 373 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 374 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 375 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 376 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 377 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 378 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 379 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 380 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 381 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 382 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 383 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 384 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 385 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 386 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 387 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 388 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 389 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 390 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 391 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 392 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 393 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 394 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 395 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 396 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 397 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 398 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 399 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 400 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 401 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 402 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 403 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 404 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 405 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 406 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 407 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 408 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 409 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 410 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 411 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 412 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 413 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 414 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 415 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 416 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 417 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 418 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 419 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 420 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 421 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 422 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 423 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 424 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 425 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 426 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 427 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 428 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 429 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 430 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 431 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 432 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 433 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 434 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 435 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 436 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 437 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 438 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 439 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 440 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 441 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 442 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 443 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 444 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 445 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 446 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 447 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 448 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 449 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 450 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 451 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 452 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 453 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 454 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 455 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 456 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 457 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 458 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 459 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 460 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 461 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 462 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 463 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 464 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 465 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 466 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 467 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 468 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 469 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 470 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 471 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 472 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 473 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 474 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 475 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 476 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 477 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 478 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 479 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 480 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 481 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 482 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 483 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 484 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 485 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 486 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 487 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 488 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 489 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 490 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 491 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 492 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 493 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 494 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 495 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 496 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 497 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 498 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 499 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 500 | -----------------------x--------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 501 | 01: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 502 | 02: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin |
| 503 | 03: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin |
| 504 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 505 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 506 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 507 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 508 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 509 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 510 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 511 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 512 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 513 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 514 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 515 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 516 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 517 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 518 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 519 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 520 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 521 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 522 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 523 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 524 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 525 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 526 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 527 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 528 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 529 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 530 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 531 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 532 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 533 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 534 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 535 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 536 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 537 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 538 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 539 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 540 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 541 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 542 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 543 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 544 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 545 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 546 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 547 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 548 | SkOpSegment::missingCoincidence coinSpan=63 endSpan=76 oppSpan=75 oppEndSpan=58 |
| 549 | -----------------xx--x----------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 Fail |
| 550 | 01: seg/base=32/63 seg/base=29/75 MarkCoinStart |
| 551 | 02: seg/base=32/76 seg/base=29/58 MarkCoinEnd |
| 552 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 553 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 554 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 555 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 556 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 557 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 558 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 559 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 560 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 561 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 562 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 563 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 564 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 565 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 566 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 567 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 568 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 569 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 570 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 571 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 572 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 573 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 574 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 575 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 576 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 577 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 578 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 579 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 580 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 581 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 582 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 583 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 584 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 585 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 586 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 587 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 588 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 589 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 590 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 591 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 592 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 593 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 594 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 595 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 596 | -----------------xx--x----------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 Fail |
| 597 | 01: seg/base=32/63 seg/base=29/75 MarkCoinStart |
| 598 | 02: seg/base=32/76 seg/base=29/58 MarkCoinEnd |
| 599 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 600 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 601 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 602 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 603 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 604 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 605 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 606 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 607 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 608 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 609 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 610 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 611 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 612 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 613 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 614 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 615 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 616 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 617 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 618 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 619 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 620 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 621 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 622 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 623 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 624 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 625 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 626 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 627 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 628 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 629 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 630 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 631 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 632 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 633 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 634 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 635 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 636 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 637 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 638 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 639 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 640 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 641 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 642 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 643 | -----------------xx--x----------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 Fail |
| 644 | 01: seg/base=32/63 seg/base=29/75 MarkCoinStart |
| 645 | 02: seg/base=32/76 seg/base=29/58 MarkCoinEnd |
| 646 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 647 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 648 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 649 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 650 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 651 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 652 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 653 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 654 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 655 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 656 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 657 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 658 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 659 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 660 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 661 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 662 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 663 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 664 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 665 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 666 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 667 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 668 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 669 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 670 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 671 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 672 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 673 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 674 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 675 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 676 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 677 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 678 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 679 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 680 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 681 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 682 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 683 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 684 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 685 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 686 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 687 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 688 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 689 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 690 | -----------------x--------------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 Fail |
| 691 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 692 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 693 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 694 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 695 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 696 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 697 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 698 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 699 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 700 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 701 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 702 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 703 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 704 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 705 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 706 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 707 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 708 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 709 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 710 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 711 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 712 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 713 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 714 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 715 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 716 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 717 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 718 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 719 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 720 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 721 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 722 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 723 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 724 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 725 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 726 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 727 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 728 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 729 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 730 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 731 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 732 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 733 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 734 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 735 | --------------------------------------SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 736 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 737 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 738 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 739 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 740 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 741 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 742 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 743 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 744 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 745 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 746 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 747 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 748 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 749 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 750 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 751 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 752 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 753 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 754 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 755 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 756 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 757 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 758 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 759 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 760 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 761 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 762 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 763 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 764 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 765 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 766 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 767 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 768 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 769 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 770 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 771 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 772 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 773 | SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1 |
| 774 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 775 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 776 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1 |
| 777 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 778 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 779 | SkOpSegment::markDone id=29 (113.430878,104.355003 107.679138,105.935608 103.891258,109.227226) t=0.999923983 [75] (103.89183,109.226723) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0 |
| 780 | --------------------------------------SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 781 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 782 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 783 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 784 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 785 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 786 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 787 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 788 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 789 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 790 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 791 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 792 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 793 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 794 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 795 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 796 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 797 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 798 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 799 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 800 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 801 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 802 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 803 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 804 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 805 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 806 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 807 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 808 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 809 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 810 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 811 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 812 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 813 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 814 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 815 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 816 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 817 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 818 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 819 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 820 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2 |
| 821 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 822 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 823 | --------------------------------------SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 824 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 825 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 826 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 827 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 828 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 829 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 830 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 831 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 832 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 833 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 834 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 835 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 836 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 837 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 838 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 839 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 840 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 841 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 842 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 843 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 844 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 845 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 846 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 847 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 848 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 849 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 850 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 851 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 852 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 853 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 854 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 855 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 856 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 857 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 858 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 859 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 860 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 861 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 862 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 863 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2 |
| 864 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 865 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 866 | SkOpSegment::sortAngles [7] tStart=0.999952051 [65] |
| 867 | SkOpAngle::after [7/1] 5/5 tStart=0.999952051 tEnd=0 < [10/3] 5/5 tStart=0.0189869068 tEnd=0 < [7/2] 21/21 tStart=0.999952051 tEnd=1 T 12 |
| 868 | SkOpAngle::afterPart {{{123.38755,106.912048}, {125.172625,104.575609}, {123.637985,102.405312}}} id=7 |
| 869 | SkOpAngle::afterPart {{{123.38755,106.912048}, {123.388428,106.910896}, {123.388428,106.910896}}} id=10 |
| 870 | SkOpAngle::afterPart {{{123.38755,106.912048}, {123.387383,106.91227}, {123.387383,106.91227}}} id=7 |
| 871 | SkOpAngle::after [7/1] 5/5 tStart=0.999952051 tEnd=0 < [10/4] 21/21 tStart=0.0189869068 tEnd=1 < [10/3] 5/5 tStart=0.0189869068 tEnd=0 F 5 |
| 872 | SkOpAngle::afterPart {{{123.38755,106.912048}, {125.172625,104.575609}, {123.637985,102.405312}}} id=7 |
| 873 | SkOpAngle::afterPart {{{123.38755,106.912048}, {123.365603,106.940906}, {123.320007,107.000946}}} id=10 |
| 874 | SkOpAngle::afterPart {{{123.38755,106.912048}, {123.388428,106.910896}, {123.388428,106.910896}}} id=10 |
| 875 | SkOpAngle::after [10/3] 5/5 tStart=0.0189869068 tEnd=0 < [10/4] 21/21 tStart=0.0189869068 tEnd=1 < [7/2] 21/21 tStart=0.999952051 tEnd=1 T 11 |
| 876 | SkOpAngle::afterPart {{{123.38755,106.912048}, {123.388428,106.910896}, {123.388428,106.910896}}} id=10 |
| 877 | SkOpAngle::afterPart {{{123.38755,106.912048}, {123.365603,106.940906}, {123.320007,107.000946}}} id=10 |
| 878 | SkOpAngle::afterPart {{{123.38755,106.912048}, {123.387383,106.91227}, {123.387383,106.91227}}} id=7 |
| 879 | SkOpSegment::sortAngles [10] tStart=0.0189869068 [66] |
| 880 | SkOpSegment::sortAngles [17] tStart=0.0929234671 [69] |
| 881 | SkOpAngle::after [17/5] 17/17 tStart=0.0929234671 tEnd=0 < [32/25] 5/5 tStart=0.913746799 tEnd=5.43505489e-05 < [17/6] 1/1 tStart=0.0929234671 tEnd=0.991938827 F 4 |
| 882 | SkOpAngle::afterPart {{{97.6869507,118.970093}, {96.5972366,119.139954}}} id=17 |
| 883 | SkOpAngle::afterPart {{{97.6869507,118.970093}, {99.0549405,113.438713}, {103.891266,109.227234}}} id=32 |
| 884 | SkOpAngle::afterPart {{{97.6869507,118.970093}, {108.229698,117.326683}}} id=17 |
| 885 | SkOpAngle::after [17/5] 17/17 tStart=0.0929234671 tEnd=0 < [32/26] 21/21 tStart=0.913746799 tEnd=1 < [17/6] 1/1 tStart=0.0929234671 tEnd=0.991938827 T 4 |
| 886 | SkOpAngle::afterPart {{{97.6869507,118.970093}, {96.5972366,119.139954}}} id=17 |
| 887 | SkOpAngle::afterPart {{{97.6869507,118.970093}, {97.5578058,119.492282}, {97.4595795,120.026184}}} id=32 |
| 888 | SkOpAngle::afterPart {{{97.6869507,118.970093}, {108.229698,117.326683}}} id=17 |
| 889 | SkOpSegment::sortAngles [17] tStart=0.991938827 [67] |
| 890 | SkOpAngle::after [17/7] 17/17 tStart=0.991938827 tEnd=0.0929234671 < [20/9] 17/17 tStart=0.00542932628 tEnd=0 < [17/8] 1/1 tStart=0.991938827 tEnd=1 T 12 |
| 891 | SkOpAngle::afterPart {{{108.229698,117.326683}, {97.6869507,118.970093}}} id=17 |
| 892 | SkOpAngle::afterPart {{{108.229698,117.326683}, {108.185051,117.34594}, {108.142868,117.363983}}} id=20 |
| 893 | SkOpAngle::afterPart {{{108.229698,117.326683}, {108.324234,117.311951}}} id=17 |
| 894 | SkOpAngle::after [17/7] 17/17 tStart=0.991938827 tEnd=0.0929234671 < [20/10] 1/1 tStart=0.00542932628 tEnd=1 < [20/9] 17/17 tStart=0.00542932628 tEnd=0 F 5 |
| 895 | SkOpAngle::afterPart {{{108.229698,117.326683}, {97.6869507,118.970093}}} id=17 |
| 896 | SkOpAngle::afterPart {{{108.229698,117.326683}, {116.177424,113.898617}, {122.112564,106.083923}}} id=20 |
| 897 | SkOpAngle::afterPart {{{108.229698,117.326683}, {108.185051,117.34594}, {108.142868,117.363983}}} id=20 |
| 898 | SkOpAngle::after [20/9] 17/17 tStart=0.00542932628 tEnd=0 < [20/10] 1/1 tStart=0.00542932628 tEnd=1 < [17/8] 1/1 tStart=0.991938827 tEnd=1 F 11 |
| 899 | SkOpAngle::afterPart {{{108.229698,117.326683}, {108.185051,117.34594}, {108.142868,117.363983}}} id=20 |
| 900 | SkOpAngle::afterPart {{{108.229698,117.326683}, {116.177424,113.898617}, {122.112564,106.083923}}} id=20 |
| 901 | SkOpAngle::afterPart {{{108.229698,117.326683}, {108.324234,117.311951}}} id=17 |
| 902 | SkOpAngle::after [17/8] 1/1 tStart=0.991938827 tEnd=1 < [20/10] 1/1 tStart=0.00542932628 tEnd=1 < [17/7] 17/17 tStart=0.991938827 tEnd=0.0929234671 T 12 |
| 903 | SkOpAngle::afterPart {{{108.229698,117.326683}, {108.324234,117.311951}}} id=17 |
| 904 | SkOpAngle::afterPart {{{108.229698,117.326683}, {116.177424,113.898617}, {122.112564,106.083923}}} id=20 |
| 905 | SkOpAngle::afterPart {{{108.229698,117.326683}, {97.6869507,118.970093}}} id=17 |
| 906 | SkOpSegment::sortAngles [20] tStart=0.00542932628 [68] |
| 907 | SkOpSegment::sortAngles [23] tStart=0.860440414 [71] |
| 908 | SkOpAngle::after [23/11] 25/21 tStart=0.860440414 tEnd=0 < [26/13] 1/1 tStart=0.0479619043 tEnd=0 < [23/12] 9/9 tStart=0.860440414 tEnd=1 T 4 |
| 909 | SkOpAngle::afterPart {{{122.609795,103.636162}, {123.136432,104.743399}, {122.18261,105.991737}}} id=23 |
| 910 | SkOpAngle::afterPart {{{122.609795,103.636162}, {123.079292,103.598701}}} id=26 |
| 911 | SkOpAngle::afterPart {{{122.609795,103.636162}, {122.524376,103.456572}, {122.400009,103.280693}}} id=23 |
| 912 | SkOpAngle::after [23/11] 25/21 tStart=0.860440414 tEnd=0 < [26/14] 17/17 tStart=0.0479619043 tEnd=0.992657126 < [26/13] 1/1 tStart=0.0479619043 tEnd=0 F 4 |
| 913 | SkOpAngle::afterPart {{{122.609795,103.636162}, {123.136432,104.743399}, {122.18261,105.991737}}} id=23 |
| 914 | SkOpAngle::afterPart {{{122.609795,103.636162}, {113.362167,104.373962}}} id=26 |
| 915 | SkOpAngle::afterPart {{{122.609795,103.636162}, {123.079292,103.598701}}} id=26 |
| 916 | SkOpAngle::after [26/13] 1/1 tStart=0.0479619043 tEnd=0 < [26/14] 17/17 tStart=0.0479619043 tEnd=0.992657126 < [23/12] 9/9 tStart=0.860440414 tEnd=1 F 4 |
| 917 | SkOpAngle::afterPart {{{122.609795,103.636162}, {123.079292,103.598701}}} id=26 |
| 918 | SkOpAngle::afterPart {{{122.609795,103.636162}, {113.362167,104.373962}}} id=26 |
| 919 | SkOpAngle::afterPart {{{122.609795,103.636162}, {122.524376,103.456572}, {122.400009,103.280693}}} id=23 |
| 920 | SkOpAngle::after [23/12] 9/9 tStart=0.860440414 tEnd=1 < [26/14] 17/17 tStart=0.0479619043 tEnd=0.992657126 < [23/11] 25/21 tStart=0.860440414 tEnd=0 T 4 |
| 921 | SkOpAngle::afterPart {{{122.609795,103.636162}, {122.524376,103.456572}, {122.400009,103.280693}}} id=23 |
| 922 | SkOpAngle::afterPart {{{122.609795,103.636162}, {113.362167,104.373962}}} id=26 |
| 923 | SkOpAngle::afterPart {{{122.609795,103.636162}, {123.136432,104.743399}, {122.18261,105.991737}}} id=23 |
| 924 | SkOpSegment::sortAngles [26] tStart=0.0479619043 [72] |
| 925 | SkOpSegment::sortAngles [26] tStart=0.992657126 [73] |
| 926 | SkOpAngle::after [26/15] 1/1 tStart=0.992657126 tEnd=0.0479619043 < [29/17] 1/1 tStart=0.00597885639 tEnd=0 < [26/16] 17/17 tStart=0.992657126 tEnd=1 T 12 |
| 927 | SkOpAngle::afterPart {{{113.362167,104.373962}, {122.609795,103.636162}}} id=26 |
| 928 | SkOpAngle::afterPart {{{113.362167,104.373962}, {113.395068,104.364844}, {113.430878,104.355003}}} id=29 |
| 929 | SkOpAngle::afterPart {{{113.362167,104.373962}, {113.290291,104.3797}}} id=26 |
| 930 | SkOpAngle::after [26/15] 1/1 tStart=0.992657126 tEnd=0.0479619043 < [29/18] 17/17 tStart=0.00597885639 tEnd=0.999923983 < [29/17] 1/1 tStart=0.00597885639 tEnd=0 F 5 |
| 931 | SkOpAngle::afterPart {{{113.362167,104.373962}, {122.609795,103.636162}}} id=26 |
| 932 | SkOpAngle::afterPart {{{113.362167,104.373962}, {107.656922,105.955165}, {103.89183,109.226723}}} id=29 |
| 933 | SkOpAngle::afterPart {{{113.362167,104.373962}, {113.395068,104.364844}, {113.430878,104.355003}}} id=29 |
| 934 | SkOpAngle::after [29/17] 1/1 tStart=0.00597885639 tEnd=0 < [29/18] 17/17 tStart=0.00597885639 tEnd=0.999923983 < [26/16] 17/17 tStart=0.992657126 tEnd=1 F 11 |
| 935 | SkOpAngle::afterPart {{{113.362167,104.373962}, {113.395068,104.364844}, {113.430878,104.355003}}} id=29 |
| 936 | SkOpAngle::afterPart {{{113.362167,104.373962}, {107.656922,105.955165}, {103.89183,109.226723}}} id=29 |
| 937 | SkOpAngle::afterPart {{{113.362167,104.373962}, {113.290291,104.3797}}} id=26 |
| 938 | SkOpAngle::after [26/16] 17/17 tStart=0.992657126 tEnd=1 < [29/18] 17/17 tStart=0.00597885639 tEnd=0.999923983 < [26/15] 1/1 tStart=0.992657126 tEnd=0.0479619043 T 12 |
| 939 | SkOpAngle::afterPart {{{113.362167,104.373962}, {113.290291,104.3797}}} id=26 |
| 940 | SkOpAngle::afterPart {{{113.362167,104.373962}, {107.656922,105.955165}, {103.89183,109.226723}}} id=29 |
| 941 | SkOpAngle::afterPart {{{113.362167,104.373962}, {122.609795,103.636162}}} id=26 |
| 942 | SkOpSegment::sortAngles [29] tStart=0.00597885639 [74] |
| 943 | SkOpSegment::sortAngles [29] tStart=0.999923983 [75] |
| 944 | SkOpAngle::after [29/19] 1/1 tStart=0.999923983 tEnd=0.00597885639 < [31/21] 9/9 tStart=1 tEnd=0 < [32/22] 17/17 tStart=0 tEnd=5.43505489e-05 T 4 |
| 945 | SkOpAngle::afterPart {{{103.891838,109.22673}, {107.65693,105.955173}, {113.362175,104.37397}}} id=29 |
| 946 | SkOpAngle::afterPart {{{103.891838,109.22673}, {103.393997,108.654999}}} id=31 |
| 947 | SkOpAngle::afterPart {{{103.891838,109.22673}, {103.891266,109.227234}, {103.891266,109.227234}}} id=32 |
| 948 | SkOpSegment::sortAngles [30] tStart=0 [59] |
| 949 | SkOpAngle::after [30/20] 9/9 tStart=0 tEnd=1 < [32/24] 17/21 tStart=5.43505489e-05 tEnd=0.913746799 < [32/23] 1/1 tStart=5.43505489e-05 tEnd=0 T 4 |
| 950 | SkOpAngle::afterPart {{{103.891266,109.227234}, {103.394005,108.655006}}} id=30 |
| 951 | SkOpAngle::afterPart {{{103.891266,109.227234}, {99.0549405,113.438713}, {97.6869507,118.970093}}} id=32 |
| 952 | SkOpAngle::afterPart {{{103.891266,109.227234}, {103.891838,109.22673}, {103.891838,109.22673}}} id=32 |
| 953 | SkOpSegment::sortAngles [31] tStart=1 [62] |
| 954 | SkOpSegment::sortAngles [32] tStart=0 [63] |
| 955 | SkOpSegment::sortAngles [32] tStart=5.43505489e-05 [76] |
| 956 | SkOpSegment::sortAngles [32] tStart=0.913746799 [70] |
| 957 | coinSpan - id=32 t=0 tEnd=5.43505489e-05 |
| 958 | coinSpan + id=29 t=0.999923983 tEnd=1 |
| 959 | SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1 |
| 960 | SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1 |
| 961 | SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1 |
| 962 | SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1 |
| 963 | SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1 |
| 964 | SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1 |
| 965 | SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1 |
| 966 | SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1 |
| 967 | SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1 |
| 968 | SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1 |
| 969 | SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1 |
| 970 | SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1 |
| 971 | SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1 |
| 972 | SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1 |
| 973 | SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1 |
| 974 | SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1 |
| 975 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 976 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 977 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 978 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 979 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 980 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 981 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 982 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 983 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 984 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 985 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 986 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 987 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 988 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 989 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 990 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 991 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 992 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 993 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 994 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 995 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 996 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 997 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 998 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 999 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2 |
| 1000 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 1001 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 1002 | SkOpSpan::sortableTop dir=kLeft seg=1 t=0.5 pt=(98.3177643,113.479004) |
| 1003 | SkOpSpan::sortableTop [0] valid=1 operand=0 span=1 ccw=1 seg=1 {{{95.9684143f, 119.751823f}, {97.2032471f, 113.040466f}, {102.896156f, 108.083267f}}} t=0.5 pt=(98.3177643,113.479004) slope=(3.463871,-5.83427811) |
| 1004 | SkOpSegment::markWinding id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 [1] (95.9684143,119.751823) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1005 | SkOpSegment::markWinding id=2 (102.896156,108.083267 102.896736,108.082771) t=0 [3] (102.896156,108.083267) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1006 | SkOpSegment::markWinding id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 [5] (102.896736,108.082771) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1007 | SkOpSegment::markWinding id=4 (113.029114,102.892998 113.169701,102.868301) t=0 [7] (113.029114,102.892998) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1008 | SkOpSegment::markWinding id=5 (113.169701,102.868301 122.958702,102.087303) t=0 [9] (113.169701,102.868301) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1009 | SkOpSegment::markWinding id=6 (122.958702,102.087303 123.637985,102.405312) t=0 [11] (122.958702,102.087303) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1010 | SkOpSegment::markWinding id=7 (123.637985,102.405312 125.172699,104.575714 123.387383,106.91227) t=0 [13] (123.637985,102.405312) tEnd=0.999952051 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1011 | SkOpSegment::markWinding id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 [1] (95.9684143,119.751823) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1012 | SkOpSegment::markWinding id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 [27] (96.8307571,120.638062) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1013 | SkOpSegment::markWinding id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 [25] (108.557755,118.810059) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1014 | SkOpSegment::markWinding id=12 (108.73912,118.758026 108.557755,118.810059) t=0 [23] (108.73912,118.758026) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1015 | SkOpSegment::markWinding id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 [21] (123.320007,107.000946) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1016 | SkOpSegment::markWinding id=10 (123.388428,106.910896 123.365623,106.94088 123.320007,107.000946) t=0.0189869068 [66] (123.38755,106.912048) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1017 | SkOpSegment::findNextWinding simple |
| 1018 | SkOpSegment::markDone id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 [1] (95.9684143,119.751823) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1019 | bridgeWinding current id=1 from=(102.896156,108.083267) to=(95.9684143,119.751823) |
| 1020 | path.moveTo(102.896156,108.083267); |
| 1021 | path.quadTo(97.2032471,113.040466, 95.9684143,119.751823); |
| 1022 | SkOpSegment::findNextWinding simple |
| 1023 | SkOpSegment::markDone id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 [27] (96.8307571,120.638062) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1024 | bridgeWinding current id=14 from=(95.9684143,119.751823) to=(96.8307571,120.638062) |
| 1025 | SkOpSegment::findNextWinding simple |
| 1026 | SkOpSegment::markDone id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 [25] (108.557755,118.810059) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1027 | bridgeWinding current id=13 from=(96.8307571,120.638062) to=(108.557755,118.810059) |
| 1028 | path.lineTo(96.8307571,120.638062); |
| 1029 | SkOpSegment::findNextWinding simple |
| 1030 | SkOpSegment::markDone id=12 (108.73912,118.758026 108.557755,118.810059) t=0 [23] (108.73912,118.758026) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1031 | bridgeWinding current id=12 from=(108.557755,118.810059) to=(108.73912,118.758026) |
| 1032 | path.lineTo(108.557755,118.810059); |
| 1033 | SkOpSegment::findNextWinding simple |
| 1034 | SkOpSegment::markDone id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 [21] (123.320007,107.000946) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1035 | bridgeWinding current id=11 from=(108.73912,118.758026) to=(123.320007,107.000946) |
| 1036 | path.lineTo(108.73912,118.758026); |
| 1037 | path.quadTo(117.109985,115.177612, 123.320007,107.000946); |
| 1038 | SkOpSegment::markWinding id=7 (123.637985,102.405312 125.172699,104.575714 123.387383,106.91227) t=0.999952051 [65] (123.38755,106.912048) tEnd=1 newWindSum=1 windSum=? windValue=1 |
| 1039 | SkOpSegment::markWinding id=8 (123.387383,106.91227 122.784996,106.452003) t=0 [15] (123.387383,106.91227) tEnd=1 newWindSum=1 windSum=? windValue=1 |
| 1040 | SkOpSegment::markWinding id=9 (122.784996,106.452003 123.388428,106.910896) t=0 [17] (122.784996,106.452003) tEnd=1 newWindSum=1 windSum=? windValue=1 |
| 1041 | SkOpSegment::markWinding id=10 (123.388428,106.910896 123.365623,106.94088 123.320007,107.000946) t=0 [19] (123.388428,106.910896) tEnd=0.0189869068 newWindSum=1 windSum=? windValue=1 |
| 1042 | SkOpSegment::markAngle last seg=10 span=66 windSum=-1 |
| 1043 | SkOpSegment::findNextWinding |
| 1044 | SkOpAngle::dumpOne [10/4] next=7/2 sect=21/21 s=0.0189869068 [66] e=1 [20] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 1045 | SkOpAngle::dumpOne [7/2] next=7/1 sect=21/21 s=0.999952051 [65] e=1 [14] sgn=-1 windVal=1 windSum=1 |
| 1046 | SkOpAngle::dumpOne [7/1] next=10/3 sect=5/5 s=0.999952051 [65] e=0 [13] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 1047 | SkOpAngle::dumpOne [10/3] next=10/4 sect=5/5 s=0.0189869068 [66] e=0 [19] sgn=1 windVal=1 windSum=1 |
| 1048 | SkOpSegment::findNextWinding chase.append segment=10 span=66 windSum=-1 |
| 1049 | SkOpSegment::markDone id=10 (123.388428,106.910896 123.365623,106.94088 123.320007,107.000946) t=0.0189869068 [66] (123.38755,106.912048) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1050 | SkOpSegment::findNextWinding from:[10] to:[7] start=6169336 end=6162888 |
| 1051 | bridgeWinding current id=10 from=(123.320007,107.000946) to=(123.38755,106.912048) |
| 1052 | path.quadTo(123.365601,106.940903, 123.38755,106.912048); |
| 1053 | SkOpSegment::findNextWinding simple |
| 1054 | SkOpSegment::markDone id=7 (123.637985,102.405312 125.172699,104.575714 123.387383,106.91227) t=0.999952051 [65] (123.38755,106.912048) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 1055 | bridgeWinding current id=7 from=(123.38755,106.912048) to=(123.387383,106.91227) |
| 1056 | SkOpSegment::findNextWinding simple |
| 1057 | SkOpSegment::markDone id=8 (123.387383,106.91227 122.784996,106.452003) t=0 [15] (123.387383,106.91227) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 1058 | bridgeWinding current id=8 from=(123.387383,106.91227) to=(122.784996,106.452003) |
| 1059 | path.lineTo(123.387383,106.91227); |
| 1060 | SkOpSegment::findNextWinding simple |
| 1061 | SkOpSegment::markDone id=9 (122.784996,106.452003 123.388428,106.910896) t=0 [17] (122.784996,106.452003) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 1062 | bridgeWinding current id=9 from=(122.784996,106.452003) to=(123.388428,106.910896) |
| 1063 | path.lineTo(122.784996,106.452003); |
| 1064 | SkOpSegment::findNextWinding |
| 1065 | SkOpAngle::dumpOne [10/3] next=10/4 sect=5/5 s=0.0189869068 [66] e=0 [19] sgn=1 windVal=1 windSum=1 |
| 1066 | SkOpAngle::dumpOne [10/4] next=7/2 sect=21/21 s=0.0189869068 [66] e=1 [20] sgn=-1 windVal=1 windSum=-1 oppVal=0 oppSum=0 done |
| 1067 | SkOpAngle::dumpOne [7/2] next=7/1 sect=21/21 s=0.999952051 [65] e=1 [14] sgn=-1 windVal=1 windSum=1 done |
| 1068 | SkOpAngle::dumpOne [7/1] next=10/3 sect=5/5 s=0.999952051 [65] e=0 [13] sgn=1 windVal=1 windSum=-1 oppVal=0 oppSum=0 |
| 1069 | SkOpSegment::markDone id=7 (123.637985,102.405312 125.172699,104.575714 123.387383,106.91227) t=0 [13] (123.637985,102.405312) tEnd=0.999952051 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1070 | SkOpSegment::markDone id=6 (122.958702,102.087303 123.637985,102.405312) t=0 [11] (122.958702,102.087303) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1071 | SkOpSegment::markDone id=5 (113.169701,102.868301 122.958702,102.087303) t=0 [9] (113.169701,102.868301) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1072 | SkOpSegment::markDone id=4 (113.029114,102.892998 113.169701,102.868301) t=0 [7] (113.029114,102.892998) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1073 | SkOpSegment::markDone id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 [5] (102.896736,108.082771) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1074 | SkOpSegment::markDone id=2 (102.896156,108.083267 102.896736,108.082771) t=0 [3] (102.896156,108.083267) tEnd=1 newWindSum=-1 newOppSum=0 oppSum=0 windSum=-1 windValue=1 oppValue=0 |
| 1075 | SkOpSegment::markDone id=10 (123.388428,106.910896 123.365623,106.94088 123.320007,107.000946) t=0 [19] (123.388428,106.910896) tEnd=0.0189869068 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0 |
| 1076 | SkOpSegment::findNextWinding from:[10] to:[10] start=6169448 end=6163608 |
| 1077 | bridgeWinding current id=10 from=(123.388428,106.910896) to=(123.38755,106.912048) |
| 1078 | path.lineTo(123.388428,106.910896); |
| 1079 | path.lineTo(123.38755,106.912048); |
| 1080 | SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1 |
| 1081 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1 |
| 1082 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1 |
| 1083 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 1084 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 1085 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 1086 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 1087 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 1088 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 1089 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 1090 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 1091 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 1092 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 1093 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 1094 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 1095 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 1096 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 1097 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 1098 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 1099 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 1100 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 1101 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 1102 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 1103 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 1104 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2 |
| 1105 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 1106 | SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1 |
| 1107 | SkOpSpan::sortableTop dir=kTop seg=15 t=0.5 pt=(97.086792,119.957596) |
| 1108 | SkOpSpan::sortableTop [0] valid=1 operand=0 span=1 ccw=1 seg=1 {{{95.9684143f, 119.751823f}, {97.2032471f, 113.040466f}, {102.896156f, 108.083267f}}} t=0.295365035 pt=(97.086792,115.940254) slope=(2.55159268,-6.19324017) |
| 1109 | SkOpSpan::sortableTop [1] valid=1 operand=0 span=33 ccw=1 seg=17 {{{96.5972366f, 119.139954f}, {108.324234f, 117.311951f}}} t=0.0417460108 pt=(97.086792,119.063644) slope=(11.7269974,-1.82800293) |
| 1110 | SkOpSpan::sortableTop [2] valid=1 operand=0 span=29 ccw=0 seg=15 {{{97.4595795f, 120.026184f}, {96.7139969f, 119.889008f}}} t=0.5 pt=(97.086792,119.957596) slope=(-0.745582581,-0.137176514) |
| 1111 | SkOpSegment::markWinding id=17 (96.5972366,119.139954 108.324234,117.311951) t=0 [33] (96.5972366,119.139954) tEnd=0.0929234671 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 oppValue=0 |
| 1112 | SkOpSegment::markWinding id=17 (96.5972366,119.139954 108.324234,117.311951) t=0 [33] (96.5972366,119.139954) tEnd=0.0929234671 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 oppValue=0 |
| 1113 | SkOpSegment::markWinding id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 [31] (96.7139969,119.889008) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1114 | SkOpSegment::markWinding id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 [29] (97.4595795,120.026184) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1115 | SkOpSegment::markWinding id=32 (103.891838,109.22673 98.5984497,113.835938 97.4595795,120.026184) t=0.913746799 [70] (97.6869507,118.970093) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0 |
| 1116 | SkOpSegment::markDone id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 [29] (97.4595795,120.026184) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 oppValue=0 |
| 1117 | SkOpSegment::markDone id=32 (103.891838,109.22673 98.5984497,113.835938 97.4595795,120.026184) t=0.913746799 [70] (97.6869507,118.970093) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 oppValue=0 |
| 1118 | bridgeWinding chase.append id=32 windSum=-2 |
| 1119 | SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=-2 oppSum=0 windValue=1 oppValue=0 |
| 1120 | SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=-2 oppSum=0 windValue=1 oppValue=0 |
| 1121 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1 |
| 1122 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 1123 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 1124 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 1125 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 1126 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 1127 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 1128 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 1129 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 1130 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 1131 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 1132 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 1133 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 1134 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 1135 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 1136 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 1137 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 1138 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 1139 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 1140 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 1141 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 1142 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2 |
| 1143 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=? windValue=1 |
| 1144 | SkOpSegment::markDone id=17 (96.5972366,119.139954 108.324234,117.311951) t=0 [33] (96.5972366,119.139954) tEnd=0.0929234671 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 oppValue=0 |
| 1145 | SkOpSegment::markDone id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 [31] (96.7139969,119.889008) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=1 oppValue=0 |
| 1146 | SkOpSegment::markWinding id=17 (96.5972366,119.139954 108.324234,117.311951) t=0.0929234671 [69] (97.6869507,118.970093) tEnd=0.991938827 newWindSum=-1 windSum=? windValue=1 |
| 1147 | SkOpSegment::markAngle last seg=17 span=67 windSum=? |
| 1148 | SkOpSegment::markWinding id=32 (103.891838,109.22673 98.5984497,113.835938 97.4595795,120.026184) t=5.43505489e-05 [76] (103.891266,109.227234) tEnd=0.913746799 newWindSum=-1 windSum=? windValue=1 |
| 1149 | SkOpSegment::markAngle last seg=32 span=76 windSum=-1 |
| 1150 | SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=-1 windValue=1 |
| 1151 | SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1 |
| 1152 | SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1 |
| 1153 | SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1 |
| 1154 | SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1 |
| 1155 | SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1 |
| 1156 | SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1 |
| 1157 | SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1 |
| 1158 | SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1 |
| 1159 | SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1 |
| 1160 | SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1 |
| 1161 | SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1 |
| 1162 | SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1 |
| 1163 | SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1 |
| 1164 | SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1 |
| 1165 | SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1 |
| 1166 | SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1 |
| 1167 | SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1 |
| 1168 | SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1 |
| 1169 | SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1 |
| 1170 | SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1 |
| 1171 | SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2 |
| 1172 | SkOpSegment::debugShowActiveSpans id=32 (103.891266,109.227234 99.0549405,113.438713 97.6869507,118.970093) t=5.43505489e-05 tEnd=0.913746799 windSum=-1 windValue=1 |
| 1173 | SkOpSegment::markWinding id=20 (108.142868,117.363983 116.14502,113.941284 122.112564,106.083923) t=0 [39] (108.142868,117.363983) tEnd=0.00542932628 newWindSum=-2 windSum=? windValue=1 |
| 1174 | SkOpSegment::markWinding id=19 (108.440994,118.061005 108.142868,117.363983) t=0 [37] (108.440994,118.061005) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1175 | SkOpSegment::markWinding id=18 (108.324234,117.311951 108.440994,118.061005) t=0 [35] (108.324234,117.311951) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1176 | SkOpSegment::markWinding id=17 (96.5972366,119.139954 108.324234,117.311951) t=0.991938827 [67] (108.229698,117.326683) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1177 | SkOpSegment::markAngle last seg=17 span=67 windSum=-2 |
| 1178 | SkOpSegment::markWinding id=20 (108.142868,117.363983 116.14502,113.941284 122.112564,106.083923) t=0.00542932628 [68] (108.229698,117.326683) tEnd=1 newWindSum=-1 windSum=? windValue=1 |
| 1179 | SkOpSegment::markWinding id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 [41] (122.112564,106.083923) tEnd=1 newWindSum=-1 windSum=? windValue=1 |
| 1180 | SkOpSegment::markWinding id=22 (122.181564,105.993111 122.18261,105.991737) t=0 [43] (122.181564,105.993111) tEnd=1 newWindSum=-1 windSum=? windValue=1 |
| 1181 | SkOpSegment::markWinding id=23 (122.18261,105.991737 123.291138,104.540924 122.400009,103.280693) t=0 [45] (122.18261,105.991737) tEnd=0.860440414 newWindSum=-1 windSum=? windValue=1 |
| 1182 | SkOpSegment::markAngle last seg=23 span=71 windSum=? |
| 1183 | SkOpSegment::findNextWinding |
| 1184 | SkOpAngle::dumpOne [17/7] next=20/9 sect=17/17 s=0.991938827 [67] e=0.0929234671 [69] sgn=1 windVal=1 windSum=-1 |
| 1185 | SkOpAngle::dumpOne [20/9] next=17/8 sect=17/17 s=0.00542932628 [68] e=0 [39] sgn=1 windVal=1 windSum=-2 |
| 1186 | SkOpAngle::dumpOne [17/8] next=20/10 sect=1/1 s=0.991938827 [67] e=1 [34] sgn=-1 windVal=1 windSum=-2 |
| 1187 | SkOpAngle::dumpOne [20/10] next=17/7 sect=1/1 s=0.00542932628 [68] e=1 [40] sgn=-1 windVal=1 windSum=-1 |
| 1188 | SkOpSegment::markDone id=20 (108.142868,117.363983 116.14502,113.941284 122.112564,106.083923) t=0 [39] (108.142868,117.363983) tEnd=0.00542932628 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1189 | SkOpSegment::markDone id=19 (108.440994,118.061005 108.142868,117.363983) t=0 [37] (108.440994,118.061005) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1190 | SkOpSegment::markDone id=18 (108.324234,117.311951 108.440994,118.061005) t=0 [35] (108.324234,117.311951) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1191 | SkOpSegment::markDone id=17 (96.5972366,119.139954 108.324234,117.311951) t=0.991938827 [67] (108.229698,117.326683) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1192 | SkOpSegment::findNextWinding chase.append segment=17 span=67 windSum=-2 |
| 1193 | SkOpSegment::findNextWinding chase.append segment=23 span=71 windSum=-2147483647 |
| 1194 | SkOpSegment::markDone id=17 (96.5972366,119.139954 108.324234,117.311951) t=0.0929234671 [69] (97.6869507,118.970093) tEnd=0.991938827 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1195 | SkOpSegment::findNextWinding from:[17] to:[20] start=6169672 end=6166328 |
| 1196 | bridgeWinding current id=17 from=(97.6869507,118.970093) to=(108.229698,117.326683) |
| 1197 | SkOpSegment::findNextWinding simple |
| 1198 | SkOpSegment::markDone id=20 (108.142868,117.363983 116.14502,113.941284 122.112564,106.083923) t=0.00542932628 [68] (108.229698,117.326683) tEnd=1 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1199 | bridgeWinding current id=20 from=(108.229698,117.326683) to=(122.112564,106.083923) |
| 1200 | path.moveTo(97.6869507,118.970093); |
| 1201 | path.lineTo(108.229698,117.326683); |
| 1202 | path.quadTo(116.177422,113.898621, 122.112564,106.083923); |
| 1203 | SkOpSegment::findNextWinding simple |
| 1204 | SkOpSegment::markDone id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 [41] (122.112564,106.083923) tEnd=1 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1205 | bridgeWinding current id=21 from=(122.112564,106.083923) to=(122.181564,105.993111) |
| 1206 | path.quadTo(122.158455,106.023499, 122.181564,105.993111); |
| 1207 | SkOpSegment::findNextWinding simple |
| 1208 | SkOpSegment::markDone id=22 (122.181564,105.993111 122.18261,105.991737) t=0 [43] (122.181564,105.993111) tEnd=1 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1209 | bridgeWinding current id=22 from=(122.181564,105.993111) to=(122.18261,105.991737) |
| 1210 | SkOpSegment::markWinding id=26 (123.079292,103.598701 113.290291,104.3797) t=0 [51] (123.079292,103.598701) tEnd=0.0479619043 newWindSum=-2 windSum=? windValue=1 |
| 1211 | SkOpSegment::markWinding id=25 (123.018997,102.843002 123.079292,103.598701) t=0 [49] (123.018997,102.843002) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1212 | SkOpSegment::markWinding id=24 (122.400009,103.280693 123.018997,102.843002) t=0 [47] (122.400009,103.280693) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1213 | SkOpSegment::markWinding id=23 (122.18261,105.991737 123.291138,104.540924 122.400009,103.280693) t=0.860440414 [71] (122.609795,103.636162) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1214 | SkOpSegment::markAngle last seg=23 span=71 windSum=-2 |
| 1215 | SkOpSegment::markWinding id=26 (123.079292,103.598701 113.290291,104.3797) t=0.0479619043 [72] (122.609795,103.636162) tEnd=0.992657126 newWindSum=-1 windSum=? windValue=1 |
| 1216 | SkOpSegment::markAngle last seg=26 span=73 windSum=? |
| 1217 | SkOpSegment::findNextWinding |
| 1218 | SkOpAngle::dumpOne [23/11] next=26/13 sect=25/21 s=0.860440414 [71] e=0 [45] sgn=1 windVal=1 windSum=-1 |
| 1219 | SkOpAngle::dumpOne [26/13] next=23/12 sect=1/1 s=0.0479619043 [72] e=0 [51] sgn=1 windVal=1 windSum=-2 |
| 1220 | SkOpAngle::dumpOne [23/12] next=26/14 sect=9/9 s=0.860440414 [71] e=1 [46] sgn=-1 windVal=1 windSum=-2 |
| 1221 | SkOpAngle::dumpOne [26/14] next=23/11 sect=17/17 s=0.0479619043 [72] e=0.992657126 [73] sgn=-1 windVal=1 windSum=-1 |
| 1222 | SkOpSegment::markDone id=26 (123.079292,103.598701 113.290291,104.3797) t=0 [51] (123.079292,103.598701) tEnd=0.0479619043 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1223 | SkOpSegment::markDone id=25 (123.018997,102.843002 123.079292,103.598701) t=0 [49] (123.018997,102.843002) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1224 | SkOpSegment::markDone id=24 (122.400009,103.280693 123.018997,102.843002) t=0 [47] (122.400009,103.280693) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1225 | SkOpSegment::markDone id=23 (122.18261,105.991737 123.291138,104.540924 122.400009,103.280693) t=0.860440414 [71] (122.609795,103.636162) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1226 | SkOpSegment::findNextWinding chase.append segment=26 span=73 windSum=-2147483647 |
| 1227 | SkOpSegment::markDone id=23 (122.18261,105.991737 123.291138,104.540924 122.400009,103.280693) t=0 [45] (122.18261,105.991737) tEnd=0.860440414 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1228 | SkOpSegment::findNextWinding from:[23] to:[26] start=6170120 end=6170232 |
| 1229 | bridgeWinding current id=23 from=(122.18261,105.991737) to=(122.609795,103.636162) |
| 1230 | path.lineTo(122.18261,105.991737); |
| 1231 | path.quadTo(123.136429,104.743401, 122.609795,103.636162); |
| 1232 | SkOpSegment::markWinding id=29 (113.430878,104.355003 107.679138,105.935608 103.891258,109.227226) t=0 [57] (113.430878,104.355003) tEnd=0.00597885639 newWindSum=-2 windSum=? windValue=1 |
| 1233 | SkOpSegment::markWinding id=28 (113.229996,103.624001 113.430878,104.355003) t=0 [55] (113.229996,103.624001) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1234 | SkOpSegment::markWinding id=27 (113.290291,104.3797 113.229996,103.624001) t=0 [53] (113.290291,104.3797) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1235 | SkOpSegment::markWinding id=26 (123.079292,103.598701 113.290291,104.3797) t=0.992657126 [73] (113.362167,104.373962) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1236 | SkOpSegment::markAngle last seg=26 span=73 windSum=-2 |
| 1237 | SkOpSegment::markWinding id=29 (113.430878,104.355003 107.679138,105.935608 103.891258,109.227226) t=0.00597885639 [74] (113.362167,104.373962) tEnd=0.999923983 newWindSum=-1 windSum=? windValue=1 |
| 1238 | SkOpSegment::markAngle last seg=29 span=75 windSum=? |
| 1239 | SkOpSegment::findNextWinding |
| 1240 | SkOpAngle::dumpOne [26/15] next=29/17 sect=1/1 s=0.992657126 [73] e=0.0479619043 [72] sgn=1 windVal=1 windSum=-1 |
| 1241 | SkOpAngle::dumpOne [29/17] next=26/16 sect=1/1 s=0.00597885639 [74] e=0 [57] sgn=1 windVal=1 windSum=-2 |
| 1242 | SkOpAngle::dumpOne [26/16] next=29/18 sect=17/17 s=0.992657126 [73] e=1 [52] sgn=-1 windVal=1 windSum=-2 |
| 1243 | SkOpAngle::dumpOne [29/18] next=26/15 sect=17/17 s=0.00597885639 [74] e=0.999923983 [75] sgn=-1 windVal=1 windSum=-1 |
| 1244 | SkOpSegment::markDone id=29 (113.430878,104.355003 107.679138,105.935608 103.891258,109.227226) t=0 [57] (113.430878,104.355003) tEnd=0.00597885639 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1245 | SkOpSegment::markDone id=28 (113.229996,103.624001 113.430878,104.355003) t=0 [55] (113.229996,103.624001) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1246 | SkOpSegment::markDone id=27 (113.290291,104.3797 113.229996,103.624001) t=0 [53] (113.290291,104.3797) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1247 | SkOpSegment::markDone id=26 (123.079292,103.598701 113.290291,104.3797) t=0.992657126 [73] (113.362167,104.373962) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1248 | SkOpSegment::findNextWinding chase.append segment=29 span=75 windSum=-2147483647 |
| 1249 | SkOpSegment::markDone id=26 (123.079292,103.598701 113.290291,104.3797) t=0.0479619043 [72] (122.609795,103.636162) tEnd=0.992657126 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1250 | SkOpSegment::findNextWinding from:[26] to:[29] start=6170344 end=6170456 |
| 1251 | bridgeWinding current id=26 from=(122.609795,103.636162) to=(113.362167,104.373962) |
| 1252 | SkOpSegment::markWinding id=31 (103.393997,108.654999 103.891838,109.22673) t=0 [61] (103.393997,108.654999) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1253 | SkOpSegment::markWinding id=30 (103.891258,109.227226 103.393997,108.654999) t=0 [59] (103.891258,109.227226) tEnd=1 newWindSum=-2 windSum=? windValue=1 |
| 1254 | SkOpSegment::markAngle last seg=30 span=59 windSum=-2 |
| 1255 | SkOpSegment::markWinding id=32 (103.891838,109.22673 98.5984497,113.835938 97.4595795,120.026184) t=0 [63] (103.891838,109.22673) tEnd=5.43505489e-05 newWindSum=-2 windSum=? windValue=2 |
| 1256 | SkOpSegment::markAngle last seg=32 span=76 windSum=-1 |
| 1257 | SkOpSegment::findNextWinding |
| 1258 | SkOpAngle::dumpOne [29/19] next=31/21 sect=1/1 s=0.999923983 [75] e=0.00597885639 [74] sgn=1 windVal=1 windSum=-1 |
| 1259 | SkOpAngle::dumpOne [31/21] next=32/22 sect=9/9 s=1 [62] e=0 [61] sgn=1 windVal=1 windSum=-2 |
| 1260 | SkOpAngle::dumpOne [32/22] next=29/19 sect=17/17 s=0 [63] e=5.43505489e-05 [76] sgn=-1 windVal=2 windSum=-2 |
| 1261 | SkOpSegment::markDone id=31 (103.393997,108.654999 103.891838,109.22673) t=0 [61] (103.393997,108.654999) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1262 | SkOpSegment::markDone id=30 (103.891258,109.227226 103.393997,108.654999) t=0 [59] (103.891258,109.227226) tEnd=1 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=1 oppValue=0 |
| 1263 | SkOpSegment::findNextWinding chase.append segment=30 span=59 windSum=-2 |
| 1264 | SkOpSegment::findNextWinding chase.append segment=32 span=76 windSum=-1 |
| 1265 | SkOpSegment::markDone id=29 (113.430878,104.355003 107.679138,105.935608 103.891258,109.227226) t=0.00597885639 [74] (113.362167,104.373962) tEnd=0.999923983 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1266 | SkOpSegment::findNextWinding from:[29] to:[32] start=6169096 end=6170568 |
| 1267 | bridgeWinding current id=29 from=(113.362167,104.373962) to=(103.89183,109.226723) |
| 1268 | path.lineTo(113.362167,104.373962); |
| 1269 | path.quadTo(107.656921,105.955162, 103.89183,109.226723); |
| 1270 | SkOpSegment::findNextWinding |
| 1271 | SkOpAngle::dumpOne [32/23] next=30/20 sect=1/1 s=5.43505489e-05 [76] e=0 [63] sgn=1 windVal=2 windSum=-2 |
| 1272 | SkOpAngle::dumpOne [30/20] next=32/24 sect=9/9 s=0 [59] e=1 [60] sgn=-1 windVal=1 windSum=-2 done |
| 1273 | SkOpAngle::dumpOne [32/24] next=32/23 sect=17/21 s=5.43505489e-05 [76] e=0.913746799 [70] sgn=-1 windVal=1 windSum=-1 |
| 1274 | SkOpSegment::markDone id=32 (103.891838,109.22673 98.5984497,113.835938 97.4595795,120.026184) t=0 [63] (103.891838,109.22673) tEnd=5.43505489e-05 newWindSum=-2 newOppSum=? oppSum=? windSum=-2 windValue=2 oppValue=0 |
| 1275 | SkOpSegment::findNextWinding from:[32] to:[32] start=6170568 end=6169896 |
| 1276 | bridgeWinding current id=32 from=(103.891838,109.22673) to=(103.891266,109.227234) |
| 1277 | SkOpSegment::findNextWinding |
| 1278 | SkOpAngle::dumpOne [32/25] next=17/5 sect=5/5 s=0.913746799 [70] e=5.43505489e-05 [76] sgn=1 windVal=1 windSum=-1 |
| 1279 | SkOpAngle::dumpOne [17/5] next=32/26 sect=17/17 s=0.0929234671 [69] e=0 [33] sgn=1 windVal=1 windSum=-2 oppVal=0 oppSum=0 done |
| 1280 | SkOpAngle::dumpOne [32/26] next=17/6 sect=21/21 s=0.913746799 [70] e=1 [64] sgn=-1 windVal=1 windSum=-2 oppVal=0 oppSum=0 done |
| 1281 | SkOpAngle::dumpOne [17/6] next=32/25 sect=1/1 s=0.0929234671 [69] e=0.991938827 [67] sgn=-1 windVal=1 windSum=-1 done |
| 1282 | SkOpSegment::markDone id=32 (103.891838,109.22673 98.5984497,113.835938 97.4595795,120.026184) t=5.43505489e-05 [76] (103.891266,109.227234) tEnd=0.913746799 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0 |
| 1283 | SkOpSegment::findNextWinding from:[32] to:[17] start=6169784 end=6169560 |
| 1284 | bridgeWinding current id=32 from=(103.891266,109.227234) to=(97.6869507,118.970093) |
| 1285 | path.lineTo(103.891266,109.227234); |
| 1286 | path.quadTo(99.0549393,113.438713, 97.6869507,118.970093); |
caryclark | 27c015d | 2016-09-23 05:47:20 -0700 | [diff] [blame] | 1287 | path.close(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1288 | </div> |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1289 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1290 | </div> |
| 1291 | |
| 1292 | <script type="text/javascript"> |
| 1293 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1294 | var testDivs = [ |
caryclark | 34efb70 | 2016-10-24 08:19:06 -0700 | [diff] [blame] | 1295 | simplifyTest_1, |
caryclark | 30b9fdd | 2016-08-31 14:36:29 -0700 | [diff] [blame] | 1296 | ]; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1297 | |
| 1298 | var decimal_places = 3; // make this 3 to show more precision |
| 1299 | |
| 1300 | var tests = []; |
| 1301 | var testLines = []; |
| 1302 | var testTitles = []; |
| 1303 | var testIndex = 0; |
| 1304 | var ctx; |
| 1305 | |
| 1306 | var xmin, xmax, focusXmin, focusXmax; |
| 1307 | var ymin, ymax, focusYmin, focusYmax; |
| 1308 | var scale; |
| 1309 | var mouseX, mouseY; |
| 1310 | var srcLeft, srcTop; |
| 1311 | var screenWidth, screenHeight; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1312 | var drawnPts, drawnLines, drawnQuads, drawnConics, drawnCubics; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1313 | var curveT = 0; |
| 1314 | |
| 1315 | var pt_labels = 2; |
| 1316 | var collect_bounds = false; |
| 1317 | var control_lines = 0; |
| 1318 | var curve_t = false; |
| 1319 | var debug_xy = 1; |
| 1320 | var focus_enabled = false; |
| 1321 | var focus_on_selection = false; |
| 1322 | var step_limit = 0; |
| 1323 | var draw_active = false; |
| 1324 | var draw_add = false; |
| 1325 | var draw_angle = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1326 | var draw_coincidence = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1327 | var draw_deriviatives = 0; |
| 1328 | var draw_hints = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1329 | var draw_id = false; |
| 1330 | var draw_intersection = 0; |
| 1331 | var draw_intersectT = false; |
| 1332 | var draw_legend = true; |
| 1333 | var draw_log = false; |
| 1334 | var draw_mark = false; |
| 1335 | var draw_midpoint = false; |
| 1336 | var draw_op = 0; |
| 1337 | var draw_sequence = false; |
| 1338 | var draw_sort = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1339 | var draw_top = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1340 | var draw_path = 3; |
| 1341 | var draw_computed = 0; |
| 1342 | var retina_scale = !!window.devicePixelRatio; |
| 1343 | |
| 1344 | var activeCount = 0; |
| 1345 | var addCount = 0; |
| 1346 | var angleCount = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1347 | var coinCount = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1348 | var opCount = 0; |
| 1349 | var sectCount = 0; |
| 1350 | var sortCount = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1351 | var topCount = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1352 | var markCount = 0; |
| 1353 | var activeMax = 0; |
| 1354 | var addMax = 0; |
| 1355 | var angleMax = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1356 | var coinMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1357 | var sectMax = 0; |
| 1358 | var sectMax2 = 0; |
| 1359 | var sortMax = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1360 | var topMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1361 | var markMax = 0; |
| 1362 | var opMax = 0; |
| 1363 | var stepMax = 0; |
| 1364 | var lastIndex = 0; |
| 1365 | var hasPath = false; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1366 | var hasAlignedPath = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1367 | var hasComputedPath = false; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1368 | var angleBetween = false; |
| 1369 | var afterIndex = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1370 | |
| 1371 | var firstActiveSpan = -1; |
| 1372 | var logStart = -1; |
| 1373 | var logRange = 0; |
| 1374 | |
| 1375 | var SPAN_ID = 0; |
| 1376 | var SPAN_X1 = SPAN_ID + 1; |
| 1377 | var SPAN_Y1 = SPAN_X1 + 1; |
| 1378 | var SPAN_X2 = SPAN_Y1 + 1; |
| 1379 | var SPAN_Y2 = SPAN_X2 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1380 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1381 | var SPAN_L_TX = SPAN_Y2 + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1382 | var SPAN_L_TY = SPAN_L_TX + 1; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1383 | var SPAN_L_OTHER = SPAN_L_TY + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1384 | var SPAN_L_OTHERT = SPAN_L_OTHER + 1; |
| 1385 | var SPAN_L_OTHERI = SPAN_L_OTHERT + 1; |
| 1386 | var SPAN_L_SUM = SPAN_L_OTHERI + 1; |
| 1387 | var SPAN_L_VAL = SPAN_L_SUM + 1; |
| 1388 | var SPAN_L_OPP = SPAN_L_VAL + 1; |
| 1389 | |
| 1390 | var SPAN_X3 = SPAN_Y2 + 1; |
| 1391 | var SPAN_Y3 = SPAN_X3 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1392 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1393 | var SPAN_Q_TX = SPAN_Y3 + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1394 | var SPAN_Q_TY = SPAN_Q_TX + 1; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1395 | var SPAN_Q_OTHER = SPAN_Q_TY + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1396 | var SPAN_Q_OTHERT = SPAN_Q_OTHER + 1; |
| 1397 | var SPAN_Q_OTHERI = SPAN_Q_OTHERT + 1; |
| 1398 | var SPAN_Q_SUM = SPAN_Q_OTHERI + 1; |
| 1399 | var SPAN_Q_VAL = SPAN_Q_SUM + 1; |
| 1400 | var SPAN_Q_OPP = SPAN_Q_VAL + 1; |
| 1401 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1402 | var SPAN_K_W = SPAN_Y3 + 1; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1403 | var SPAN_K_TX = SPAN_K_W + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1404 | var SPAN_K_TY = SPAN_K_TX + 1; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1405 | var SPAN_K_OTHER = SPAN_K_TY + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1406 | var SPAN_K_OTHERT = SPAN_K_OTHER + 1; |
| 1407 | var SPAN_K_OTHERI = SPAN_K_OTHERT + 1; |
| 1408 | var SPAN_K_SUM = SPAN_K_OTHERI + 1; |
| 1409 | var SPAN_K_VAL = SPAN_K_SUM + 1; |
| 1410 | var SPAN_K_OPP = SPAN_K_VAL + 1; |
| 1411 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1412 | var SPAN_X4 = SPAN_Y3 + 1; |
| 1413 | var SPAN_Y4 = SPAN_X4 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1414 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1415 | var SPAN_C_TX = SPAN_Y4 + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1416 | var SPAN_C_TY = SPAN_C_TX + 1; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1417 | var SPAN_C_OTHER = SPAN_C_TY + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1418 | var SPAN_C_OTHERT = SPAN_C_OTHER + 1; |
| 1419 | var SPAN_C_OTHERI = SPAN_C_OTHERT + 1; |
| 1420 | var SPAN_C_SUM = SPAN_C_OTHERI + 1; |
| 1421 | var SPAN_C_VAL = SPAN_C_SUM + 1; |
| 1422 | var SPAN_C_OPP = SPAN_C_VAL + 1; |
| 1423 | |
| 1424 | var ACTIVE_LINE_SPAN = 1; |
| 1425 | var ACTIVE_QUAD_SPAN = ACTIVE_LINE_SPAN + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1426 | var ACTIVE_CONIC_SPAN = ACTIVE_QUAD_SPAN + 1; |
| 1427 | var ACTIVE_CUBIC_SPAN = ACTIVE_CONIC_SPAN + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1428 | |
| 1429 | var ADD_MOVETO = ACTIVE_CUBIC_SPAN + 1; |
| 1430 | var ADD_LINETO = ADD_MOVETO + 1; |
| 1431 | var ADD_QUADTO = ADD_LINETO + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1432 | var ADD_CONICTO = ADD_QUADTO + 1; |
| 1433 | var ADD_CUBICTO = ADD_CONICTO + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1434 | var ADD_CLOSE = ADD_CUBICTO + 1; |
| 1435 | var ADD_FILL = ADD_CLOSE + 1; |
| 1436 | |
| 1437 | var PATH_LINE = ADD_FILL + 1; |
| 1438 | var PATH_QUAD = PATH_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1439 | var PATH_CONIC = PATH_QUAD + 1; |
| 1440 | var PATH_CUBIC = PATH_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1441 | |
| 1442 | var INTERSECT_LINE = PATH_CUBIC + 1; |
| 1443 | var INTERSECT_LINE_2 = INTERSECT_LINE + 1; |
| 1444 | var INTERSECT_LINE_NO = INTERSECT_LINE_2 + 1; |
| 1445 | var INTERSECT_QUAD_LINE = INTERSECT_LINE_NO + 1; |
| 1446 | var INTERSECT_QUAD_LINE_2 = INTERSECT_QUAD_LINE + 1; |
| 1447 | var INTERSECT_QUAD_LINE_NO = INTERSECT_QUAD_LINE_2 + 1; |
| 1448 | var INTERSECT_QUAD = INTERSECT_QUAD_LINE_NO + 1; |
| 1449 | var INTERSECT_QUAD_2 = INTERSECT_QUAD + 1; |
| 1450 | var INTERSECT_QUAD_NO = INTERSECT_QUAD_2 + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1451 | var INTERSECT_CONIC_LINE = INTERSECT_QUAD_NO + 1; |
| 1452 | var INTERSECT_CONIC_LINE_2 = INTERSECT_CONIC_LINE + 1; |
| 1453 | var INTERSECT_CONIC_LINE_NO = INTERSECT_CONIC_LINE_2 + 1; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1454 | var INTERSECT_CONIC_QUAD = INTERSECT_CONIC_LINE_NO + 1; |
| 1455 | var INTERSECT_CONIC_QUAD_2 = INTERSECT_CONIC_QUAD + 1; |
caryclark | 6c3b9cd | 2016-09-26 05:36:58 -0700 | [diff] [blame] | 1456 | var INTERSECT_CONIC_QUAD_3 = INTERSECT_CONIC_QUAD_2 + 1; |
| 1457 | var INTERSECT_CONIC_QUAD_4 = INTERSECT_CONIC_QUAD_3 + 1; |
| 1458 | var INTERSECT_CONIC_QUAD_NO = INTERSECT_CONIC_QUAD_4 + 1; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1459 | var INTERSECT_CONIC = INTERSECT_CONIC_QUAD_NO + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1460 | var INTERSECT_CONIC_2 = INTERSECT_CONIC + 1; |
| 1461 | var INTERSECT_CONIC_NO = INTERSECT_CONIC_2 + 1; |
| 1462 | var INTERSECT_SELF_CUBIC = INTERSECT_CONIC_NO + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1463 | var INTERSECT_SELF_CUBIC_NO = INTERSECT_SELF_CUBIC + 1; |
| 1464 | var INTERSECT_CUBIC_LINE = INTERSECT_SELF_CUBIC_NO + 1; |
| 1465 | var INTERSECT_CUBIC_LINE_2 = INTERSECT_CUBIC_LINE + 1; |
| 1466 | var INTERSECT_CUBIC_LINE_3 = INTERSECT_CUBIC_LINE_2 + 1; |
| 1467 | var INTERSECT_CUBIC_LINE_NO = INTERSECT_CUBIC_LINE_3 + 1; |
| 1468 | var INTERSECT_CUBIC_QUAD = INTERSECT_CUBIC_LINE_NO + 1; |
| 1469 | var INTERSECT_CUBIC_QUAD_2 = INTERSECT_CUBIC_QUAD + 1; |
| 1470 | var INTERSECT_CUBIC_QUAD_3 = INTERSECT_CUBIC_QUAD_2 + 1; |
| 1471 | var INTERSECT_CUBIC_QUAD_4 = INTERSECT_CUBIC_QUAD_3 + 1; |
| 1472 | var INTERSECT_CUBIC_QUAD_NO = INTERSECT_CUBIC_QUAD_4 + 1; |
| 1473 | var INTERSECT_CUBIC = INTERSECT_CUBIC_QUAD_NO + 1; |
| 1474 | var INTERSECT_CUBIC_2 = INTERSECT_CUBIC + 1; |
| 1475 | var INTERSECT_CUBIC_3 = INTERSECT_CUBIC_2 + 1; |
| 1476 | var INTERSECT_CUBIC_4 = INTERSECT_CUBIC_3 + 1; |
| 1477 | // FIXME: add cubic 5- 9 |
| 1478 | var INTERSECT_CUBIC_NO = INTERSECT_CUBIC_4 + 1; |
| 1479 | |
| 1480 | var SORT_UNARY = INTERSECT_CUBIC_NO + 1; |
| 1481 | var SORT_BINARY = SORT_UNARY + 1; |
| 1482 | |
| 1483 | var OP_DIFFERENCE = SORT_BINARY + 1; |
| 1484 | var OP_INTERSECT = OP_DIFFERENCE + 1; |
| 1485 | var OP_UNION = OP_INTERSECT + 1; |
| 1486 | var OP_XOR = OP_UNION + 1; |
| 1487 | |
| 1488 | var MARK_LINE = OP_XOR + 1; |
| 1489 | var MARK_QUAD = MARK_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1490 | var MARK_CONIC = MARK_QUAD + 1; |
| 1491 | var MARK_CUBIC = MARK_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1492 | var MARK_DONE_LINE = MARK_CUBIC + 1; |
| 1493 | var MARK_DONE_QUAD = MARK_DONE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1494 | var MARK_DONE_CONIC = MARK_DONE_QUAD + 1; |
| 1495 | var MARK_DONE_CUBIC = MARK_DONE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1496 | var MARK_UNSORTABLE_LINE = MARK_DONE_CUBIC + 1; |
| 1497 | var MARK_UNSORTABLE_QUAD = MARK_UNSORTABLE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1498 | var MARK_UNSORTABLE_CONIC = MARK_UNSORTABLE_QUAD + 1; |
| 1499 | var MARK_UNSORTABLE_CUBIC = MARK_UNSORTABLE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1500 | var MARK_SIMPLE_LINE = MARK_UNSORTABLE_CUBIC + 1; |
| 1501 | var MARK_SIMPLE_QUAD = MARK_SIMPLE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1502 | var MARK_SIMPLE_CONIC = MARK_SIMPLE_QUAD + 1; |
| 1503 | var MARK_SIMPLE_CUBIC = MARK_SIMPLE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1504 | var MARK_SIMPLE_DONE_LINE = MARK_SIMPLE_CUBIC + 1; |
| 1505 | var MARK_SIMPLE_DONE_QUAD = MARK_SIMPLE_DONE_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1506 | var MARK_SIMPLE_DONE_CONIC = MARK_SIMPLE_DONE_QUAD + 1; |
| 1507 | var MARK_SIMPLE_DONE_CUBIC = MARK_SIMPLE_DONE_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1508 | var MARK_DONE_UNARY_LINE = MARK_SIMPLE_DONE_CUBIC + 1; |
| 1509 | var MARK_DONE_UNARY_QUAD = MARK_DONE_UNARY_LINE + 1; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1510 | var MARK_DONE_UNARY_CONIC = MARK_DONE_UNARY_QUAD + 1; |
| 1511 | var MARK_DONE_UNARY_CUBIC = MARK_DONE_UNARY_CONIC + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1512 | var MARK_ANGLE_LAST = MARK_DONE_UNARY_CUBIC + 1; |
| 1513 | |
| 1514 | var COMPUTED_SET_1 = MARK_ANGLE_LAST + 1; |
| 1515 | var COMPUTED_SET_2 = COMPUTED_SET_1 + 1; |
| 1516 | |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1517 | var ANGLE_AFTER = COMPUTED_SET_2 + 1; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1518 | var ANGLE_AFTERPART = ANGLE_AFTER + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1519 | |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1520 | var ACTIVE_OP = ANGLE_AFTERPART + 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1521 | |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1522 | var COIN_MAIN_SPAN = ACTIVE_OP + 1; |
| 1523 | var COIN_OPP_SPAN = COIN_MAIN_SPAN + 1; |
| 1524 | |
| 1525 | var FRAG_TYPE_LAST = COIN_OPP_SPAN; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1526 | |
| 1527 | var REC_TYPE_UNKNOWN = -1; |
| 1528 | var REC_TYPE_PATH = 0; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1529 | var REC_TYPE_PATH2 = 1; |
| 1530 | var REC_TYPE_SECT = 2; |
| 1531 | var REC_TYPE_ACTIVE = 3; |
| 1532 | var REC_TYPE_ADD = 4; |
| 1533 | var REC_TYPE_SORT = 5; |
| 1534 | var REC_TYPE_OP = 6; |
| 1535 | var REC_TYPE_MARK = 7; |
| 1536 | var REC_TYPE_COMPUTED = 8; |
| 1537 | var REC_TYPE_COIN = 9; |
| 1538 | var REC_TYPE_ANGLE = 10; |
| 1539 | var REC_TYPE_ACTIVE_OP = 11; |
| 1540 | var REC_TYPE_AFTERPART = 12; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1541 | var REC_TYPE_TOP = 13; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1542 | var REC_TYPE_COINCIDENCE = 14; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1543 | var REC_TYPE_ALIGNED = 15; |
| 1544 | var REC_TYPE_LAST = REC_TYPE_ALIGNED; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1545 | |
| 1546 | function strs_to_nums(strs) { |
| 1547 | var result = []; |
| 1548 | for (var idx = 1; idx < strs.length; ++idx) { |
| 1549 | var str = strs[idx]; |
| 1550 | var num = parseFloat(str); |
| 1551 | if (isNaN(num)) { |
| 1552 | result.push(str); |
| 1553 | } else { |
| 1554 | result.push(num); |
| 1555 | } |
| 1556 | } |
| 1557 | return result; |
| 1558 | } |
| 1559 | |
| 1560 | function filter_str_by(id, str, regex, array) { |
| 1561 | if (regex.test(str)) { |
| 1562 | var strs = regex.exec(str); |
| 1563 | var result = strs_to_nums(strs); |
| 1564 | array.push(id); |
| 1565 | array.push(result); |
| 1566 | return true; |
| 1567 | } |
| 1568 | return false; |
| 1569 | } |
| 1570 | |
| 1571 | function construct_regexp2(pattern) { |
| 1572 | var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); |
| 1573 | escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); |
| 1574 | escape = escape.replace(/CUBIC_VAL/g, "\\(P_VAL P_VAL P_VAL P_VAL\\)"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1575 | escape = escape.replace(/CONIC_VAL/g, "\\(P_VAL P_VAL P_VAL W_VAL\\)"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1576 | escape = escape.replace(/QUAD_VAL/g, "\\(P_VAL P_VAL P_VAL\\)"); |
| 1577 | escape = escape.replace(/LINE_VAL/g, "\\(P_VAL P_VAL\\)"); |
| 1578 | escape = escape.replace(/FILL_TYPE/g, "SkPath::k[a-zA-Z]+_FillType"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1579 | escape = escape.replace(/PTR_VAL/g, "0x[0-9A-F]+"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1580 | escape = escape.replace(/PT_VAL/g, "\\(P_VAL\\)"); |
| 1581 | escape = escape.replace(/P_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?, ?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
| 1582 | escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1583 | escape = escape.replace(/W_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1584 | escape = escape.replace(/PATH/g, "pathB?"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1585 | escape = escape.replace(/IDX/g, "(-?\\d+)"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1586 | escape = escape.replace(/NUM/g, "(-?\\d+)"); |
| 1587 | escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); |
| 1588 | return new RegExp(escape, 'i'); |
| 1589 | } |
| 1590 | |
| 1591 | function construct_regexp2c(pattern) { |
| 1592 | var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); |
| 1593 | escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1594 | escape = escape.replace(/CUBIC_VAL/g, "(?:\\$\\d = )?\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1595 | escape = escape.replace(/CONIC_VAL/g, "(?:\\$\\d = )?\\{\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}, W_VAL\\}"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1596 | escape = escape.replace(/QUAD_VAL/g, "(?:\\$\\d = )?\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}"); |
| 1597 | escape = escape.replace(/LINE_VAL/g, "(?:\\$\\d = )?\\{\\{\\{P_VAL\\}, \\{P_VAL\\}\\}\\}"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1598 | escape = escape.replace(/FILL_TYPE/g, "SkPath::k[a-zA-Z]+_FillType"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1599 | escape = escape.replace(/PTR_VAL/g, "0x[0-9A-F]+"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1600 | escape = escape.replace(/PT_VAL/g, "\\{\\{P_VAL\\}\\}"); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1601 | escape = escape.replace(/P_VAL/g, "(?:f?[xX] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?, *(?: f?[yY] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1602 | escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1603 | escape = escape.replace(/W_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1604 | escape = escape.replace(/OPER/g, "[a-z]+"); |
| 1605 | escape = escape.replace(/PATH/g, "pathB?"); |
| 1606 | escape = escape.replace(/T_F/g, "([TF])"); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1607 | escape = escape.replace(/IDX/g, "(-?\\d+)"); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1608 | escape = escape.replace(/NUM/g, "(-?\\d+)"); |
| 1609 | escape = escape.replace(/OPT/g, "(\\?|-?\\d+)"); |
| 1610 | return new RegExp(escape, 'i'); |
| 1611 | } |
| 1612 | |
| 1613 | function match_regexp(str, lineNo, array, id, pattern) { |
| 1614 | var regex = construct_regexp2(pattern); |
| 1615 | if (filter_str_by(id, str, regex, array)) { |
| 1616 | return true; |
| 1617 | } |
| 1618 | regex = construct_regexp2c(pattern); |
| 1619 | return filter_str_by(id, str, regex, array); |
| 1620 | } |
| 1621 | |
| 1622 | function endsWith(str, suffix) { |
| 1623 | return str.indexOf(suffix, str.length - suffix.length) !== -1; |
| 1624 | } |
| 1625 | |
| 1626 | function parse_all(test) { |
| 1627 | var lines = test.match(/[^\r\n]+/g); |
| 1628 | var records = []; // a rec can be the original paths, a set of intersections, a set of active spans, a sort, or a path add |
| 1629 | var record = []; |
| 1630 | var recType = REC_TYPE_UNKNOWN; |
| 1631 | var lastLineNo; |
| 1632 | var moveX, moveY; |
| 1633 | for (var lineNo = 0; lineNo < lines.length; ++lineNo) { |
| 1634 | var line = lines[lineNo]; |
| 1635 | if (line.length == 0) { |
| 1636 | continue; |
| 1637 | } |
| 1638 | var opStart = "SkOpSegment::"; |
| 1639 | if (line.lastIndexOf(opStart, 0) === 0) { |
| 1640 | line = line.substr(opStart.length); |
| 1641 | } |
| 1642 | var angleStart = "SkOpAngle::"; |
| 1643 | if (line.lastIndexOf(angleStart, 0) === 0) { |
| 1644 | line = line.substr(angleStart.length); |
| 1645 | } |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1646 | var coinStart = "SkOpCoincidence::"; |
| 1647 | if (line.lastIndexOf(coinStart, 0) === 0) { |
| 1648 | line = line.substr(coinStart.length); |
| 1649 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1650 | var type = line.lastIndexOf("debugShowActiveSpans", 0) === 0 ? REC_TYPE_ACTIVE |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1651 | : line.lastIndexOf("debugShowCoincidence", 0) === 0 ? REC_TYPE_COINCIDENCE |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1652 | : line.lastIndexOf("((SkOpSegment*)", 0) === 0 ? REC_TYPE_PATH2 |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1653 | : line.lastIndexOf("debugShowTs", 0) === 0 ? REC_TYPE_COIN |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1654 | : line.lastIndexOf("afterPart", 0) === 0 ? REC_TYPE_AFTERPART |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1655 | : line.lastIndexOf("debugShow", 0) === 0 ? REC_TYPE_SECT |
| 1656 | : line.lastIndexOf("activeOp", 0) === 0 ? REC_TYPE_ACTIVE_OP |
| 1657 | : line.lastIndexOf("computed", 0) === 0 ? REC_TYPE_COMPUTED |
| 1658 | : line.lastIndexOf("debugOne", 0) === 0 ? REC_TYPE_SORT |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1659 | : line.lastIndexOf("aligned=", 0) === 0 ? REC_TYPE_ALIGNED |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1660 | : line.lastIndexOf("dumpOne", 0) === 0 ? REC_TYPE_SORT |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1661 | : line.lastIndexOf("findTop", 0) === 0 ? REC_TYPE_TOP |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1662 | : line.lastIndexOf("pathB.", 0) === 0 ? REC_TYPE_ADD |
| 1663 | : line.lastIndexOf("path.", 0) === 0 ? REC_TYPE_ADD |
| 1664 | : line.lastIndexOf("after", 0) === 0 ? REC_TYPE_ANGLE |
| 1665 | : line.lastIndexOf("mark", 0) === 0 ? REC_TYPE_MARK |
| 1666 | : line.lastIndexOf(" {{", 0) === 0 ? REC_TYPE_COMPUTED |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1667 | : line.lastIndexOf("seg=", 0) === 0 ? REC_TYPE_PATH |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1668 | : line.lastIndexOf("op", 0) === 0 ? REC_TYPE_OP |
| 1669 | : line.lastIndexOf("$", 0) === 0 ? REC_TYPE_PATH |
| 1670 | : REC_TYPE_UNKNOWN; |
| 1671 | if (recType != type || recType == REC_TYPE_ADD || recType == REC_TYPE_SECT |
| 1672 | || recType == REC_TYPE_ACTIVE_OP || recType == REC_TYPE_ANGLE) { |
| 1673 | if (recType != REC_TYPE_UNKNOWN) { |
| 1674 | records.push(recType); |
| 1675 | records.push(lastLineNo); |
| 1676 | records.push(record); |
| 1677 | } |
| 1678 | record = []; |
| 1679 | recType = type; |
| 1680 | lastLineNo = lineNo; |
| 1681 | } |
| 1682 | var found = false; |
| 1683 | switch (recType) { |
| 1684 | case REC_TYPE_ACTIVE: |
| 1685 | found = match_regexp(line, lineNo, record, ACTIVE_LINE_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1686 | " id=IDX LINE_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1687 | ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1688 | " id=IDX QUAD_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1689 | ) || match_regexp(line, lineNo, record, ACTIVE_CONIC_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1690 | " id=IDX CONIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1691 | ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1692 | " id=IDX CUBIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX" |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1693 | ) || match_regexp(line, lineNo, record, ACTIVE_LINE_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1694 | " id=IDX LINE_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1695 | ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1696 | " id=IDX QUAD_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1697 | ) || match_regexp(line, lineNo, record, ACTIVE_CONIC_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1698 | " id=IDX CONIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1699 | ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1700 | " id=IDX CUBIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1701 | ); |
| 1702 | break; |
| 1703 | case REC_TYPE_ACTIVE_OP: |
| 1704 | found = match_regexp(line, lineNo, record, ACTIVE_OP, "activeOp" + |
| 1705 | " id=IDX t=T_VAL tEnd=T_VAL op=OPER miFrom=NUM miTo=NUM suFrom=NUM suTo=NUM result=IDX" |
| 1706 | ); |
| 1707 | break; |
| 1708 | case REC_TYPE_ADD: |
| 1709 | if (match_regexp(line, lineNo, record, ADD_MOVETO, "PATH.moveTo(P_VAL);")) { |
| 1710 | moveX = record[1][0]; |
| 1711 | moveY = record[1][1]; |
| 1712 | found = true; |
| 1713 | } else if (match_regexp(line, lineNo, record, ADD_LINETO, "PATH.lineTo(P_VAL);")) { |
| 1714 | record[1].unshift(moveY); |
| 1715 | record[1].unshift(moveX); |
| 1716 | moveX = record[1][2]; |
| 1717 | moveY = record[1][3]; |
| 1718 | found = true; |
| 1719 | } else if (match_regexp(line, lineNo, record, ADD_QUADTO, "PATH.quadTo(P_VAL, P_VAL);")) { |
| 1720 | record[1].unshift(moveY); |
| 1721 | record[1].unshift(moveX); |
| 1722 | moveX = record[1][4]; |
| 1723 | moveY = record[1][5]; |
| 1724 | found = true; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1725 | } else if (match_regexp(line, lineNo, record, ADD_CONICTO, "PATH.conicTo(P_VAL, P_VAL, T_VAL);")) { |
| 1726 | record[1].unshift(moveY); |
| 1727 | record[1].unshift(moveX); |
| 1728 | moveX = record[1][4]; |
| 1729 | moveY = record[1][5]; |
| 1730 | found = true; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1731 | } else if (match_regexp(line, lineNo, record, ADD_CUBICTO, "PATH.cubicTo(P_VAL, P_VAL, P_VAL);")) { |
| 1732 | record[1].unshift(moveY); |
| 1733 | record[1].unshift(moveX); |
| 1734 | moveX = record[1][6]; |
| 1735 | moveY = record[1][7]; |
| 1736 | found = true; |
| 1737 | } else if (match_regexp(line, lineNo, record, ADD_FILL, "PATH.setFillType(FILL_TYPE);")) { |
| 1738 | found = true; |
| 1739 | } else { |
| 1740 | found = match_regexp(line, lineNo, record, ADD_CLOSE, "PATH.close();"); |
| 1741 | } |
| 1742 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1743 | case REC_TYPE_AFTERPART: |
| 1744 | found = match_regexp(line, lineNo, record, PATH_LINE, "afterPart LINE_VAL") |
| 1745 | || match_regexp(line, lineNo, record, PATH_QUAD, "afterPart QUAD_VAL") |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1746 | || match_regexp(line, lineNo, record, PATH_CONIC, "afterPart CONIC_VAL") |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1747 | || match_regexp(line, lineNo, record, PATH_CUBIC, "afterPart CUBIC_VAL") |
| 1748 | break; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1749 | case REC_TYPE_ALIGNED: |
| 1750 | found = match_regexp(line, lineNo, record, PATH_LINE, "aligned=IDX LINE_VAL" |
| 1751 | ) || match_regexp(line, lineNo, record, PATH_QUAD, "aligned=IDX QUAD_VAL" |
| 1752 | ) || match_regexp(line, lineNo, record, PATH_CONIC, "aligned=IDX CONIC_VAL" |
| 1753 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, "aligned=IDX CUBIC_VAL" |
| 1754 | ); |
| 1755 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1756 | case REC_TYPE_ANGLE: |
| 1757 | found = match_regexp(line, lineNo, record, ANGLE_AFTER, "after " + |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1758 | "[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"); |
| 1759 | break; |
| 1760 | case REC_TYPE_COIN: |
| 1761 | found = true; |
| 1762 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 1763 | case REC_TYPE_COINCIDENCE: |
| 1764 | found = match_regexp(line, lineNo, record, COIN_MAIN_SPAN, "debugShowCoincidence" + |
| 1765 | " + id=IDX t=T_VAL tEnd=T_VAL" |
| 1766 | ) || match_regexp(line, lineNo, record, COIN_OPP_SPAN, "debugShowCoincidence" + |
| 1767 | " - id=IDX t=T_VAL tEnd=T_VAL" |
| 1768 | ); |
| 1769 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1770 | case REC_TYPE_COMPUTED: |
| 1771 | found = line == "computed quadratics given" |
| 1772 | || match_regexp(line, lineNo, record, COMPUTED_SET_1, "computed quadratics set 1" |
| 1773 | ) || match_regexp(line, lineNo, record, COMPUTED_SET_2, "computed quadratics set 2" |
| 1774 | ) || match_regexp(line, lineNo, record, PATH_QUAD, " QUAD_VAL," |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1775 | ) || match_regexp(line, lineNo, record, PATH_CONIC, " CONIC_VAL," |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1776 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, " CUBIC_VAL," |
| 1777 | ); |
| 1778 | break; |
| 1779 | case REC_TYPE_PATH: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1780 | found = match_regexp(line, lineNo, record, PATH_LINE, "seg=IDX LINE_VAL" |
| 1781 | ) || match_regexp(line, lineNo, record, PATH_QUAD, "seg=IDX QUAD_VAL" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1782 | ) || match_regexp(line, lineNo, record, PATH_CONIC, "seg=IDX CONIC_VAL" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1783 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, "seg=IDX CUBIC_VAL" |
| 1784 | ); |
| 1785 | break; |
| 1786 | case REC_TYPE_PATH2: |
| 1787 | found = match_regexp(line, lineNo, record, PATH_LINE, "((SkOpSegment*) PTR_VAL) [IDX] {LINE_VAL}" |
| 1788 | ) || match_regexp(line, lineNo, record, PATH_QUAD, "((SkOpSegment*) PTR_VAL) [IDX] {QUAD_VAL}" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1789 | ) || match_regexp(line, lineNo, record, PATH_CONIC, "((SkOpSegment*) PTR_VAL) [IDX] {CONIC_VAL}" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1790 | ) || match_regexp(line, lineNo, record, PATH_CUBIC, "((SkOpSegment*) PTR_VAL) [IDX] {CUBIC_VAL}" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1791 | ); |
| 1792 | break; |
| 1793 | case REC_TYPE_SECT: |
| 1794 | found = match_regexp(line, lineNo, record, INTERSECT_LINE, "debugShowLineIntersection" + |
| 1795 | " wtTs[0]=T_VAL LINE_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1796 | ) || match_regexp(line, lineNo, record, INTERSECT_LINE_2, "debugShowLineIntersection" + |
| 1797 | " wtTs[0]=T_VAL LINE_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1798 | ) || match_regexp(line, lineNo, record, INTERSECT_LINE_NO, "debugShowLineIntersection" + |
| 1799 | " no intersect LINE_VAL LINE_VAL" |
| 1800 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE, "debugShowQuadLineIntersection" + |
| 1801 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1802 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_2, "debugShowQuadLineIntersection" + |
| 1803 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1804 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_LINE_NO, "debugShowQuadLineIntersection" + |
| 1805 | " no intersect QUAD_VAL LINE_VAL" |
| 1806 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD, "debugShowQuadIntersection" + |
| 1807 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL" |
| 1808 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_2, "debugShowQuadIntersection" + |
| 1809 | " wtTs[0]=T_VAL QUAD_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL" |
| 1810 | ) || match_regexp(line, lineNo, record, INTERSECT_QUAD_NO, "debugShowQuadIntersection" + |
| 1811 | " no intersect QUAD_VAL QUAD_VAL" |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1812 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1813 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_LINE, "debugShowConicLineIntersection" + |
| 1814 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1815 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_LINE_2, "debugShowConicLineIntersection" + |
| 1816 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1817 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_LINE_NO, "debugShowConicLineIntersection" + |
| 1818 | " no intersect CONIC_VAL LINE_VAL" |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1819 | |
| 1820 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_QUAD, "debugShowConicQuadIntersection" + |
| 1821 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL" |
| 1822 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_QUAD_2, "debugShowConicQuadIntersection" + |
| 1823 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL" |
caryclark | 6c3b9cd | 2016-09-26 05:36:58 -0700 | [diff] [blame] | 1824 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_QUAD_3, "debugShowConicQuadIntersection" + |
| 1825 | " wtTs[0]=T_VAL CONIC_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" |
| 1826 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_QUAD_4, "debugShowConicQuadIntersection" + |
| 1827 | " wtTs[0]=T_VAL CONIC_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 QUAD_VAL wnTs[1]=T_VAL wnTs[2]=T_VAL wnTs[3]=T_VAL" |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1828 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_QUAD_NO, "debugShowConicQuadIntersection" + |
| 1829 | " no intersect CONIC_VAL QUAD_VAL" |
| 1830 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1831 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC, "debugShowConicIntersection" + |
| 1832 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wnTs[0]=T_VAL CONIC_VAL" |
| 1833 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_2, "debugShowConicIntersection" + |
| 1834 | " wtTs[0]=T_VAL CONIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL CONIC_VAL wnTs[1]=T_VAL" |
| 1835 | ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_NO, "debugShowConicIntersection" + |
| 1836 | " no intersect CONIC_VAL CONIC_VAL" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1837 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE, "debugShowCubicLineIntersection" + |
| 1838 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL" |
| 1839 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_2, "debugShowCubicLineIntersection" + |
| 1840 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL LINE_VAL wnTs[1]=T_VAL" |
| 1841 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_3, "debugShowCubicLineIntersection" + |
| 1842 | " 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" |
| 1843 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_LINE_NO, "debugShowCubicLineIntersection" + |
| 1844 | " no intersect CUBIC_VAL LINE_VAL" |
| 1845 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD, "debugShowCubicQuadIntersection" + |
| 1846 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL" |
| 1847 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_2, "debugShowCubicQuadIntersection" + |
| 1848 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL QUAD_VAL wnTs[1]=T_VAL" |
| 1849 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_3, "debugShowCubicQuadIntersection" + |
| 1850 | " 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" |
| 1851 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_4, "debugShowCubicQuadIntersection" + |
| 1852 | " 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" |
| 1853 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_QUAD_NO, "debugShowCubicQuadIntersection" + |
| 1854 | " no intersect CUBIC_VAL QUAD_VAL" |
| 1855 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC, "debugShowCubicIntersection" + |
| 1856 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL" |
| 1857 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_2, "debugShowCubicIntersection" + |
| 1858 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL PT_VAL wnTs[0]=T_VAL CUBIC_VAL wnTs[1]=T_VAL" |
| 1859 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_3, "debugShowCubicIntersection" + |
| 1860 | " 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" |
| 1861 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_4, "debugShowCubicIntersection" + |
| 1862 | " 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" |
| 1863 | ) || match_regexp(line, lineNo, record, INTERSECT_CUBIC_NO, "debugShowCubicIntersection" + |
| 1864 | " no intersect CUBIC_VAL CUBIC_VAL" |
| 1865 | ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC, "debugShowCubicIntersection" + |
| 1866 | " wtTs[0]=T_VAL CUBIC_VAL PT_VAL wtTs[1]=T_VAL" |
| 1867 | ) || match_regexp(line, lineNo, record, INTERSECT_SELF_CUBIC_NO, "debugShowCubicIntersection" + |
| 1868 | " no self intersect CUBIC_VAL" |
| 1869 | ); |
| 1870 | break; |
| 1871 | case REC_TYPE_SORT: |
| 1872 | var hasDone = / done/.test(line); |
| 1873 | var hasUnorderable = / unorderable/.test(line); |
| 1874 | var hasSmall = / small/.test(line); |
| 1875 | var hasTiny = / tiny/.test(line); |
| 1876 | var hasOperand = / operand/.test(line); |
| 1877 | var hasStop = / stop/.test(line); |
| 1878 | line.replace(/[ a-z]+$/, ""); |
| 1879 | found = match_regexp(line, lineNo, record, SORT_UNARY, "debugOne" + |
| 1880 | " [IDX/IDX] next=IDX/IDX sect=IDX/IDX s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT" |
| 1881 | ) || match_regexp(line, lineNo, record, SORT_BINARY, "debugOne" + |
| 1882 | " [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" |
| 1883 | ) || match_regexp(line, lineNo, record, SORT_UNARY, "dumpOne" + |
| 1884 | " [IDX/IDX] next=IDX/IDX sect=NUM/NUM s=T_VAL [IDX] e=T_VAL [IDX] sgn=NUM windVal=IDX windSum=OPT" |
| 1885 | ) || match_regexp(line, lineNo, record, SORT_BINARY, "dumpOne" + |
| 1886 | " [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" |
| 1887 | ); |
| 1888 | if (found) { |
| 1889 | record[1].push(hasDone); |
| 1890 | record[1].push(hasUnorderable); |
| 1891 | record[1].push(hasSmall); |
| 1892 | record[1].push(hasTiny); |
| 1893 | record[1].push(hasOperand); |
| 1894 | record[1].push(hasStop); |
| 1895 | } |
| 1896 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 1897 | case REC_TYPE_TOP: |
| 1898 | found = match_regexp(line, lineNo, record, ACTIVE_OP, "findTop" + |
| 1899 | " id=IDX s=T_VAL e=T_VAL cw=NUM swap=NUM inflections=NUM monotonic=NUM" |
| 1900 | ) || match_regexp(line, lineNo, record, ACTIVE_OP, "findTop" + |
| 1901 | " id=IDX s=T_VAL e=T_VAL (-) cw=NUM swap=NUM inflections=NUM monotonic=NUM" |
| 1902 | ) || match_regexp(line, lineNo, record, ACTIVE_OP, "findTop" + |
| 1903 | " id=IDX s=T_VAL e=T_VAL (+) cw=NUM swap=NUM inflections=NUM monotonic=NUM" |
| 1904 | ); |
| 1905 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1906 | case REC_TYPE_MARK: |
| 1907 | found = match_regexp(line, lineNo, record, MARK_LINE, "markWinding" + |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1908 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1909 | ) || match_regexp(line, lineNo, record, MARK_QUAD, "markWinding" + |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1910 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1911 | ) || match_regexp(line, lineNo, record, MARK_CONIC, "markWinding" + |
| 1912 | " id=IDX CONIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1913 | ) || match_regexp(line, lineNo, record, MARK_CUBIC, "markWinding" + |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1914 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX" |
| 1915 | ) || match_regexp(line, lineNo, record, MARK_DONE_LINE, "markDone" + |
| 1916 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
| 1917 | ) || match_regexp(line, lineNo, record, MARK_DONE_QUAD, "markDone" + |
| 1918 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1919 | ) || match_regexp(line, lineNo, record, MARK_DONE_CONIC, "markDone" + |
| 1920 | " id=IDX CONIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1921 | ) || match_regexp(line, lineNo, record, MARK_DONE_CUBIC, "markDone" + |
| 1922 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=OPT newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX oppValue=OPT" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1923 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_LINE, "markWinding" + |
| 1924 | " id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
| 1925 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_QUAD, "markWinding" + |
| 1926 | " id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1927 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_CONIC, "markWinding" + |
| 1928 | " id=IDX CONIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1929 | ) || match_regexp(line, lineNo, record, MARK_SIMPLE_CUBIC, "markWinding" + |
| 1930 | " id=IDX CUBIC_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM windSum=OPT windValue=IDX" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1931 | ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" + |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 1932 | " last segment=IDX span=IDX" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1933 | ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" + |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 1934 | " last seg=IDX span=IDX" |
| 1935 | ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" + |
| 1936 | " last segment=IDX span=IDX windSum=OPT" |
| 1937 | ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" + |
| 1938 | " last seg=IDX span=IDX windSum=OPT" |
| 1939 | ); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1940 | break; |
| 1941 | case REC_TYPE_OP: |
| 1942 | if (line.lastIndexOf("oppSign oppSign=", 0) === 0 |
| 1943 | || line.lastIndexOf("operator<", 0) === 0) { |
| 1944 | found = true; |
| 1945 | break; |
| 1946 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1947 | found = match_regexp(line, lineNo, record, OP_DIFFERENCE, "op diff" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1948 | ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op intersect" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 1949 | ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op sect" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1950 | ) || match_regexp(line, lineNo, record, OP_UNION, "op union" |
| 1951 | ) || match_regexp(line, lineNo, record, OP_XOR, "op xor" |
| 1952 | ); |
| 1953 | break; |
| 1954 | case REC_TYPE_UNKNOWN: |
| 1955 | found = true; |
| 1956 | break; |
| 1957 | } |
| 1958 | if (!found) { |
| 1959 | console.log(line + " [" + lineNo + "] of type " + type + " not found"); |
| 1960 | } |
| 1961 | } |
| 1962 | if (recType != REC_TYPE_UNKNOWN) { |
| 1963 | records.push(recType); |
| 1964 | records.push(lastLineNo); |
| 1965 | records.push(record); |
| 1966 | } |
| 1967 | if (records.length >= 1) { |
| 1968 | tests[testIndex] = records; |
| 1969 | testLines[testIndex] = lines; |
| 1970 | } |
| 1971 | } |
| 1972 | |
| 1973 | function init(test) { |
| 1974 | var canvas = document.getElementById('canvas'); |
| 1975 | if (!canvas.getContext) return; |
| 1976 | ctx = canvas.getContext('2d'); |
| 1977 | var resScale = retina_scale && window.devicePixelRatio ? window.devicePixelRatio : 1; |
| 1978 | var unscaledWidth = window.innerWidth - 20; |
| 1979 | var unscaledHeight = window.innerHeight - 20; |
| 1980 | screenWidth = unscaledWidth; |
| 1981 | screenHeight = unscaledHeight; |
| 1982 | canvas.width = unscaledWidth * resScale; |
| 1983 | canvas.height = unscaledHeight * resScale; |
| 1984 | canvas.style.width = unscaledWidth + 'px'; |
| 1985 | canvas.style.height = unscaledHeight + 'px'; |
| 1986 | if (resScale != 1) { |
| 1987 | ctx.scale(resScale, resScale); |
| 1988 | } |
| 1989 | xmin = Infinity; |
| 1990 | xmax = -Infinity; |
| 1991 | ymin = Infinity; |
| 1992 | ymax = -Infinity; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 1993 | hasPath = hasAlignedPath = hasComputedPath = false; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 1994 | firstActiveSpan = -1; |
| 1995 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 1996 | var recType = test[tIndex]; |
| 1997 | if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { |
| 1998 | console.log("unknown rec type: " + recType); |
| 1999 | throw "stop execution"; |
| 2000 | } |
| 2001 | var records = test[tIndex + 2]; |
| 2002 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 2003 | var fragType = records[recordIndex]; |
| 2004 | if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { |
| 2005 | console.log("unknown in range frag type: " + fragType); |
| 2006 | throw "stop execution"; |
| 2007 | } |
| 2008 | var frags = records[recordIndex + 1]; |
| 2009 | var first = 0; |
| 2010 | var last = -1; |
| 2011 | var first2 = 0; |
| 2012 | var last2 = 0; |
| 2013 | switch (recType) { |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2014 | case REC_TYPE_ALIGNED: |
| 2015 | hasAlignedPath = true; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2016 | case REC_TYPE_COMPUTED: |
| 2017 | if (fragType == COMPUTED_SET_1 || fragType == COMPUTED_SET_2) { |
| 2018 | break; |
| 2019 | } |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2020 | if (REC_TYPE_COMPUTED == recType) { |
| 2021 | hasComputedPath = true; |
| 2022 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2023 | case REC_TYPE_PATH: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2024 | first = 1; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2025 | switch (fragType) { |
| 2026 | case PATH_LINE: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2027 | last = 5; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2028 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2029 | case PATH_CONIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2030 | case PATH_QUAD: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2031 | last = 7; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2032 | break; |
| 2033 | case PATH_CUBIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2034 | last = 9; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2035 | break; |
| 2036 | default: |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 2037 | console.log("unknown " + (recType == REC_TYPE_PATH ? "REC_TYPE_PATH" |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2038 | : "REC_TYPE_COMPUTED") + " frag type:" + fragType); |
| 2039 | throw "stop execution"; |
| 2040 | } |
| 2041 | if (recType == REC_TYPE_PATH) { |
| 2042 | hasPath = true; |
| 2043 | } |
| 2044 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2045 | case REC_TYPE_PATH2: |
| 2046 | first = 1; |
| 2047 | switch (fragType) { |
| 2048 | case PATH_LINE: |
| 2049 | last = 5; |
| 2050 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2051 | case PATH_CONIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2052 | case PATH_QUAD: |
| 2053 | last = 7; |
| 2054 | break; |
| 2055 | case PATH_CUBIC: |
| 2056 | last = 9; |
| 2057 | break; |
| 2058 | default: |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 2059 | console.log("unknown " + (recType == REC_TYPE_PATH2 ? "REC_TYPE_PATH2" |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2060 | : "REC_TYPE_COMPUTED") + " frag type:" + fragType); |
| 2061 | throw "stop execution"; |
| 2062 | } |
| 2063 | if (recType == REC_TYPE_PATH2) { |
| 2064 | hasPath = true; |
| 2065 | } |
| 2066 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2067 | case REC_TYPE_ACTIVE: |
| 2068 | if (firstActiveSpan < 0) { |
| 2069 | firstActiveSpan = tIndex; |
| 2070 | } |
| 2071 | first = 1; |
| 2072 | switch (fragType) { |
| 2073 | case ACTIVE_LINE_SPAN: |
| 2074 | last = 5; |
| 2075 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2076 | case ACTIVE_CONIC_SPAN: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2077 | case ACTIVE_QUAD_SPAN: |
| 2078 | last = 7; |
| 2079 | break; |
| 2080 | case ACTIVE_CUBIC_SPAN: |
| 2081 | last = 9; |
| 2082 | break; |
| 2083 | default: |
| 2084 | console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType); |
| 2085 | throw "stop execution"; |
| 2086 | } |
| 2087 | break; |
| 2088 | case REC_TYPE_ADD: |
| 2089 | switch (fragType) { |
| 2090 | case ADD_MOVETO: |
| 2091 | break; |
| 2092 | case ADD_LINETO: |
| 2093 | last = 4; |
| 2094 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2095 | case ADD_CONICTO: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2096 | case ADD_QUADTO: |
| 2097 | last = 6; |
| 2098 | break; |
| 2099 | case ADD_CUBICTO: |
| 2100 | last = 8; |
| 2101 | break; |
| 2102 | case ADD_CLOSE: |
| 2103 | case ADD_FILL: |
| 2104 | break; |
| 2105 | default: |
| 2106 | console.log("unknown REC_TYPE_ADD frag type: " + fragType); |
| 2107 | throw "stop execution"; |
| 2108 | } |
| 2109 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2110 | case REC_TYPE_AFTERPART: |
| 2111 | switch (fragType) { |
| 2112 | case PATH_LINE: |
| 2113 | last = 4; |
| 2114 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2115 | case PATH_CONIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2116 | case PATH_QUAD: |
| 2117 | last = 6; |
| 2118 | break; |
| 2119 | case PATH_CUBIC: |
| 2120 | last = 8; |
| 2121 | break; |
| 2122 | default: |
| 2123 | console.log("unknown REC_TYPE_ACTIVEPART frag type: " + fragType); |
| 2124 | throw "stop execution"; |
| 2125 | } |
| 2126 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2127 | case REC_TYPE_SECT: |
| 2128 | switch (fragType) { |
| 2129 | case INTERSECT_LINE: |
| 2130 | first = 1; last = 5; first2 = 8; last2 = 12; |
| 2131 | break; |
| 2132 | case INTERSECT_LINE_2: |
| 2133 | first = 1; last = 5; first2 = 11; last2 = 15; |
| 2134 | break; |
| 2135 | case INTERSECT_LINE_NO: |
| 2136 | first = 0; last = 4; first2 = 4; last2 = 8; |
| 2137 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2138 | case INTERSECT_CONIC_LINE: |
| 2139 | first = 1; last = 7; first2 = 11; last2 = 15; |
| 2140 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2141 | case INTERSECT_QUAD_LINE: |
| 2142 | first = 1; last = 7; first2 = 10; last2 = 14; |
| 2143 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2144 | case INTERSECT_CONIC_LINE_2: |
| 2145 | first = 1; last = 7; first2 = 14; last2 = 18; |
| 2146 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2147 | case INTERSECT_QUAD_LINE_2: |
| 2148 | first = 1; last = 7; first2 = 13; last2 = 17; |
| 2149 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2150 | case INTERSECT_CONIC_LINE_NO: |
| 2151 | first = 0; last = 6; first2 = 7; last2 = 11; |
| 2152 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2153 | case INTERSECT_QUAD_LINE_NO: |
| 2154 | first = 0; last = 6; first2 = 6; last2 = 10; |
| 2155 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2156 | case INTERSECT_CONIC: |
| 2157 | first = 1; last = 7; first2 = 11; last2 = 17; |
| 2158 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2159 | case INTERSECT_QUAD: |
| 2160 | first = 1; last = 7; first2 = 10; last2 = 16; |
| 2161 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2162 | case INTERSECT_CONIC_2: |
| 2163 | first = 1; last = 7; first2 = 14; last2 = 20; |
| 2164 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2165 | case INTERSECT_QUAD_2: |
| 2166 | first = 1; last = 7; first2 = 13; last2 = 19; |
| 2167 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2168 | case INTERSECT_CONIC_NO: |
| 2169 | first = 0; last = 6; first2 = 7; last2 = 13; |
| 2170 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2171 | case INTERSECT_QUAD_NO: |
| 2172 | first = 0; last = 6; first2 = 6; last2 = 12; |
| 2173 | break; |
| 2174 | case INTERSECT_SELF_CUBIC: |
| 2175 | first = 1; last = 9; |
| 2176 | break; |
| 2177 | case INTERSECT_SELF_CUBIC_NO: |
| 2178 | first = 0; last = 8; |
| 2179 | break; |
| 2180 | case INTERSECT_CUBIC_LINE: |
| 2181 | first = 1; last = 9; first2 = 12; last2 = 16; |
| 2182 | break; |
| 2183 | case INTERSECT_CUBIC_LINE_2: |
| 2184 | first = 1; last = 9; first2 = 15; last2 = 19; |
| 2185 | break; |
| 2186 | case INTERSECT_CUBIC_LINE_3: |
| 2187 | first = 1; last = 9; first2 = 18; last2 = 22; |
| 2188 | break; |
| 2189 | case INTERSECT_CUBIC_LINE_NO: |
| 2190 | first = 0; last = 8; first2 = 8; last2 = 12; |
| 2191 | break; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 2192 | case INTERSECT_CONIC_QUAD: |
| 2193 | first = 1; last = 7; first2 = 11; last2 = 17; |
| 2194 | break; |
| 2195 | case INTERSECT_CONIC_QUAD_2: |
| 2196 | first = 1; last = 7; first2 = 14; last2 = 20; |
| 2197 | break; |
caryclark | 6c3b9cd | 2016-09-26 05:36:58 -0700 | [diff] [blame] | 2198 | case INTERSECT_CONIC_QUAD_3: |
| 2199 | first = 1; last = 7; first2 = 17; last2 = 23; |
| 2200 | break; |
| 2201 | case INTERSECT_CONIC_QUAD_4: |
| 2202 | first = 1; last = 7; first2 = 20; last2 = 26; |
| 2203 | break; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 2204 | case INTERSECT_CONIC_QUAD_NO: |
| 2205 | first = 0; last = 6; first2 = 7; last2 = 13; |
| 2206 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2207 | case INTERSECT_CUBIC_QUAD: |
| 2208 | first = 1; last = 9; first2 = 12; last2 = 18; |
| 2209 | break; |
| 2210 | case INTERSECT_CUBIC_QUAD_2: |
| 2211 | first = 1; last = 9; first2 = 15; last2 = 21; |
| 2212 | break; |
| 2213 | case INTERSECT_CUBIC_QUAD_3: |
| 2214 | first = 1; last = 9; first2 = 18; last2 = 24; |
| 2215 | break; |
| 2216 | case INTERSECT_CUBIC_QUAD_4: |
| 2217 | first = 1; last = 9; first2 = 21; last2 = 27; |
| 2218 | break; |
| 2219 | case INTERSECT_CUBIC_QUAD_NO: |
| 2220 | first = 0; last = 8; first2 = 8; last2 = 14; |
| 2221 | break; |
| 2222 | case INTERSECT_CUBIC: |
| 2223 | first = 1; last = 9; first2 = 12; last2 = 20; |
| 2224 | break; |
| 2225 | case INTERSECT_CUBIC_2: |
| 2226 | first = 1; last = 9; first2 = 15; last2 = 23; |
| 2227 | break; |
| 2228 | case INTERSECT_CUBIC_3: |
| 2229 | first = 1; last = 9; first2 = 18; last2 = 26; |
| 2230 | break; |
| 2231 | case INTERSECT_CUBIC_4: |
| 2232 | first = 1; last = 9; first2 = 21; last2 = 29; |
| 2233 | break; |
| 2234 | case INTERSECT_CUBIC_NO: |
| 2235 | first = 0; last = 8; first2 = 8; last2 = 16; |
| 2236 | break; |
| 2237 | default: |
| 2238 | console.log("unknown REC_TYPE_SECT frag type: " + fragType); |
| 2239 | throw "stop execution"; |
| 2240 | } |
| 2241 | break; |
| 2242 | default: |
| 2243 | continue; |
| 2244 | } |
| 2245 | for (var idx = first; idx < last; idx += 2) { |
| 2246 | xmin = Math.min(xmin, frags[idx]); |
| 2247 | xmax = Math.max(xmax, frags[idx]); |
| 2248 | ymin = Math.min(ymin, frags[idx + 1]); |
| 2249 | ymax = Math.max(ymax, frags[idx + 1]); |
| 2250 | } |
| 2251 | for (var idx = first2; idx < last2; idx += 2) { |
| 2252 | xmin = Math.min(xmin, frags[idx]); |
| 2253 | xmax = Math.max(xmax, frags[idx]); |
| 2254 | ymin = Math.min(ymin, frags[idx + 1]); |
| 2255 | ymax = Math.max(ymax, frags[idx + 1]); |
| 2256 | } |
| 2257 | } |
| 2258 | } |
| 2259 | var angleBounds = [Infinity, Infinity, -Infinity, -Infinity]; |
| 2260 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 2261 | var recType = test[tIndex]; |
| 2262 | var records = test[tIndex + 2]; |
| 2263 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 2264 | var fragType = records[recordIndex]; |
| 2265 | var frags = records[recordIndex + 1]; |
| 2266 | switch (recType) { |
| 2267 | case REC_TYPE_ACTIVE_OP: |
| 2268 | if (!draw_op) { |
| 2269 | break; |
| 2270 | } |
| 2271 | { |
| 2272 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 2273 | curve_extremes(curve, angleBounds); |
| 2274 | } |
| 2275 | break; |
| 2276 | case REC_TYPE_ANGLE: |
| 2277 | if (!draw_angle) { |
| 2278 | break; |
| 2279 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2280 | { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2281 | var curve = curvePartialByID(test, frags[0], frags[4], frags[5]); |
| 2282 | curve_extremes(curve, angleBounds); |
| 2283 | curve = curvePartialByID(test, frags[6], frags[10], frags[11]); |
| 2284 | curve_extremes(curve, angleBounds); |
| 2285 | curve = curvePartialByID(test, frags[12], frags[16], frags[17]); |
| 2286 | } |
| 2287 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 2288 | case REC_TYPE_COINCIDENCE: |
| 2289 | if (!draw_coincidence) { |
| 2290 | break; |
| 2291 | } |
| 2292 | { |
| 2293 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 2294 | curve_extremes(curve, angleBounds); |
| 2295 | } |
| 2296 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2297 | case REC_TYPE_SORT: |
| 2298 | if (!draw_sort) { |
| 2299 | break; |
| 2300 | } |
| 2301 | if (fragType == SORT_UNARY || fragType == SORT_BINARY) { |
| 2302 | var curve = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 2303 | curve_extremes(curve, angleBounds); |
| 2304 | } |
| 2305 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 2306 | case REC_TYPE_TOP: |
| 2307 | if (!draw_top) { |
| 2308 | break; |
| 2309 | } |
| 2310 | { |
| 2311 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 2312 | curve_extremes(curve, angleBounds); |
| 2313 | } |
| 2314 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2315 | } |
| 2316 | } |
| 2317 | } |
| 2318 | xmin = Math.min(xmin, angleBounds[0]); |
| 2319 | ymin = Math.min(ymin, angleBounds[1]); |
| 2320 | xmax = Math.max(xmax, angleBounds[2]); |
| 2321 | ymax = Math.max(ymax, angleBounds[3]); |
| 2322 | setScale(xmin, xmax, ymin, ymax); |
| 2323 | if (hasPath == false && hasComputedPath == true && !draw_computed) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2324 | draw_computed = 7; // show quadratics, conics, and cubics |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2325 | } |
| 2326 | if (hasPath == true && hasComputedPath == false && draw_computed) { |
| 2327 | draw_computed = 0; |
| 2328 | } |
| 2329 | } |
| 2330 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2331 | function curveByIDMatch(test, id, recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2332 | var tIndex = -3; |
| 2333 | while ((tIndex += 3) < test.length) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2334 | var recType = test[tIndex]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2335 | if (recType == REC_TYPE_OP) { |
| 2336 | continue; |
| 2337 | } |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2338 | if (recType != recMatch) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2339 | return []; |
| 2340 | } |
| 2341 | var records = test[tIndex + 2]; |
| 2342 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 2343 | var fragType = records[recordIndex]; |
| 2344 | var frags = records[recordIndex + 1]; |
| 2345 | if (frags[0] == id) { |
| 2346 | switch (fragType) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2347 | case PATH_LINE: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2348 | return [frags[1], frags[2], frags[3], frags[4]]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2349 | case PATH_QUAD: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2350 | return [frags[1], frags[2], frags[3], frags[4], |
| 2351 | frags[5], frags[6]]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2352 | case PATH_CONIC: |
| 2353 | return [frags[1], frags[2], frags[3], frags[4], |
| 2354 | frags[5], frags[6], frags[7]]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2355 | case PATH_CUBIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2356 | return [frags[1], frags[2], frags[3], frags[4], |
| 2357 | frags[5], frags[6], frags[7], frags[8]]; |
| 2358 | } |
| 2359 | } |
| 2360 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2361 | } |
| 2362 | return []; |
| 2363 | } |
| 2364 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2365 | function curveByID(test, id) { |
| 2366 | var result = draw_path >= 4 ? curveByIDMatch(test, id, REC_TYPE_ALIGNED) : []; |
| 2367 | if (!result.length) { |
| 2368 | result = curveByIDMatch(test, id, REC_TYPE_PATH); |
| 2369 | } |
| 2370 | return result; |
| 2371 | } |
| 2372 | |
| 2373 | function curvePartialByIDMatch(test, id, t0, t1, recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2374 | var tIndex = -3; |
| 2375 | while ((tIndex += 3) < test.length) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2376 | var recType = test[tIndex]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2377 | if (recType == REC_TYPE_OP) { |
| 2378 | continue; |
| 2379 | } |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2380 | if (recType != recMatch) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2381 | return []; |
| 2382 | } |
| 2383 | var records = test[tIndex + 2]; |
| 2384 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 2385 | var fragType = records[recordIndex]; |
| 2386 | var frags = records[recordIndex + 1]; |
| 2387 | if (frags[0] == id) { |
| 2388 | switch (fragType) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2389 | case PATH_LINE: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2390 | return linePartial(frags[1], frags[2], frags[3], frags[4], t0, t1); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2391 | case PATH_QUAD: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2392 | return quadPartial(frags[1], frags[2], frags[3], frags[4], |
| 2393 | frags[5], frags[6], t0, t1); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2394 | case PATH_CONIC: |
| 2395 | return conicPartial(frags[1], frags[2], frags[3], frags[4], |
| 2396 | frags[5], frags[6], frags[7], t0, t1); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2397 | case PATH_CUBIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2398 | return cubicPartial(frags[1], frags[2], frags[3], frags[4], |
| 2399 | frags[5], frags[6], frags[7], frags[8], t0, t1); |
| 2400 | } |
| 2401 | } |
| 2402 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2403 | } |
| 2404 | return []; |
| 2405 | } |
| 2406 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2407 | function curvePartialByID(test, id, t0, t1) { |
| 2408 | var result = draw_path >= 4 ? curvePartialByIDMatch(test, id, t0, t1, REC_TYPE_ALIGNED) : []; |
| 2409 | if (!result.length) { |
| 2410 | result = curvePartialByIDMatch(test, id, t0, t1, REC_TYPE_PATH); |
| 2411 | } |
| 2412 | return result; |
| 2413 | } |
| 2414 | |
| 2415 | function idByCurveIDMatch(test, frag, type, recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2416 | var tIndex = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2417 | while (tIndex < test.length) { |
| 2418 | var recType = test[tIndex]; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2419 | if (recType != recMatch) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2420 | ++tIndex; |
| 2421 | continue; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2422 | } |
| 2423 | var records = test[tIndex + 2]; |
| 2424 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 2425 | var fragType = records[recordIndex]; |
| 2426 | var frags = records[recordIndex + 1]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2427 | if (frag.length != frags.length - 1) { |
| 2428 | continue; |
| 2429 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2430 | switch (fragType) { |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2431 | case PATH_LINE: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2432 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 2433 | || frag[2] != frags[3] || frag[3] != frags[4]) { |
| 2434 | continue; |
| 2435 | } |
| 2436 | return frags[0]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2437 | case PATH_QUAD: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2438 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 2439 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 2440 | || frag[4] != frags[5] || frag[5] != frags[6]) { |
| 2441 | continue; |
| 2442 | } |
| 2443 | return frags[0]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2444 | case PATH_CONIC: |
| 2445 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 2446 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 2447 | || frag[4] != frags[5] || frag[5] != frags[6] |
| 2448 | || frag[6] != frags[7]) { |
| 2449 | continue; |
| 2450 | } |
| 2451 | return frags[0]; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 2452 | case PATH_CUBIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2453 | if (frag[0] != frags[1] || frag[1] != frags[2] |
| 2454 | || frag[2] != frags[3] || frag[3] != frags[4] |
| 2455 | || frag[4] != frags[5] || frag[5] != frags[6] |
| 2456 | || frag[6] != frags[7] || frag[7] != frags[8]) { |
| 2457 | continue; |
| 2458 | } |
| 2459 | return frags[0]; |
| 2460 | } |
| 2461 | } |
| 2462 | ++tIndex; |
| 2463 | } |
| 2464 | return -1; |
| 2465 | } |
| 2466 | |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 2467 | function idByCurve(test, frag, type) { |
| 2468 | var result = draw_path >= 4 ? idByCurveIDMatch(test, frag, type, REC_TYPE_ALIGNED) : []; |
| 2469 | if (!result.length) { |
| 2470 | result = idByCurveIDMatch(test, frag, type, REC_TYPE_PATH); |
| 2471 | } |
| 2472 | return result; |
| 2473 | } |
| 2474 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2475 | function curve_extremes(curve, bounds) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2476 | var length = curve.length == 7 ? 6 : curve.length; |
caryclark | ed0935a | 2015-10-22 07:23:52 -0700 | [diff] [blame] | 2477 | for (var index = 0; index < length; index += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2478 | var x = curve[index]; |
| 2479 | var y = curve[index + 1]; |
| 2480 | bounds[0] = Math.min(bounds[0], x); |
| 2481 | bounds[1] = Math.min(bounds[1], y); |
| 2482 | bounds[2] = Math.max(bounds[2], x); |
| 2483 | bounds[3] = Math.max(bounds[3], y); |
| 2484 | } |
| 2485 | } |
| 2486 | |
| 2487 | function setScale(x0, x1, y0, y1) { |
| 2488 | var srcWidth = x1 - x0; |
| 2489 | var srcHeight = y1 - y0; |
| 2490 | var usableWidth = screenWidth; |
| 2491 | var xDigits = Math.ceil(Math.log(Math.abs(xmax)) / Math.log(10)); |
| 2492 | var yDigits = Math.ceil(Math.log(Math.abs(ymax)) / Math.log(10)); |
| 2493 | usableWidth -= (xDigits + yDigits) * 10; |
| 2494 | usableWidth -= decimal_places * 10; |
| 2495 | if (draw_legend) { |
| 2496 | usableWidth -= 40; |
| 2497 | } |
| 2498 | var hscale = usableWidth / srcWidth; |
| 2499 | var vscale = screenHeight / srcHeight; |
| 2500 | scale = Math.min(hscale, vscale); |
| 2501 | var invScale = 1 / scale; |
| 2502 | var sxmin = x0 - invScale * 5; |
| 2503 | var symin = y0 - invScale * 10; |
| 2504 | var sxmax = x1 + invScale * (6 * decimal_places + 10); |
| 2505 | var symax = y1 + invScale * 10; |
| 2506 | srcWidth = sxmax - sxmin; |
| 2507 | srcHeight = symax - symin; |
| 2508 | hscale = usableWidth / srcWidth; |
| 2509 | vscale = screenHeight / srcHeight; |
| 2510 | scale = Math.min(hscale, vscale); |
| 2511 | srcLeft = sxmin; |
| 2512 | srcTop = symin; |
| 2513 | } |
| 2514 | |
| 2515 | function drawArc(curve, op, from, to) { |
| 2516 | var type = PATH_LINE + (curve.length / 2 - 2); |
| 2517 | var pt = pointAtT(curve, type, op ? 0.4 : 0.6); |
| 2518 | var dy = pt.y - curve[1]; |
| 2519 | var dx = pt.x - curve[0]; |
| 2520 | var dist = Math.sqrt(dy * dy + dx * dx); |
| 2521 | var _dist = dist * scale; |
| 2522 | var angle = Math.atan2(dy, dx); |
| 2523 | var _px = (curve[0] - srcLeft) * scale; |
| 2524 | var _py = (curve[1] - srcTop) * scale; |
| 2525 | var divisor = 4; |
| 2526 | var endDist; |
| 2527 | do { |
| 2528 | var ends = []; |
| 2529 | for (var index = -1; index <= 1; index += 2) { |
| 2530 | var px = Math.cos(index * Math.PI / divisor); |
| 2531 | var py = Math.sin(index * Math.PI / divisor); |
| 2532 | ends.push(px); |
| 2533 | ends.push(py); |
| 2534 | } |
| 2535 | var endDx = (ends[2] - ends[0]) * scale * dist; |
| 2536 | var endDy = (ends[3] - ends[1]) * scale * dist; |
| 2537 | endDist = Math.sqrt(endDx * endDx + endDy * endDy); |
| 2538 | if (endDist < 100) { |
| 2539 | break; |
| 2540 | } |
| 2541 | divisor *= 2; |
| 2542 | } while (true); |
| 2543 | if (endDist < 30) { |
| 2544 | return; |
| 2545 | } |
| 2546 | if (op) { |
| 2547 | divisor *= 2; |
| 2548 | } |
| 2549 | ctx.strokeStyle = op ? "rgba(210,0,45, 0.4)" : "rgba(90,90,90, 0.5)"; |
| 2550 | ctx.beginPath(); |
| 2551 | ctx.arc(_px, _py, _dist, angle - Math.PI / divisor, angle + Math.PI / divisor, false); |
| 2552 | ctx.stroke(); |
| 2553 | var saveAlign = ctx.textAlign; |
| 2554 | var saveStyle = ctx.fillStyle; |
| 2555 | var saveFont = ctx.font; |
| 2556 | ctx.textAlign = "center"; |
| 2557 | ctx.fillStyle = "black"; |
| 2558 | ctx.font = "normal 24px Arial"; |
| 2559 | divisor *= 0.8; |
| 2560 | for (var index = -1; index <= 1; index += 2) { |
| 2561 | var px = curve[0] + Math.cos(angle + index * Math.PI / divisor) * dist; |
| 2562 | var py = curve[1] + Math.sin(angle + index * Math.PI / divisor) * dist; |
| 2563 | var _px = (px - srcLeft) * scale; |
| 2564 | var _py = (py - srcTop) * scale; |
| 2565 | ctx.fillText(index < 0 ? to.toString() : from.toString(), _px, _py + 8); |
| 2566 | } |
| 2567 | ctx.textAlign = saveAlign; |
| 2568 | ctx.fillStyle = saveStyle; |
| 2569 | ctx.font = saveFont; |
| 2570 | } |
| 2571 | |
| 2572 | function drawPoint(px, py, end) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2573 | var length = drawnPts.length == 7 ? 6 : drawnPts.length; |
| 2574 | for (var pts = 0; pts < length; pts += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2575 | var x = drawnPts[pts]; |
| 2576 | var y = drawnPts[pts + 1]; |
| 2577 | if (px == x && py == y) { |
| 2578 | return; |
| 2579 | } |
| 2580 | } |
| 2581 | drawnPts.push(px); |
| 2582 | drawnPts.push(py); |
| 2583 | var label = px.toFixed(decimal_places) + ", " + py.toFixed(decimal_places); |
| 2584 | var _px = (px - srcLeft) * scale; |
| 2585 | var _py = (py - srcTop) * scale; |
| 2586 | ctx.beginPath(); |
| 2587 | ctx.arc(_px, _py, 3, 0, Math.PI*2, true); |
| 2588 | ctx.closePath(); |
| 2589 | if (end) { |
| 2590 | ctx.fill(); |
| 2591 | } else { |
| 2592 | ctx.stroke(); |
| 2593 | } |
| 2594 | if (debug_xy) { |
| 2595 | ctx.textAlign = "left"; |
| 2596 | ctx.fillText(label, _px + 5, _py); |
| 2597 | } |
| 2598 | } |
| 2599 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2600 | function coordCount(curveType) { |
| 2601 | switch (curveType) { |
| 2602 | case PATH_LINE: |
| 2603 | return 4; |
| 2604 | case PATH_QUAD: |
| 2605 | return 6; |
| 2606 | case PATH_CONIC: |
| 2607 | return 6; |
| 2608 | case PATH_CUBIC: |
| 2609 | return 8; |
| 2610 | } |
| 2611 | return -1; |
| 2612 | } |
| 2613 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2614 | function drawPoints(ptArray, curveType, drawControls) { |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2615 | var count = coordCount(curveType); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2616 | for (var idx = 0; idx < count; idx += 2) { |
| 2617 | if (!drawControls && idx != 0 && idx != count - 2) { |
| 2618 | continue; |
| 2619 | } |
| 2620 | drawPoint(ptArray[idx], ptArray[idx + 1], idx == 0 || idx == count - 2); |
| 2621 | } |
| 2622 | } |
| 2623 | |
| 2624 | function drawControlLines(curve, curveType, drawEnd) { |
| 2625 | if (curveType == PATH_LINE) { |
| 2626 | return; |
| 2627 | } |
| 2628 | ctx.strokeStyle = "rgba(0,0,0, 0.3)"; |
| 2629 | drawLine(curve[0], curve[1], curve[2], curve[3]); |
| 2630 | drawLine(curve[2], curve[3], curve[4], curve[5]); |
| 2631 | if (curveType == PATH_CUBIC) { |
| 2632 | drawLine(curve[4], curve[5], curve[6], curve[7]); |
| 2633 | if (drawEnd > 1) { |
| 2634 | drawLine(curve[6], curve[7], curve[0], curve[1]); |
| 2635 | if (drawEnd > 2) { |
| 2636 | drawLine(curve[0], curve[1], curve[4], curve[5]); |
| 2637 | drawLine(curve[6], curve[7], curve[2], curve[3]); |
| 2638 | } |
| 2639 | } |
| 2640 | } else if (drawEnd > 1) { |
| 2641 | drawLine(curve[4], curve[5], curve[0], curve[1]); |
| 2642 | } |
| 2643 | } |
| 2644 | |
| 2645 | function pointAtT(curve, curveType, t) { |
| 2646 | var xy = {}; |
| 2647 | switch (curveType) { |
| 2648 | case PATH_LINE: |
| 2649 | var a = 1 - t; |
| 2650 | var b = t; |
| 2651 | xy.x = a * curve[0] + b * curve[2]; |
| 2652 | xy.y = a * curve[1] + b * curve[3]; |
| 2653 | break; |
| 2654 | case PATH_QUAD: |
| 2655 | var one_t = 1 - t; |
| 2656 | var a = one_t * one_t; |
| 2657 | var b = 2 * one_t * t; |
| 2658 | var c = t * t; |
| 2659 | xy.x = a * curve[0] + b * curve[2] + c * curve[4]; |
| 2660 | xy.y = a * curve[1] + b * curve[3] + c * curve[5]; |
| 2661 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2662 | case PATH_CONIC: |
| 2663 | var one_t = 1 - t; |
| 2664 | var a = one_t * one_t; |
| 2665 | var b = 2 * one_t * t; |
| 2666 | var c = t * t; |
| 2667 | xy.x = a * curve[0] + b * curve[2] * curve[6] + c * curve[4]; |
| 2668 | xy.y = a * curve[1] + b * curve[3] * curve[6] + c * curve[5]; |
| 2669 | var d = a + b * curve[6] + c; |
| 2670 | xy.x /= d; |
| 2671 | xy.y /= d; |
| 2672 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2673 | case PATH_CUBIC: |
| 2674 | var one_t = 1 - t; |
| 2675 | var one_t2 = one_t * one_t; |
| 2676 | var a = one_t2 * one_t; |
| 2677 | var b = 3 * one_t2 * t; |
| 2678 | var t2 = t * t; |
| 2679 | var c = 3 * one_t * t2; |
| 2680 | var d = t2 * t; |
| 2681 | xy.x = a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; |
| 2682 | xy.y = a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; |
| 2683 | break; |
| 2684 | } |
| 2685 | return xy; |
| 2686 | } |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 2687 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 2688 | function drawPointAtT(curve, curveType) { |
| 2689 | var x, y; |
| 2690 | var xy = pointAtT(curve, curveType, curveT); |
| 2691 | drawPoint(xy.x, xy.y, true); |
| 2692 | if (!draw_intersectT) { |
| 2693 | return; |
| 2694 | } |
| 2695 | ctx.fillStyle = "red"; |
| 2696 | drawTAtPointUp(xy.x, xy.y, curveT); |
| 2697 | } |
| 2698 | |
| 2699 | function drawTAtPointUp(px, py, t) { |
| 2700 | var label = t.toFixed(decimal_places); |
| 2701 | var _px = (px - srcLeft)* scale; |
| 2702 | var _py = (py - srcTop) * scale; |
| 2703 | ctx.fillText(label, _px + 5, _py - 10); |
| 2704 | } |
| 2705 | |
| 2706 | function drawTAtPointDown(px, py, t) { |
| 2707 | var label = t.toFixed(decimal_places); |
| 2708 | var _px = (px - srcLeft)* scale; |
| 2709 | var _py = (py - srcTop) * scale; |
| 2710 | ctx.fillText(label, _px + 5, _py + 10); |
| 2711 | } |
| 2712 | |
| 2713 | function alreadyDrawnLine(x1, y1, x2, y2) { |
| 2714 | if (collect_bounds) { |
| 2715 | if (focus_enabled) { |
| 2716 | focusXmin = Math.min(focusXmin, x1, x2); |
| 2717 | focusYmin = Math.min(focusYmin, y1, y2); |
| 2718 | focusXmax = Math.max(focusXmax, x1, x2); |
| 2719 | focusYmax = Math.max(focusYmax, y1, y2); |
| 2720 | } |
| 2721 | return true; |
| 2722 | } |
| 2723 | for (var pts = 0; pts < drawnLines.length; pts += 4) { |
| 2724 | if (x1 == drawnLines[pts] && y1 == drawnLines[pts + 1] |
| 2725 | && x2 == drawnLines[pts + 2] && y2 == drawnLines[pts + 3]) { |
| 2726 | return true; |
| 2727 | } |
| 2728 | } |
| 2729 | drawnLines.push(x1); |
| 2730 | drawnLines.push(y1); |
| 2731 | drawnLines.push(x2); |
| 2732 | drawnLines.push(y2); |
| 2733 | return false; |
| 2734 | } |
| 2735 | |
| 2736 | function drawLine(x1, y1, x2, y2) { |
| 2737 | if (alreadyDrawnLine(x1, y1, x2, y2)) { |
| 2738 | return; |
| 2739 | } |
| 2740 | ctx.beginPath(); |
| 2741 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2742 | (y1 - srcTop) * scale); |
| 2743 | ctx.lineTo((x2 - srcLeft) * scale, |
| 2744 | (y2 - srcTop) * scale); |
| 2745 | ctx.stroke(); |
| 2746 | } |
| 2747 | |
| 2748 | function linePartial(x1, y1, x2, y2, t1, t2) { |
| 2749 | var dx = x1 - x2; |
| 2750 | var dy = y1 - y2; |
| 2751 | var array = [ |
| 2752 | x1 - t1 * dx, |
| 2753 | y1 - t1 * dy, |
| 2754 | x1 - t2 * dx, |
| 2755 | y1 - t2 * dy |
| 2756 | ]; |
| 2757 | return array; |
| 2758 | } |
| 2759 | |
| 2760 | function drawLinePartial(x1, y1, x2, y2, t1, t2) { |
| 2761 | var a = linePartial(x1, y1, x2, y2, t1, t2); |
| 2762 | var ax = a[0]; |
| 2763 | var ay = a[1]; |
| 2764 | var bx = a[2]; |
| 2765 | var by = a[3]; |
| 2766 | if (alreadyDrawnLine(ax, ay, bx, by)) { |
| 2767 | return; |
| 2768 | } |
| 2769 | ctx.beginPath(); |
| 2770 | ctx.moveTo((ax - srcLeft) * scale, |
| 2771 | (ay - srcTop) * scale); |
| 2772 | ctx.lineTo((bx - srcLeft) * scale, |
| 2773 | (by - srcTop) * scale); |
| 2774 | ctx.stroke(); |
| 2775 | } |
| 2776 | |
| 2777 | function alreadyDrawnQuad(x1, y1, x2, y2, x3, y3) { |
| 2778 | if (collect_bounds) { |
| 2779 | if (focus_enabled) { |
| 2780 | focusXmin = Math.min(focusXmin, x1, x2, x3); |
| 2781 | focusYmin = Math.min(focusYmin, y1, y2, y3); |
| 2782 | focusXmax = Math.max(focusXmax, x1, x2, x3); |
| 2783 | focusYmax = Math.max(focusYmax, y1, y2, y3); |
| 2784 | } |
| 2785 | return true; |
| 2786 | } |
| 2787 | for (var pts = 0; pts < drawnQuads.length; pts += 6) { |
| 2788 | if (x1 == drawnQuads[pts] && y1 == drawnQuads[pts + 1] |
| 2789 | && x2 == drawnQuads[pts + 2] && y2 == drawnQuads[pts + 3] |
| 2790 | && x3 == drawnQuads[pts + 4] && y3 == drawnQuads[pts + 5]) { |
| 2791 | return true; |
| 2792 | } |
| 2793 | } |
| 2794 | drawnQuads.push(x1); |
| 2795 | drawnQuads.push(y1); |
| 2796 | drawnQuads.push(x2); |
| 2797 | drawnQuads.push(y2); |
| 2798 | drawnQuads.push(x3); |
| 2799 | drawnQuads.push(y3); |
| 2800 | return false; |
| 2801 | } |
| 2802 | |
| 2803 | function drawQuad(x1, y1, x2, y2, x3, y3) { |
| 2804 | if (alreadyDrawnQuad(x1, y1, x2, y2, x3, y3)) { |
| 2805 | return; |
| 2806 | } |
| 2807 | ctx.beginPath(); |
| 2808 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2809 | (y1 - srcTop) * scale); |
| 2810 | ctx.quadraticCurveTo((x2 - srcLeft) * scale, |
| 2811 | (y2 - srcTop) * scale, |
| 2812 | (x3 - srcLeft) * scale, |
| 2813 | (y3 - srcTop) * scale); |
| 2814 | ctx.stroke(); |
| 2815 | } |
| 2816 | |
| 2817 | function interp(A, B, t) { |
| 2818 | return A + (B - A) * t; |
| 2819 | } |
| 2820 | |
| 2821 | function interp_quad_coords(x1, x2, x3, t) |
| 2822 | { |
| 2823 | var ab = interp(x1, x2, t); |
| 2824 | var bc = interp(x2, x3, t); |
| 2825 | var abc = interp(ab, bc, t); |
| 2826 | return abc; |
| 2827 | } |
| 2828 | |
| 2829 | function quadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { |
| 2830 | var ax = interp_quad_coords(x1, x2, x3, t1); |
| 2831 | var ay = interp_quad_coords(y1, y2, y3, t1); |
| 2832 | var dx = interp_quad_coords(x1, x2, x3, (t1 + t2) / 2); |
| 2833 | var dy = interp_quad_coords(y1, y2, y3, (t1 + t2) / 2); |
| 2834 | var cx = interp_quad_coords(x1, x2, x3, t2); |
| 2835 | var cy = interp_quad_coords(y1, y2, y3, t2); |
| 2836 | var bx = 2*dx - (ax + cx)/2; |
| 2837 | var by = 2*dy - (ay + cy)/2; |
| 2838 | var array = [ |
| 2839 | ax, ay, bx, by, cx, cy |
| 2840 | ]; |
| 2841 | return array; |
| 2842 | } |
| 2843 | |
| 2844 | function drawQuadPartial(x1, y1, x2, y2, x3, y3, t1, t2) { |
| 2845 | var a = quadPartial(x1, y1, x2, y2, x3, y3, t1, t2); |
| 2846 | var ax = a[0]; |
| 2847 | var ay = a[1]; |
| 2848 | var bx = a[2]; |
| 2849 | var by = a[3]; |
| 2850 | var cx = a[4]; |
| 2851 | var cy = a[5]; |
| 2852 | if (alreadyDrawnQuad(ax, ay, bx, by, cx, cy)) { |
| 2853 | return; |
| 2854 | } |
| 2855 | ctx.beginPath(); |
| 2856 | ctx.moveTo((ax - srcLeft) * scale, |
| 2857 | (ay - srcTop) * scale); |
| 2858 | ctx.quadraticCurveTo((bx - srcLeft) * scale, |
| 2859 | (by - srcTop) * scale, |
| 2860 | (cx - srcLeft) * scale, |
| 2861 | (cy - srcTop) * scale); |
| 2862 | ctx.stroke(); |
| 2863 | } |
| 2864 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2865 | function alreadyDrawnConic(x1, y1, x2, y2, x3, y3, w) { |
| 2866 | if (collect_bounds) { |
| 2867 | if (focus_enabled) { |
| 2868 | focusXmin = Math.min(focusXmin, x1, x2, x3); |
| 2869 | focusYmin = Math.min(focusYmin, y1, y2, y3); |
| 2870 | focusXmax = Math.max(focusXmax, x1, x2, x3); |
| 2871 | focusYmax = Math.max(focusYmax, y1, y2, y3); |
| 2872 | } |
| 2873 | return true; |
| 2874 | } |
| 2875 | for (var pts = 0; pts < drawnConics.length; pts += 8) { |
| 2876 | if (x1 == drawnConics[pts] && y1 == drawnCubics[pts + 1] |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 2877 | && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3] |
| 2878 | && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5] |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 2879 | && w == drawnCubics[pts + 6]) { |
| 2880 | return true; |
| 2881 | } |
| 2882 | } |
| 2883 | drawnConics.push(x1); |
| 2884 | drawnConics.push(y1); |
| 2885 | drawnConics.push(x2); |
| 2886 | drawnConics.push(y2); |
| 2887 | drawnConics.push(x3); |
| 2888 | drawnConics.push(y3); |
| 2889 | drawnCubics.push(w); |
| 2890 | return false; |
| 2891 | } |
| 2892 | |
| 2893 | var kMaxConicToQuadPOW2 = 5; |
| 2894 | |
| 2895 | function computeQuadPOW2(curve, tol) { |
| 2896 | var a = curve[6] - 1; |
| 2897 | var k = a / (4 * (2 + a)); |
| 2898 | var x = k * (curve[0] - 2 * curve[2] + curve[4]); |
| 2899 | var y = k * (curve[1] - 2 * curve[3] + curve[5]); |
| 2900 | |
| 2901 | var error = Math.sqrt(x * x + y * y); |
| 2902 | var pow2; |
| 2903 | for (pow2 = 0; pow2 < kMaxConicToQuadPOW2; ++pow2) { |
| 2904 | if (error <= tol) { |
| 2905 | break; |
| 2906 | } |
| 2907 | error *= 0.25; |
| 2908 | } |
| 2909 | return pow2; |
| 2910 | } |
| 2911 | |
| 2912 | function subdivide_w_value(w) { |
| 2913 | return Math.sqrt(0.5 + w * 0.5); |
| 2914 | } |
| 2915 | |
| 2916 | function chop(curve, part1, part2) { |
| 2917 | var w = curve[6]; |
| 2918 | var scale = 1 / (1 + w); |
| 2919 | part1[0] = curve[0]; |
| 2920 | part1[1] = curve[1]; |
| 2921 | part1[2] = (curve[0] + curve[2] * w) * scale; |
| 2922 | part1[3] = (curve[1] + curve[3] * w) * scale; |
| 2923 | part1[4] = part2[0] = (curve[0] + (curve[2] * w) * 2 + curve[4]) * scale * 0.5; |
| 2924 | part1[5] = part2[1] = (curve[1] + (curve[3] * w) * 2 + curve[5]) * scale * 0.5; |
| 2925 | part2[2] = (curve[2] * w + curve[4]) * scale; |
| 2926 | part2[3] = (curve[3] * w + curve[5]) * scale; |
| 2927 | part2[4] = curve[4]; |
| 2928 | part2[5] = curve[5]; |
| 2929 | part1[6] = part2[6] = subdivide_w_value(w); |
| 2930 | } |
| 2931 | |
| 2932 | function subdivide(curve, level, pts) { |
| 2933 | if (0 == level) { |
| 2934 | pts.push(curve[2]); |
| 2935 | pts.push(curve[3]); |
| 2936 | pts.push(curve[4]); |
| 2937 | pts.push(curve[5]); |
| 2938 | } else { |
| 2939 | var part1 = [], part2 = []; |
| 2940 | chop(curve, part1, part2); |
| 2941 | --level; |
| 2942 | subdivide(part1, level, pts); |
| 2943 | subdivide(part2, level, pts); |
| 2944 | } |
| 2945 | } |
| 2946 | |
| 2947 | function chopIntoQuadsPOW2(curve, pow2, pts) { |
| 2948 | subdivide(curve, pow2, pts); |
| 2949 | return 1 << pow2; |
| 2950 | } |
| 2951 | |
| 2952 | function drawConicWithQuads(x1, y1, x2, y2, x3, y3, w) { |
| 2953 | if (alreadyDrawnConic(x1, y1, x2, y2, x3, y3, w)) { |
| 2954 | return; |
| 2955 | } |
| 2956 | ctx.beginPath(); |
| 2957 | ctx.moveTo((x1 - srcLeft) * scale, |
| 2958 | (y1 - srcTop) * scale); |
| 2959 | var tol = 1 / scale; |
| 2960 | var curve = [x1, y1, x2, y2, x3, y3, w]; |
| 2961 | var pow2 = computeQuadPOW2(curve, tol); |
| 2962 | var pts = []; |
| 2963 | chopIntoQuadsPOW2(curve, pow2, pts); |
| 2964 | for (var i = 0; i < pts.length; i += 4) { |
| 2965 | ctx.quadraticCurveTo( |
| 2966 | (pts[i + 0] - srcLeft) * scale, (pts[i + 1] - srcTop) * scale, |
| 2967 | (pts[i + 2] - srcLeft) * scale, (pts[i + 3] - srcTop) * scale); |
| 2968 | } |
| 2969 | ctx.stroke(); |
| 2970 | } |
| 2971 | |
| 2972 | function conic_eval_numerator(x1, x2, x3, w, t) { |
| 2973 | var src2w = x2 * w; |
| 2974 | var C = x1; |
| 2975 | var A = x3 - 2 * src2w + C; |
| 2976 | var B = 2 * (src2w - C); |
| 2977 | return (A * t + B) * t + C; |
| 2978 | } |
| 2979 | |
| 2980 | |
| 2981 | function conic_eval_denominator(w, t) { |
| 2982 | var B = 2 * (w - 1); |
| 2983 | var C = 1; |
| 2984 | var A = -B; |
| 2985 | return (A * t + B) * t + C; |
| 2986 | } |
| 2987 | |
| 2988 | function conicPartial(x1, y1, x2, y2, x3, y3, w, t1, t2) { |
| 2989 | var ax = conic_eval_numerator(x1, x2, x3, w, t1); |
| 2990 | var ay = conic_eval_numerator(y1, y2, y3, w, t1); |
| 2991 | var az = conic_eval_denominator(w, t1); |
| 2992 | var midT = (t1 + t2) / 2; |
| 2993 | var dx = conic_eval_numerator(x1, x2, x3, w, midT); |
| 2994 | var dy = conic_eval_numerator(y1, y2, y3, w, midT); |
| 2995 | var dz = conic_eval_denominator(w, midT); |
| 2996 | var cx = conic_eval_numerator(x1, x2, x3, w, t2); |
| 2997 | var cy = conic_eval_numerator(y1, y2, y3, w, t2); |
| 2998 | var cz = conic_eval_denominator(w, t2); |
| 2999 | var bx = 2 * dx - (ax + cx) / 2; |
| 3000 | var by = 2 * dy - (ay + cy) / 2; |
| 3001 | var bz = 2 * dz - (az + cz) / 2; |
| 3002 | var dt = t2 - t1; |
| 3003 | var dt_1 = 1 - dt; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3004 | var array = [ |
caryclark | ed0935a | 2015-10-22 07:23:52 -0700 | [diff] [blame] | 3005 | ax / az, ay / az, bx / bz, by / bz, cx / cz, cy / cz, 0 |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3006 | ]; |
caryclark | ed0935a | 2015-10-22 07:23:52 -0700 | [diff] [blame] | 3007 | var dMidAC = { x:(array[0] + array[4]) / 2, y:(array[1] + array[5]) / 2 }; |
| 3008 | var dMid = { x:dx / dz, y:dy / dz }; |
| 3009 | var dWNumer = { x:dMidAC.x - dMid.x, y:dMidAC.y - dMid.y }; |
| 3010 | var dWDenom = { x:dMid.x - array[2], y:dMid.y - array[3] }; |
| 3011 | var partW = Math.sqrt(dWNumer.x * dWNumer.x + dWNumer.y * dWNumer.y) |
| 3012 | / Math.sqrt(dWDenom.x * dWDenom.x + dWDenom.y * dWDenom.y); |
| 3013 | array[6] = partW; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3014 | return array; |
| 3015 | } |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3016 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3017 | function drawConicPartial(x1, y1, x2, y2, x3, y3, w, t1, t2) { |
| 3018 | var a = conicPartial(x1, y1, x2, y2, x3, y3, w, t1, t2); |
| 3019 | var ax = a[0]; |
| 3020 | var ay = a[1]; |
| 3021 | var bx = a[2]; |
| 3022 | var by = a[3]; |
| 3023 | var cx = a[4]; |
| 3024 | var cy = a[5]; |
| 3025 | var w_ = a[6]; |
| 3026 | drawConicWithQuads(ax, ay, bx, by, cx, cy, w_); |
| 3027 | } |
| 3028 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3029 | function alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4) { |
| 3030 | if (collect_bounds) { |
| 3031 | if (focus_enabled) { |
| 3032 | focusXmin = Math.min(focusXmin, x1, x2, x3, x4); |
| 3033 | focusYmin = Math.min(focusYmin, y1, y2, y3, y4); |
| 3034 | focusXmax = Math.max(focusXmax, x1, x2, x3, x4); |
| 3035 | focusYmax = Math.max(focusYmax, y1, y2, y3, y4); |
| 3036 | } |
| 3037 | return true; |
| 3038 | } |
| 3039 | for (var pts = 0; pts < drawnCubics.length; pts += 8) { |
| 3040 | if (x1 == drawnCubics[pts] && y1 == drawnCubics[pts + 1] |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3041 | && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3] |
| 3042 | && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5] |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3043 | && x4 == drawnCubics[pts + 6] && y4 == drawnCubics[pts + 7]) { |
| 3044 | return true; |
| 3045 | } |
| 3046 | } |
| 3047 | drawnCubics.push(x1); |
| 3048 | drawnCubics.push(y1); |
| 3049 | drawnCubics.push(x2); |
| 3050 | drawnCubics.push(y2); |
| 3051 | drawnCubics.push(x3); |
| 3052 | drawnCubics.push(y3); |
| 3053 | drawnCubics.push(x4); |
| 3054 | drawnCubics.push(y4); |
| 3055 | return false; |
| 3056 | } |
| 3057 | |
| 3058 | function drawCubic(x1, y1, x2, y2, x3, y3, x4, y4) { |
| 3059 | if (alreadyDrawnCubic(x1, y1, x2, y2, x3, y3, x4, y4)) { |
| 3060 | return; |
| 3061 | } |
| 3062 | ctx.beginPath(); |
| 3063 | ctx.moveTo((x1 - srcLeft) * scale, |
| 3064 | (y1 - srcTop) * scale); |
| 3065 | ctx.bezierCurveTo((x2 - srcLeft) * scale, |
| 3066 | (y2 - srcTop) * scale, |
| 3067 | (x3 - srcLeft) * scale, |
| 3068 | (y3 - srcTop) * scale, |
| 3069 | (x4 - srcLeft) * scale, |
| 3070 | (y4 - srcTop) * scale); |
| 3071 | ctx.stroke(); |
| 3072 | } |
| 3073 | |
| 3074 | function interp_cubic_coords(x1, x2, x3, x4, t) |
| 3075 | { |
| 3076 | var ab = interp(x1, x2, t); |
| 3077 | var bc = interp(x2, x3, t); |
| 3078 | var cd = interp(x3, x4, t); |
| 3079 | var abc = interp(ab, bc, t); |
| 3080 | var bcd = interp(bc, cd, t); |
| 3081 | var abcd = interp(abc, bcd, t); |
| 3082 | return abcd; |
| 3083 | } |
| 3084 | |
| 3085 | function cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 3086 | var ax = interp_cubic_coords(x1, x2, x3, x4, t1); |
| 3087 | var ay = interp_cubic_coords(y1, y2, y3, y4, t1); |
| 3088 | var ex = interp_cubic_coords(x1, x2, x3, x4, (t1*2+t2)/3); |
| 3089 | var ey = interp_cubic_coords(y1, y2, y3, y4, (t1*2+t2)/3); |
| 3090 | var fx = interp_cubic_coords(x1, x2, x3, x4, (t1+t2*2)/3); |
| 3091 | var fy = interp_cubic_coords(y1, y2, y3, y4, (t1+t2*2)/3); |
| 3092 | var dx = interp_cubic_coords(x1, x2, x3, x4, t2); |
| 3093 | var dy = interp_cubic_coords(y1, y2, y3, y4, t2); |
| 3094 | var mx = ex * 27 - ax * 8 - dx; |
| 3095 | var my = ey * 27 - ay * 8 - dy; |
| 3096 | var nx = fx * 27 - ax - dx * 8; |
| 3097 | var ny = fy * 27 - ay - dy * 8; |
| 3098 | var bx = (mx * 2 - nx) / 18; |
| 3099 | var by = (my * 2 - ny) / 18; |
| 3100 | var cx = (nx * 2 - mx) / 18; |
| 3101 | var cy = (ny * 2 - my) / 18; |
| 3102 | var array = [ |
| 3103 | ax, ay, bx, by, cx, cy, dx, dy |
| 3104 | ]; |
| 3105 | return array; |
| 3106 | } |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3107 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3108 | function drawCubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 3109 | var a = cubicPartial(x1, y1, x2, y2, x3, y3, x4, y4, t1, t2); |
| 3110 | var ax = a[0]; |
| 3111 | var ay = a[1]; |
| 3112 | var bx = a[2]; |
| 3113 | var by = a[3]; |
| 3114 | var cx = a[4]; |
| 3115 | var cy = a[5]; |
| 3116 | var dx = a[6]; |
| 3117 | var dy = a[7]; |
| 3118 | if (alreadyDrawnCubic(ax, ay, bx, by, cx, cy, dx, dy)) { |
| 3119 | return; |
| 3120 | } |
| 3121 | ctx.beginPath(); |
| 3122 | ctx.moveTo((ax - srcLeft) * scale, |
| 3123 | (ay - srcTop) * scale); |
| 3124 | ctx.bezierCurveTo((bx - srcLeft) * scale, |
| 3125 | (by - srcTop) * scale, |
| 3126 | (cx - srcLeft) * scale, |
| 3127 | (cy - srcTop) * scale, |
| 3128 | (dx - srcLeft) * scale, |
| 3129 | (dy - srcTop) * scale); |
| 3130 | ctx.stroke(); |
| 3131 | } |
| 3132 | |
| 3133 | function drawCurve(c) { |
| 3134 | switch (c.length) { |
| 3135 | case 4: |
| 3136 | drawLine(c[0], c[1], c[2], c[3]); |
| 3137 | break; |
| 3138 | case 6: |
| 3139 | drawQuad(c[0], c[1], c[2], c[3], c[4], c[5]); |
| 3140 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3141 | case 7: |
| 3142 | drawConicWithQuads(c[0], c[1], c[2], c[3], c[4], c[5], c[6]); |
| 3143 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3144 | case 8: |
| 3145 | drawCubic(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7]); |
| 3146 | break; |
| 3147 | } |
| 3148 | } |
| 3149 | |
| 3150 | function boundsWidth(pts) { |
| 3151 | var min = pts[0]; |
| 3152 | var max = pts[0]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3153 | var length = pts.length == 7 ? 6 : pts.length; |
| 3154 | for (var idx = 2; idx < length; idx += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3155 | min = Math.min(min, pts[idx]); |
| 3156 | max = Math.max(max, pts[idx]); |
| 3157 | } |
| 3158 | return max - min; |
| 3159 | } |
| 3160 | |
| 3161 | function boundsHeight(pts) { |
| 3162 | var min = pts[1]; |
| 3163 | var max = pts[1]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3164 | var length = pts.length == 7 ? 6 : pts.length; |
| 3165 | for (var idx = 3; idx < length; idx += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3166 | min = Math.min(min, pts[idx]); |
| 3167 | max = Math.max(max, pts[idx]); |
| 3168 | } |
| 3169 | return max - min; |
| 3170 | } |
| 3171 | |
| 3172 | function tangent(pts) { |
| 3173 | var dx = pts[2] - pts[0]; |
| 3174 | var dy = pts[3] - pts[1]; |
| 3175 | if (dx == 0 && dy == 0 && pts.length > 4) { |
| 3176 | dx = pts[4] - pts[0]; |
| 3177 | dy = pts[5] - pts[1]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3178 | if (dx == 0 && dy == 0 && pts.length == 8) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3179 | dx = pts[6] - pts[0]; |
| 3180 | dy = pts[7] - pts[1]; |
| 3181 | } |
| 3182 | } |
| 3183 | return Math.atan2(-dy, dx); |
| 3184 | } |
| 3185 | |
| 3186 | function hodograph(cubic) { |
| 3187 | var hodo = []; |
| 3188 | hodo[0] = 3 * (cubic[2] - cubic[0]); |
| 3189 | hodo[1] = 3 * (cubic[3] - cubic[1]); |
| 3190 | hodo[2] = 3 * (cubic[4] - cubic[2]); |
| 3191 | hodo[3] = 3 * (cubic[5] - cubic[3]); |
| 3192 | hodo[4] = 3 * (cubic[6] - cubic[4]); |
| 3193 | hodo[5] = 3 * (cubic[7] - cubic[5]); |
| 3194 | return hodo; |
| 3195 | } |
| 3196 | |
| 3197 | function hodograph2(cubic) { |
| 3198 | var quad = hodograph(cubic); |
| 3199 | var hodo = []; |
| 3200 | hodo[0] = 2 * (quad[2] - quad[0]); |
| 3201 | hodo[1] = 2 * (quad[3] - quad[1]); |
| 3202 | hodo[2] = 2 * (quad[4] - quad[2]); |
| 3203 | hodo[3] = 2 * (quad[5] - quad[3]); |
| 3204 | return hodo; |
| 3205 | } |
| 3206 | |
| 3207 | function quadraticRootsReal(A, B, C, s) { |
| 3208 | if (A == 0) { |
| 3209 | if (B == 0) { |
| 3210 | s[0] = 0; |
| 3211 | return C == 0; |
| 3212 | } |
| 3213 | s[0] = -C / B; |
| 3214 | return 1; |
| 3215 | } |
| 3216 | /* normal form: x^2 + px + q = 0 */ |
| 3217 | var p = B / (2 * A); |
| 3218 | var q = C / A; |
| 3219 | var p2 = p * p; |
| 3220 | if (p2 < q) { |
| 3221 | return 0; |
| 3222 | } |
| 3223 | var sqrt_D = 0; |
| 3224 | if (p2 > q) { |
| 3225 | sqrt_D = sqrt(p2 - q); |
| 3226 | } |
| 3227 | s[0] = sqrt_D - p; |
| 3228 | s[1] = -sqrt_D - p; |
| 3229 | return 1 + s[0] != s[1]; |
| 3230 | } |
| 3231 | |
| 3232 | function add_valid_ts(s, realRoots, t) { |
| 3233 | var foundRoots = 0; |
| 3234 | for (var index = 0; index < realRoots; ++index) { |
| 3235 | var tValue = s[index]; |
| 3236 | if (tValue >= 0 && tValue <= 1) { |
| 3237 | for (var idx2 = 0; idx2 < foundRoots; ++idx2) { |
| 3238 | if (t[idx2] != tValue) { |
| 3239 | t[foundRoots++] = tValue; |
| 3240 | } |
| 3241 | } |
| 3242 | } |
| 3243 | } |
| 3244 | return foundRoots; |
| 3245 | } |
| 3246 | |
| 3247 | function quadraticRootsValidT(a, b, c, t) { |
| 3248 | var s = []; |
| 3249 | var realRoots = quadraticRootsReal(A, B, C, s); |
| 3250 | var foundRoots = add_valid_ts(s, realRoots, t); |
| 3251 | return foundRoots != 0; |
| 3252 | } |
| 3253 | |
| 3254 | function find_cubic_inflections(cubic, tValues) { |
| 3255 | var Ax = src[2] - src[0]; |
| 3256 | var Ay = src[3] - src[1]; |
| 3257 | var Bx = src[4] - 2 * src[2] + src[0]; |
| 3258 | var By = src[5] - 2 * src[3] + src[1]; |
| 3259 | var Cx = src[6] + 3 * (src[2] - src[4]) - src[0]; |
| 3260 | var Cy = src[7] + 3 * (src[3] - src[5]) - src[1]; |
| 3261 | return quadraticRootsValidT(Bx * Cy - By * Cx, (Ax * Cy - Ay * Cx), |
| 3262 | Ax * By - Ay * Bx, tValues); |
| 3263 | } |
| 3264 | |
| 3265 | function dxy_at_t(curve, type, t) { |
| 3266 | var dxy = {}; |
| 3267 | if (type == PATH_QUAD) { |
| 3268 | var a = t - 1; |
| 3269 | var b = 1 - 2 * t; |
| 3270 | var c = t; |
| 3271 | dxy.x = a * curve[0] + b * curve[2] + c * curve[4]; |
| 3272 | dxy.y = a * curve[1] + b * curve[3] + c * curve[5]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3273 | } else if (type == PATH_CONIC) { |
| 3274 | var p20x = curve[4] - curve[0]; |
| 3275 | var p20y = curve[5] - curve[1]; |
| 3276 | var p10xw = (curve[2] - curve[0]) * curve[6]; |
| 3277 | var p10yw = (curve[3] - curve[1]) * curve[6]; |
| 3278 | var coeff0x = curve[6] * p20x - p20x; |
| 3279 | var coeff0y = curve[6] * p20y - p20y; |
| 3280 | var coeff1x = p20x - 2 * p10xw; |
| 3281 | var coeff1y = p20y - 2 * p10yw; |
| 3282 | dxy.x = t * (t * coeff0x + coeff1x) + p10xw; |
| 3283 | dxy.y = t * (t * coeff0y + coeff1y) + p10yw; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3284 | } else if (type == PATH_CUBIC) { |
| 3285 | var one_t = 1 - t; |
| 3286 | var a = curve[0]; |
| 3287 | var b = curve[2]; |
| 3288 | var c = curve[4]; |
| 3289 | var d = curve[6]; |
| 3290 | dxy.x = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); |
| 3291 | a = curve[1]; |
| 3292 | b = curve[3]; |
| 3293 | c = curve[5]; |
| 3294 | d = curve[7]; |
| 3295 | dxy.y = 3 * ((b - a) * one_t * one_t + 2 * (c - b) * t * one_t + (d - c) * t * t); |
| 3296 | } |
| 3297 | return dxy; |
| 3298 | } |
| 3299 | |
| 3300 | function drawLabel(num, px, py) { |
| 3301 | ctx.beginPath(); |
| 3302 | ctx.arc(px, py, 8, 0, Math.PI*2, true); |
| 3303 | ctx.closePath(); |
| 3304 | ctx.strokeStyle = "rgba(0,0,0, 0.4)"; |
| 3305 | ctx.lineWidth = num == 0 || num == 3 ? 2 : 1; |
| 3306 | ctx.stroke(); |
| 3307 | ctx.fillStyle = "black"; |
| 3308 | ctx.font = "normal 10px Arial"; |
| 3309 | // ctx.rotate(0.001); |
| 3310 | ctx.fillText(num, px - 2, py + 3); |
| 3311 | // ctx.rotate(-0.001); |
| 3312 | } |
| 3313 | |
| 3314 | function drawLabelX(ymin, num, loc) { |
| 3315 | var px = (loc - srcLeft) * scale; |
| 3316 | var py = (ymin - srcTop) * scale - 20; |
| 3317 | drawLabel(num, px, py); |
| 3318 | } |
| 3319 | |
| 3320 | function drawLabelY(xmin, num, loc) { |
| 3321 | var px = (xmin - srcLeft) * scale - 20; |
| 3322 | var py = (loc - srcTop) * scale; |
| 3323 | drawLabel(num, px, py); |
| 3324 | } |
| 3325 | |
| 3326 | function drawHodoOrigin(hx, hy, hMinX, hMinY, hMaxX, hMaxY) { |
| 3327 | ctx.beginPath(); |
| 3328 | ctx.moveTo(hx, hy - 100); |
| 3329 | ctx.lineTo(hx, hy); |
| 3330 | ctx.strokeStyle = hMinY < 0 ? "green" : "blue"; |
| 3331 | ctx.stroke(); |
| 3332 | ctx.beginPath(); |
| 3333 | ctx.moveTo(hx, hy); |
| 3334 | ctx.lineTo(hx, hy + 100); |
| 3335 | ctx.strokeStyle = hMaxY > 0 ? "green" : "blue"; |
| 3336 | ctx.stroke(); |
| 3337 | ctx.beginPath(); |
| 3338 | ctx.moveTo(hx - 100, hy); |
| 3339 | ctx.lineTo(hx, hy); |
| 3340 | ctx.strokeStyle = hMinX < 0 ? "green" : "blue"; |
| 3341 | ctx.stroke(); |
| 3342 | ctx.beginPath(); |
| 3343 | ctx.moveTo(hx, hy); |
| 3344 | ctx.lineTo(hx + 100, hy); |
| 3345 | ctx.strokeStyle = hMaxX > 0 ? "green" : "blue"; |
| 3346 | ctx.stroke(); |
| 3347 | } |
| 3348 | |
| 3349 | function scalexy(x, y, mag) { |
| 3350 | var length = Math.sqrt(x * x + y * y); |
| 3351 | return mag / length; |
| 3352 | } |
| 3353 | |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3354 | function drawArrow(x, y, dx, dy, s) { |
| 3355 | var dscale = scalexy(dx, dy, 1 / scale * 100 * s); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3356 | dx *= dscale; |
| 3357 | dy *= dscale; |
| 3358 | ctx.beginPath(); |
| 3359 | ctx.moveTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 3360 | x += dx; |
| 3361 | y += dy; |
| 3362 | ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 3363 | dx /= 10; |
| 3364 | dy /= 10; |
| 3365 | ctx.lineTo((x - dy - srcLeft) * scale, (y + dx - srcTop) * scale); |
| 3366 | ctx.lineTo((x + dx * 2 - srcLeft) * scale, (y + dy * 2 - srcTop) * scale); |
| 3367 | ctx.lineTo((x + dy - srcLeft) * scale, (y - dx - srcTop) * scale); |
| 3368 | ctx.lineTo((x - srcLeft) * scale, (y - srcTop) * scale); |
| 3369 | ctx.strokeStyle = "rgba(0,75,0, 0.4)"; |
| 3370 | ctx.stroke(); |
| 3371 | } |
| 3372 | |
| 3373 | function x_at_t(curve, t) { |
| 3374 | var one_t = 1 - t; |
| 3375 | if (curve.length == 4) { |
| 3376 | return one_t * curve[0] + t * curve[2]; |
| 3377 | } |
| 3378 | var one_t2 = one_t * one_t; |
| 3379 | var t2 = t * t; |
| 3380 | if (curve.length == 6) { |
| 3381 | return one_t2 * curve[0] + 2 * one_t * t * curve[2] + t2 * curve[4]; |
| 3382 | } |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3383 | if (curve.length == 7) { |
| 3384 | return (one_t2 * curve[0] + 2 * one_t * t * curve[2] * curve[6] + t2 * curve[4]) |
| 3385 | / (one_t2 +2 * one_t * t * curve[6] + t2); |
| 3386 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3387 | var a = one_t2 * one_t; |
| 3388 | var b = 3 * one_t2 * t; |
| 3389 | var c = 3 * one_t * t2; |
| 3390 | var d = t2 * t; |
| 3391 | return a * curve[0] + b * curve[2] + c * curve[4] + d * curve[6]; |
| 3392 | } |
| 3393 | |
| 3394 | function y_at_t(curve, t) { |
| 3395 | var one_t = 1 - t; |
| 3396 | if (curve.length == 4) { |
| 3397 | return one_t * curve[1] + t * curve[3]; |
| 3398 | } |
| 3399 | var one_t2 = one_t * one_t; |
| 3400 | var t2 = t * t; |
| 3401 | if (curve.length == 6) { |
| 3402 | return one_t2 * curve[1] + 2 * one_t * t * curve[3] + t2 * curve[5]; |
| 3403 | } |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3404 | if (curve.length == 7) { |
| 3405 | return (one_t2 * curve[1] + 2 * one_t * t * curve[3] * curve[6] + t2 * curve[5]) |
| 3406 | / (one_t2 +2 * one_t * t * curve[6] + t2); |
| 3407 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3408 | var a = one_t2 * one_t; |
| 3409 | var b = 3 * one_t2 * t; |
| 3410 | var c = 3 * one_t * t2; |
| 3411 | var d = t2 * t; |
| 3412 | return a * curve[1] + b * curve[3] + c * curve[5] + d * curve[7]; |
| 3413 | } |
| 3414 | |
| 3415 | function drawOrder(curve, label) { |
| 3416 | var px = x_at_t(curve, 0.75); |
| 3417 | var py = y_at_t(curve, 0.75); |
| 3418 | var _px = (px - srcLeft) * scale; |
| 3419 | var _py = (py - srcTop) * scale; |
| 3420 | ctx.beginPath(); |
| 3421 | ctx.arc(_px, _py, 15, 0, Math.PI * 2, true); |
| 3422 | ctx.closePath(); |
| 3423 | ctx.fillStyle = "white"; |
| 3424 | ctx.fill(); |
| 3425 | if (label == 'L') { |
| 3426 | ctx.strokeStyle = "rgba(255,0,0, 1)"; |
| 3427 | ctx.fillStyle = "rgba(255,0,0, 1)"; |
| 3428 | } else { |
| 3429 | ctx.strokeStyle = "rgba(0,0,255, 1)"; |
| 3430 | ctx.fillStyle = "rgba(0,0,255, 1)"; |
| 3431 | } |
| 3432 | ctx.stroke(); |
| 3433 | ctx.font = "normal 16px Arial"; |
| 3434 | ctx.textAlign = "center"; |
| 3435 | ctx.fillText(label, _px, _py + 5); |
| 3436 | ctx.font = "normal 10px Arial"; |
| 3437 | } |
| 3438 | |
| 3439 | function drawID(curve, id) { |
| 3440 | var px = x_at_t(curve, 0.5); |
| 3441 | var py = y_at_t(curve, 0.5); |
| 3442 | var _px = (px - srcLeft) * scale; |
| 3443 | var _py = (py - srcTop) * scale; |
| 3444 | draw_id_at(id, _px, _py); |
| 3445 | } |
| 3446 | |
| 3447 | function draw_id_at(id, _px, _py) { |
| 3448 | ctx.beginPath(); |
| 3449 | ctx.arc(_px, _py, 15, 0, Math.PI * 2, true); |
| 3450 | ctx.closePath(); |
| 3451 | ctx.fillStyle = "white"; |
| 3452 | ctx.fill(); |
| 3453 | ctx.strokeStyle = "rgba(127,127,0, 1)"; |
| 3454 | ctx.fillStyle = "rgba(127,127,0, 1)"; |
| 3455 | ctx.stroke(); |
| 3456 | ctx.font = "normal 16px Arial"; |
| 3457 | ctx.textAlign = "center"; |
| 3458 | ctx.fillText(id, _px, _py + 5); |
| 3459 | ctx.font = "normal 10px Arial"; |
| 3460 | } |
| 3461 | |
| 3462 | function drawLinePartialID(id, x1, y1, x2, y2, t1, t2) { |
| 3463 | var curve = [x1, y1, x2, y2]; |
| 3464 | drawCurvePartialID(id, curve, t1, t2); |
| 3465 | } |
| 3466 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3467 | function drawLineID(id, x1, y1, x2, y2) { |
| 3468 | drawLinePartialID(id, x1, y1, x2, y2, 0, 1); |
| 3469 | } |
| 3470 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3471 | function drawQuadPartialID(id, x1, y1, x2, y2, x3, y3, t1, t2) { |
| 3472 | var curve = [x1, y1, x2, y2, x3, y3]; |
| 3473 | drawCurvePartialID(id, curve, t1, t2); |
| 3474 | } |
| 3475 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3476 | function drawQuadID(id, x1, y1, x2, y2, x3, y3) { |
| 3477 | drawQuadPartialID(id, x1, y1, x2, y2, x3, y3, 0, 1); |
| 3478 | } |
| 3479 | |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3480 | function drawConicPartialID(id, x1, y1, x2, y2, x3, y3, w, t1, t2) { |
| 3481 | var curve = [x1, y1, x2, y2, x3, y3, w]; |
| 3482 | drawCurvePartialID(id, curve, t1, t2); |
| 3483 | } |
| 3484 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3485 | function drawConicID(id, x1, y1, x2, y2, x3, y3, w) { |
| 3486 | drawConicPartialID(id, x1, y1, x2, y2, x3, y3, w, 0, 1); |
| 3487 | } |
| 3488 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3489 | function drawCubicPartialID(id, x1, y1, x2, y2, x3, y3, x4, y4, t1, t2) { |
| 3490 | var curve = [x1, y1, x2, y2, x3, y3, x4, y4]; |
| 3491 | drawCurvePartialID(id, curve, t1, t2); |
| 3492 | } |
| 3493 | |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3494 | function drawCubicID(id, x1, y1, x2, y2, x3, y3, x4, y4) { |
| 3495 | drawCubicPartialID(id, x1, y1, x2, y2, x3, y3, x4, y4, 0, 1); |
| 3496 | } |
| 3497 | |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3498 | function drawCurvePartialID(id, curve, t1, t2) { |
| 3499 | var px = x_at_t(curve, (t1 + t2) / 2); |
| 3500 | var py = y_at_t(curve, (t1 + t2) / 2); |
| 3501 | var _px = (px - srcLeft) * scale; |
| 3502 | var _py = (py - srcTop) * scale; |
| 3503 | draw_id_at(id, _px, _py); |
| 3504 | } |
| 3505 | |
| 3506 | function drawCurveSpecials(test, curve, type) { |
| 3507 | if (pt_labels) { |
| 3508 | drawPoints(curve, type, pt_labels == 2); |
| 3509 | } |
| 3510 | if (control_lines != 0) { |
| 3511 | drawControlLines(curve, type, control_lines); |
| 3512 | } |
| 3513 | if (curve_t) { |
| 3514 | drawPointAtT(curve, type); |
| 3515 | } |
| 3516 | if (draw_midpoint) { |
| 3517 | var mid = pointAtT(curve, type, 0.5); |
| 3518 | drawPoint(mid.x, mid.y, true); |
| 3519 | } |
| 3520 | if (draw_id) { |
| 3521 | var id = idByCurve(test, curve, type); |
| 3522 | if (id >= 0) { |
| 3523 | drawID(curve, id); |
| 3524 | } |
| 3525 | } |
| 3526 | if (type == PATH_LINE) { |
| 3527 | return; |
| 3528 | } |
| 3529 | if (draw_deriviatives > 0) { |
| 3530 | var d = dxy_at_t(curve, type, 0); |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3531 | drawArrow(curve[0], curve[1], d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3532 | if (draw_deriviatives == 2) { |
| 3533 | d = dxy_at_t(curve, type, 1); |
| 3534 | if (type == PATH_CUBIC) { |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3535 | drawArrow(curve[6], curve[7], d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3536 | } else { |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3537 | drawArrow(curve[4], curve[5], d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3538 | } |
| 3539 | } |
| 3540 | if (draw_midpoint) { |
| 3541 | var mid = pointAtT(curve, type, 0.5); |
| 3542 | d = dxy_at_t(curve, type, 0.5); |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3543 | drawArrow(mid.x, mid.y, d.x, d.y, 1); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3544 | } |
| 3545 | } |
| 3546 | if (type != PATH_CUBIC) { |
| 3547 | return; |
| 3548 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3549 | if (draw_sequence) { |
| 3550 | var ymin = Math.min(curve[1], curve[3], curve[5], curve[7]); |
| 3551 | for (var i = 0; i < 8; i+= 2) { |
| 3552 | drawLabelX(ymin, i >> 1, curve[i]); |
| 3553 | } |
| 3554 | var xmin = Math.min(curve[0], curve[2], curve[4], curve[6]); |
| 3555 | for (var i = 1; i < 8; i+= 2) { |
| 3556 | drawLabelY(xmin, i >> 1, curve[i]); |
| 3557 | } |
| 3558 | } |
| 3559 | } |
| 3560 | |
| 3561 | function logCurves(test) { |
| 3562 | for (curves in test) { |
| 3563 | var curve = test[curves]; |
| 3564 | dumpCurve(curve); |
| 3565 | } |
| 3566 | } |
| 3567 | |
| 3568 | function curveToString(curve) { |
| 3569 | var str = "{{"; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3570 | var length = curve.length == 7 ? 6 : curve.length; |
| 3571 | if (curve.length == 7) { |
| 3572 | str += "{"; |
| 3573 | } |
| 3574 | for (i = 0; i < length; i += 2) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3575 | str += curve[i].toFixed(decimal_places) + "," + curve[i + 1].toFixed(decimal_places); |
| 3576 | if (i < curve.length - 2) { |
| 3577 | str += "}, {"; |
| 3578 | } |
| 3579 | } |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3580 | str += "}"; |
| 3581 | if (curve.length == 7) { |
| 3582 | str += "}, " + curve[6].toFixed(decimal_places); |
| 3583 | } |
| 3584 | str += "}"; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3585 | return str; |
| 3586 | } |
| 3587 | |
| 3588 | function dumpCurve(curve) { |
| 3589 | console.log(curveToString(curve)); |
| 3590 | } |
| 3591 | |
| 3592 | function draw(test, lines, title) { |
| 3593 | ctx.fillStyle = "rgba(0,0,0, 0.1)"; |
| 3594 | ctx.font = "normal 50px Arial"; |
| 3595 | ctx.textAlign = "left"; |
| 3596 | ctx.fillText(title, 50, 50); |
| 3597 | ctx.font = "normal 10px Arial"; |
| 3598 | ctx.lineWidth = "1.001"; "0.999"; |
| 3599 | var secondPath = test.length; |
| 3600 | var closeCount = 0; |
| 3601 | logStart = -1; |
| 3602 | logRange = 0; |
| 3603 | // find last active rec type at this step |
| 3604 | var curType = test[0]; |
| 3605 | var curStep = 0; |
| 3606 | var hasOp = false; |
| 3607 | var lastActive = 0; |
| 3608 | var lastAdd = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3609 | var lastCoin = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3610 | var lastSect = 0; |
| 3611 | var lastSort = 0; |
| 3612 | var lastMark = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3613 | var lastTop = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3614 | activeCount = 0; |
| 3615 | addCount = 0; |
| 3616 | angleCount = 0; |
| 3617 | opCount = 0; |
| 3618 | sectCount = 0; |
| 3619 | sortCount = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3620 | topCount = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3621 | markCount = 0; |
| 3622 | activeMax = 0; |
| 3623 | addMax = 0; |
| 3624 | angleMax = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3625 | coinMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3626 | opMax = 0; |
| 3627 | sectMax = 0; |
| 3628 | sectMax2 = 0; |
| 3629 | sortMax = 0; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3630 | topMax = 0; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3631 | markMax = 0; |
| 3632 | lastIndex = test.length - 3; |
| 3633 | for (var tIndex = 0; tIndex < test.length; tIndex += 3) { |
| 3634 | var recType = test[tIndex]; |
| 3635 | if (!typeof recType == 'number' || recType < REC_TYPE_UNKNOWN || recType > REC_TYPE_LAST) { |
| 3636 | console.log("unknown rec type: " + recType); |
| 3637 | throw "stop execution"; |
| 3638 | } |
| 3639 | // if (curType == recType && curType != REC_TYPE_ADD) { |
| 3640 | // continue; |
| 3641 | // } |
| 3642 | var inStepRange = step_limit == 0 || curStep < step_limit; |
| 3643 | curType = recType; |
| 3644 | if (recType == REC_TYPE_OP) { |
| 3645 | hasOp = true; |
| 3646 | continue; |
| 3647 | } |
| 3648 | if (recType == REC_TYPE_UNKNOWN) { |
| 3649 | // these types do not advance step |
| 3650 | continue; |
| 3651 | } |
| 3652 | var bumpStep = false; |
| 3653 | var records = test[tIndex + 2]; |
| 3654 | var fragType = records[0]; |
| 3655 | if (recType == REC_TYPE_ADD) { |
| 3656 | if (records.length != 2) { |
| 3657 | console.log("expect only two elements: " + records.length); |
| 3658 | throw "stop execution"; |
| 3659 | } |
| 3660 | if (fragType == ADD_MOVETO || fragType == ADD_CLOSE) { |
| 3661 | continue; |
| 3662 | } |
| 3663 | ++addMax; |
| 3664 | if (!draw_add || !inStepRange) { |
| 3665 | continue; |
| 3666 | } |
| 3667 | lastAdd = tIndex; |
| 3668 | ++addCount; |
| 3669 | bumpStep = true; |
| 3670 | } |
| 3671 | if (recType == REC_TYPE_PATH && hasOp) { |
| 3672 | secondPath = tIndex; |
| 3673 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3674 | if (recType == REC_TYPE_PATH2 && hasOp) { |
| 3675 | secondPath = tIndex; |
| 3676 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3677 | if (recType == REC_TYPE_ACTIVE) { |
| 3678 | ++activeMax; |
| 3679 | if (!draw_active || !inStepRange) { |
| 3680 | continue; |
| 3681 | } |
| 3682 | lastActive = tIndex; |
| 3683 | ++activeCount; |
| 3684 | bumpStep = true; |
| 3685 | } |
| 3686 | if (recType == REC_TYPE_ACTIVE_OP) { |
| 3687 | ++opMax; |
| 3688 | if (!draw_op || !inStepRange) { |
| 3689 | continue; |
| 3690 | } |
| 3691 | lastOp = tIndex; |
| 3692 | ++opCount; |
| 3693 | bumpStep = true; |
| 3694 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3695 | if (recType == REC_TYPE_AFTERPART) { |
| 3696 | if (draw_angle != 3 || !inStepRange) { |
| 3697 | continue; |
| 3698 | } |
| 3699 | lastAngle = tIndex; |
| 3700 | ++angleCount; |
| 3701 | bumpStep = true; |
| 3702 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3703 | if (recType == REC_TYPE_ANGLE) { |
| 3704 | ++angleMax; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3705 | if (draw_angle == 0 || draw_angle == 3 || !inStepRange) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3706 | continue; |
| 3707 | } |
| 3708 | lastAngle = tIndex; |
| 3709 | ++angleCount; |
| 3710 | bumpStep = true; |
| 3711 | } |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3712 | if (recType == REC_TYPE_COINCIDENCE) { |
| 3713 | ++coinMax; |
| 3714 | if (!draw_coincidence || !inStepRange) { |
| 3715 | continue; |
| 3716 | } |
| 3717 | lastCoin = tIndex; |
| 3718 | ++coinCount; |
| 3719 | bumpStep = true; |
| 3720 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3721 | if (recType == REC_TYPE_SECT) { |
| 3722 | if (records.length != 2) { |
| 3723 | console.log("expect only two elements: " + records.length); |
| 3724 | throw "stop execution"; |
| 3725 | } |
| 3726 | ++sectMax; |
| 3727 | var sectBump = 1; |
| 3728 | switch (fragType) { |
| 3729 | case INTERSECT_LINE: |
| 3730 | case INTERSECT_QUAD_LINE: |
| 3731 | case INTERSECT_QUAD: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3732 | case INTERSECT_CONIC_LINE: |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3733 | case INTERSECT_CONIC_QUAD: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3734 | case INTERSECT_CONIC: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3735 | case INTERSECT_SELF_CUBIC: |
| 3736 | case INTERSECT_CUBIC_LINE: |
| 3737 | case INTERSECT_CUBIC_QUAD: |
| 3738 | case INTERSECT_CUBIC: |
| 3739 | sectBump = 1; |
| 3740 | break; |
| 3741 | case INTERSECT_LINE_2: |
| 3742 | case INTERSECT_QUAD_LINE_2: |
| 3743 | case INTERSECT_QUAD_2: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3744 | case INTERSECT_CONIC_LINE_2: |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3745 | case INTERSECT_CONIC_QUAD_2: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3746 | case INTERSECT_CONIC_2: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3747 | case INTERSECT_CUBIC_LINE_2: |
| 3748 | case INTERSECT_CUBIC_QUAD_2: |
| 3749 | case INTERSECT_CUBIC_2: |
| 3750 | sectBump = 2; |
| 3751 | break; |
| 3752 | case INTERSECT_LINE_NO: |
| 3753 | case INTERSECT_QUAD_LINE_NO: |
| 3754 | case INTERSECT_QUAD_NO: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3755 | case INTERSECT_CONIC_LINE_NO: |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3756 | case INTERSECT_CONIC_QUAD_NO: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3757 | case INTERSECT_CONIC_NO: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3758 | case INTERSECT_SELF_CUBIC_NO: |
| 3759 | case INTERSECT_CUBIC_LINE_NO: |
| 3760 | case INTERSECT_CUBIC_QUAD_NO: |
| 3761 | case INTERSECT_CUBIC_NO: |
| 3762 | sectBump = 0; |
| 3763 | break; |
caryclark | 6c3b9cd | 2016-09-26 05:36:58 -0700 | [diff] [blame] | 3764 | case INTERSECT_CONIC_QUAD_3: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3765 | case INTERSECT_CUBIC_LINE_3: |
| 3766 | case INTERSECT_CUBIC_QUAD_3: |
| 3767 | case INTERSECT_CUBIC_3: |
| 3768 | sectBump = 3; |
| 3769 | break; |
caryclark | 6c3b9cd | 2016-09-26 05:36:58 -0700 | [diff] [blame] | 3770 | case INTERSECT_CONIC_QUAD_4: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3771 | case INTERSECT_CUBIC_QUAD_4: |
| 3772 | case INTERSECT_CUBIC_4: |
| 3773 | sectBump = 4; |
| 3774 | break; |
| 3775 | default: |
| 3776 | console.log("missing case " + records.length); |
| 3777 | throw "stop execution"; |
| 3778 | } |
| 3779 | sectMax2 += sectBump; |
| 3780 | if (draw_intersection <= 1 || !inStepRange) { |
| 3781 | continue; |
| 3782 | } |
| 3783 | lastSect = tIndex; |
| 3784 | sectCount += sectBump; |
| 3785 | bumpStep = true; |
| 3786 | } |
| 3787 | if (recType == REC_TYPE_SORT) { |
| 3788 | ++sortMax; |
| 3789 | if (!draw_sort || !inStepRange) { |
| 3790 | continue; |
| 3791 | } |
| 3792 | lastSort = tIndex; |
| 3793 | ++sortCount; |
| 3794 | bumpStep = true; |
| 3795 | } |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3796 | if (recType == REC_TYPE_TOP) { |
| 3797 | ++topMax; |
| 3798 | if (!draw_top || !inStepRange) { |
| 3799 | continue; |
| 3800 | } |
| 3801 | lastTop = tIndex; |
| 3802 | ++topCount; |
| 3803 | bumpStep = true; |
| 3804 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3805 | if (recType == REC_TYPE_MARK) { |
| 3806 | ++markMax; |
| 3807 | if (!draw_mark || !inStepRange) { |
| 3808 | continue; |
| 3809 | } |
| 3810 | lastMark = tIndex; |
| 3811 | ++markCount; |
| 3812 | bumpStep = true; |
| 3813 | } |
| 3814 | if (bumpStep) { |
| 3815 | lastIndex = tIndex; |
| 3816 | logStart = test[tIndex + 1]; |
| 3817 | logRange = records.length / 2; |
| 3818 | ++curStep; |
| 3819 | } |
| 3820 | } |
| 3821 | stepMax = (draw_add ? addMax : 0) |
| 3822 | + (draw_active ? activeMax : 0) |
reed | 0dc4dd6 | 2015-03-24 13:55:33 -0700 | [diff] [blame] | 3823 | + (draw_angle ? angleMax : 0) |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3824 | + (draw_coincidence ? coinMax : 0) |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3825 | + (draw_op ? opMax : 0) |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3826 | + (draw_sort ? sortMax : 0) |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 3827 | + (draw_top ? topMax : 0) |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3828 | + (draw_mark ? markMax : 0) |
| 3829 | + (draw_intersection == 2 ? sectMax : draw_intersection == 3 ? sectMax2 : 0); |
| 3830 | if (stepMax == 0) { |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 3831 | stepMax = addMax + activeMax + angleMax + coinMax + opMax + sortMax + topMax + markMax; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3832 | } |
| 3833 | drawnPts = []; |
| 3834 | drawnLines = []; |
| 3835 | drawnQuads = []; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3836 | drawnConics = []; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3837 | drawnCubics = []; |
| 3838 | focusXmin = focusYmin = Infinity; |
| 3839 | focusXmax = focusYmax = -Infinity; |
| 3840 | var pathIndex = 0; |
| 3841 | var opLetter = 'S'; |
| 3842 | for (var tIndex = lastIndex; tIndex >= 0; tIndex -= 3) { |
| 3843 | var recType = test[tIndex]; |
| 3844 | var records = test[tIndex + 2]; |
| 3845 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 3846 | var fragType = records[recordIndex]; |
| 3847 | if (!typeof fragType == 'number' || fragType < 1 || fragType > FRAG_TYPE_LAST) { |
| 3848 | console.log("unknown in range frag type: " + fragType); |
| 3849 | throw "stop execution"; |
| 3850 | } |
| 3851 | var frags = records[recordIndex + 1]; |
| 3852 | focus_enabled = false; |
| 3853 | switch (recType) { |
| 3854 | case REC_TYPE_COMPUTED: |
| 3855 | if (draw_computed == 0) { |
| 3856 | continue; |
| 3857 | } |
| 3858 | ctx.lineWidth = 1; |
| 3859 | ctx.strokeStyle = pathIndex == 0 ? "black" : "red"; |
| 3860 | ctx.fillStyle = "blue"; |
| 3861 | var drawThis = false; |
| 3862 | switch (fragType) { |
| 3863 | case PATH_QUAD: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3864 | if ((draw_computed & 0x9) == 1 || ((draw_computed & 8) != 0 |
| 3865 | && (draw_computed & 7) == pathIndex)) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3866 | drawQuad(frags[0], frags[1], frags[2], frags[3], |
| 3867 | frags[4], frags[5]); |
| 3868 | drawThis = true; |
| 3869 | } |
| 3870 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3871 | case PATH_CONIC: |
| 3872 | if ((draw_computed & 0xA) == 2 || ((draw_computed & 8) != 0 |
| 3873 | && (draw_computed & 7) == pathIndex)) { |
| 3874 | drawConicWithQuads(frags[0], frags[1], frags[2], frags[3], |
| 3875 | frags[4], frags[5], frags[6]); |
| 3876 | drawThis = true; |
| 3877 | } |
| 3878 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3879 | case PATH_CUBIC: |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3880 | if ((draw_computed & 0xC) == 4 || ((draw_computed & 8) != 0 |
| 3881 | && (draw_computed & 7) == pathIndex)) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3882 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
| 3883 | frags[4], frags[5], frags[6], frags[7]); |
| 3884 | drawThis = true; |
| 3885 | } |
| 3886 | ++pathIndex; |
| 3887 | break; |
| 3888 | case COMPUTED_SET_1: |
| 3889 | pathIndex = 0; |
| 3890 | break; |
| 3891 | case COMPUTED_SET_2: |
| 3892 | pathIndex = 1; |
| 3893 | break; |
| 3894 | default: |
| 3895 | console.log("unknown REC_TYPE_COMPUTED frag type: " + fragType); |
| 3896 | throw "stop execution"; |
| 3897 | } |
| 3898 | if (!drawThis || collect_bounds) { |
| 3899 | break; |
| 3900 | } |
| 3901 | drawCurveSpecials(test, frags, fragType); |
| 3902 | break; |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 3903 | case REC_TYPE_ALIGNED: |
| 3904 | if (draw_path < 4) { |
| 3905 | continue; |
| 3906 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3907 | case REC_TYPE_PATH: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3908 | case REC_TYPE_PATH2: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 3909 | if (REC_TYPE_ALIGNED != recType && draw_path >= 4) { |
| 3910 | continue; |
| 3911 | } |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3912 | if (!draw_path) { |
| 3913 | continue; |
| 3914 | } |
| 3915 | var firstPath = tIndex < secondPath; |
| 3916 | if ((draw_path & (firstPath ? 1 : 2)) == 0) { |
| 3917 | continue; |
| 3918 | } |
| 3919 | ctx.lineWidth = 1; |
| 3920 | ctx.strokeStyle = firstPath ? "black" : "red"; |
| 3921 | ctx.fillStyle = "blue"; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3922 | var frags2 = []; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3923 | switch (fragType) { |
| 3924 | case PATH_LINE: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3925 | for (var i = 0; i < 4; ++ i) { frags2[i] = frags[i + 1]; } |
| 3926 | drawLine(frags2[0], frags2[1], frags2[2], frags2[3]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3927 | break; |
| 3928 | case PATH_QUAD: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3929 | for (var i = 0; i < 6; ++ i) { frags2[i] = frags[i + 1]; } |
| 3930 | drawQuad(frags2[0], frags2[1], frags2[2], frags2[3], |
| 3931 | frags2[4], frags2[5]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3932 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 3933 | case PATH_CONIC: |
| 3934 | for (var i = 0; i < 7; ++ i) { frags2[i] = frags[i + 1]; } |
| 3935 | drawConicWithQuads(frags2[0], frags2[1], frags2[2], frags2[3], |
| 3936 | frags2[4], frags2[5], frags2[6]); |
| 3937 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3938 | case PATH_CUBIC: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3939 | for (var i = 0; i < 8; ++ i) { frags2[i] = frags[i + 1]; } |
| 3940 | drawCubic(frags2[0], frags2[1], frags2[2], frags2[3], |
| 3941 | frags2[4], frags2[5], frags2[6], frags2[7]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3942 | break; |
| 3943 | default: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 3944 | console.log("unknown " + recType + " frag type: " + fragType); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3945 | throw "stop execution"; |
| 3946 | } |
| 3947 | if (collect_bounds) { |
| 3948 | break; |
| 3949 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 3950 | drawCurveSpecials(test, frags2, fragType); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3951 | break; |
| 3952 | case REC_TYPE_OP: |
| 3953 | switch (fragType) { |
| 3954 | case OP_INTERSECT: opLetter = 'I'; break; |
| 3955 | case OP_DIFFERENCE: opLetter = 'D'; break; |
| 3956 | case OP_UNION: opLetter = 'U'; break; |
| 3957 | case OP_XOR: opLetter = 'X'; break; |
| 3958 | default: |
| 3959 | console.log("unknown REC_TYPE_OP frag type: " + fragType); |
| 3960 | throw "stop execution"; |
| 3961 | } |
| 3962 | break; |
| 3963 | case REC_TYPE_ACTIVE: |
| 3964 | if (!draw_active || (step_limit > 0 && tIndex < lastActive)) { |
| 3965 | continue; |
| 3966 | } |
| 3967 | var x1 = frags[SPAN_X1]; |
| 3968 | var y1 = frags[SPAN_Y1]; |
| 3969 | var x2 = frags[SPAN_X2]; |
| 3970 | var y2 = frags[SPAN_Y2]; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3971 | var x3, y3, x3, y4, w; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3972 | ctx.lineWidth = 3; |
| 3973 | ctx.strokeStyle = "rgba(0,0,255, 0.3)"; |
| 3974 | focus_enabled = true; |
| 3975 | switch (fragType) { |
| 3976 | case ACTIVE_LINE_SPAN: |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3977 | drawLine(x1, y1, x2, y2); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3978 | if (draw_id) { |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3979 | drawLineID(frags[0], x1, y1, x2, y2); |
| 3980 | } |
| 3981 | if (pt_labels) { |
| 3982 | var curve = [x1, y1, x2, y2]; |
| 3983 | ctx.fillStyle = "blue"; |
| 3984 | drawPoints(curve, PATH_LINE, pt_labels == 2); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3985 | } |
| 3986 | break; |
| 3987 | case ACTIVE_QUAD_SPAN: |
| 3988 | x3 = frags[SPAN_X3]; |
| 3989 | y3 = frags[SPAN_Y3]; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3990 | drawQuad(x1, y1, x2, y2, x3, y3); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3991 | if (draw_id) { |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 3992 | drawQuadID(frags[0], x1, y1, x2, y2, x3, y3); |
| 3993 | } |
| 3994 | if (pt_labels) { |
| 3995 | var curve = [x1, y1, x2, y2, x3, y3]; |
| 3996 | ctx.fillStyle = "blue"; |
| 3997 | drawPoints(curve, PATH_QUAD, pt_labels == 2); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 3998 | } |
| 3999 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4000 | case ACTIVE_CONIC_SPAN: |
| 4001 | x3 = frags[SPAN_X3]; |
| 4002 | y3 = frags[SPAN_Y3]; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4003 | w = frags[SPAN_K_W]; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4004 | drawConicWithQuads(x1, y1, x2, y2, x3, y3, w); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4005 | if (draw_id) { |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4006 | drawConicID(frags[0], x1, y1, x2, y2, x3, y3, w); |
| 4007 | } |
| 4008 | if (pt_labels) { |
| 4009 | var curve = [x1, y1, x2, y2, x3, y3, w]; |
| 4010 | ctx.fillStyle = "blue"; |
| 4011 | drawPoints(curve, PATH_CONIC, pt_labels == 2); |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4012 | } |
| 4013 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4014 | case ACTIVE_CUBIC_SPAN: |
| 4015 | x3 = frags[SPAN_X3]; |
| 4016 | y3 = frags[SPAN_Y3]; |
| 4017 | x4 = frags[SPAN_X4]; |
| 4018 | y4 = frags[SPAN_Y4]; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4019 | drawCubic(x1, y1, x2, y2, x3, y3, x4, y4); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4020 | if (draw_id) { |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4021 | drawCubicID(frags[0], x1, y1, x2, y2, x3, y3, x4, y4); |
| 4022 | } |
| 4023 | if (pt_labels) { |
| 4024 | var curve = [x1, y1, x2, y2, x3, y3, x4, y4]; |
| 4025 | ctx.fillStyle = "blue"; |
| 4026 | drawPoints(curve, PATH_CUBIC, pt_labels == 2); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4027 | } |
| 4028 | break; |
| 4029 | default: |
| 4030 | console.log("unknown REC_TYPE_ACTIVE frag type: " + fragType); |
| 4031 | throw "stop execution"; |
| 4032 | } |
| 4033 | break; |
| 4034 | case REC_TYPE_ACTIVE_OP: |
| 4035 | if (!draw_op || (step_limit > 0 && tIndex < lastOp)) { |
| 4036 | continue; |
| 4037 | } |
| 4038 | focus_enabled = true; |
| 4039 | ctx.lineWidth = 3; |
| 4040 | var activeSpan = frags[7] == "1"; |
| 4041 | ctx.strokeStyle = activeSpan ? "rgba(45,160,0, 0.3)" : "rgba(255,45,0, 0.5)"; |
| 4042 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 4043 | drawCurve(curve); |
| 4044 | if (draw_op > 1) { |
| 4045 | drawArc(curve, false, frags[3], frags[4]); |
| 4046 | drawArc(curve, true, frags[5], frags[6]); |
| 4047 | } |
| 4048 | break; |
| 4049 | case REC_TYPE_ADD: |
| 4050 | if (!draw_add) { |
| 4051 | continue; |
| 4052 | } |
| 4053 | ctx.lineWidth = 3; |
| 4054 | ctx.strokeStyle = closeCount == 0 ? "rgba(0,0,255, 0.3)" |
| 4055 | : closeCount == 1 ? "rgba(0,127,0, 0.3)" |
| 4056 | : closeCount == 2 ? "rgba(0,127,127, 0.3)" |
| 4057 | : closeCount == 3 ? "rgba(127,127,0, 0.3)" |
| 4058 | : "rgba(127,0,127, 0.3)"; |
| 4059 | focus_enabled = true; |
| 4060 | switch (fragType) { |
| 4061 | case ADD_MOVETO: |
| 4062 | break; |
| 4063 | case ADD_LINETO: |
| 4064 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 4065 | drawLine(frags[0], frags[1], frags[2], frags[3]); |
| 4066 | } |
| 4067 | break; |
| 4068 | case ADD_QUADTO: |
| 4069 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 4070 | drawQuad(frags[0], frags[1], frags[2], frags[3], frags[4], frags[5]); |
| 4071 | } |
| 4072 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4073 | case ADD_CONICTO: |
| 4074 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 4075 | drawConicWithQuads(frags[0], frags[1], frags[2], frags[3], |
| 4076 | frags[4], frags[5], frags[6]); |
| 4077 | } |
| 4078 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4079 | case ADD_CUBICTO: |
| 4080 | if (step_limit == 0 || tIndex >= lastAdd) { |
| 4081 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
| 4082 | frags[4], frags[5], frags[6], frags[7]); |
| 4083 | } |
| 4084 | break; |
| 4085 | case ADD_CLOSE: |
| 4086 | ++closeCount; |
| 4087 | break; |
| 4088 | case ADD_FILL: |
| 4089 | break; |
| 4090 | default: |
| 4091 | console.log("unknown REC_TYPE_ADD frag type: " + fragType); |
| 4092 | throw "stop execution"; |
| 4093 | } |
| 4094 | break; |
| 4095 | case REC_TYPE_ANGLE: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4096 | angleBetween = frags[18] == "T"; |
| 4097 | afterIndex = 0; |
| 4098 | if (draw_angle == 0 || draw_angle == 3 || (step_limit > 0 && tIndex < lastAngle)) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4099 | continue; |
| 4100 | } |
| 4101 | focus_enabled = true; |
| 4102 | ctx.lineWidth = 3; |
| 4103 | ctx.strokeStyle = "rgba(127,45,127, 0.3)"; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4104 | var leftCurve = curvePartialByID(test, frags[0], frags[4], frags[5]); |
| 4105 | var midCurve = curvePartialByID(test, frags[6], frags[10], frags[11]); |
| 4106 | var rightCurve = curvePartialByID(test, frags[12], frags[16], frags[17]); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4107 | drawCurve(leftCurve); |
| 4108 | drawCurve(rightCurve); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4109 | ctx.strokeStyle = angleBetween ? "rgba(0,160,45, 0.3)" : "rgba(255,0,45, 0.5)"; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4110 | drawCurve(midCurve); |
| 4111 | if (draw_angle > 1) { |
| 4112 | drawOrder(leftCurve, 'L'); |
| 4113 | drawOrder(rightCurve, 'R'); |
| 4114 | } |
| 4115 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4116 | case REC_TYPE_AFTERPART: |
| 4117 | if (draw_angle != 3 || (step_limit > 0 && tIndex < lastAngle)) { |
| 4118 | continue; |
| 4119 | } |
| 4120 | ctx.strokeStyle = afterIndex == 0 ? "rgba(255,0,0, 1.0)" |
| 4121 | : (afterIndex == 1) == angleBetween ? "rgba(0,128,0, 1.0)" |
| 4122 | : "rgba(0,0,255, 1.0)"; |
| 4123 | switch (fragType) { |
| 4124 | case PATH_LINE: |
| 4125 | drawLine(frags[0], frags[1], frags[2], frags[3]); |
| 4126 | break; |
| 4127 | case PATH_QUAD: |
| 4128 | drawQuad(frags[0], frags[1], frags[2], frags[3], |
| 4129 | frags[4], frags[5]); |
| 4130 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4131 | case PATH_CONIC: |
| 4132 | drawConicWithQuads(frags[0], frags[1], frags[2], frags[3], |
| 4133 | frags[4], frags[5], frags[6]); |
| 4134 | break; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4135 | case PATH_CUBIC: |
| 4136 | drawCubic(frags[0], frags[1], frags[2], frags[3], |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4137 | frags[4], frags[5], frags[6], frags[7]); |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4138 | break; |
| 4139 | default: |
| 4140 | console.log("unknown REC_TYPE_AFTERPART frag type: " + fragType); |
| 4141 | throw "stop execution"; |
| 4142 | } |
| 4143 | ++afterIndex; |
| 4144 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4145 | case REC_TYPE_COINCIDENCE: |
| 4146 | if (!draw_coincidence || (step_limit > 0 && tIndex < lastCoin)) { |
| 4147 | continue; |
| 4148 | } |
| 4149 | focus_enabled = true; |
| 4150 | ctx.lineWidth = 3; |
| 4151 | ctx.strokeStyle = "rgba(127,45,63, 0.3)"; |
| 4152 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 4153 | drawCurve(curve); |
| 4154 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4155 | case REC_TYPE_SECT: |
| 4156 | if (!draw_intersection) { |
| 4157 | continue; |
| 4158 | } |
| 4159 | if (draw_intersection != 1 && (step_limit > 0 && tIndex < lastSect)) { |
| 4160 | continue; |
| 4161 | } |
| 4162 | // draw_intersection == 1 : show all |
| 4163 | // draw_intersection == 2 : step == 0 ? show all : show intersection line #step |
| 4164 | // draw_intersection == 3 : step == 0 ? show all : show intersection #step |
| 4165 | ctx.lineWidth = 1; |
| 4166 | ctx.strokeStyle = "rgba(0,0,255, 0.3)"; |
| 4167 | ctx.fillStyle = "blue"; |
| 4168 | focus_enabled = true; |
| 4169 | var f = []; |
| 4170 | var c1s; |
| 4171 | var c1l; |
| 4172 | var c2s; |
| 4173 | var c2l; |
| 4174 | switch (fragType) { |
| 4175 | case INTERSECT_LINE: |
| 4176 | f.push(5, 6, 0, 7); |
| 4177 | c1s = 1; c1l = 4; c2s = 8; c2l = 4; |
| 4178 | break; |
| 4179 | case INTERSECT_LINE_2: |
| 4180 | f.push(5, 6, 0, 10); |
| 4181 | f.push(8, 9, 7, 15); |
| 4182 | c1s = 1; c1l = 4; c2s = 11; c2l = 4; |
| 4183 | break; |
| 4184 | case INTERSECT_LINE_NO: |
| 4185 | c1s = 0; c1l = 4; c2s = 4; c2l = 4; |
| 4186 | break; |
| 4187 | case INTERSECT_QUAD_LINE: |
| 4188 | f.push(7, 8, 0, 9); |
| 4189 | c1s = 1; c1l = 6; c2s = 10; c2l = 4; |
| 4190 | break; |
| 4191 | case INTERSECT_QUAD_LINE_2: |
| 4192 | f.push(7, 8, 0, 12); |
| 4193 | f.push(10, 11, 9, 17); |
| 4194 | c1s = 1; c1l = 6; c2s = 13; c2l = 4; |
| 4195 | break; |
| 4196 | case INTERSECT_QUAD_LINE_NO: |
| 4197 | c1s = 0; c1l = 6; c2s = 6; c2l = 4; |
| 4198 | break; |
| 4199 | case INTERSECT_QUAD: |
| 4200 | f.push(7, 8, 0, 9); |
| 4201 | c1s = 1; c1l = 6; c2s = 10; c2l = 6; |
| 4202 | break; |
| 4203 | case INTERSECT_QUAD_2: |
| 4204 | f.push(7, 8, 0, 12); |
| 4205 | f.push(10, 11, 9, 19); |
| 4206 | c1s = 1; c1l = 6; c2s = 13; c2l = 6; |
| 4207 | break; |
| 4208 | case INTERSECT_QUAD_NO: |
| 4209 | c1s = 0; c1l = 6; c2s = 6; c2l = 6; |
| 4210 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4211 | case INTERSECT_CONIC_LINE: |
| 4212 | f.push(8, 9, 0, 10); |
| 4213 | c1s = 1; c1l = 7; c2s = 11; c2l = 4; |
| 4214 | break; |
| 4215 | case INTERSECT_CONIC_LINE_2: |
| 4216 | f.push(8, 9, 0, 12); |
| 4217 | f.push(11, 12, 10, 18); |
| 4218 | c1s = 1; c1l = 7; c2s = 14; c2l = 4; |
| 4219 | break; |
| 4220 | case INTERSECT_CONIC_LINE_NO: |
| 4221 | c1s = 0; c1l = 7; c2s = 7; c2l = 4; |
| 4222 | break; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4223 | case INTERSECT_CONIC_QUAD: |
| 4224 | f.push(8, 9, 0, 10); |
| 4225 | c1s = 1; c1l = 7; c2s = 11; c2l = 6; |
| 4226 | break; |
| 4227 | case INTERSECT_CONIC_QUAD_2: |
| 4228 | f.push(8, 9, 0, 12); |
| 4229 | f.push(11, 12, 10, 18); |
| 4230 | c1s = 1; c1l = 7; c2s = 14; c2l = 6; |
| 4231 | break; |
caryclark | 6c3b9cd | 2016-09-26 05:36:58 -0700 | [diff] [blame] | 4232 | case INTERSECT_CONIC_QUAD_3: |
| 4233 | f.push(8, 9, 0, 15); |
| 4234 | f.push(11, 12, 10, 21); |
| 4235 | f.push(14, 15, 13, 22); |
| 4236 | c1s = 1; c1l = 7; c2s = 17; c2l = 6; |
| 4237 | break; |
| 4238 | case INTERSECT_CONIC_QUAD_4: |
| 4239 | f.push(8, 9, 0, 18); |
| 4240 | f.push(11, 12, 10, 24); |
| 4241 | f.push(14, 15, 13, 25); |
| 4242 | f.push(17, 18, 16, 26); |
| 4243 | c1s = 1; c1l = 7; c2s = 20; c2l = 6; |
| 4244 | break; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4245 | case INTERSECT_CONIC_QUAD_NO: |
| 4246 | c1s = 0; c1l = 7; c2s = 7; c2l = 6; |
| 4247 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4248 | case INTERSECT_CONIC: |
| 4249 | f.push(8, 9, 0, 10); |
| 4250 | c1s = 1; c1l = 7; c2s = 11; c2l = 7; |
| 4251 | break; |
| 4252 | case INTERSECT_CONIC_2: |
| 4253 | f.push(8, 9, 0, 13); |
| 4254 | f.push(11, 12, 10, 21); |
| 4255 | c1s = 1; c1l = 7; c2s = 14; c2l = 7; |
| 4256 | break; |
| 4257 | case INTERSECT_CONIC_NO: |
| 4258 | c1s = 0; c1l = 7; c2s = 7; c2l = 7; |
| 4259 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4260 | case INTERSECT_SELF_CUBIC: |
| 4261 | f.push(9, 10, 0, 11); |
| 4262 | c1s = 1; c1l = 8; c2s = 0; c2l = 0; |
| 4263 | break; |
| 4264 | case INTERSECT_SELF_CUBIC_NO: |
| 4265 | c1s = 0; c1l = 8; c2s = 0; c2l = 0; |
| 4266 | break; |
| 4267 | case INTERSECT_CUBIC_LINE: |
| 4268 | f.push(9, 10, 0, 11); |
| 4269 | c1s = 1; c1l = 8; c2s = 12; c2l = 4; |
| 4270 | break; |
| 4271 | case INTERSECT_CUBIC_LINE_2: |
| 4272 | f.push(9, 10, 0, 14); |
| 4273 | f.push(12, 13, 11, 19); |
| 4274 | c1s = 1; c1l = 8; c2s = 15; c2l = 4; |
| 4275 | break; |
| 4276 | case INTERSECT_CUBIC_LINE_3: |
| 4277 | f.push(9, 10, 0, 17); |
| 4278 | f.push(12, 13, 11, 22); |
| 4279 | f.push(15, 16, 14, 23); |
| 4280 | c1s = 1; c1l = 8; c2s = 18; c2l = 4; |
| 4281 | break; |
| 4282 | case INTERSECT_CUBIC_QUAD_NO: |
| 4283 | c1s = 0; c1l = 8; c2s = 8; c2l = 6; |
| 4284 | break; |
| 4285 | case INTERSECT_CUBIC_QUAD: |
| 4286 | f.push(9, 10, 0, 11); |
| 4287 | c1s = 1; c1l = 8; c2s = 12; c2l = 6; |
| 4288 | break; |
| 4289 | case INTERSECT_CUBIC_QUAD_2: |
| 4290 | f.push(9, 10, 0, 14); |
| 4291 | f.push(12, 13, 11, 21); |
| 4292 | c1s = 1; c1l = 8; c2s = 15; c2l = 6; |
| 4293 | break; |
| 4294 | case INTERSECT_CUBIC_QUAD_3: |
| 4295 | f.push(9, 10, 0, 17); |
| 4296 | f.push(12, 13, 11, 24); |
| 4297 | f.push(15, 16, 14, 25); |
| 4298 | c1s = 1; c1l = 8; c2s = 18; c2l = 6; |
| 4299 | break; |
| 4300 | case INTERSECT_CUBIC_QUAD_4: |
| 4301 | f.push(9, 10, 0, 20); |
| 4302 | f.push(12, 13, 11, 27); |
| 4303 | f.push(15, 16, 14, 28); |
| 4304 | f.push(18, 19, 17, 29); |
| 4305 | c1s = 1; c1l = 8; c2s = 21; c2l = 6; |
| 4306 | break; |
| 4307 | case INTERSECT_CUBIC_LINE_NO: |
| 4308 | c1s = 0; c1l = 8; c2s = 8; c2l = 4; |
| 4309 | break; |
| 4310 | case INTERSECT_CUBIC: |
| 4311 | f.push(9, 10, 0, 11); |
| 4312 | c1s = 1; c1l = 8; c2s = 12; c2l = 8; |
| 4313 | break; |
| 4314 | case INTERSECT_CUBIC_2: |
| 4315 | f.push(9, 10, 0, 14); |
| 4316 | f.push(12, 13, 11, 23); |
| 4317 | c1s = 1; c1l = 8; c2s = 15; c2l = 8; |
| 4318 | break; |
| 4319 | case INTERSECT_CUBIC_3: |
| 4320 | f.push(9, 10, 0, 17); |
| 4321 | f.push(12, 13, 11, 26); |
| 4322 | f.push(15, 16, 14, 27); |
| 4323 | c1s = 1; c1l = 8; c2s = 18; c2l = 8; |
| 4324 | break; |
| 4325 | case INTERSECT_CUBIC_4: |
| 4326 | f.push(9, 10, 0, 20); |
| 4327 | f.push(12, 13, 11, 29); |
| 4328 | f.push(15, 16, 14, 30); |
| 4329 | f.push(18, 19, 17, 31); |
| 4330 | c1s = 1; c1l = 8; c2s = 21; c2l = 8; |
| 4331 | break; |
| 4332 | case INTERSECT_CUBIC_NO: |
| 4333 | c1s = 0; c1l = 8; c2s = 8; c2l = 8; |
| 4334 | break; |
| 4335 | default: |
| 4336 | console.log("unknown REC_TYPE_SECT frag type: " + fragType); |
| 4337 | throw "stop execution"; |
| 4338 | } |
| 4339 | if (draw_intersection != 1) { |
| 4340 | var id = -1; |
| 4341 | var curve; |
| 4342 | switch (c1l) { |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4343 | case 4: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4344 | drawLine(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]); |
| 4345 | if (draw_id) { |
| 4346 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3]]; |
| 4347 | id = idByCurve(test, curve, PATH_LINE); |
| 4348 | } |
| 4349 | break; |
| 4350 | case 6: |
| 4351 | drawQuad(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 4352 | frags[c1s + 4], frags[c1s + 5]); |
| 4353 | if (draw_id) { |
| 4354 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 4355 | frags[c1s + 4], frags[c1s + 5]]; |
| 4356 | id = idByCurve(test, curve, PATH_QUAD); |
| 4357 | } |
| 4358 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4359 | case 7: |
| 4360 | drawConicWithQuads(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 4361 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6]); |
| 4362 | if (draw_id) { |
| 4363 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 4364 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6]]; |
| 4365 | id = idByCurve(test, curve, PATH_CONIC); |
| 4366 | } |
| 4367 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4368 | case 8: |
| 4369 | drawCubic(frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 4370 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]); |
| 4371 | if (draw_id) { |
| 4372 | curve = [frags[c1s], frags[c1s + 1], frags[c1s + 2], frags[c1s + 3], |
| 4373 | frags[c1s + 4], frags[c1s + 5], frags[c1s + 6], frags[c1s + 7]]; |
| 4374 | id = idByCurve(test, curve, PATH_CUBIC); |
| 4375 | } |
| 4376 | break; |
| 4377 | } |
| 4378 | if (id >= 0) { |
| 4379 | drawID(curve, id); |
| 4380 | } |
| 4381 | id = -1; |
| 4382 | switch (c2l) { |
| 4383 | case 0: |
| 4384 | break; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4385 | case 4: |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4386 | drawLine(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]); |
| 4387 | if (draw_id) { |
| 4388 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3]]; |
| 4389 | id = idByCurve(test, curve, PATH_LINE); |
| 4390 | } |
| 4391 | break; |
| 4392 | case 6: |
| 4393 | drawQuad(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 4394 | frags[c2s + 4], frags[c2s + 5]); |
| 4395 | if (draw_id) { |
| 4396 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 4397 | frags[c2s + 4], frags[c2s + 5]]; |
| 4398 | id = idByCurve(test, curve, PATH_QUAD); |
| 4399 | } |
| 4400 | break; |
caryclark | 1049f12 | 2015-04-20 08:31:59 -0700 | [diff] [blame] | 4401 | case 7: |
| 4402 | drawConicWithQuads(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 4403 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6]); |
| 4404 | if (draw_id) { |
| 4405 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 4406 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6]]; |
| 4407 | id = idByCurve(test, curve, PATH_CONIC); |
| 4408 | } |
| 4409 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4410 | case 8: |
| 4411 | drawCubic(frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 4412 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]); |
| 4413 | if (draw_id) { |
| 4414 | curve = [frags[c2s], frags[c2s + 1], frags[c2s + 2], frags[c2s + 3], |
| 4415 | frags[c2s + 4], frags[c2s + 5], frags[c2s + 6], frags[c2s + 7]]; |
| 4416 | id = idByCurve(test, curve, PATH_CUBIC); |
| 4417 | } |
| 4418 | break; |
| 4419 | } |
| 4420 | if (id >= 0) { |
| 4421 | drawID(curve, id); |
| 4422 | } |
| 4423 | } |
| 4424 | if (collect_bounds) { |
| 4425 | break; |
| 4426 | } |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4427 | if (draw_intersection != 3 || step_limit == 0 || tIndex >= lastSect) { |
| 4428 | for (var idx = 0; idx < f.length; idx += 4) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4429 | drawPoint(frags[f[idx]], frags[f[idx + 1]], true); |
| 4430 | } |
| 4431 | } |
| 4432 | if (!draw_intersectT) { |
| 4433 | break; |
| 4434 | } |
| 4435 | ctx.fillStyle = "red"; |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4436 | if (draw_intersection != 3 || step_limit == 0 || tIndex >= lastSect) { |
| 4437 | for (var idx = 0; idx < f.length; idx += 4) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4438 | drawTAtPointUp(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 2]]); |
| 4439 | drawTAtPointDown(frags[f[idx]], frags[f[idx + 1]], frags[f[idx + 3]]); |
| 4440 | } |
| 4441 | } |
| 4442 | break; |
| 4443 | case REC_TYPE_SORT: |
| 4444 | if (!draw_sort || (step_limit > 0 && tIndex < lastSort)) { |
| 4445 | continue; |
| 4446 | } |
| 4447 | ctx.lineWidth = 3; |
| 4448 | ctx.strokeStyle = "rgba(127,127,0, 0.5)"; |
| 4449 | focus_enabled = true; |
| 4450 | switch (fragType) { |
| 4451 | case SORT_UNARY: |
| 4452 | case SORT_BINARY: |
| 4453 | var curve = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 4454 | drawCurve(curve); |
| 4455 | break; |
| 4456 | default: |
| 4457 | console.log("unknown REC_TYPE_SORT frag type: " + fragType); |
| 4458 | throw "stop execution"; |
| 4459 | } |
| 4460 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 4461 | case REC_TYPE_TOP: |
| 4462 | if (!draw_top || (step_limit > 0 && tIndex < lastTop)) { |
| 4463 | continue; |
| 4464 | } |
| 4465 | ctx.lineWidth = 3; |
| 4466 | ctx.strokeStyle = "rgba(127,127,0, 0.5)"; |
| 4467 | focus_enabled = true; |
| 4468 | { |
| 4469 | var curve = curvePartialByID(test, frags[0], frags[1], frags[2]); |
| 4470 | drawCurve(curve); |
| 4471 | var type = PATH_LINE + (curve.length / 2 - 2); |
| 4472 | var mid = pointAtT(curve, type, 0.5); |
| 4473 | var d = dxy_at_t(curve, type, 0.5); |
| 4474 | drawArrow(mid.x, mid.y, d.x, d.y, 0.3); |
| 4475 | } |
| 4476 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4477 | case REC_TYPE_MARK: |
| 4478 | if (!draw_mark || (step_limit > 0 && tIndex < lastMark)) { |
| 4479 | continue; |
| 4480 | } |
| 4481 | ctx.lineWidth = 3; |
| 4482 | ctx.strokeStyle = fragType >= MARK_DONE_LINE ? |
| 4483 | "rgba(127,0,127, 0.5)" : "rgba(127,127,0, 0.5)"; |
| 4484 | focus_enabled = true; |
| 4485 | switch (fragType) { |
| 4486 | case MARK_LINE: |
| 4487 | case MARK_DONE_LINE: |
| 4488 | case MARK_UNSORTABLE_LINE: |
| 4489 | case MARK_SIMPLE_LINE: |
| 4490 | case MARK_SIMPLE_DONE_LINE: |
| 4491 | case MARK_DONE_UNARY_LINE: |
| 4492 | drawLinePartial(frags[1], frags[2], frags[3], frags[4], |
| 4493 | frags[5], frags[9]); |
| 4494 | if (draw_id) { |
| 4495 | drawLinePartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 4496 | frags[5], frags[9]); |
| 4497 | } |
| 4498 | break; |
| 4499 | case MARK_QUAD: |
| 4500 | case MARK_DONE_QUAD: |
| 4501 | case MARK_UNSORTABLE_QUAD: |
| 4502 | case MARK_SIMPLE_QUAD: |
| 4503 | case MARK_SIMPLE_DONE_QUAD: |
| 4504 | case MARK_DONE_UNARY_QUAD: |
| 4505 | drawQuadPartial(frags[1], frags[2], frags[3], frags[4], |
| 4506 | frags[5], frags[6], frags[7], frags[11]); |
| 4507 | if (draw_id) { |
| 4508 | drawQuadPartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 4509 | frags[5], frags[6], frags[7], frags[11]); |
| 4510 | } |
| 4511 | break; |
| 4512 | case MARK_CUBIC: |
| 4513 | case MARK_DONE_CUBIC: |
| 4514 | case MARK_UNSORTABLE_CUBIC: |
| 4515 | case MARK_SIMPLE_CUBIC: |
| 4516 | case MARK_SIMPLE_DONE_CUBIC: |
| 4517 | case MARK_DONE_UNARY_CUBIC: |
| 4518 | drawCubicPartial(frags[1], frags[2], frags[3], frags[4], |
| 4519 | frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); |
| 4520 | if (draw_id) { |
| 4521 | drawCubicPartialID(frags[0], frags[1], frags[2], frags[3], frags[4], |
| 4522 | frags[5], frags[6], frags[7], frags[8], frags[9], frags[13]); |
| 4523 | } |
| 4524 | break; |
| 4525 | case MARK_ANGLE_LAST: |
| 4526 | // FIXME: ignored for now |
| 4527 | break; |
| 4528 | default: |
| 4529 | console.log("unknown REC_TYPE_MARK frag type: " + fragType); |
| 4530 | throw "stop execution"; |
| 4531 | } |
| 4532 | break; |
| 4533 | default: |
| 4534 | continue; |
| 4535 | } |
| 4536 | } |
| 4537 | switch (recType) { |
| 4538 | case REC_TYPE_SORT: |
| 4539 | if (!draw_sort || (step_limit > 0 && tIndex < lastSort)) { |
| 4540 | break; |
| 4541 | } |
| 4542 | var angles = []; // use tangent lines to describe arcs |
| 4543 | var windFrom = []; |
| 4544 | var windTo = []; |
| 4545 | var opp = []; |
| 4546 | var minXY = Number.MAX_VALUE; |
| 4547 | var partial; |
| 4548 | focus_enabled = true; |
| 4549 | var someUnsortable = false; |
| 4550 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 4551 | var fragType = records[recordIndex]; |
| 4552 | var frags = records[recordIndex + 1]; |
| 4553 | var unsortable = (fragType == SORT_UNARY && frags[14]) || |
| 4554 | (fragType == SORT_BINARY && frags[16]); |
| 4555 | someUnsortable |= unsortable; |
| 4556 | switch (fragType) { |
| 4557 | case SORT_UNARY: |
| 4558 | case SORT_BINARY: |
| 4559 | partial = curvePartialByID(test, frags[0], frags[6], frags[8]); |
| 4560 | break; |
| 4561 | default: |
| 4562 | console.log("unknown REC_TYPE_SORT frag type: " + fragType); |
| 4563 | throw "stop execution"; |
| 4564 | } |
| 4565 | var dx = boundsWidth(partial); |
| 4566 | var dy = boundsHeight(partial); |
| 4567 | minXY = Math.min(minXY, dx * dx + dy * dy); |
| 4568 | if (collect_bounds) { |
| 4569 | continue; |
| 4570 | } |
| 4571 | angles.push(tangent(partial)); |
| 4572 | var from = frags[12]; |
| 4573 | var to = frags[12]; |
| 4574 | var sgn = frags[10]; |
| 4575 | if (sgn < 0) { |
| 4576 | from -= frags[11]; |
| 4577 | } else if (sgn > 0) { |
| 4578 | to -= frags[11]; |
| 4579 | } |
| 4580 | windFrom.push(from + (unsortable ? "!" : "")); |
| 4581 | windTo.push(to + (unsortable ? "!" : "")); |
| 4582 | opp.push(fragType == SORT_BINARY); |
| 4583 | if (draw_sort == 1) { |
| 4584 | drawOrder(partial, frags[12]); |
| 4585 | } else { |
| 4586 | drawOrder(partial, (recordIndex / 2) + 1); |
| 4587 | } |
| 4588 | } |
| 4589 | var radius = Math.sqrt(minXY) / 2 * scale; |
| 4590 | radius = Math.min(50, radius); |
| 4591 | var scaledRadius = radius / scale; |
| 4592 | var centerX = partial[0]; |
| 4593 | var centerY = partial[1]; |
| 4594 | if (collect_bounds) { |
| 4595 | if (focus_enabled) { |
| 4596 | focusXmin = Math.min(focusXmin, centerX - scaledRadius); |
| 4597 | focusYmin = Math.min(focusYmin, centerY - scaledRadius); |
| 4598 | focusXmax = Math.max(focusXmax, centerX + scaledRadius); |
| 4599 | focusYmax = Math.max(focusYmax, centerY + scaledRadius); |
| 4600 | } |
| 4601 | break; |
| 4602 | } |
| 4603 | break; |
| 4604 | default: |
| 4605 | break; |
| 4606 | } |
| 4607 | } |
| 4608 | if (collect_bounds) { |
| 4609 | return; |
| 4610 | } |
| 4611 | if (draw_log && logStart >= 0) { |
| 4612 | ctx.font = "normal 10px Arial"; |
| 4613 | ctx.textAlign = "left"; |
| 4614 | ctx.beginPath(); |
| 4615 | var top = screenHeight - 20 - (logRange + 2) * 10; |
| 4616 | ctx.rect(50, top, screenWidth - 100, (logRange + 2) * 10); |
| 4617 | ctx.fillStyle = "white"; |
| 4618 | ctx.fill(); |
| 4619 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 4620 | if (logStart > 0) { |
| 4621 | ctx.fillText(lines[logStart - 1], 50, top + 8); |
| 4622 | } |
| 4623 | ctx.fillStyle = "black"; |
| 4624 | for (var idx = 0; idx < logRange; ++idx) { |
| 4625 | ctx.fillText(lines[logStart + idx], 50, top + 18 + 10 * idx); |
| 4626 | } |
| 4627 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 4628 | if (logStart + logRange < lines.length) { |
| 4629 | ctx.fillText(lines[logStart + logRange], 50, top + 18 + 10 * logRange); |
| 4630 | } |
| 4631 | } |
| 4632 | if (draw_legend) { |
| 4633 | var pos = 0; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4634 | var drawSomething = draw_add | draw_active | draw_angle | draw_coincidence | draw_sort | draw_mark; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4635 | // drawBox(pos++, "yellow", "black", opLetter, true, ''); |
| 4636 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_intersection > 1 ? sectCount : sectMax2, draw_intersection, intersectionKey); |
| 4637 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_add ? addCount : addMax, draw_add, addKey); |
| 4638 | drawBox(pos++, "rgba(0,0,255, 0.3)", "black", draw_active ? activeCount : activeMax, draw_active, activeKey); |
| 4639 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_angle ? angleCount : angleMax, draw_angle, angleKey); |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4640 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_coincidence ? coinCount : coinMax, draw_coincidence, coincidenceKey); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4641 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_op ? opCount : opMax, draw_op, opKey); |
| 4642 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_sort ? sortCount : sortMax, draw_sort, sortKey); |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 4643 | drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_top ? topCount : topMax, draw_top, topKey); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4644 | drawBox(pos++, "rgba(127,0,127, 0.3)", "black", draw_mark ? markCount : markMax, draw_mark, markKey); |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4645 | drawBox(pos++, "black", "white", |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 4646 | (new Array('P', 'P1', 'P2', 'P', 'p', 'p1', 'p2'))[draw_path], draw_path != 0, pathKey); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4647 | drawBox(pos++, "rgba(0,63,0, 0.7)", "white", |
| 4648 | (new Array('Q', 'Q', 'C', 'QC', 'Qc', 'Cq'))[draw_computed], |
| 4649 | draw_computed != 0, computedKey); |
| 4650 | drawBox(pos++, "green", "black", step_limit, drawSomething, ''); |
| 4651 | drawBox(pos++, "green", "black", stepMax, drawSomething, ''); |
| 4652 | drawBox(pos++, "rgba(255,0,0, 0.6)", "black", lastIndex, drawSomething & draw_log, ''); |
| 4653 | drawBox(pos++, "rgba(255,0,0, 0.6)", "black", test.length - 1, drawSomething & draw_log, ''); |
| 4654 | if (curve_t) { |
| 4655 | drawCurveTControl(); |
| 4656 | } |
| 4657 | ctx.font = "normal 20px Arial"; |
| 4658 | ctx.fillStyle = "rgba(0,0,0, 0.3)"; |
| 4659 | ctx.textAlign = "right"; |
| 4660 | ctx.fillText(scale.toFixed(decimal_places) + 'x' , screenWidth - 10, screenHeight - 5); |
| 4661 | } |
| 4662 | if (draw_hints) { |
| 4663 | ctx.font = "normal 10px Arial"; |
| 4664 | ctx.fillStyle = "rgba(0,0,0, 0.5)"; |
| 4665 | ctx.textAlign = "right"; |
| 4666 | var y = 4; |
| 4667 | ctx.fillText("control lines : " + controlLinesKey, ctx.screenWidthwidth - 10, pos * 50 + y++ * 10); |
| 4668 | ctx.fillText("curve t : " + curveTKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4669 | ctx.fillText("deriviatives : " + deriviativesKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4670 | ctx.fillText("intersect t : " + intersectTKey, screenWidth - 10, pos * 50 + y++ * 10); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4671 | ctx.fillText("log : " + logKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4672 | ctx.fillText("log curve : " + logCurvesKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4673 | ctx.fillText("mid point : " + midpointKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4674 | ctx.fillText("points : " + ptsKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4675 | ctx.fillText("sequence : " + sequenceKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4676 | ctx.fillText("xy : " + xyKey, screenWidth - 10, pos * 50 + y++ * 10); |
| 4677 | } |
| 4678 | } |
| 4679 | |
| 4680 | function drawBox(y, backC, foreC, str, enable, label) { |
| 4681 | ctx.beginPath(); |
| 4682 | ctx.fillStyle = backC; |
| 4683 | ctx.rect(screenWidth - 40, y * 50 + 10, 40, 30); |
| 4684 | ctx.fill(); |
| 4685 | ctx.font = "normal 16px Arial"; |
| 4686 | ctx.fillStyle = foreC; |
| 4687 | ctx.textAlign = "center"; |
| 4688 | ctx.fillText(str, screenWidth - 20, y * 50 + 32); |
| 4689 | if (!enable) { |
| 4690 | ctx.fillStyle = "rgba(255,255,255, 0.5)"; |
| 4691 | ctx.fill(); |
| 4692 | } |
| 4693 | if (label != '') { |
| 4694 | ctx.font = "normal 9px Arial"; |
| 4695 | ctx.fillStyle = "black"; |
| 4696 | ctx.fillText(label, screenWidth - 47, y * 50 + 40); |
| 4697 | } |
| 4698 | } |
| 4699 | |
| 4700 | function drawCurveTControl() { |
| 4701 | ctx.lineWidth = 2; |
| 4702 | ctx.strokeStyle = "rgba(0,0,0, 0.3)"; |
| 4703 | ctx.beginPath(); |
| 4704 | ctx.rect(screenWidth - 80, 40, 28, screenHeight - 80); |
| 4705 | ctx.stroke(); |
| 4706 | var ty = 40 + curveT * (screenHeight - 80); |
| 4707 | ctx.beginPath(); |
| 4708 | ctx.moveTo(screenWidth - 80, ty); |
| 4709 | ctx.lineTo(screenWidth - 85, ty - 5); |
| 4710 | ctx.lineTo(screenWidth - 85, ty + 5); |
| 4711 | ctx.lineTo(screenWidth - 80, ty); |
| 4712 | ctx.fillStyle = "rgba(0,0,0, 0.6)"; |
| 4713 | ctx.fill(); |
| 4714 | var num = curveT.toFixed(decimal_places); |
| 4715 | ctx.font = "normal 10px Arial"; |
| 4716 | ctx.textAlign = "left"; |
| 4717 | ctx.fillText(num, screenWidth - 78, ty); |
| 4718 | } |
| 4719 | |
| 4720 | function ptInTControl() { |
| 4721 | var e = window.event; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4722 | var tgt = e.target || e.srcElement; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4723 | var left = tgt.offsetLeft; |
| 4724 | var top = tgt.offsetTop; |
| 4725 | var x = (e.clientX - left); |
| 4726 | var y = (e.clientY - top); |
| 4727 | if (x < screenWidth - 80 || x > screenWidth - 50) { |
| 4728 | return false; |
| 4729 | } |
| 4730 | if (y < 40 || y > screenHeight - 80) { |
| 4731 | return false; |
| 4732 | } |
| 4733 | curveT = (y - 40) / (screenHeight - 120); |
| 4734 | if (curveT < 0 || curveT > 1) { |
| 4735 | throw "stop execution"; |
| 4736 | } |
| 4737 | return true; |
| 4738 | } |
| 4739 | |
| 4740 | function drawTop() { |
| 4741 | if (tests[testIndex] == null) { |
| 4742 | var str = testDivs[testIndex].textContent; |
| 4743 | parse_all(str); |
| 4744 | var title = testDivs[testIndex].id.toString(); |
| 4745 | testTitles[testIndex] = title; |
| 4746 | } |
| 4747 | init(tests[testIndex]); |
| 4748 | redraw(); |
| 4749 | } |
| 4750 | |
| 4751 | function redraw() { |
| 4752 | if (focus_on_selection) { |
| 4753 | collect_bounds = true; |
| 4754 | draw(tests[testIndex], testLines[testIndex], testTitles[testIndex]); |
| 4755 | collect_bounds = false; |
| 4756 | if (focusXmin < focusXmax && focusYmin < focusYmax) { |
| 4757 | setScale(focusXmin, focusXmax, focusYmin, focusYmax); |
| 4758 | } |
| 4759 | } |
| 4760 | ctx.beginPath(); |
| 4761 | ctx.fillStyle = "white"; |
| 4762 | ctx.rect(0, 0, screenWidth, screenHeight); |
| 4763 | ctx.fill(); |
| 4764 | draw(tests[testIndex], testLines[testIndex], testTitles[testIndex]); |
| 4765 | } |
| 4766 | |
| 4767 | function dumpCurvePartial(test, id, t0, t1) { |
| 4768 | var curve = curveByID(test, id); |
| 4769 | var name = ["line", "quad", "cubic"][curve.length / 2 - 2]; |
| 4770 | console.log("id=" + id + " " + name + "=" + curveToString(curve) |
| 4771 | + " t0=" + t0 + " t1=" + t1 |
| 4772 | + " partial=" + curveToString(curvePartialByID(test, id, t0, t1))); |
| 4773 | } |
| 4774 | |
| 4775 | function dumpAngleTest(test, id, t0, t1) { |
| 4776 | var curve = curveByID(test, id); |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4777 | console.log(" { {" + curveToString(curve) + "}, " |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4778 | + curve.length / 2 + ", " + t0 + ", " + t1 + ", {} }, //"); |
| 4779 | } |
| 4780 | |
| 4781 | function dumpLogToConsole() { |
| 4782 | if (logStart < 0) { |
| 4783 | return; |
| 4784 | } |
| 4785 | var test = tests[testIndex]; |
| 4786 | var recType = REC_TYPE_UNKNOWN; |
| 4787 | var records; |
| 4788 | for (var index = 0; index < test.length; index += 3) { |
| 4789 | var lastLineNo = test[index + 1]; |
| 4790 | if (lastLineNo >= logStart && lastLineNo < logStart + logRange) { |
| 4791 | recType = test[index]; |
| 4792 | records = test[index + 2]; |
| 4793 | break; |
| 4794 | } |
| 4795 | } |
| 4796 | if (recType == REC_TYPE_UNKNOWN) { |
| 4797 | return; |
| 4798 | } |
| 4799 | var lines = testLines[testIndex]; |
| 4800 | for (var idx = 0; idx < logRange; ++idx) { |
| 4801 | var line = lines[logStart + idx]; |
| 4802 | console.log(line); |
| 4803 | for (var recordIndex = 0; recordIndex < records.length; recordIndex += 2) { |
| 4804 | var fragType = records[recordIndex]; |
| 4805 | var frags = records[recordIndex + 1]; |
| 4806 | if (recType == REC_TYPE_ANGLE && fragType == ANGLE_AFTER) { |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4807 | dumpCurvePartial(test, frags[0], frags[4], frags[5]); |
| 4808 | dumpCurvePartial(test, frags[6], frags[10], frags[11]); |
| 4809 | dumpCurvePartial(test, frags[12], frags[16], frags[17]); |
| 4810 | console.log("\nstatic IntersectData intersectDataSet[] = { //"); |
| 4811 | dumpAngleTest(test, frags[0], frags[4], frags[5]); |
| 4812 | dumpAngleTest(test, frags[6], frags[10], frags[11]); |
| 4813 | dumpAngleTest(test, frags[12], frags[16], frags[17]); |
| 4814 | console.log("}; //"); |
| 4815 | } |
| 4816 | } |
| 4817 | } |
| 4818 | } |
| 4819 | |
| 4820 | var activeKey = 'a'; |
| 4821 | var pathKey = 'b'; |
| 4822 | var pathBackKey = 'B'; |
| 4823 | var centerKey = 'c'; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4824 | var coincidenceKey = 'C'; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4825 | var addKey = 'd'; |
| 4826 | var deriviativesKey = 'f'; |
| 4827 | var angleKey = 'g'; |
| 4828 | var angleBackKey = 'G'; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4829 | var intersectionKey = 'i'; |
| 4830 | var intersectionBackKey = 'I'; |
| 4831 | var sequenceKey = 'j'; |
| 4832 | var midpointKey = 'k'; |
| 4833 | var logKey = 'l'; |
| 4834 | var logToConsoleKey = 'L'; |
| 4835 | var markKey = 'm'; |
| 4836 | var sortKey = 'o'; |
| 4837 | var opKey = 'p'; |
| 4838 | var opBackKey = 'P'; |
| 4839 | var computedKey = 'q'; |
| 4840 | var computedBackKey = 'Q'; |
| 4841 | var stepKey = 's'; |
| 4842 | var stepBackKey = 'S'; |
| 4843 | var intersectTKey = 't'; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 4844 | var topKey = 'T'; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4845 | var curveTKey = 'u'; |
| 4846 | var controlLinesBackKey = 'V'; |
| 4847 | var controlLinesKey = 'v'; |
| 4848 | var ptsKey = 'x'; |
| 4849 | var xyKey = 'y'; |
| 4850 | var logCurvesKey = 'z'; |
| 4851 | var focusKey = '`'; |
| 4852 | var idKey = '.'; |
| 4853 | var retinaKey = '\\'; |
| 4854 | |
| 4855 | function doKeyPress(evt) { |
| 4856 | var char = String.fromCharCode(evt.charCode); |
| 4857 | var focusWasOn = false; |
| 4858 | switch (char) { |
| 4859 | case '0': |
| 4860 | case '1': |
| 4861 | case '2': |
| 4862 | case '3': |
| 4863 | case '4': |
| 4864 | case '5': |
| 4865 | case '6': |
| 4866 | case '7': |
| 4867 | case '8': |
| 4868 | case '9': |
| 4869 | decimal_places = char - '0'; |
| 4870 | redraw(); |
| 4871 | break; |
| 4872 | case activeKey: |
| 4873 | draw_active ^= true; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4874 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4875 | break; |
| 4876 | case addKey: |
| 4877 | draw_add ^= true; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4878 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4879 | break; |
| 4880 | case angleKey: |
caryclark | 5435929 | 2015-03-26 07:52:43 -0700 | [diff] [blame] | 4881 | draw_angle = (draw_angle + 1) % 4; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4882 | redraw(); |
| 4883 | break; |
| 4884 | case angleBackKey: |
| 4885 | draw_angle = (draw_angle + 2) % 3; |
| 4886 | redraw(); |
| 4887 | break; |
| 4888 | case centerKey: |
| 4889 | setScale(xmin, xmax, ymin, ymax); |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4890 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4891 | break; |
caryclark | 624637c | 2015-05-11 07:21:27 -0700 | [diff] [blame] | 4892 | case coincidenceKey: |
| 4893 | draw_coincidence ^= true; |
| 4894 | redraw(); |
| 4895 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4896 | case controlLinesBackKey: |
| 4897 | control_lines = (control_lines + 3) % 4; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4898 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4899 | break; |
| 4900 | case controlLinesKey: |
| 4901 | control_lines = (control_lines + 1) % 4; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4902 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4903 | break; |
| 4904 | case computedBackKey: |
| 4905 | draw_computed = (draw_computed + 5) % 6; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4906 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4907 | break; |
| 4908 | case computedKey: |
| 4909 | draw_computed = (draw_computed + 1) % 6; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4910 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4911 | break; |
| 4912 | case curveTKey: |
| 4913 | curve_t ^= true; |
| 4914 | if (curve_t) { |
| 4915 | draw_legend = true; |
| 4916 | } |
| 4917 | redraw(); |
| 4918 | break; |
| 4919 | case deriviativesKey: |
| 4920 | draw_deriviatives = (draw_deriviatives + 1) % 3; |
| 4921 | redraw(); |
| 4922 | break; |
| 4923 | case focusKey: |
| 4924 | focus_on_selection ^= true; |
| 4925 | setScale(xmin, xmax, ymin, ymax); |
| 4926 | redraw(); |
| 4927 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4928 | case idKey: |
| 4929 | draw_id ^= true; |
| 4930 | redraw(); |
| 4931 | break; |
| 4932 | case intersectionBackKey: |
| 4933 | draw_intersection = (draw_intersection + 3) % 4; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4934 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4935 | break; |
| 4936 | case intersectionKey: |
| 4937 | draw_intersection = (draw_intersection + 1) % 4; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4938 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4939 | break; |
| 4940 | case intersectTKey: |
| 4941 | draw_intersectT ^= true; |
| 4942 | redraw(); |
| 4943 | break; |
| 4944 | case logCurvesKey: |
| 4945 | logCurves(tests[testIndex]); |
| 4946 | break; |
| 4947 | case logKey: |
| 4948 | draw_log ^= true; |
| 4949 | redraw(); |
| 4950 | break; |
| 4951 | case logToConsoleKey: |
| 4952 | if (draw_log) { |
| 4953 | dumpLogToConsole(); |
| 4954 | } |
| 4955 | break; |
| 4956 | case markKey: |
| 4957 | draw_mark ^= true; |
| 4958 | redraw(); |
| 4959 | break; |
| 4960 | case midpointKey: |
| 4961 | draw_midpoint ^= true; |
| 4962 | redraw(); |
| 4963 | break; |
| 4964 | case opKey: |
| 4965 | draw_op = (draw_op + 1) % 3; |
| 4966 | redraw(); |
| 4967 | break; |
| 4968 | case opBackKey: |
| 4969 | draw_op = (draw_op + 2) % 3; |
| 4970 | redraw(); |
| 4971 | break; |
| 4972 | case pathKey: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 4973 | draw_path = (draw_path + 1) % (4 + (hasAlignedPath ? 3 : 0)); |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4974 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4975 | break; |
| 4976 | case pathBackKey: |
caryclark | 26ad22a | 2015-10-16 09:03:38 -0700 | [diff] [blame] | 4977 | draw_path = (draw_path + 3 + (hasAlignedPath ? 3 : 0)) % (4 + (hasAlignedPath ? 3 : 0)); |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 4978 | redraw(); |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 4979 | break; |
| 4980 | case ptsKey: |
| 4981 | pt_labels = (pt_labels + 1) % 3; |
| 4982 | redraw(); |
| 4983 | break; |
| 4984 | case retinaKey: |
| 4985 | retina_scale ^= true; |
| 4986 | drawTop(); |
| 4987 | break; |
| 4988 | case sequenceKey: |
| 4989 | draw_sequence ^= true; |
| 4990 | redraw(); |
| 4991 | break; |
| 4992 | case sortKey: |
| 4993 | draw_sort = (draw_sort + 1) % 3; |
| 4994 | drawTop(); |
| 4995 | break; |
| 4996 | case stepKey: |
| 4997 | step_limit++; |
| 4998 | if (step_limit > stepMax) { |
| 4999 | step_limit = stepMax; |
| 5000 | } |
| 5001 | redraw(); |
| 5002 | break; |
| 5003 | case stepBackKey: |
| 5004 | step_limit--; |
| 5005 | if (step_limit < 0) { |
| 5006 | step_limit = 0; |
| 5007 | } |
| 5008 | redraw(); |
| 5009 | break; |
caryclark | 03b03ca | 2015-04-23 09:13:37 -0700 | [diff] [blame] | 5010 | case topKey: |
| 5011 | draw_top ^= true; |
| 5012 | redraw(); |
| 5013 | break; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 5014 | case xyKey: |
| 5015 | debug_xy = (debug_xy + 1) % 3; |
| 5016 | redraw(); |
| 5017 | break; |
| 5018 | case '-': |
| 5019 | focusWasOn = focus_on_selection; |
| 5020 | if (focusWasOn) { |
| 5021 | focus_on_selection = false; |
| 5022 | scale /= 1.2; |
| 5023 | } else { |
| 5024 | scale /= 2; |
| 5025 | calcLeftTop(); |
| 5026 | } |
| 5027 | redraw(); |
| 5028 | focus_on_selection = focusWasOn; |
| 5029 | break; |
| 5030 | case '=': |
| 5031 | case '+': |
| 5032 | focusWasOn = focus_on_selection; |
| 5033 | if (focusWasOn) { |
| 5034 | focus_on_selection = false; |
| 5035 | scale *= 1.2; |
| 5036 | } else { |
| 5037 | scale *= 2; |
| 5038 | calcLeftTop(); |
| 5039 | } |
| 5040 | redraw(); |
| 5041 | focus_on_selection = focusWasOn; |
| 5042 | break; |
| 5043 | case '?': |
| 5044 | draw_hints ^= true; |
| 5045 | if (draw_hints && !draw_legend) { |
| 5046 | draw_legend = true; |
| 5047 | } |
| 5048 | redraw(); |
| 5049 | break; |
| 5050 | case '/': |
| 5051 | draw_legend ^= true; |
| 5052 | redraw(); |
| 5053 | break; |
| 5054 | } |
| 5055 | } |
| 5056 | |
| 5057 | function doKeyDown(evt) { |
| 5058 | var char = evt.keyCode; |
| 5059 | var preventDefault = false; |
| 5060 | switch (char) { |
| 5061 | case 37: // left arrow |
| 5062 | if (evt.shiftKey) { |
| 5063 | testIndex -= 9; |
| 5064 | } |
| 5065 | if (--testIndex < 0) |
| 5066 | testIndex = tests.length - 1; |
| 5067 | drawTop(); |
| 5068 | preventDefault = true; |
| 5069 | break; |
| 5070 | case 39: // right arrow |
| 5071 | if (evt.shiftKey) { |
| 5072 | testIndex += 9; |
| 5073 | } |
| 5074 | if (++testIndex >= tests.length) |
| 5075 | testIndex = 0; |
| 5076 | drawTop(); |
| 5077 | preventDefault = true; |
| 5078 | break; |
| 5079 | } |
| 5080 | if (preventDefault) { |
| 5081 | evt.preventDefault(); |
| 5082 | return false; |
| 5083 | } |
| 5084 | return true; |
| 5085 | } |
| 5086 | |
| 5087 | (function() { |
| 5088 | var hidden = "hidden"; |
| 5089 | |
| 5090 | // Standards: |
| 5091 | if (hidden in document) |
| 5092 | document.addEventListener("visibilitychange", onchange); |
| 5093 | else if ((hidden = "mozHidden") in document) |
| 5094 | document.addEventListener("mozvisibilitychange", onchange); |
| 5095 | else if ((hidden = "webkitHidden") in document) |
| 5096 | document.addEventListener("webkitvisibilitychange", onchange); |
| 5097 | else if ((hidden = "msHidden") in document) |
| 5098 | document.addEventListener("msvisibilitychange", onchange); |
| 5099 | // IE 9 and lower: |
| 5100 | else if ('onfocusin' in document) |
| 5101 | document.onfocusin = document.onfocusout = onchange; |
| 5102 | // All others: |
| 5103 | else |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 5104 | window.onpageshow = window.onpagehide |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 5105 | = window.onfocus = window.onblur = onchange; |
| 5106 | |
| 5107 | function onchange (evt) { |
| 5108 | var v = 'visible', h = 'hidden', |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 5109 | evtMap = { |
| 5110 | focus:v, focusin:v, pageshow:v, blur:h, focusout:h, pagehide:h |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 5111 | }; |
| 5112 | |
| 5113 | evt = evt || window.event; |
| 5114 | if (evt.type in evtMap) |
| 5115 | document.body.className = evtMap[evt.type]; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 5116 | else |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 5117 | document.body.className = this[hidden] ? "hidden" : "visible"; |
| 5118 | } |
| 5119 | })(); |
| 5120 | |
| 5121 | function calcXY() { |
| 5122 | var e = window.event; |
caryclark | 55888e4 | 2016-07-18 10:01:36 -0700 | [diff] [blame] | 5123 | var tgt = e.target || e.srcElement; |
caryclark | dac1d17 | 2014-06-17 05:15:38 -0700 | [diff] [blame] | 5124 | var left = tgt.offsetLeft; |
| 5125 | var top = tgt.offsetTop; |
| 5126 | mouseX = (e.clientX - left) / scale + srcLeft; |
| 5127 | mouseY = (e.clientY - top) / scale + srcTop; |
| 5128 | } |
| 5129 | |
| 5130 | function calcLeftTop() { |
| 5131 | srcLeft = mouseX - screenWidth / 2 / scale; |
| 5132 | srcTop = mouseY - screenHeight / 2 / scale; |
| 5133 | } |
| 5134 | |
| 5135 | var disableClick = false; |
| 5136 | |
| 5137 | function handleMouseClick() { |
| 5138 | if (disableClick) { |
| 5139 | return; |
| 5140 | } |
| 5141 | if (!curve_t || !ptInTControl()) { |
| 5142 | calcXY(); |
| 5143 | calcLeftTop(); |
| 5144 | } |
| 5145 | redraw(); |
| 5146 | // if (!curve_t || !ptInTControl()) { |
| 5147 | // mouseX = screenWidth / 2 / scale + srcLeft; |
| 5148 | // mouseY = screenHeight / 2 / scale + srcTop; |
| 5149 | // } |
| 5150 | } |
| 5151 | |
| 5152 | function handleMouseOver() { |
| 5153 | calcXY(); |
| 5154 | if (debug_xy != 2) { |
| 5155 | return; |
| 5156 | } |
| 5157 | var num = mouseX.toFixed(decimal_places) + ", " + mouseY.toFixed(decimal_places); |
| 5158 | ctx.beginPath(); |
| 5159 | ctx.rect(300,100,num.length * 6,10); |
| 5160 | ctx.fillStyle="white"; |
| 5161 | ctx.fill(); |
| 5162 | ctx.font = "normal 10px Arial"; |
| 5163 | ctx.fillStyle="black"; |
| 5164 | ctx.textAlign = "left"; |
| 5165 | ctx.fillText(num, 300, 108); |
| 5166 | } |
| 5167 | |
| 5168 | function start() { |
| 5169 | for (var i = 0; i < testDivs.length; ++i) { |
| 5170 | tests[i] = null; |
| 5171 | } |
| 5172 | testIndex = 0; |
| 5173 | drawTop(); |
| 5174 | window.addEventListener('keypress', doKeyPress, true); |
| 5175 | window.addEventListener('keydown', doKeyDown, true); |
| 5176 | window.onresize = function() { |
| 5177 | drawTop(); |
| 5178 | } |
| 5179 | /* |
| 5180 | window.onpagehide = function() { |
| 5181 | disableClick = true; |
| 5182 | } |
| 5183 | */ |
| 5184 | window.onpageshow = function () { |
| 5185 | disableClick = false; |
| 5186 | } |
| 5187 | } |
| 5188 | |
| 5189 | </script> |
| 5190 | </head> |
| 5191 | |
| 5192 | <body onLoad="start();"> |
| 5193 | <canvas id="canvas" width="750" height="500" |
| 5194 | onmousemove="handleMouseOver()" |
| 5195 | onclick="handleMouseClick()" |
| 5196 | ></canvas > |
| 5197 | </body> |
| 5198 | </html> |