blob: aa325c94d67803edf7a8548dffea29cf529abaff [file] [log] [blame]
caryclarkdac1d172014-06-17 05:15:38 -07001<html>
2<head>
3<div height="0" hidden="true">
caryclarkdac1d172014-06-17 05:15:38 -07004
caryclark6c3b9cd2016-09-26 05:36:58 -07005Skia UnitTests: --match PathOpsSimplify$ --resourcePath resources/ SK_DEBUG
6
caryclark34efb702016-10-24 08:19:06 -07007Skia UnitTests: --match Simplify$ --resourcePath resources\ SK_DEBUG
8
9<div id="simplifyTest_1">
10seg=1 {{{95.9684143f, 119.751823f}, {97.2032471f, 113.040466f}, {102.896156f, 108.083267f}}}
11seg=2 {{{102.896156f, 108.083267f}, {102.896736f, 108.082771f}}}
12seg=3 {{{102.896736f, 108.082771f}, {106.944885f, 104.564941f}, {113.029114f, 102.892998f}}}
13seg=4 {{{113.029114f, 102.892998f}, {113.169701f, 102.868301f}}}
14seg=5 {{{113.169701f, 102.868301f}, {122.958702f, 102.087303f}}}
15seg=6 {{{122.958702f, 102.087303f}, {123.637985f, 102.405312f}}}
16seg=7 {{{123.637985f, 102.405312f}, {125.172699f, 104.575714f}, {123.387383f, 106.91227f}}}
17seg=8 {{{123.387383f, 106.91227f}, {122.784996f, 106.452003f}}}
18seg=9 {{{122.784996f, 106.452003f}, {123.388428f, 106.910896f}}}
19seg=10 {{{123.388428f, 106.910896f}, {123.365623f, 106.94088f}, {123.320007f, 107.000946f}}}
20seg=11 {{{123.320007f, 107.000946f}, {117.109985f, 115.177612f}, {108.73912f, 118.758026f}}}
21seg=12 {{{108.73912f, 118.758026f}, {108.557755f, 118.810059f}}}
22seg=13 {{{108.557755f, 118.810059f}, {96.8307571f, 120.638062f}}}
23seg=14 {{{96.8307571f, 120.638062f}, {95.9684143f, 119.751823f}}}
24seg=15 {{{97.4595795f, 120.026184f}, {96.7139969f, 119.889008f}}}
25seg=16 {{{96.7139969f, 119.889008f}, {96.5972366f, 119.139954f}}}
26seg=17 {{{96.5972366f, 119.139954f}, {108.324234f, 117.311951f}}}
27seg=18 {{{108.324234f, 117.311951f}, {108.440994f, 118.061005f}}}
28seg=19 {{{108.440994f, 118.061005f}, {108.142868f, 117.363983f}}}
29seg=20 {{{108.142868f, 117.363983f}, {116.14502f, 113.941284f}, {122.112564f, 106.083923f}}}
30seg=21 {{{122.112564f, 106.083923f}, {122.158455f, 106.023499f}, {122.181564f, 105.993111f}}}
31seg=22 {{{122.181564f, 105.993111f}, {122.18261f, 105.991737f}}}
32seg=23 {{{122.18261f, 105.991737f}, {123.291138f, 104.540924f}, {122.400009f, 103.280693f}}}
33seg=24 {{{122.400009f, 103.280693f}, {123.018997f, 102.843002f}}}
34seg=25 {{{123.018997f, 102.843002f}, {123.079292f, 103.598701f}}}
35seg=26 {{{123.079292f, 103.598701f}, {113.290291f, 104.3797f}}}
36seg=27 {{{113.290291f, 104.3797f}, {113.229996f, 103.624001f}}}
37seg=28 {{{113.229996f, 103.624001f}, {113.430878f, 104.355003f}}}
38seg=29 {{{113.430878f, 104.355003f}, {107.679138f, 105.935608f}, {103.891258f, 109.227226f}}}
39seg=30 {{{103.891258f, 109.227226f}, {103.393997f, 108.654999f}}}
40seg=31 {{{103.393997f, 108.654999f}, {103.891838f, 109.22673f}}}
41seg=32 {{{103.891838f, 109.22673f}, {98.5984497f, 113.835938f}, {97.4595795f, 120.026184f}}}
42debugShowQuadLineIntersection 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}}}
43debugShowQuadLineIntersection no intersect {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{{108.557755,118.810059}, {96.8307571,120.638062}}}
44debugShowQuadLineIntersection 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}}}
45debugShowQuadLineIntersection 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}}}
46debugShowQuadLineIntersection 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}}}
47debugShowQuadIntersection 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}}}
48debugShowLineIntersection 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}}}
49debugShowLineIntersection 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}}}
50debugShowQuadLineIntersection 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}}}
51debugShowQuadLineIntersection 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}}}
52debugShowQuadLineIntersection no intersect {{{123.637985,102.405312}, {125.172699,104.575714}, {123.387383,106.91227}}} {{{122.784996,106.452003}, {123.388428,106.910896}}}
53debugShowQuadIntersection 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}}}
54SkOpSegment::addT insert t=0.999952051 segID=7 spanID=65
55SkOpSegment::addT insert t=0.0189869068 segID=10 spanID=66
56debugShowLineIntersection 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}}}
57debugShowQuadLineIntersection no intersect {{{123.388428,106.910896}, {123.365623,106.94088}, {123.320007,107.000946}}} {{{123.387383,106.91227}, {122.784996,106.452003}}}
58debugShowQuadLineIntersection 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}}}
59debugShowQuadIntersection 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}}}
60debugShowQuadLineIntersection 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}}}
61debugShowLineIntersection 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}}}
62debugShowLineIntersection 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}}}
63debugShowQuadLineIntersection no intersect {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{{96.7139969,119.889008}, {96.5972366,119.139954}}}
64debugShowQuadLineIntersection no intersect {{{95.9684143,119.751823}, {97.2032471,113.040466}, {102.896156,108.083267}}} {{{96.5972366,119.139954}, {108.324234,117.311951}}}
65debugShowQuadIntersection 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}}}
66debugShowQuadIntersection 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}}}
67debugShowQuadIntersection 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}}}
68debugShowLineIntersection no intersect {{{113.169701,102.868301}, {122.958702,102.087303}}} {{{122.400009,103.280693}, {123.018997,102.843002}}}
69debugShowQuadIntersection 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}}}
70debugShowQuadIntersection 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}}}
71debugShowLineIntersection no intersect {{{108.557755,118.810059}, {96.8307571,120.638062}}} {{{97.4595795,120.026184}, {96.7139969,119.889008}}}
72debugShowLineIntersection no intersect {{{108.557755,118.810059}, {96.8307571,120.638062}}} {{{96.5972366,119.139954}, {108.324234,117.311951}}}
73debugShowQuadLineIntersection no intersect {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} {{{108.557755,118.810059}, {96.8307571,120.638062}}}
74debugShowLineIntersection no intersect {{{96.8307571,120.638062}, {95.9684143,119.751823}}} {{{97.4595795,120.026184}, {96.7139969,119.889008}}}
75debugShowLineIntersection no intersect {{{96.8307571,120.638062}, {95.9684143,119.751823}}} {{{96.7139969,119.889008}, {96.5972366,119.139954}}}
76debugShowLineIntersection 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}}}
77debugShowQuadLineIntersection 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}}}
78debugShowLineIntersection 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}}}
79debugShowLineIntersection 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}}}
80debugShowLineIntersection no intersect {{{96.5972366,119.139954}, {108.324234,117.311951}}} {{{108.440994,118.061005}, {108.142868,117.363983}}}
81debugShowQuadLineIntersection 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}}}
82SkOpSegment::addT insert t=0.991938827 segID=17 spanID=67
83SkOpSegment::addT insert t=0.00542932628 segID=20 spanID=68
84debugShowQuadLineIntersection 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}}}
85SkOpSegment::addT insert t=0.0929234671 segID=17 spanID=69
86SkOpSegment::addT insert t=0.913746799 segID=32 spanID=70
87debugShowLineIntersection 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}}}
88debugShowQuadLineIntersection no intersect {{{108.142868,117.363983}, {116.14502,113.941284}, {122.112564,106.083923}}} {{{108.324234,117.311951}, {108.440994,118.061005}}}
89debugShowQuadLineIntersection 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}}}
90debugShowQuadIntersection 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}}}
91debugShowQuadIntersection 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}}}
92debugShowQuadLineIntersection 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}}}
93debugShowQuadLineIntersection 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}}}
94debugShowQuadLineIntersection 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}}}
95debugShowQuadLineIntersection 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}}}
96SkOpSegment::addT insert t=0.860440414 segID=23 spanID=71
97SkOpSegment::addT insert t=0.0479619043 segID=26 spanID=72
98debugShowLineIntersection 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}}}
99debugShowLineIntersection 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}}}
100debugShowLineIntersection 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}}}
101debugShowLineIntersection no intersect {{{123.079292,103.598701}, {113.290291,104.3797}}} {{{113.229996,103.624001}, {113.430878,104.355003}}}
102debugShowQuadLineIntersection 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}}}
103SkOpSegment::addT insert t=0.992657126 segID=26 spanID=73
104SkOpSegment::addT insert t=0.00597885639 segID=29 spanID=74
105debugShowLineIntersection 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}}}
106debugShowQuadLineIntersection no intersect {{{113.430878,104.355003}, {107.679138,105.935608}, {103.891258,109.227226}}} {{{113.290291,104.3797}, {113.229996,103.624001}}}
107debugShowQuadLineIntersection 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}}}
108debugShowQuadLineIntersection 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}}}
109debugShowQuadLineIntersection 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}}}
110SkOpSegment::addT insert t=0.999923983 segID=29 spanID=75
111debugShowQuadIntersection 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
112SkOpSegment::addT insert t=5.43505489e-05 segID=32 spanID=76
113debugShowLineIntersection 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}}}
114debugShowQuadLineIntersection no intersect {{{103.891838,109.22673}, {98.5984497,113.835938}, {97.4595795,120.026184}}} {{{103.891258,109.227226}, {103.393997,108.654999}}}
115debugShowQuadLineIntersection 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
11701: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
11802: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
11903: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
120SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
121SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
122SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
123SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
124SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
125SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
126SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
127SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
128SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
129SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
130SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
131SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
132SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
133SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
134SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
135SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
136SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
137SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
138SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
139SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
140SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
141SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
142SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
143SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
144SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
145SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
146SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
147SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
148SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
149SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
150SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
151SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
152SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
153SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
154SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
155SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
156SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
157SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
158SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
159SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
160SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
161SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
162SkOpSegment::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
163SkOpSegment::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
16501: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
16602: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
16703: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
168SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
169SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
170SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
171SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
172SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
173SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
174SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
175SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
176SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
177SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
178SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
179SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
180SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
181SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
182SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
183SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
184SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
185SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
186SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
187SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
188SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
189SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
190SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
191SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
192SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
193SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
194SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
195SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
196SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
197SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
198SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
199SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
200SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
201SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
202SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
203SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
204SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
205SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
206SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
207SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
208SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
209SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
210SkOpSegment::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
211SkOpSegment::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
21301: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
21402: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
21503: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
216SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
217SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
218SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
219SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
220SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
221SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
222SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
223SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
224SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
225SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
226SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
227SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
228SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
229SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
230SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
231SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
232SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
233SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
234SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
235SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
236SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
237SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
238SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
239SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
240SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
241SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
242SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
243SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
244SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
245SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
246SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
247SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
248SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
249SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
250SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
251SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
252SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
253SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
254SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
255SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
256SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
257SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
258SkOpSegment::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
259SkOpSegment::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
26101: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
26202: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
26303: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
264SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
265SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
266SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
267SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
268SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
269SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
270SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
271SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
272SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
273SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
274SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
275SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
276SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
277SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
278SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
279SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
280SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
281SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
282SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
283SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
284SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
285SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
286SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
287SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
288SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
289SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
290SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
291SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
292SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
293SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
294SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
295SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
296SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
297SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
298SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
299SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
300SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
301SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
302SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
303SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
304SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
305SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
306SkOpSegment::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
307SkOpSegment::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
30901: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
31002: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
31103: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
312SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
313SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
314SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
315SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
316SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
317SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
318SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
319SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
320SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
321SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
322SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
323SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
324SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
325SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
326SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
327SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
328SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
329SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
330SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
331SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
332SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
333SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
334SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
335SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
336SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
337SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
338SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
339SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
340SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
341SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
342SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
343SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
344SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
345SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
346SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
347SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
348SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
349SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
350SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
351SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
352SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
353SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
354SkOpSegment::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
355SkOpSegment::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
35701: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
35802: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
35903: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
360SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
361SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
362SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
363SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
364SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
365SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
366SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
367SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
368SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
369SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
370SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
371SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
372SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
373SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
374SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
375SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
376SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
377SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
378SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
379SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
380SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
381SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
382SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
383SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
384SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
385SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
386SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
387SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
388SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
389SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
390SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
391SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
392SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
393SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
394SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
395SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
396SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
397SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
398SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
399SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
400SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
401SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
402SkOpSegment::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
403SkOpSegment::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
40501: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
40602: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
40703: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
408SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
409SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
410SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
411SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
412SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
413SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
414SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
415SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
416SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
417SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
418SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
419SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
420SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
421SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
422SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
423SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
424SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
425SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
426SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
427SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
428SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
429SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
430SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
431SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
432SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
433SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
434SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
435SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
436SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
437SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
438SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
439SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
440SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
441SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
442SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
443SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
444SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
445SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
446SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
447SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
448SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
449SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
450SkOpSegment::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
451SkOpSegment::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
45301: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
45402: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
45503: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
456SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
457SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
458SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
459SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
460SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
461SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
462SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
463SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
464SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
465SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
466SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
467SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
468SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
469SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
470SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
471SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
472SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
473SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
474SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
475SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
476SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
477SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
478SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
479SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
480SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
481SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
482SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
483SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
484SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
485SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
486SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
487SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
488SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
489SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
490SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
491SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
492SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
493SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
494SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
495SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
496SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
497SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
498SkOpSegment::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
499SkOpSegment::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
50101: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
50202: coinSeg/Span/PtT=32/63/63 endSpan=76 oppSeg/Span/PtT=29/75/75 oppEndSpan=58 MissingCoin
50303: coinSeg/Span/PtT=29/75/75 endSpan=58 oppSeg/Span/PtT=32/63/63 oppEndSpan=76 MissingCoin
504SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
505SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
506SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
507SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
508SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
509SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
510SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
511SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
512SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
513SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
514SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
515SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
516SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
517SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
518SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
519SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
520SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
521SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
522SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
523SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
524SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
525SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
526SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
527SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
528SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
529SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
530SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
531SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
532SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
533SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
534SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
535SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
536SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
537SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
538SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
539SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
540SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
541SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
542SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
543SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
544SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
545SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
546SkOpSegment::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
547SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1
548SkOpSegment::missingCoincidence coinSpan=63 endSpan=76 oppSpan=75 oppEndSpan=58
549-----------------xx--x----------------00: coinSeg/Span/PtT=32/63/63 endSpan=76 Fail
55001: seg/base=32/63 seg/base=29/75 MarkCoinStart
55102: seg/base=32/76 seg/base=29/58 MarkCoinEnd
552SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
553SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
554SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
555SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
556SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
557SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
558SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
559SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
560SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
561SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
562SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
563SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
564SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
565SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
566SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
567SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
568SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
569SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
570SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
571SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
572SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
573SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
574SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
575SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
576SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
577SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
578SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
579SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
580SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
581SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
582SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
583SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
584SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
585SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
586SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
587SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
588SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
589SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
590SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
591SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
592SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
593SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
594SkOpSegment::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
595SkOpSegment::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
59701: seg/base=32/63 seg/base=29/75 MarkCoinStart
59802: seg/base=32/76 seg/base=29/58 MarkCoinEnd
599SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
600SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
601SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
602SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
603SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
604SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
605SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
606SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
607SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
608SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
609SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
610SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
611SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
612SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
613SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
614SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
615SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
616SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
617SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
618SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
619SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
620SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
621SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
622SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
623SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
624SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
625SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
626SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
627SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
628SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
629SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
630SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
631SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
632SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
633SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
634SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
635SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
636SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
637SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
638SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
639SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
640SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
641SkOpSegment::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
642SkOpSegment::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
64401: seg/base=32/63 seg/base=29/75 MarkCoinStart
64502: seg/base=32/76 seg/base=29/58 MarkCoinEnd
646SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
647SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
648SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
649SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
650SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
651SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
652SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
653SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
654SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
655SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
656SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
657SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
658SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
659SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
660SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
661SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
662SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
663SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
664SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
665SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
666SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
667SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
668SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
669SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
670SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
671SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
672SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
673SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
674SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
675SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
676SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
677SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
678SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
679SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
680SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
681SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
682SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
683SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
684SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
685SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
686SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
687SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
688SkOpSegment::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
689SkOpSegment::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
691SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
692SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
693SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
694SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
695SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
696SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
697SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
698SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
699SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
700SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
701SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
702SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
703SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
704SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
705SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
706SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
707SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
708SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
709SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
710SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
711SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
712SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
713SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
714SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
715SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
716SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
717SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
718SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
719SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
720SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
721SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
722SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
723SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
724SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
725SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
726SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
727SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
728SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
729SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
730SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
731SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
732SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
733SkOpSegment::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
734SkOpSegment::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
736SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
737SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
738SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
739SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
740SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
741SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
742SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
743SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
744SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
745SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
746SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
747SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
748SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
749SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
750SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
751SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
752SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
753SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
754SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
755SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
756SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
757SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
758SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
759SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
760SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
761SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
762SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
763SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
764SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
765SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
766SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
767SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
768SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
769SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
770SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
771SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
772SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
773SkOpSegment::debugShowActiveSpans id=29 (103.89183,109.226723 103.891544,109.226974 103.891258,109.227226) t=0.999923983 tEnd=1 windSum=? windValue=1
774SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
775SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
776SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=1
777SkOpSegment::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
778SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1
779SkOpSegment::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
781SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
782SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
783SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
784SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
785SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
786SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
787SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
788SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
789SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
790SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
791SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
792SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
793SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
794SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
795SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
796SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
797SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
798SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
799SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
800SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
801SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
802SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
803SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
804SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
805SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
806SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
807SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
808SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
809SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
810SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
811SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
812SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
813SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
814SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
815SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
816SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
817SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
818SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
819SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
820SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2
821SkOpSegment::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
822SkOpSegment::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
824SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
825SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
826SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
827SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
828SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
829SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
830SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
831SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
832SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
833SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
834SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
835SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
836SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
837SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
838SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
839SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
840SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
841SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
842SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
843SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
844SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
845SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
846SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
847SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
848SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
849SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
850SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
851SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
852SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
853SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
854SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
855SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
856SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
857SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
858SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
859SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
860SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
861SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
862SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
863SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2
864SkOpSegment::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
865SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1
866SkOpSegment::sortAngles [7] tStart=0.999952051 [65]
867SkOpAngle::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
868SkOpAngle::afterPart {{{123.38755,106.912048}, {125.172625,104.575609}, {123.637985,102.405312}}} id=7
869SkOpAngle::afterPart {{{123.38755,106.912048}, {123.388428,106.910896}, {123.388428,106.910896}}} id=10
870SkOpAngle::afterPart {{{123.38755,106.912048}, {123.387383,106.91227}, {123.387383,106.91227}}} id=7
871SkOpAngle::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
872SkOpAngle::afterPart {{{123.38755,106.912048}, {125.172625,104.575609}, {123.637985,102.405312}}} id=7
873SkOpAngle::afterPart {{{123.38755,106.912048}, {123.365603,106.940906}, {123.320007,107.000946}}} id=10
874SkOpAngle::afterPart {{{123.38755,106.912048}, {123.388428,106.910896}, {123.388428,106.910896}}} id=10
875SkOpAngle::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
876SkOpAngle::afterPart {{{123.38755,106.912048}, {123.388428,106.910896}, {123.388428,106.910896}}} id=10
877SkOpAngle::afterPart {{{123.38755,106.912048}, {123.365603,106.940906}, {123.320007,107.000946}}} id=10
878SkOpAngle::afterPart {{{123.38755,106.912048}, {123.387383,106.91227}, {123.387383,106.91227}}} id=7
879SkOpSegment::sortAngles [10] tStart=0.0189869068 [66]
880SkOpSegment::sortAngles [17] tStart=0.0929234671 [69]
881SkOpAngle::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
882SkOpAngle::afterPart {{{97.6869507,118.970093}, {96.5972366,119.139954}}} id=17
883SkOpAngle::afterPart {{{97.6869507,118.970093}, {99.0549405,113.438713}, {103.891266,109.227234}}} id=32
884SkOpAngle::afterPart {{{97.6869507,118.970093}, {108.229698,117.326683}}} id=17
885SkOpAngle::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
886SkOpAngle::afterPart {{{97.6869507,118.970093}, {96.5972366,119.139954}}} id=17
887SkOpAngle::afterPart {{{97.6869507,118.970093}, {97.5578058,119.492282}, {97.4595795,120.026184}}} id=32
888SkOpAngle::afterPart {{{97.6869507,118.970093}, {108.229698,117.326683}}} id=17
889SkOpSegment::sortAngles [17] tStart=0.991938827 [67]
890SkOpAngle::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
891SkOpAngle::afterPart {{{108.229698,117.326683}, {97.6869507,118.970093}}} id=17
892SkOpAngle::afterPart {{{108.229698,117.326683}, {108.185051,117.34594}, {108.142868,117.363983}}} id=20
893SkOpAngle::afterPart {{{108.229698,117.326683}, {108.324234,117.311951}}} id=17
894SkOpAngle::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
895SkOpAngle::afterPart {{{108.229698,117.326683}, {97.6869507,118.970093}}} id=17
896SkOpAngle::afterPart {{{108.229698,117.326683}, {116.177424,113.898617}, {122.112564,106.083923}}} id=20
897SkOpAngle::afterPart {{{108.229698,117.326683}, {108.185051,117.34594}, {108.142868,117.363983}}} id=20
898SkOpAngle::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
899SkOpAngle::afterPart {{{108.229698,117.326683}, {108.185051,117.34594}, {108.142868,117.363983}}} id=20
900SkOpAngle::afterPart {{{108.229698,117.326683}, {116.177424,113.898617}, {122.112564,106.083923}}} id=20
901SkOpAngle::afterPart {{{108.229698,117.326683}, {108.324234,117.311951}}} id=17
902SkOpAngle::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
903SkOpAngle::afterPart {{{108.229698,117.326683}, {108.324234,117.311951}}} id=17
904SkOpAngle::afterPart {{{108.229698,117.326683}, {116.177424,113.898617}, {122.112564,106.083923}}} id=20
905SkOpAngle::afterPart {{{108.229698,117.326683}, {97.6869507,118.970093}}} id=17
906SkOpSegment::sortAngles [20] tStart=0.00542932628 [68]
907SkOpSegment::sortAngles [23] tStart=0.860440414 [71]
908SkOpAngle::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
909SkOpAngle::afterPart {{{122.609795,103.636162}, {123.136432,104.743399}, {122.18261,105.991737}}} id=23
910SkOpAngle::afterPart {{{122.609795,103.636162}, {123.079292,103.598701}}} id=26
911SkOpAngle::afterPart {{{122.609795,103.636162}, {122.524376,103.456572}, {122.400009,103.280693}}} id=23
912SkOpAngle::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
913SkOpAngle::afterPart {{{122.609795,103.636162}, {123.136432,104.743399}, {122.18261,105.991737}}} id=23
914SkOpAngle::afterPart {{{122.609795,103.636162}, {113.362167,104.373962}}} id=26
915SkOpAngle::afterPart {{{122.609795,103.636162}, {123.079292,103.598701}}} id=26
916SkOpAngle::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
917SkOpAngle::afterPart {{{122.609795,103.636162}, {123.079292,103.598701}}} id=26
918SkOpAngle::afterPart {{{122.609795,103.636162}, {113.362167,104.373962}}} id=26
919SkOpAngle::afterPart {{{122.609795,103.636162}, {122.524376,103.456572}, {122.400009,103.280693}}} id=23
920SkOpAngle::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
921SkOpAngle::afterPart {{{122.609795,103.636162}, {122.524376,103.456572}, {122.400009,103.280693}}} id=23
922SkOpAngle::afterPart {{{122.609795,103.636162}, {113.362167,104.373962}}} id=26
923SkOpAngle::afterPart {{{122.609795,103.636162}, {123.136432,104.743399}, {122.18261,105.991737}}} id=23
924SkOpSegment::sortAngles [26] tStart=0.0479619043 [72]
925SkOpSegment::sortAngles [26] tStart=0.992657126 [73]
926SkOpAngle::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
927SkOpAngle::afterPart {{{113.362167,104.373962}, {122.609795,103.636162}}} id=26
928SkOpAngle::afterPart {{{113.362167,104.373962}, {113.395068,104.364844}, {113.430878,104.355003}}} id=29
929SkOpAngle::afterPart {{{113.362167,104.373962}, {113.290291,104.3797}}} id=26
930SkOpAngle::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
931SkOpAngle::afterPart {{{113.362167,104.373962}, {122.609795,103.636162}}} id=26
932SkOpAngle::afterPart {{{113.362167,104.373962}, {107.656922,105.955165}, {103.89183,109.226723}}} id=29
933SkOpAngle::afterPart {{{113.362167,104.373962}, {113.395068,104.364844}, {113.430878,104.355003}}} id=29
934SkOpAngle::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
935SkOpAngle::afterPart {{{113.362167,104.373962}, {113.395068,104.364844}, {113.430878,104.355003}}} id=29
936SkOpAngle::afterPart {{{113.362167,104.373962}, {107.656922,105.955165}, {103.89183,109.226723}}} id=29
937SkOpAngle::afterPart {{{113.362167,104.373962}, {113.290291,104.3797}}} id=26
938SkOpAngle::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
939SkOpAngle::afterPart {{{113.362167,104.373962}, {113.290291,104.3797}}} id=26
940SkOpAngle::afterPart {{{113.362167,104.373962}, {107.656922,105.955165}, {103.89183,109.226723}}} id=29
941SkOpAngle::afterPart {{{113.362167,104.373962}, {122.609795,103.636162}}} id=26
942SkOpSegment::sortAngles [29] tStart=0.00597885639 [74]
943SkOpSegment::sortAngles [29] tStart=0.999923983 [75]
944SkOpAngle::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
945SkOpAngle::afterPart {{{103.891838,109.22673}, {107.65693,105.955173}, {113.362175,104.37397}}} id=29
946SkOpAngle::afterPart {{{103.891838,109.22673}, {103.393997,108.654999}}} id=31
947SkOpAngle::afterPart {{{103.891838,109.22673}, {103.891266,109.227234}, {103.891266,109.227234}}} id=32
948SkOpSegment::sortAngles [30] tStart=0 [59]
949SkOpAngle::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
950SkOpAngle::afterPart {{{103.891266,109.227234}, {103.394005,108.655006}}} id=30
951SkOpAngle::afterPart {{{103.891266,109.227234}, {99.0549405,113.438713}, {97.6869507,118.970093}}} id=32
952SkOpAngle::afterPart {{{103.891266,109.227234}, {103.891838,109.22673}, {103.891838,109.22673}}} id=32
953SkOpSegment::sortAngles [31] tStart=1 [62]
954SkOpSegment::sortAngles [32] tStart=0 [63]
955SkOpSegment::sortAngles [32] tStart=5.43505489e-05 [76]
956SkOpSegment::sortAngles [32] tStart=0.913746799 [70]
957coinSpan - id=32 t=0 tEnd=5.43505489e-05
958coinSpan + id=29 t=0.999923983 tEnd=1
959SkOpSegment::debugShowActiveSpans id=1 (95.9684143,119.751823 97.2032471,113.040466 102.896156,108.083267) t=0 tEnd=1 windSum=? windValue=1
960SkOpSegment::debugShowActiveSpans id=2 (102.896156,108.083267 102.896736,108.082771) t=0 tEnd=1 windSum=? windValue=1
961SkOpSegment::debugShowActiveSpans id=3 (102.896736,108.082771 106.944885,104.564941 113.029114,102.892998) t=0 tEnd=1 windSum=? windValue=1
962SkOpSegment::debugShowActiveSpans id=4 (113.029114,102.892998 113.169701,102.868301) t=0 tEnd=1 windSum=? windValue=1
963SkOpSegment::debugShowActiveSpans id=5 (113.169701,102.868301 122.958702,102.087303) t=0 tEnd=1 windSum=? windValue=1
964SkOpSegment::debugShowActiveSpans id=6 (122.958702,102.087303 123.637985,102.405312) t=0 tEnd=1 windSum=? windValue=1
965SkOpSegment::debugShowActiveSpans id=7 (123.637985,102.405312 125.172625,104.575609 123.38755,106.912048) t=0 tEnd=0.999952051 windSum=? windValue=1
966SkOpSegment::debugShowActiveSpans id=7 (123.38755,106.912048 123.387466,106.912159 123.387383,106.91227) t=0.999952051 tEnd=1 windSum=? windValue=1
967SkOpSegment::debugShowActiveSpans id=8 (123.387383,106.91227 122.784996,106.452003) t=0 tEnd=1 windSum=? windValue=1
968SkOpSegment::debugShowActiveSpans id=9 (122.784996,106.452003 123.388428,106.910896) t=0 tEnd=1 windSum=? windValue=1
969SkOpSegment::debugShowActiveSpans id=10 (123.388428,106.910896 123.387993,106.911467 123.38755,106.912048) t=0 tEnd=0.0189869068 windSum=? windValue=1
970SkOpSegment::debugShowActiveSpans id=10 (123.38755,106.912048 123.365603,106.940906 123.320007,107.000946) t=0.0189869068 tEnd=1 windSum=? windValue=1
971SkOpSegment::debugShowActiveSpans id=11 (123.320007,107.000946 117.109985,115.177612 108.73912,118.758026) t=0 tEnd=1 windSum=? windValue=1
972SkOpSegment::debugShowActiveSpans id=12 (108.73912,118.758026 108.557755,118.810059) t=0 tEnd=1 windSum=? windValue=1
973SkOpSegment::debugShowActiveSpans id=13 (108.557755,118.810059 96.8307571,120.638062) t=0 tEnd=1 windSum=? windValue=1
974SkOpSegment::debugShowActiveSpans id=14 (96.8307571,120.638062 95.9684143,119.751823) t=0 tEnd=1 windSum=? windValue=1
975SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
976SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
977SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
978SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
979SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
980SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
981SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
982SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
983SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
984SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
985SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
986SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
987SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
988SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
989SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
990SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
991SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
992SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
993SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
994SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
995SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
996SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
997SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
998SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
999SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2
1000SkOpSegment::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
1001SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1
1002SkOpSpan::sortableTop dir=kLeft seg=1 t=0.5 pt=(98.3177643,113.479004)
1003SkOpSpan::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)
1004SkOpSegment::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
1005SkOpSegment::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
1006SkOpSegment::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
1007SkOpSegment::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
1008SkOpSegment::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
1009SkOpSegment::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
1010SkOpSegment::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
1011SkOpSegment::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
1012SkOpSegment::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
1013SkOpSegment::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
1014SkOpSegment::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
1015SkOpSegment::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
1016SkOpSegment::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
1017SkOpSegment::findNextWinding simple
1018SkOpSegment::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
1019bridgeWinding current id=1 from=(102.896156,108.083267) to=(95.9684143,119.751823)
1020path.moveTo(102.896156,108.083267);
1021path.quadTo(97.2032471,113.040466, 95.9684143,119.751823);
1022SkOpSegment::findNextWinding simple
1023SkOpSegment::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
1024bridgeWinding current id=14 from=(95.9684143,119.751823) to=(96.8307571,120.638062)
1025SkOpSegment::findNextWinding simple
1026SkOpSegment::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
1027bridgeWinding current id=13 from=(96.8307571,120.638062) to=(108.557755,118.810059)
1028path.lineTo(96.8307571,120.638062);
1029SkOpSegment::findNextWinding simple
1030SkOpSegment::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
1031bridgeWinding current id=12 from=(108.557755,118.810059) to=(108.73912,118.758026)
1032path.lineTo(108.557755,118.810059);
1033SkOpSegment::findNextWinding simple
1034SkOpSegment::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
1035bridgeWinding current id=11 from=(108.73912,118.758026) to=(123.320007,107.000946)
1036path.lineTo(108.73912,118.758026);
1037path.quadTo(117.109985,115.177612, 123.320007,107.000946);
1038SkOpSegment::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
1039SkOpSegment::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
1040SkOpSegment::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
1041SkOpSegment::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
1042SkOpSegment::markAngle last seg=10 span=66 windSum=-1
1043SkOpSegment::findNextWinding
1044SkOpAngle::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
1045SkOpAngle::dumpOne [7/2] next=7/1 sect=21/21 s=0.999952051 [65] e=1 [14] sgn=-1 windVal=1 windSum=1
1046SkOpAngle::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
1047SkOpAngle::dumpOne [10/3] next=10/4 sect=5/5 s=0.0189869068 [66] e=0 [19] sgn=1 windVal=1 windSum=1
1048SkOpSegment::findNextWinding chase.append segment=10 span=66 windSum=-1
1049SkOpSegment::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
1050SkOpSegment::findNextWinding from:[10] to:[7] start=6169336 end=6162888
1051bridgeWinding current id=10 from=(123.320007,107.000946) to=(123.38755,106.912048)
1052path.quadTo(123.365601,106.940903, 123.38755,106.912048);
1053SkOpSegment::findNextWinding simple
1054SkOpSegment::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
1055bridgeWinding current id=7 from=(123.38755,106.912048) to=(123.387383,106.91227)
1056SkOpSegment::findNextWinding simple
1057SkOpSegment::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
1058bridgeWinding current id=8 from=(123.387383,106.91227) to=(122.784996,106.452003)
1059path.lineTo(123.387383,106.91227);
1060SkOpSegment::findNextWinding simple
1061SkOpSegment::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
1062bridgeWinding current id=9 from=(122.784996,106.452003) to=(123.388428,106.910896)
1063path.lineTo(122.784996,106.452003);
1064SkOpSegment::findNextWinding
1065SkOpAngle::dumpOne [10/3] next=10/4 sect=5/5 s=0.0189869068 [66] e=0 [19] sgn=1 windVal=1 windSum=1
1066SkOpAngle::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
1067SkOpAngle::dumpOne [7/2] next=7/1 sect=21/21 s=0.999952051 [65] e=1 [14] sgn=-1 windVal=1 windSum=1 done
1068SkOpAngle::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
1069SkOpSegment::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
1070SkOpSegment::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
1071SkOpSegment::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
1072SkOpSegment::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
1073SkOpSegment::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
1074SkOpSegment::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
1075SkOpSegment::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
1076SkOpSegment::findNextWinding from:[10] to:[10] start=6169448 end=6163608
1077bridgeWinding current id=10 from=(123.388428,106.910896) to=(123.38755,106.912048)
1078path.lineTo(123.388428,106.910896);
1079path.lineTo(123.38755,106.912048);
1080SkOpSegment::debugShowActiveSpans id=15 (97.4595795,120.026184 96.7139969,119.889008) t=0 tEnd=1 windSum=? windValue=1
1081SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=? windValue=1
1082SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=? windValue=1
1083SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
1084SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
1085SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
1086SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
1087SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
1088SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
1089SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
1090SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
1091SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
1092SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
1093SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
1094SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
1095SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
1096SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
1097SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
1098SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
1099SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
1100SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
1101SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
1102SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
1103SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
1104SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2
1105SkOpSegment::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
1106SkOpSegment::debugShowActiveSpans id=32 (97.6869507,118.970093 97.5578058,119.492282 97.4595795,120.026184) t=0.913746799 tEnd=1 windSum=? windValue=1
1107SkOpSpan::sortableTop dir=kTop seg=15 t=0.5 pt=(97.086792,119.957596)
1108SkOpSpan::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)
1109SkOpSpan::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)
1110SkOpSpan::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)
1111SkOpSegment::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
1112SkOpSegment::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
1113SkOpSegment::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
1114SkOpSegment::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
1115SkOpSegment::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
1116SkOpSegment::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
1117SkOpSegment::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
1118bridgeWinding chase.append id=32 windSum=-2
1119SkOpSegment::debugShowActiveSpans id=16 (96.7139969,119.889008 96.5972366,119.139954) t=0 tEnd=1 windSum=-2 oppSum=0 windValue=1 oppValue=0
1120SkOpSegment::debugShowActiveSpans id=17 (96.5972366,119.139954 97.6869507,118.970093) t=0 tEnd=0.0929234671 windSum=-2 oppSum=0 windValue=1 oppValue=0
1121SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=? windValue=1
1122SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
1123SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
1124SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
1125SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
1126SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
1127SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
1128SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
1129SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
1130SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
1131SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
1132SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
1133SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
1134SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
1135SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
1136SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
1137SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
1138SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
1139SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
1140SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
1141SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
1142SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2
1143SkOpSegment::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
1144SkOpSegment::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
1145SkOpSegment::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
1146SkOpSegment::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
1147SkOpSegment::markAngle last seg=17 span=67 windSum=?
1148SkOpSegment::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
1149SkOpSegment::markAngle last seg=32 span=76 windSum=-1
1150SkOpSegment::debugShowActiveSpans id=17 (97.6869507,118.970093 108.229698,117.326683) t=0.0929234671 tEnd=0.991938827 windSum=-1 windValue=1
1151SkOpSegment::debugShowActiveSpans id=17 (108.229698,117.326683 108.324234,117.311951) t=0.991938827 tEnd=1 windSum=? windValue=1
1152SkOpSegment::debugShowActiveSpans id=18 (108.324234,117.311951 108.440994,118.061005) t=0 tEnd=1 windSum=? windValue=1
1153SkOpSegment::debugShowActiveSpans id=19 (108.440994,118.061005 108.142868,117.363983) t=0 tEnd=1 windSum=? windValue=1
1154SkOpSegment::debugShowActiveSpans id=20 (108.142868,117.363983 108.185051,117.34594 108.229698,117.326683) t=0 tEnd=0.00542932628 windSum=? windValue=1
1155SkOpSegment::debugShowActiveSpans id=20 (108.229698,117.326683 116.177424,113.898617 122.112564,106.083923) t=0.00542932628 tEnd=1 windSum=? windValue=1
1156SkOpSegment::debugShowActiveSpans id=21 (122.112564,106.083923 122.158455,106.023499 122.181564,105.993111) t=0 tEnd=1 windSum=? windValue=1
1157SkOpSegment::debugShowActiveSpans id=22 (122.181564,105.993111 122.18261,105.991737) t=0 tEnd=1 windSum=? windValue=1
1158SkOpSegment::debugShowActiveSpans id=23 (122.18261,105.991737 123.136432,104.743399 122.609795,103.636162) t=0 tEnd=0.860440414 windSum=? windValue=1
1159SkOpSegment::debugShowActiveSpans id=23 (122.609795,103.636162 122.524376,103.456572 122.400009,103.280693) t=0.860440414 tEnd=1 windSum=? windValue=1
1160SkOpSegment::debugShowActiveSpans id=24 (122.400009,103.280693 123.018997,102.843002) t=0 tEnd=1 windSum=? windValue=1
1161SkOpSegment::debugShowActiveSpans id=25 (123.018997,102.843002 123.079292,103.598701) t=0 tEnd=1 windSum=? windValue=1
1162SkOpSegment::debugShowActiveSpans id=26 (123.079292,103.598701 122.609795,103.636162) t=0 tEnd=0.0479619043 windSum=? windValue=1
1163SkOpSegment::debugShowActiveSpans id=26 (122.609795,103.636162 113.362167,104.373962) t=0.0479619043 tEnd=0.992657126 windSum=? windValue=1
1164SkOpSegment::debugShowActiveSpans id=26 (113.362167,104.373962 113.290291,104.3797) t=0.992657126 tEnd=1 windSum=? windValue=1
1165SkOpSegment::debugShowActiveSpans id=27 (113.290291,104.3797 113.229996,103.624001) t=0 tEnd=1 windSum=? windValue=1
1166SkOpSegment::debugShowActiveSpans id=28 (113.229996,103.624001 113.430878,104.355003) t=0 tEnd=1 windSum=? windValue=1
1167SkOpSegment::debugShowActiveSpans id=29 (113.430878,104.355003 113.395068,104.364844 113.362167,104.373962) t=0 tEnd=0.00597885639 windSum=? windValue=1
1168SkOpSegment::debugShowActiveSpans id=29 (113.362167,104.373962 107.656922,105.955165 103.89183,109.226723) t=0.00597885639 tEnd=0.999923983 windSum=? windValue=1
1169SkOpSegment::debugShowActiveSpans id=30 (103.891258,109.227226 103.393997,108.654999) t=0 tEnd=1 windSum=? windValue=1
1170SkOpSegment::debugShowActiveSpans id=31 (103.393997,108.654999 103.891838,109.22673) t=0 tEnd=1 windSum=? windValue=1
1171SkOpSegment::debugShowActiveSpans id=32 (103.891838,109.22673 103.891552,109.226982 103.891266,109.227234) t=0 tEnd=5.43505489e-05 windSum=? windValue=2
1172SkOpSegment::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
1173SkOpSegment::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
1174SkOpSegment::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
1175SkOpSegment::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
1176SkOpSegment::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
1177SkOpSegment::markAngle last seg=17 span=67 windSum=-2
1178SkOpSegment::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
1179SkOpSegment::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
1180SkOpSegment::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
1181SkOpSegment::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
1182SkOpSegment::markAngle last seg=23 span=71 windSum=?
1183SkOpSegment::findNextWinding
1184SkOpAngle::dumpOne [17/7] next=20/9 sect=17/17 s=0.991938827 [67] e=0.0929234671 [69] sgn=1 windVal=1 windSum=-1
1185SkOpAngle::dumpOne [20/9] next=17/8 sect=17/17 s=0.00542932628 [68] e=0 [39] sgn=1 windVal=1 windSum=-2
1186SkOpAngle::dumpOne [17/8] next=20/10 sect=1/1 s=0.991938827 [67] e=1 [34] sgn=-1 windVal=1 windSum=-2
1187SkOpAngle::dumpOne [20/10] next=17/7 sect=1/1 s=0.00542932628 [68] e=1 [40] sgn=-1 windVal=1 windSum=-1
1188SkOpSegment::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
1189SkOpSegment::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
1190SkOpSegment::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
1191SkOpSegment::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
1192SkOpSegment::findNextWinding chase.append segment=17 span=67 windSum=-2
1193SkOpSegment::findNextWinding chase.append segment=23 span=71 windSum=-2147483647
1194SkOpSegment::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
1195SkOpSegment::findNextWinding from:[17] to:[20] start=6169672 end=6166328
1196bridgeWinding current id=17 from=(97.6869507,118.970093) to=(108.229698,117.326683)
1197SkOpSegment::findNextWinding simple
1198SkOpSegment::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
1199bridgeWinding current id=20 from=(108.229698,117.326683) to=(122.112564,106.083923)
1200path.moveTo(97.6869507,118.970093);
1201path.lineTo(108.229698,117.326683);
1202path.quadTo(116.177422,113.898621, 122.112564,106.083923);
1203SkOpSegment::findNextWinding simple
1204SkOpSegment::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
1205bridgeWinding current id=21 from=(122.112564,106.083923) to=(122.181564,105.993111)
1206path.quadTo(122.158455,106.023499, 122.181564,105.993111);
1207SkOpSegment::findNextWinding simple
1208SkOpSegment::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
1209bridgeWinding current id=22 from=(122.181564,105.993111) to=(122.18261,105.991737)
1210SkOpSegment::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
1211SkOpSegment::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
1212SkOpSegment::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
1213SkOpSegment::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
1214SkOpSegment::markAngle last seg=23 span=71 windSum=-2
1215SkOpSegment::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
1216SkOpSegment::markAngle last seg=26 span=73 windSum=?
1217SkOpSegment::findNextWinding
1218SkOpAngle::dumpOne [23/11] next=26/13 sect=25/21 s=0.860440414 [71] e=0 [45] sgn=1 windVal=1 windSum=-1
1219SkOpAngle::dumpOne [26/13] next=23/12 sect=1/1 s=0.0479619043 [72] e=0 [51] sgn=1 windVal=1 windSum=-2
1220SkOpAngle::dumpOne [23/12] next=26/14 sect=9/9 s=0.860440414 [71] e=1 [46] sgn=-1 windVal=1 windSum=-2
1221SkOpAngle::dumpOne [26/14] next=23/11 sect=17/17 s=0.0479619043 [72] e=0.992657126 [73] sgn=-1 windVal=1 windSum=-1
1222SkOpSegment::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
1223SkOpSegment::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
1224SkOpSegment::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
1225SkOpSegment::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
1226SkOpSegment::findNextWinding chase.append segment=26 span=73 windSum=-2147483647
1227SkOpSegment::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
1228SkOpSegment::findNextWinding from:[23] to:[26] start=6170120 end=6170232
1229bridgeWinding current id=23 from=(122.18261,105.991737) to=(122.609795,103.636162)
1230path.lineTo(122.18261,105.991737);
1231path.quadTo(123.136429,104.743401, 122.609795,103.636162);
1232SkOpSegment::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
1233SkOpSegment::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
1234SkOpSegment::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
1235SkOpSegment::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
1236SkOpSegment::markAngle last seg=26 span=73 windSum=-2
1237SkOpSegment::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
1238SkOpSegment::markAngle last seg=29 span=75 windSum=?
1239SkOpSegment::findNextWinding
1240SkOpAngle::dumpOne [26/15] next=29/17 sect=1/1 s=0.992657126 [73] e=0.0479619043 [72] sgn=1 windVal=1 windSum=-1
1241SkOpAngle::dumpOne [29/17] next=26/16 sect=1/1 s=0.00597885639 [74] e=0 [57] sgn=1 windVal=1 windSum=-2
1242SkOpAngle::dumpOne [26/16] next=29/18 sect=17/17 s=0.992657126 [73] e=1 [52] sgn=-1 windVal=1 windSum=-2
1243SkOpAngle::dumpOne [29/18] next=26/15 sect=17/17 s=0.00597885639 [74] e=0.999923983 [75] sgn=-1 windVal=1 windSum=-1
1244SkOpSegment::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
1245SkOpSegment::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
1246SkOpSegment::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
1247SkOpSegment::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
1248SkOpSegment::findNextWinding chase.append segment=29 span=75 windSum=-2147483647
1249SkOpSegment::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
1250SkOpSegment::findNextWinding from:[26] to:[29] start=6170344 end=6170456
1251bridgeWinding current id=26 from=(122.609795,103.636162) to=(113.362167,104.373962)
1252SkOpSegment::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
1253SkOpSegment::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
1254SkOpSegment::markAngle last seg=30 span=59 windSum=-2
1255SkOpSegment::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
1256SkOpSegment::markAngle last seg=32 span=76 windSum=-1
1257SkOpSegment::findNextWinding
1258SkOpAngle::dumpOne [29/19] next=31/21 sect=1/1 s=0.999923983 [75] e=0.00597885639 [74] sgn=1 windVal=1 windSum=-1
1259SkOpAngle::dumpOne [31/21] next=32/22 sect=9/9 s=1 [62] e=0 [61] sgn=1 windVal=1 windSum=-2
1260SkOpAngle::dumpOne [32/22] next=29/19 sect=17/17 s=0 [63] e=5.43505489e-05 [76] sgn=-1 windVal=2 windSum=-2
1261SkOpSegment::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
1262SkOpSegment::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
1263SkOpSegment::findNextWinding chase.append segment=30 span=59 windSum=-2
1264SkOpSegment::findNextWinding chase.append segment=32 span=76 windSum=-1
1265SkOpSegment::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
1266SkOpSegment::findNextWinding from:[29] to:[32] start=6169096 end=6170568
1267bridgeWinding current id=29 from=(113.362167,104.373962) to=(103.89183,109.226723)
1268path.lineTo(113.362167,104.373962);
1269path.quadTo(107.656921,105.955162, 103.89183,109.226723);
1270SkOpSegment::findNextWinding
1271SkOpAngle::dumpOne [32/23] next=30/20 sect=1/1 s=5.43505489e-05 [76] e=0 [63] sgn=1 windVal=2 windSum=-2
1272SkOpAngle::dumpOne [30/20] next=32/24 sect=9/9 s=0 [59] e=1 [60] sgn=-1 windVal=1 windSum=-2 done
1273SkOpAngle::dumpOne [32/24] next=32/23 sect=17/21 s=5.43505489e-05 [76] e=0.913746799 [70] sgn=-1 windVal=1 windSum=-1
1274SkOpSegment::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
1275SkOpSegment::findNextWinding from:[32] to:[32] start=6170568 end=6169896
1276bridgeWinding current id=32 from=(103.891838,109.22673) to=(103.891266,109.227234)
1277SkOpSegment::findNextWinding
1278SkOpAngle::dumpOne [32/25] next=17/5 sect=5/5 s=0.913746799 [70] e=5.43505489e-05 [76] sgn=1 windVal=1 windSum=-1
1279SkOpAngle::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
1280SkOpAngle::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
1281SkOpAngle::dumpOne [17/6] next=32/25 sect=1/1 s=0.0929234671 [69] e=0.991938827 [67] sgn=-1 windVal=1 windSum=-1 done
1282SkOpSegment::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
1283SkOpSegment::findNextWinding from:[32] to:[17] start=6169784 end=6169560
1284bridgeWinding current id=32 from=(103.891266,109.227234) to=(97.6869507,118.970093)
1285path.lineTo(103.891266,109.227234);
1286path.quadTo(99.0549393,113.438713, 97.6869507,118.970093);
caryclark27c015d2016-09-23 05:47:20 -07001287path.close();
caryclarkdac1d172014-06-17 05:15:38 -07001288</div>
caryclark26ad22a2015-10-16 09:03:38 -07001289
caryclarkdac1d172014-06-17 05:15:38 -07001290</div>
1291
1292<script type="text/javascript">
1293
caryclark55888e42016-07-18 10:01:36 -07001294 var testDivs = [
caryclark34efb702016-10-24 08:19:06 -07001295 simplifyTest_1,
caryclark30b9fdd2016-08-31 14:36:29 -07001296 ];
caryclarkdac1d172014-06-17 05:15:38 -07001297
1298var decimal_places = 3; // make this 3 to show more precision
1299
1300var tests = [];
1301var testLines = [];
1302var testTitles = [];
1303var testIndex = 0;
1304var ctx;
1305
1306var xmin, xmax, focusXmin, focusXmax;
1307var ymin, ymax, focusYmin, focusYmax;
1308var scale;
1309var mouseX, mouseY;
1310var srcLeft, srcTop;
1311var screenWidth, screenHeight;
caryclark1049f122015-04-20 08:31:59 -07001312var drawnPts, drawnLines, drawnQuads, drawnConics, drawnCubics;
caryclarkdac1d172014-06-17 05:15:38 -07001313var curveT = 0;
1314
1315var pt_labels = 2;
1316var collect_bounds = false;
1317var control_lines = 0;
1318var curve_t = false;
1319var debug_xy = 1;
1320var focus_enabled = false;
1321var focus_on_selection = false;
1322var step_limit = 0;
1323var draw_active = false;
1324var draw_add = false;
1325var draw_angle = 0;
caryclark624637c2015-05-11 07:21:27 -07001326var draw_coincidence = false;
caryclarkdac1d172014-06-17 05:15:38 -07001327var draw_deriviatives = 0;
1328var draw_hints = false;
caryclarkdac1d172014-06-17 05:15:38 -07001329var draw_id = false;
1330var draw_intersection = 0;
1331var draw_intersectT = false;
1332var draw_legend = true;
1333var draw_log = false;
1334var draw_mark = false;
1335var draw_midpoint = false;
1336var draw_op = 0;
1337var draw_sequence = false;
1338var draw_sort = 0;
caryclark03b03ca2015-04-23 09:13:37 -07001339var draw_top = false;
caryclarkdac1d172014-06-17 05:15:38 -07001340var draw_path = 3;
1341var draw_computed = 0;
1342var retina_scale = !!window.devicePixelRatio;
1343
1344var activeCount = 0;
1345var addCount = 0;
1346var angleCount = 0;
caryclark624637c2015-05-11 07:21:27 -07001347var coinCount = 0;
caryclarkdac1d172014-06-17 05:15:38 -07001348var opCount = 0;
1349var sectCount = 0;
1350var sortCount = 0;
caryclark03b03ca2015-04-23 09:13:37 -07001351var topCount = 0;
caryclarkdac1d172014-06-17 05:15:38 -07001352var markCount = 0;
1353var activeMax = 0;
1354var addMax = 0;
1355var angleMax = 0;
caryclark624637c2015-05-11 07:21:27 -07001356var coinMax = 0;
caryclarkdac1d172014-06-17 05:15:38 -07001357var sectMax = 0;
1358var sectMax2 = 0;
1359var sortMax = 0;
caryclark03b03ca2015-04-23 09:13:37 -07001360var topMax = 0;
caryclarkdac1d172014-06-17 05:15:38 -07001361var markMax = 0;
1362var opMax = 0;
1363var stepMax = 0;
1364var lastIndex = 0;
1365var hasPath = false;
caryclark26ad22a2015-10-16 09:03:38 -07001366var hasAlignedPath = false;
caryclarkdac1d172014-06-17 05:15:38 -07001367var hasComputedPath = false;
caryclark54359292015-03-26 07:52:43 -07001368var angleBetween = false;
1369var afterIndex = 0;
caryclarkdac1d172014-06-17 05:15:38 -07001370
1371var firstActiveSpan = -1;
1372var logStart = -1;
1373var logRange = 0;
1374
1375var SPAN_ID = 0;
1376var SPAN_X1 = SPAN_ID + 1;
1377var SPAN_Y1 = SPAN_X1 + 1;
1378var SPAN_X2 = SPAN_Y1 + 1;
1379var SPAN_Y2 = SPAN_X2 + 1;
caryclark1049f122015-04-20 08:31:59 -07001380
caryclark55888e42016-07-18 10:01:36 -07001381var SPAN_L_TX = SPAN_Y2 + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001382var SPAN_L_TY = SPAN_L_TX + 1;
caryclark55888e42016-07-18 10:01:36 -07001383var SPAN_L_OTHER = SPAN_L_TY + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001384var SPAN_L_OTHERT = SPAN_L_OTHER + 1;
1385var SPAN_L_OTHERI = SPAN_L_OTHERT + 1;
1386var SPAN_L_SUM = SPAN_L_OTHERI + 1;
1387var SPAN_L_VAL = SPAN_L_SUM + 1;
1388var SPAN_L_OPP = SPAN_L_VAL + 1;
1389
1390var SPAN_X3 = SPAN_Y2 + 1;
1391var SPAN_Y3 = SPAN_X3 + 1;
caryclark1049f122015-04-20 08:31:59 -07001392
caryclark55888e42016-07-18 10:01:36 -07001393var SPAN_Q_TX = SPAN_Y3 + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001394var SPAN_Q_TY = SPAN_Q_TX + 1;
caryclark55888e42016-07-18 10:01:36 -07001395var SPAN_Q_OTHER = SPAN_Q_TY + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001396var SPAN_Q_OTHERT = SPAN_Q_OTHER + 1;
1397var SPAN_Q_OTHERI = SPAN_Q_OTHERT + 1;
1398var SPAN_Q_SUM = SPAN_Q_OTHERI + 1;
1399var SPAN_Q_VAL = SPAN_Q_SUM + 1;
1400var SPAN_Q_OPP = SPAN_Q_VAL + 1;
1401
caryclark1049f122015-04-20 08:31:59 -07001402var SPAN_K_W = SPAN_Y3 + 1;
caryclark55888e42016-07-18 10:01:36 -07001403var SPAN_K_TX = SPAN_K_W + 1;
caryclark1049f122015-04-20 08:31:59 -07001404var SPAN_K_TY = SPAN_K_TX + 1;
caryclark55888e42016-07-18 10:01:36 -07001405var SPAN_K_OTHER = SPAN_K_TY + 1;
caryclark1049f122015-04-20 08:31:59 -07001406var SPAN_K_OTHERT = SPAN_K_OTHER + 1;
1407var SPAN_K_OTHERI = SPAN_K_OTHERT + 1;
1408var SPAN_K_SUM = SPAN_K_OTHERI + 1;
1409var SPAN_K_VAL = SPAN_K_SUM + 1;
1410var SPAN_K_OPP = SPAN_K_VAL + 1;
1411
caryclarkdac1d172014-06-17 05:15:38 -07001412var SPAN_X4 = SPAN_Y3 + 1;
1413var SPAN_Y4 = SPAN_X4 + 1;
caryclark1049f122015-04-20 08:31:59 -07001414
caryclark55888e42016-07-18 10:01:36 -07001415var SPAN_C_TX = SPAN_Y4 + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001416var SPAN_C_TY = SPAN_C_TX + 1;
caryclark55888e42016-07-18 10:01:36 -07001417var SPAN_C_OTHER = SPAN_C_TY + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001418var SPAN_C_OTHERT = SPAN_C_OTHER + 1;
1419var SPAN_C_OTHERI = SPAN_C_OTHERT + 1;
1420var SPAN_C_SUM = SPAN_C_OTHERI + 1;
1421var SPAN_C_VAL = SPAN_C_SUM + 1;
1422var SPAN_C_OPP = SPAN_C_VAL + 1;
1423
1424var ACTIVE_LINE_SPAN = 1;
1425var ACTIVE_QUAD_SPAN = ACTIVE_LINE_SPAN + 1;
caryclark1049f122015-04-20 08:31:59 -07001426var ACTIVE_CONIC_SPAN = ACTIVE_QUAD_SPAN + 1;
1427var ACTIVE_CUBIC_SPAN = ACTIVE_CONIC_SPAN + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001428
1429var ADD_MOVETO = ACTIVE_CUBIC_SPAN + 1;
1430var ADD_LINETO = ADD_MOVETO + 1;
1431var ADD_QUADTO = ADD_LINETO + 1;
caryclark1049f122015-04-20 08:31:59 -07001432var ADD_CONICTO = ADD_QUADTO + 1;
1433var ADD_CUBICTO = ADD_CONICTO + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001434var ADD_CLOSE = ADD_CUBICTO + 1;
1435var ADD_FILL = ADD_CLOSE + 1;
1436
1437var PATH_LINE = ADD_FILL + 1;
1438var PATH_QUAD = PATH_LINE + 1;
caryclark1049f122015-04-20 08:31:59 -07001439var PATH_CONIC = PATH_QUAD + 1;
1440var PATH_CUBIC = PATH_CONIC + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001441
1442var INTERSECT_LINE = PATH_CUBIC + 1;
1443var INTERSECT_LINE_2 = INTERSECT_LINE + 1;
1444var INTERSECT_LINE_NO = INTERSECT_LINE_2 + 1;
1445var INTERSECT_QUAD_LINE = INTERSECT_LINE_NO + 1;
1446var INTERSECT_QUAD_LINE_2 = INTERSECT_QUAD_LINE + 1;
1447var INTERSECT_QUAD_LINE_NO = INTERSECT_QUAD_LINE_2 + 1;
1448var INTERSECT_QUAD = INTERSECT_QUAD_LINE_NO + 1;
1449var INTERSECT_QUAD_2 = INTERSECT_QUAD + 1;
1450var INTERSECT_QUAD_NO = INTERSECT_QUAD_2 + 1;
caryclark1049f122015-04-20 08:31:59 -07001451var INTERSECT_CONIC_LINE = INTERSECT_QUAD_NO + 1;
1452var INTERSECT_CONIC_LINE_2 = INTERSECT_CONIC_LINE + 1;
1453var INTERSECT_CONIC_LINE_NO = INTERSECT_CONIC_LINE_2 + 1;
caryclark55888e42016-07-18 10:01:36 -07001454var INTERSECT_CONIC_QUAD = INTERSECT_CONIC_LINE_NO + 1;
1455var INTERSECT_CONIC_QUAD_2 = INTERSECT_CONIC_QUAD + 1;
caryclark6c3b9cd2016-09-26 05:36:58 -07001456var INTERSECT_CONIC_QUAD_3 = INTERSECT_CONIC_QUAD_2 + 1;
1457var INTERSECT_CONIC_QUAD_4 = INTERSECT_CONIC_QUAD_3 + 1;
1458var INTERSECT_CONIC_QUAD_NO = INTERSECT_CONIC_QUAD_4 + 1;
caryclark55888e42016-07-18 10:01:36 -07001459var INTERSECT_CONIC = INTERSECT_CONIC_QUAD_NO + 1;
caryclark1049f122015-04-20 08:31:59 -07001460var INTERSECT_CONIC_2 = INTERSECT_CONIC + 1;
1461var INTERSECT_CONIC_NO = INTERSECT_CONIC_2 + 1;
1462var INTERSECT_SELF_CUBIC = INTERSECT_CONIC_NO + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001463var INTERSECT_SELF_CUBIC_NO = INTERSECT_SELF_CUBIC + 1;
1464var INTERSECT_CUBIC_LINE = INTERSECT_SELF_CUBIC_NO + 1;
1465var INTERSECT_CUBIC_LINE_2 = INTERSECT_CUBIC_LINE + 1;
1466var INTERSECT_CUBIC_LINE_3 = INTERSECT_CUBIC_LINE_2 + 1;
1467var INTERSECT_CUBIC_LINE_NO = INTERSECT_CUBIC_LINE_3 + 1;
1468var INTERSECT_CUBIC_QUAD = INTERSECT_CUBIC_LINE_NO + 1;
1469var INTERSECT_CUBIC_QUAD_2 = INTERSECT_CUBIC_QUAD + 1;
1470var INTERSECT_CUBIC_QUAD_3 = INTERSECT_CUBIC_QUAD_2 + 1;
1471var INTERSECT_CUBIC_QUAD_4 = INTERSECT_CUBIC_QUAD_3 + 1;
1472var INTERSECT_CUBIC_QUAD_NO = INTERSECT_CUBIC_QUAD_4 + 1;
1473var INTERSECT_CUBIC = INTERSECT_CUBIC_QUAD_NO + 1;
1474var INTERSECT_CUBIC_2 = INTERSECT_CUBIC + 1;
1475var INTERSECT_CUBIC_3 = INTERSECT_CUBIC_2 + 1;
1476var INTERSECT_CUBIC_4 = INTERSECT_CUBIC_3 + 1;
1477// FIXME: add cubic 5- 9
1478var INTERSECT_CUBIC_NO = INTERSECT_CUBIC_4 + 1;
1479
1480var SORT_UNARY = INTERSECT_CUBIC_NO + 1;
1481var SORT_BINARY = SORT_UNARY + 1;
1482
1483var OP_DIFFERENCE = SORT_BINARY + 1;
1484var OP_INTERSECT = OP_DIFFERENCE + 1;
1485var OP_UNION = OP_INTERSECT + 1;
1486var OP_XOR = OP_UNION + 1;
1487
1488var MARK_LINE = OP_XOR + 1;
1489var MARK_QUAD = MARK_LINE + 1;
caryclark1049f122015-04-20 08:31:59 -07001490var MARK_CONIC = MARK_QUAD + 1;
1491var MARK_CUBIC = MARK_CONIC + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001492var MARK_DONE_LINE = MARK_CUBIC + 1;
1493var MARK_DONE_QUAD = MARK_DONE_LINE + 1;
caryclark1049f122015-04-20 08:31:59 -07001494var MARK_DONE_CONIC = MARK_DONE_QUAD + 1;
1495var MARK_DONE_CUBIC = MARK_DONE_CONIC + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001496var MARK_UNSORTABLE_LINE = MARK_DONE_CUBIC + 1;
1497var MARK_UNSORTABLE_QUAD = MARK_UNSORTABLE_LINE + 1;
caryclark1049f122015-04-20 08:31:59 -07001498var MARK_UNSORTABLE_CONIC = MARK_UNSORTABLE_QUAD + 1;
1499var MARK_UNSORTABLE_CUBIC = MARK_UNSORTABLE_CONIC + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001500var MARK_SIMPLE_LINE = MARK_UNSORTABLE_CUBIC + 1;
1501var MARK_SIMPLE_QUAD = MARK_SIMPLE_LINE + 1;
caryclark1049f122015-04-20 08:31:59 -07001502var MARK_SIMPLE_CONIC = MARK_SIMPLE_QUAD + 1;
1503var MARK_SIMPLE_CUBIC = MARK_SIMPLE_CONIC + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001504var MARK_SIMPLE_DONE_LINE = MARK_SIMPLE_CUBIC + 1;
1505var MARK_SIMPLE_DONE_QUAD = MARK_SIMPLE_DONE_LINE + 1;
caryclark1049f122015-04-20 08:31:59 -07001506var MARK_SIMPLE_DONE_CONIC = MARK_SIMPLE_DONE_QUAD + 1;
1507var MARK_SIMPLE_DONE_CUBIC = MARK_SIMPLE_DONE_CONIC + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001508var MARK_DONE_UNARY_LINE = MARK_SIMPLE_DONE_CUBIC + 1;
1509var MARK_DONE_UNARY_QUAD = MARK_DONE_UNARY_LINE + 1;
caryclark1049f122015-04-20 08:31:59 -07001510var MARK_DONE_UNARY_CONIC = MARK_DONE_UNARY_QUAD + 1;
1511var MARK_DONE_UNARY_CUBIC = MARK_DONE_UNARY_CONIC + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001512var MARK_ANGLE_LAST = MARK_DONE_UNARY_CUBIC + 1;
1513
1514var COMPUTED_SET_1 = MARK_ANGLE_LAST + 1;
1515var COMPUTED_SET_2 = COMPUTED_SET_1 + 1;
1516
caryclark624637c2015-05-11 07:21:27 -07001517var ANGLE_AFTER = COMPUTED_SET_2 + 1;
caryclark54359292015-03-26 07:52:43 -07001518var ANGLE_AFTERPART = ANGLE_AFTER + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001519
caryclark54359292015-03-26 07:52:43 -07001520var ACTIVE_OP = ANGLE_AFTERPART + 1;
caryclarkdac1d172014-06-17 05:15:38 -07001521
caryclark624637c2015-05-11 07:21:27 -07001522var COIN_MAIN_SPAN = ACTIVE_OP + 1;
1523var COIN_OPP_SPAN = COIN_MAIN_SPAN + 1;
1524
1525var FRAG_TYPE_LAST = COIN_OPP_SPAN;
caryclarkdac1d172014-06-17 05:15:38 -07001526
1527var REC_TYPE_UNKNOWN = -1;
1528var REC_TYPE_PATH = 0;
caryclark54359292015-03-26 07:52:43 -07001529var REC_TYPE_PATH2 = 1;
1530var REC_TYPE_SECT = 2;
1531var REC_TYPE_ACTIVE = 3;
1532var REC_TYPE_ADD = 4;
1533var REC_TYPE_SORT = 5;
1534var REC_TYPE_OP = 6;
1535var REC_TYPE_MARK = 7;
1536var REC_TYPE_COMPUTED = 8;
1537var REC_TYPE_COIN = 9;
1538var REC_TYPE_ANGLE = 10;
1539var REC_TYPE_ACTIVE_OP = 11;
1540var REC_TYPE_AFTERPART = 12;
caryclark03b03ca2015-04-23 09:13:37 -07001541var REC_TYPE_TOP = 13;
caryclark624637c2015-05-11 07:21:27 -07001542var REC_TYPE_COINCIDENCE = 14;
caryclark26ad22a2015-10-16 09:03:38 -07001543var REC_TYPE_ALIGNED = 15;
1544var REC_TYPE_LAST = REC_TYPE_ALIGNED;
caryclarkdac1d172014-06-17 05:15:38 -07001545
1546function 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
1560function 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
1571function 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\\)");
caryclark1049f122015-04-20 08:31:59 -07001575 escape = escape.replace(/CONIC_VAL/g, "\\(P_VAL P_VAL P_VAL W_VAL\\)");
caryclarkdac1d172014-06-17 05:15:38 -07001576 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");
caryclark54359292015-03-26 07:52:43 -07001579 escape = escape.replace(/PTR_VAL/g, "0x[0-9A-F]+");
caryclarkdac1d172014-06-17 05:15:38 -07001580 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+)?)");
caryclark1049f122015-04-20 08:31:59 -07001583 escape = escape.replace(/W_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?");
caryclarkdac1d172014-06-17 05:15:38 -07001584 escape = escape.replace(/PATH/g, "pathB?");
caryclark1049f122015-04-20 08:31:59 -07001585 escape = escape.replace(/IDX/g, "(-?\\d+)");
caryclarkdac1d172014-06-17 05:15:38 -07001586 escape = escape.replace(/NUM/g, "(-?\\d+)");
1587 escape = escape.replace(/OPT/g, "(\\?|-?\\d+)");
1588 return new RegExp(escape, 'i');
1589}
1590
1591function construct_regexp2c(pattern) {
1592 var escape = pattern.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
1593 escape = escape.replace(/UNSORTABLE/g, "\\*\\*\\* UNSORTABLE \\*\\*\\*");
caryclark54359292015-03-26 07:52:43 -07001594 escape = escape.replace(/CUBIC_VAL/g, "(?:\\$\\d = )?\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}");
caryclark1049f122015-04-20 08:31:59 -07001595 escape = escape.replace(/CONIC_VAL/g, "(?:\\$\\d = )?\\{\\{\\{\\{P_VAL\\}, \\{P_VAL\\}, \\{P_VAL\\}\\}\\}, W_VAL\\}");
caryclark54359292015-03-26 07:52:43 -07001596 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\\}\\}\\}");
caryclarkdac1d172014-06-17 05:15:38 -07001598 escape = escape.replace(/FILL_TYPE/g, "SkPath::k[a-zA-Z]+_FillType");
caryclark54359292015-03-26 07:52:43 -07001599 escape = escape.replace(/PTR_VAL/g, "0x[0-9A-F]+");
caryclarkdac1d172014-06-17 05:15:38 -07001600 escape = escape.replace(/PT_VAL/g, "\\{\\{P_VAL\\}\\}");
caryclark54359292015-03-26 07:52:43 -07001601 escape = escape.replace(/P_VAL/g, "(?:f?[xX] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?, *(?: f?[yY] = )?(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?");
caryclarkdac1d172014-06-17 05:15:38 -07001602 escape = escape.replace(/T_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)");
caryclark1049f122015-04-20 08:31:59 -07001603 escape = escape.replace(/W_VAL/g, "(-?\\d+\\.?\\d*(?:e-?\\d+)?)[Ff]?");
caryclarkdac1d172014-06-17 05:15:38 -07001604 escape = escape.replace(/OPER/g, "[a-z]+");
1605 escape = escape.replace(/PATH/g, "pathB?");
1606 escape = escape.replace(/T_F/g, "([TF])");
caryclark1049f122015-04-20 08:31:59 -07001607 escape = escape.replace(/IDX/g, "(-?\\d+)");
caryclarkdac1d172014-06-17 05:15:38 -07001608 escape = escape.replace(/NUM/g, "(-?\\d+)");
1609 escape = escape.replace(/OPT/g, "(\\?|-?\\d+)");
1610 return new RegExp(escape, 'i');
1611}
1612
1613function 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
1622function endsWith(str, suffix) {
1623 return str.indexOf(suffix, str.length - suffix.length) !== -1;
1624}
1625
1626function 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 }
caryclark624637c2015-05-11 07:21:27 -07001646 var coinStart = "SkOpCoincidence::";
1647 if (line.lastIndexOf(coinStart, 0) === 0) {
1648 line = line.substr(coinStart.length);
1649 }
caryclark54359292015-03-26 07:52:43 -07001650 var type = line.lastIndexOf("debugShowActiveSpans", 0) === 0 ? REC_TYPE_ACTIVE
caryclark624637c2015-05-11 07:21:27 -07001651 : line.lastIndexOf("debugShowCoincidence", 0) === 0 ? REC_TYPE_COINCIDENCE
caryclark54359292015-03-26 07:52:43 -07001652 : line.lastIndexOf("((SkOpSegment*)", 0) === 0 ? REC_TYPE_PATH2
caryclark55888e42016-07-18 10:01:36 -07001653 : line.lastIndexOf("debugShowTs", 0) === 0 ? REC_TYPE_COIN
caryclark54359292015-03-26 07:52:43 -07001654 : line.lastIndexOf("afterPart", 0) === 0 ? REC_TYPE_AFTERPART
caryclarkdac1d172014-06-17 05:15:38 -07001655 : 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
caryclark26ad22a2015-10-16 09:03:38 -07001659 : line.lastIndexOf("aligned=", 0) === 0 ? REC_TYPE_ALIGNED
caryclarkdac1d172014-06-17 05:15:38 -07001660 : line.lastIndexOf("dumpOne", 0) === 0 ? REC_TYPE_SORT
caryclark03b03ca2015-04-23 09:13:37 -07001661 : line.lastIndexOf("findTop", 0) === 0 ? REC_TYPE_TOP
caryclarkdac1d172014-06-17 05:15:38 -07001662 : 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
caryclark54359292015-03-26 07:52:43 -07001667 : line.lastIndexOf("seg=", 0) === 0 ? REC_TYPE_PATH
caryclarkdac1d172014-06-17 05:15:38 -07001668 : 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" +
caryclark55888e42016-07-18 10:01:36 -07001686" id=IDX LINE_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX"
caryclarkdac1d172014-06-17 05:15:38 -07001687 ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" +
caryclark55888e42016-07-18 10:01:36 -07001688" id=IDX QUAD_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX"
caryclark1049f122015-04-20 08:31:59 -07001689 ) || match_regexp(line, lineNo, record, ACTIVE_CONIC_SPAN, "debugShowActiveSpans" +
caryclark55888e42016-07-18 10:01:36 -07001690" id=IDX CONIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX"
caryclarkdac1d172014-06-17 05:15:38 -07001691 ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" +
caryclark55888e42016-07-18 10:01:36 -07001692" id=IDX CUBIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT windValue=IDX"
caryclark624637c2015-05-11 07:21:27 -07001693 ) || match_regexp(line, lineNo, record, ACTIVE_LINE_SPAN, "debugShowActiveSpans" +
caryclark55888e42016-07-18 10:01:36 -07001694" id=IDX LINE_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM"
caryclark624637c2015-05-11 07:21:27 -07001695 ) || match_regexp(line, lineNo, record, ACTIVE_QUAD_SPAN, "debugShowActiveSpans" +
caryclark55888e42016-07-18 10:01:36 -07001696" id=IDX QUAD_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM"
caryclark624637c2015-05-11 07:21:27 -07001697 ) || match_regexp(line, lineNo, record, ACTIVE_CONIC_SPAN, "debugShowActiveSpans" +
caryclark55888e42016-07-18 10:01:36 -07001698" id=IDX CONIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM"
caryclark624637c2015-05-11 07:21:27 -07001699 ) || match_regexp(line, lineNo, record, ACTIVE_CUBIC_SPAN, "debugShowActiveSpans" +
caryclark55888e42016-07-18 10:01:36 -07001700" id=IDX CUBIC_VAL t=T_VAL tEnd=T_VAL windSum=OPT oppSum=OPT windValue=IDX oppValue=NUM"
caryclarkdac1d172014-06-17 05:15:38 -07001701 );
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;
caryclark1049f122015-04-20 08:31:59 -07001725 } 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;
caryclarkdac1d172014-06-17 05:15:38 -07001731 } 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;
caryclark54359292015-03-26 07:52:43 -07001743 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")
caryclark1049f122015-04-20 08:31:59 -07001746 || match_regexp(line, lineNo, record, PATH_CONIC, "afterPart CONIC_VAL")
caryclark54359292015-03-26 07:52:43 -07001747 || match_regexp(line, lineNo, record, PATH_CUBIC, "afterPart CUBIC_VAL")
1748 break;
caryclark26ad22a2015-10-16 09:03:38 -07001749 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;
caryclarkdac1d172014-06-17 05:15:38 -07001756 case REC_TYPE_ANGLE:
1757 found = match_regexp(line, lineNo, record, ANGLE_AFTER, "after " +
caryclarkdac1d172014-06-17 05:15:38 -07001758"[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;
caryclark624637c2015-05-11 07:21:27 -07001763 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;
caryclarkdac1d172014-06-17 05:15:38 -07001770 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,"
caryclark1049f122015-04-20 08:31:59 -07001775 ) || match_regexp(line, lineNo, record, PATH_CONIC, " CONIC_VAL,"
caryclarkdac1d172014-06-17 05:15:38 -07001776 ) || match_regexp(line, lineNo, record, PATH_CUBIC, " CUBIC_VAL,"
1777 );
1778 break;
1779 case REC_TYPE_PATH:
caryclark54359292015-03-26 07:52:43 -07001780 found = match_regexp(line, lineNo, record, PATH_LINE, "seg=IDX LINE_VAL"
1781 ) || match_regexp(line, lineNo, record, PATH_QUAD, "seg=IDX QUAD_VAL"
caryclark1049f122015-04-20 08:31:59 -07001782 ) || match_regexp(line, lineNo, record, PATH_CONIC, "seg=IDX CONIC_VAL"
caryclark54359292015-03-26 07:52:43 -07001783 ) || 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}"
caryclark1049f122015-04-20 08:31:59 -07001789 ) || match_regexp(line, lineNo, record, PATH_CONIC, "((SkOpSegment*) PTR_VAL) [IDX] {CONIC_VAL}"
caryclark54359292015-03-26 07:52:43 -07001790 ) || match_regexp(line, lineNo, record, PATH_CUBIC, "((SkOpSegment*) PTR_VAL) [IDX] {CUBIC_VAL}"
caryclarkdac1d172014-06-17 05:15:38 -07001791 );
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"
caryclark55888e42016-07-18 10:01:36 -07001812
caryclark1049f122015-04-20 08:31:59 -07001813 ) || 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"
caryclark55888e42016-07-18 10:01:36 -07001819
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"
caryclark6c3b9cd2016-09-26 05:36:58 -07001824 ) || 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"
caryclark55888e42016-07-18 10:01:36 -07001828 ) || match_regexp(line, lineNo, record, INTERSECT_CONIC_QUAD_NO, "debugShowConicQuadIntersection" +
1829" no intersect CONIC_VAL QUAD_VAL"
1830
caryclark1049f122015-04-20 08:31:59 -07001831 ) || 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"
caryclarkdac1d172014-06-17 05:15:38 -07001837 ) || 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;
caryclark03b03ca2015-04-23 09:13:37 -07001897 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;
caryclarkdac1d172014-06-17 05:15:38 -07001906 case REC_TYPE_MARK:
1907 found = match_regexp(line, lineNo, record, MARK_LINE, "markWinding" +
caryclark54359292015-03-26 07:52:43 -07001908" id=IDX LINE_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX"
caryclarkdac1d172014-06-17 05:15:38 -07001909 ) || match_regexp(line, lineNo, record, MARK_QUAD, "markWinding" +
caryclark54359292015-03-26 07:52:43 -07001910" id=IDX QUAD_VAL t=T_VAL [IDX] PT_VAL tEnd=T_VAL newWindSum=NUM newOppSum=OPT oppSum=OPT windSum=OPT windValue=IDX"
caryclark1049f122015-04-20 08:31:59 -07001911 ) || 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"
caryclarkdac1d172014-06-17 05:15:38 -07001913 ) || match_regexp(line, lineNo, record, MARK_CUBIC, "markWinding" +
caryclark54359292015-03-26 07:52:43 -07001914" 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"
caryclark1049f122015-04-20 08:31:59 -07001919 ) || 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"
caryclark54359292015-03-26 07:52:43 -07001921 ) || 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"
caryclarkdac1d172014-06-17 05:15:38 -07001923 ) || 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"
caryclark1049f122015-04-20 08:31:59 -07001927 ) || 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"
caryclarkdac1d172014-06-17 05:15:38 -07001929 ) || 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"
caryclarkdac1d172014-06-17 05:15:38 -07001931 ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" +
caryclark1049f122015-04-20 08:31:59 -07001932" last segment=IDX span=IDX"
caryclark54359292015-03-26 07:52:43 -07001933 ) || match_regexp(line, lineNo, record, MARK_ANGLE_LAST, "markAngle" +
caryclark55888e42016-07-18 10:01:36 -07001934" 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 );
caryclarkdac1d172014-06-17 05:15:38 -07001940 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 }
caryclark54359292015-03-26 07:52:43 -07001947 found = match_regexp(line, lineNo, record, OP_DIFFERENCE, "op diff"
caryclarkdac1d172014-06-17 05:15:38 -07001948 ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op intersect"
caryclark54359292015-03-26 07:52:43 -07001949 ) || match_regexp(line, lineNo, record, OP_INTERSECT, "op sect"
caryclarkdac1d172014-06-17 05:15:38 -07001950 ) || 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
1973function 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;
caryclark26ad22a2015-10-16 09:03:38 -07001993 hasPath = hasAlignedPath = hasComputedPath = false;
caryclarkdac1d172014-06-17 05:15:38 -07001994 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) {
caryclark26ad22a2015-10-16 09:03:38 -07002014 case REC_TYPE_ALIGNED:
2015 hasAlignedPath = true;
caryclarkdac1d172014-06-17 05:15:38 -07002016 case REC_TYPE_COMPUTED:
2017 if (fragType == COMPUTED_SET_1 || fragType == COMPUTED_SET_2) {
2018 break;
2019 }
caryclark26ad22a2015-10-16 09:03:38 -07002020 if (REC_TYPE_COMPUTED == recType) {
2021 hasComputedPath = true;
2022 }
caryclarkdac1d172014-06-17 05:15:38 -07002023 case REC_TYPE_PATH:
caryclark54359292015-03-26 07:52:43 -07002024 first = 1;
caryclarkdac1d172014-06-17 05:15:38 -07002025 switch (fragType) {
2026 case PATH_LINE:
caryclark54359292015-03-26 07:52:43 -07002027 last = 5;
caryclarkdac1d172014-06-17 05:15:38 -07002028 break;
caryclark1049f122015-04-20 08:31:59 -07002029 case PATH_CONIC:
caryclarkdac1d172014-06-17 05:15:38 -07002030 case PATH_QUAD:
caryclark54359292015-03-26 07:52:43 -07002031 last = 7;
caryclarkdac1d172014-06-17 05:15:38 -07002032 break;
2033 case PATH_CUBIC:
caryclark54359292015-03-26 07:52:43 -07002034 last = 9;
caryclarkdac1d172014-06-17 05:15:38 -07002035 break;
2036 default:
caryclark55888e42016-07-18 10:01:36 -07002037 console.log("unknown " + (recType == REC_TYPE_PATH ? "REC_TYPE_PATH"
caryclarkdac1d172014-06-17 05:15:38 -07002038 : "REC_TYPE_COMPUTED") + " frag type:" + fragType);
2039 throw "stop execution";
2040 }
2041 if (recType == REC_TYPE_PATH) {
2042 hasPath = true;
2043 }
2044 break;
caryclark54359292015-03-26 07:52:43 -07002045 case REC_TYPE_PATH2:
2046 first = 1;
2047 switch (fragType) {
2048 case PATH_LINE:
2049 last = 5;
2050 break;
caryclark1049f122015-04-20 08:31:59 -07002051 case PATH_CONIC:
caryclark54359292015-03-26 07:52:43 -07002052 case PATH_QUAD:
2053 last = 7;
2054 break;
2055 case PATH_CUBIC:
2056 last = 9;
2057 break;
2058 default:
caryclark55888e42016-07-18 10:01:36 -07002059 console.log("unknown " + (recType == REC_TYPE_PATH2 ? "REC_TYPE_PATH2"
caryclark54359292015-03-26 07:52:43 -07002060 : "REC_TYPE_COMPUTED") + " frag type:" + fragType);
2061 throw "stop execution";
2062 }
2063 if (recType == REC_TYPE_PATH2) {
2064 hasPath = true;
2065 }
2066 break;
caryclarkdac1d172014-06-17 05:15:38 -07002067 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;
caryclark1049f122015-04-20 08:31:59 -07002076 case ACTIVE_CONIC_SPAN:
caryclarkdac1d172014-06-17 05:15:38 -07002077 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;
caryclark1049f122015-04-20 08:31:59 -07002095 case ADD_CONICTO:
caryclarkdac1d172014-06-17 05:15:38 -07002096 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;
caryclark54359292015-03-26 07:52:43 -07002110 case REC_TYPE_AFTERPART:
2111 switch (fragType) {
2112 case PATH_LINE:
2113 last = 4;
2114 break;
caryclark1049f122015-04-20 08:31:59 -07002115 case PATH_CONIC:
caryclark54359292015-03-26 07:52:43 -07002116 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;
caryclarkdac1d172014-06-17 05:15:38 -07002127 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;
caryclark1049f122015-04-20 08:31:59 -07002138 case INTERSECT_CONIC_LINE:
2139 first = 1; last = 7; first2 = 11; last2 = 15;
2140 break;
caryclarkdac1d172014-06-17 05:15:38 -07002141 case INTERSECT_QUAD_LINE:
2142 first = 1; last = 7; first2 = 10; last2 = 14;
2143 break;
caryclark1049f122015-04-20 08:31:59 -07002144 case INTERSECT_CONIC_LINE_2:
2145 first = 1; last = 7; first2 = 14; last2 = 18;
2146 break;
caryclarkdac1d172014-06-17 05:15:38 -07002147 case INTERSECT_QUAD_LINE_2:
2148 first = 1; last = 7; first2 = 13; last2 = 17;
2149 break;
caryclark1049f122015-04-20 08:31:59 -07002150 case INTERSECT_CONIC_LINE_NO:
2151 first = 0; last = 6; first2 = 7; last2 = 11;
2152 break;
caryclarkdac1d172014-06-17 05:15:38 -07002153 case INTERSECT_QUAD_LINE_NO:
2154 first = 0; last = 6; first2 = 6; last2 = 10;
2155 break;
caryclark1049f122015-04-20 08:31:59 -07002156 case INTERSECT_CONIC:
2157 first = 1; last = 7; first2 = 11; last2 = 17;
2158 break;
caryclarkdac1d172014-06-17 05:15:38 -07002159 case INTERSECT_QUAD:
2160 first = 1; last = 7; first2 = 10; last2 = 16;
2161 break;
caryclark1049f122015-04-20 08:31:59 -07002162 case INTERSECT_CONIC_2:
2163 first = 1; last = 7; first2 = 14; last2 = 20;
2164 break;
caryclarkdac1d172014-06-17 05:15:38 -07002165 case INTERSECT_QUAD_2:
2166 first = 1; last = 7; first2 = 13; last2 = 19;
2167 break;
caryclark1049f122015-04-20 08:31:59 -07002168 case INTERSECT_CONIC_NO:
2169 first = 0; last = 6; first2 = 7; last2 = 13;
2170 break;
caryclarkdac1d172014-06-17 05:15:38 -07002171 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;
caryclark55888e42016-07-18 10:01:36 -07002192 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;
caryclark6c3b9cd2016-09-26 05:36:58 -07002198 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;
caryclark55888e42016-07-18 10:01:36 -07002204 case INTERSECT_CONIC_QUAD_NO:
2205 first = 0; last = 6; first2 = 7; last2 = 13;
2206 break;
caryclarkdac1d172014-06-17 05:15:38 -07002207 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 }
caryclark54359292015-03-26 07:52:43 -07002280 {
caryclarkdac1d172014-06-17 05:15:38 -07002281 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;
caryclark624637c2015-05-11 07:21:27 -07002288 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;
caryclarkdac1d172014-06-17 05:15:38 -07002297 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;
caryclark03b03ca2015-04-23 09:13:37 -07002306 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;
caryclarkdac1d172014-06-17 05:15:38 -07002315 }
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) {
caryclark1049f122015-04-20 08:31:59 -07002324 draw_computed = 7; // show quadratics, conics, and cubics
caryclarkdac1d172014-06-17 05:15:38 -07002325 }
2326 if (hasPath == true && hasComputedPath == false && draw_computed) {
2327 draw_computed = 0;
2328 }
2329}
2330
caryclark26ad22a2015-10-16 09:03:38 -07002331function curveByIDMatch(test, id, recMatch) {
caryclark54359292015-03-26 07:52:43 -07002332 var tIndex = -3;
2333 while ((tIndex += 3) < test.length) {
caryclarkdac1d172014-06-17 05:15:38 -07002334 var recType = test[tIndex];
caryclark54359292015-03-26 07:52:43 -07002335 if (recType == REC_TYPE_OP) {
2336 continue;
2337 }
caryclark26ad22a2015-10-16 09:03:38 -07002338 if (recType != recMatch) {
caryclarkdac1d172014-06-17 05:15:38 -07002339 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) {
caryclark54359292015-03-26 07:52:43 -07002347 case PATH_LINE:
caryclarkdac1d172014-06-17 05:15:38 -07002348 return [frags[1], frags[2], frags[3], frags[4]];
caryclark54359292015-03-26 07:52:43 -07002349 case PATH_QUAD:
caryclarkdac1d172014-06-17 05:15:38 -07002350 return [frags[1], frags[2], frags[3], frags[4],
2351 frags[5], frags[6]];
caryclark1049f122015-04-20 08:31:59 -07002352 case PATH_CONIC:
2353 return [frags[1], frags[2], frags[3], frags[4],
2354 frags[5], frags[6], frags[7]];
caryclark54359292015-03-26 07:52:43 -07002355 case PATH_CUBIC:
caryclarkdac1d172014-06-17 05:15:38 -07002356 return [frags[1], frags[2], frags[3], frags[4],
2357 frags[5], frags[6], frags[7], frags[8]];
2358 }
2359 }
2360 }
caryclarkdac1d172014-06-17 05:15:38 -07002361 }
2362 return [];
2363}
2364
caryclark26ad22a2015-10-16 09:03:38 -07002365function 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
2373function curvePartialByIDMatch(test, id, t0, t1, recMatch) {
caryclark54359292015-03-26 07:52:43 -07002374 var tIndex = -3;
2375 while ((tIndex += 3) < test.length) {
caryclarkdac1d172014-06-17 05:15:38 -07002376 var recType = test[tIndex];
caryclark54359292015-03-26 07:52:43 -07002377 if (recType == REC_TYPE_OP) {
2378 continue;
2379 }
caryclark26ad22a2015-10-16 09:03:38 -07002380 if (recType != recMatch) {
caryclarkdac1d172014-06-17 05:15:38 -07002381 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) {
caryclark54359292015-03-26 07:52:43 -07002389 case PATH_LINE:
caryclarkdac1d172014-06-17 05:15:38 -07002390 return linePartial(frags[1], frags[2], frags[3], frags[4], t0, t1);
caryclark54359292015-03-26 07:52:43 -07002391 case PATH_QUAD:
caryclarkdac1d172014-06-17 05:15:38 -07002392 return quadPartial(frags[1], frags[2], frags[3], frags[4],
2393 frags[5], frags[6], t0, t1);
caryclark1049f122015-04-20 08:31:59 -07002394 case PATH_CONIC:
2395 return conicPartial(frags[1], frags[2], frags[3], frags[4],
2396 frags[5], frags[6], frags[7], t0, t1);
caryclark54359292015-03-26 07:52:43 -07002397 case PATH_CUBIC:
caryclarkdac1d172014-06-17 05:15:38 -07002398 return cubicPartial(frags[1], frags[2], frags[3], frags[4],
2399 frags[5], frags[6], frags[7], frags[8], t0, t1);
2400 }
2401 }
2402 }
caryclarkdac1d172014-06-17 05:15:38 -07002403 }
2404 return [];
2405}
2406
caryclark26ad22a2015-10-16 09:03:38 -07002407function 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
2415function idByCurveIDMatch(test, frag, type, recMatch) {
caryclark54359292015-03-26 07:52:43 -07002416 var tIndex = 0;
caryclarkdac1d172014-06-17 05:15:38 -07002417 while (tIndex < test.length) {
2418 var recType = test[tIndex];
caryclark26ad22a2015-10-16 09:03:38 -07002419 if (recType != recMatch) {
caryclark54359292015-03-26 07:52:43 -07002420 ++tIndex;
2421 continue;
caryclarkdac1d172014-06-17 05:15:38 -07002422 }
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];
caryclark54359292015-03-26 07:52:43 -07002427 if (frag.length != frags.length - 1) {
2428 continue;
2429 }
caryclarkdac1d172014-06-17 05:15:38 -07002430 switch (fragType) {
caryclark54359292015-03-26 07:52:43 -07002431 case PATH_LINE:
caryclarkdac1d172014-06-17 05:15:38 -07002432 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];
caryclark54359292015-03-26 07:52:43 -07002437 case PATH_QUAD:
caryclarkdac1d172014-06-17 05:15:38 -07002438 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];
caryclark1049f122015-04-20 08:31:59 -07002444 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];
caryclark54359292015-03-26 07:52:43 -07002452 case PATH_CUBIC:
caryclarkdac1d172014-06-17 05:15:38 -07002453 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
caryclark26ad22a2015-10-16 09:03:38 -07002467function 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
caryclarkdac1d172014-06-17 05:15:38 -07002475function curve_extremes(curve, bounds) {
caryclark1049f122015-04-20 08:31:59 -07002476 var length = curve.length == 7 ? 6 : curve.length;
caryclarked0935a2015-10-22 07:23:52 -07002477 for (var index = 0; index < length; index += 2) {
caryclarkdac1d172014-06-17 05:15:38 -07002478 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
2487function 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
2515function 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
2572function drawPoint(px, py, end) {
caryclark1049f122015-04-20 08:31:59 -07002573 var length = drawnPts.length == 7 ? 6 : drawnPts.length;
2574 for (var pts = 0; pts < length; pts += 2) {
caryclarkdac1d172014-06-17 05:15:38 -07002575 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
caryclark1049f122015-04-20 08:31:59 -07002600function 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
caryclarkdac1d172014-06-17 05:15:38 -07002614function drawPoints(ptArray, curveType, drawControls) {
caryclark1049f122015-04-20 08:31:59 -07002615 var count = coordCount(curveType);
caryclarkdac1d172014-06-17 05:15:38 -07002616 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
2624function 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
2645function 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;
caryclark1049f122015-04-20 08:31:59 -07002662 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;
caryclarkdac1d172014-06-17 05:15:38 -07002673 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}
caryclark55888e42016-07-18 10:01:36 -07002687
caryclarkdac1d172014-06-17 05:15:38 -07002688function 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
2699function 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
2706function 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
2713function 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
2736function 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
2748function 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
2760function 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
2777function 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
2803function 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
2817function interp(A, B, t) {
2818 return A + (B - A) * t;
2819}
2820
2821function 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
2829function 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
2844function 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
caryclark1049f122015-04-20 08:31:59 -07002865function 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]
caryclark55888e42016-07-18 10:01:36 -07002877 && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3]
2878 && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5]
caryclark1049f122015-04-20 08:31:59 -07002879 && 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
2893var kMaxConicToQuadPOW2 = 5;
2894
2895function 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
2912function subdivide_w_value(w) {
2913 return Math.sqrt(0.5 + w * 0.5);
2914}
2915
2916function 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
2932function 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
2947function chopIntoQuadsPOW2(curve, pow2, pts) {
2948 subdivide(curve, pow2, pts);
2949 return 1 << pow2;
2950}
2951
2952function 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
2972function 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
2981function 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
2988function 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;
caryclark1049f122015-04-20 08:31:59 -07003004 var array = [
caryclarked0935a2015-10-22 07:23:52 -07003005 ax / az, ay / az, bx / bz, by / bz, cx / cz, cy / cz, 0
caryclark1049f122015-04-20 08:31:59 -07003006 ];
caryclarked0935a2015-10-22 07:23:52 -07003007 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;
caryclark1049f122015-04-20 08:31:59 -07003014 return array;
3015}
caryclark55888e42016-07-18 10:01:36 -07003016
caryclark1049f122015-04-20 08:31:59 -07003017function 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
caryclarkdac1d172014-06-17 05:15:38 -07003029function 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]
caryclark55888e42016-07-18 10:01:36 -07003041 && x2 == drawnCubics[pts + 2] && y2 == drawnCubics[pts + 3]
3042 && x3 == drawnCubics[pts + 4] && y3 == drawnCubics[pts + 5]
caryclarkdac1d172014-06-17 05:15:38 -07003043 && 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
3058function 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
3074function 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
3085function 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}
caryclark55888e42016-07-18 10:01:36 -07003107
caryclarkdac1d172014-06-17 05:15:38 -07003108function 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
3133function 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;
caryclark1049f122015-04-20 08:31:59 -07003141 case 7:
3142 drawConicWithQuads(c[0], c[1], c[2], c[3], c[4], c[5], c[6]);
3143 break;
caryclarkdac1d172014-06-17 05:15:38 -07003144 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
3150function boundsWidth(pts) {
3151 var min = pts[0];
3152 var max = pts[0];
caryclark1049f122015-04-20 08:31:59 -07003153 var length = pts.length == 7 ? 6 : pts.length;
3154 for (var idx = 2; idx < length; idx += 2) {
caryclarkdac1d172014-06-17 05:15:38 -07003155 min = Math.min(min, pts[idx]);
3156 max = Math.max(max, pts[idx]);
3157 }
3158 return max - min;
3159}
3160
3161function boundsHeight(pts) {
3162 var min = pts[1];
3163 var max = pts[1];
caryclark1049f122015-04-20 08:31:59 -07003164 var length = pts.length == 7 ? 6 : pts.length;
3165 for (var idx = 3; idx < length; idx += 2) {
caryclarkdac1d172014-06-17 05:15:38 -07003166 min = Math.min(min, pts[idx]);
3167 max = Math.max(max, pts[idx]);
3168 }
3169 return max - min;
3170}
3171
3172function 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];
caryclark1049f122015-04-20 08:31:59 -07003178 if (dx == 0 && dy == 0 && pts.length == 8) {
caryclarkdac1d172014-06-17 05:15:38 -07003179 dx = pts[6] - pts[0];
3180 dy = pts[7] - pts[1];
3181 }
3182 }
3183 return Math.atan2(-dy, dx);
3184}
3185
3186function 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
3197function 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
3207function 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
3232function 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
3247function 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
3254function 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
3265function 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];
caryclark1049f122015-04-20 08:31:59 -07003273 } 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;
caryclarkdac1d172014-06-17 05:15:38 -07003284 } 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
3300function 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
3314function drawLabelX(ymin, num, loc) {
3315 var px = (loc - srcLeft) * scale;
3316 var py = (ymin - srcTop) * scale - 20;
3317 drawLabel(num, px, py);
3318}
3319
3320function drawLabelY(xmin, num, loc) {
3321 var px = (xmin - srcLeft) * scale - 20;
3322 var py = (loc - srcTop) * scale;
3323 drawLabel(num, px, py);
3324}
3325
3326function 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
3349function scalexy(x, y, mag) {
3350 var length = Math.sqrt(x * x + y * y);
3351 return mag / length;
3352}
3353
caryclark03b03ca2015-04-23 09:13:37 -07003354function drawArrow(x, y, dx, dy, s) {
3355 var dscale = scalexy(dx, dy, 1 / scale * 100 * s);
caryclarkdac1d172014-06-17 05:15:38 -07003356 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
3373function 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 }
caryclark1049f122015-04-20 08:31:59 -07003383 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 }
caryclarkdac1d172014-06-17 05:15:38 -07003387 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
3394function 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 }
caryclark1049f122015-04-20 08:31:59 -07003404 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 }
caryclarkdac1d172014-06-17 05:15:38 -07003408 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
3415function 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
3439function 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
3447function 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
3462function drawLinePartialID(id, x1, y1, x2, y2, t1, t2) {
3463 var curve = [x1, y1, x2, y2];
3464 drawCurvePartialID(id, curve, t1, t2);
3465}
3466
caryclark55888e42016-07-18 10:01:36 -07003467function drawLineID(id, x1, y1, x2, y2) {
3468 drawLinePartialID(id, x1, y1, x2, y2, 0, 1);
3469}
3470
caryclarkdac1d172014-06-17 05:15:38 -07003471function 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
caryclark55888e42016-07-18 10:01:36 -07003476function drawQuadID(id, x1, y1, x2, y2, x3, y3) {
3477 drawQuadPartialID(id, x1, y1, x2, y2, x3, y3, 0, 1);
3478}
3479
caryclark1049f122015-04-20 08:31:59 -07003480function 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
caryclark55888e42016-07-18 10:01:36 -07003485function drawConicID(id, x1, y1, x2, y2, x3, y3, w) {
3486 drawConicPartialID(id, x1, y1, x2, y2, x3, y3, w, 0, 1);
3487}
3488
caryclarkdac1d172014-06-17 05:15:38 -07003489function 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
caryclark55888e42016-07-18 10:01:36 -07003494function 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
caryclarkdac1d172014-06-17 05:15:38 -07003498function 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
3506function 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);
caryclark03b03ca2015-04-23 09:13:37 -07003531 drawArrow(curve[0], curve[1], d.x, d.y, 1);
caryclarkdac1d172014-06-17 05:15:38 -07003532 if (draw_deriviatives == 2) {
3533 d = dxy_at_t(curve, type, 1);
3534 if (type == PATH_CUBIC) {
caryclark03b03ca2015-04-23 09:13:37 -07003535 drawArrow(curve[6], curve[7], d.x, d.y, 1);
caryclarkdac1d172014-06-17 05:15:38 -07003536 } else {
caryclark03b03ca2015-04-23 09:13:37 -07003537 drawArrow(curve[4], curve[5], d.x, d.y, 1);
caryclarkdac1d172014-06-17 05:15:38 -07003538 }
3539 }
3540 if (draw_midpoint) {
3541 var mid = pointAtT(curve, type, 0.5);
3542 d = dxy_at_t(curve, type, 0.5);
caryclark03b03ca2015-04-23 09:13:37 -07003543 drawArrow(mid.x, mid.y, d.x, d.y, 1);
caryclarkdac1d172014-06-17 05:15:38 -07003544 }
3545 }
3546 if (type != PATH_CUBIC) {
3547 return;
3548 }
caryclarkdac1d172014-06-17 05:15:38 -07003549 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
3561function logCurves(test) {
3562 for (curves in test) {
3563 var curve = test[curves];
3564 dumpCurve(curve);
3565 }
3566}
3567
3568function curveToString(curve) {
3569 var str = "{{";
caryclark1049f122015-04-20 08:31:59 -07003570 var length = curve.length == 7 ? 6 : curve.length;
3571 if (curve.length == 7) {
3572 str += "{";
3573 }
3574 for (i = 0; i < length; i += 2) {
caryclarkdac1d172014-06-17 05:15:38 -07003575 str += curve[i].toFixed(decimal_places) + "," + curve[i + 1].toFixed(decimal_places);
3576 if (i < curve.length - 2) {
3577 str += "}, {";
3578 }
3579 }
caryclark1049f122015-04-20 08:31:59 -07003580 str += "}";
3581 if (curve.length == 7) {
3582 str += "}, " + curve[6].toFixed(decimal_places);
3583 }
3584 str += "}";
caryclarkdac1d172014-06-17 05:15:38 -07003585 return str;
3586}
3587
3588function dumpCurve(curve) {
3589 console.log(curveToString(curve));
3590}
3591
3592function 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;
caryclark624637c2015-05-11 07:21:27 -07003609 var lastCoin = 0;
caryclarkdac1d172014-06-17 05:15:38 -07003610 var lastSect = 0;
3611 var lastSort = 0;
3612 var lastMark = 0;
caryclark03b03ca2015-04-23 09:13:37 -07003613 var lastTop = 0;
caryclarkdac1d172014-06-17 05:15:38 -07003614 activeCount = 0;
3615 addCount = 0;
3616 angleCount = 0;
3617 opCount = 0;
3618 sectCount = 0;
3619 sortCount = 0;
caryclark03b03ca2015-04-23 09:13:37 -07003620 topCount = 0;
caryclarkdac1d172014-06-17 05:15:38 -07003621 markCount = 0;
3622 activeMax = 0;
3623 addMax = 0;
3624 angleMax = 0;
caryclark624637c2015-05-11 07:21:27 -07003625 coinMax = 0;
caryclarkdac1d172014-06-17 05:15:38 -07003626 opMax = 0;
3627 sectMax = 0;
3628 sectMax2 = 0;
3629 sortMax = 0;
caryclark03b03ca2015-04-23 09:13:37 -07003630 topMax = 0;
caryclarkdac1d172014-06-17 05:15:38 -07003631 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 }
caryclark54359292015-03-26 07:52:43 -07003674 if (recType == REC_TYPE_PATH2 && hasOp) {
3675 secondPath = tIndex;
3676 }
caryclarkdac1d172014-06-17 05:15:38 -07003677 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 }
caryclark54359292015-03-26 07:52:43 -07003695 if (recType == REC_TYPE_AFTERPART) {
3696 if (draw_angle != 3 || !inStepRange) {
3697 continue;
3698 }
3699 lastAngle = tIndex;
3700 ++angleCount;
3701 bumpStep = true;
3702 }
caryclarkdac1d172014-06-17 05:15:38 -07003703 if (recType == REC_TYPE_ANGLE) {
3704 ++angleMax;
caryclark54359292015-03-26 07:52:43 -07003705 if (draw_angle == 0 || draw_angle == 3 || !inStepRange) {
caryclarkdac1d172014-06-17 05:15:38 -07003706 continue;
3707 }
3708 lastAngle = tIndex;
3709 ++angleCount;
3710 bumpStep = true;
3711 }
caryclark624637c2015-05-11 07:21:27 -07003712 if (recType == REC_TYPE_COINCIDENCE) {
3713 ++coinMax;
3714 if (!draw_coincidence || !inStepRange) {
3715 continue;
3716 }
3717 lastCoin = tIndex;
3718 ++coinCount;
3719 bumpStep = true;
3720 }
caryclarkdac1d172014-06-17 05:15:38 -07003721 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:
caryclark1049f122015-04-20 08:31:59 -07003732 case INTERSECT_CONIC_LINE:
caryclark55888e42016-07-18 10:01:36 -07003733 case INTERSECT_CONIC_QUAD:
caryclark1049f122015-04-20 08:31:59 -07003734 case INTERSECT_CONIC:
caryclarkdac1d172014-06-17 05:15:38 -07003735 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:
caryclark1049f122015-04-20 08:31:59 -07003744 case INTERSECT_CONIC_LINE_2:
caryclark55888e42016-07-18 10:01:36 -07003745 case INTERSECT_CONIC_QUAD_2:
caryclark1049f122015-04-20 08:31:59 -07003746 case INTERSECT_CONIC_2:
caryclarkdac1d172014-06-17 05:15:38 -07003747 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:
caryclark1049f122015-04-20 08:31:59 -07003755 case INTERSECT_CONIC_LINE_NO:
caryclark55888e42016-07-18 10:01:36 -07003756 case INTERSECT_CONIC_QUAD_NO:
caryclark1049f122015-04-20 08:31:59 -07003757 case INTERSECT_CONIC_NO:
caryclarkdac1d172014-06-17 05:15:38 -07003758 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;
caryclark6c3b9cd2016-09-26 05:36:58 -07003764 case INTERSECT_CONIC_QUAD_3:
caryclarkdac1d172014-06-17 05:15:38 -07003765 case INTERSECT_CUBIC_LINE_3:
3766 case INTERSECT_CUBIC_QUAD_3:
3767 case INTERSECT_CUBIC_3:
3768 sectBump = 3;
3769 break;
caryclark6c3b9cd2016-09-26 05:36:58 -07003770 case INTERSECT_CONIC_QUAD_4:
caryclarkdac1d172014-06-17 05:15:38 -07003771 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 }
caryclark03b03ca2015-04-23 09:13:37 -07003796 if (recType == REC_TYPE_TOP) {
3797 ++topMax;
3798 if (!draw_top || !inStepRange) {
3799 continue;
3800 }
3801 lastTop = tIndex;
3802 ++topCount;
3803 bumpStep = true;
3804 }
caryclarkdac1d172014-06-17 05:15:38 -07003805 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)
reed0dc4dd62015-03-24 13:55:33 -07003823 + (draw_angle ? angleMax : 0)
caryclark624637c2015-05-11 07:21:27 -07003824 + (draw_coincidence ? coinMax : 0)
caryclark54359292015-03-26 07:52:43 -07003825 + (draw_op ? opMax : 0)
caryclarkdac1d172014-06-17 05:15:38 -07003826 + (draw_sort ? sortMax : 0)
caryclark03b03ca2015-04-23 09:13:37 -07003827 + (draw_top ? topMax : 0)
caryclarkdac1d172014-06-17 05:15:38 -07003828 + (draw_mark ? markMax : 0)
3829 + (draw_intersection == 2 ? sectMax : draw_intersection == 3 ? sectMax2 : 0);
3830 if (stepMax == 0) {
caryclark624637c2015-05-11 07:21:27 -07003831 stepMax = addMax + activeMax + angleMax + coinMax + opMax + sortMax + topMax + markMax;
caryclarkdac1d172014-06-17 05:15:38 -07003832 }
3833 drawnPts = [];
3834 drawnLines = [];
3835 drawnQuads = [];
caryclark1049f122015-04-20 08:31:59 -07003836 drawnConics = [];
caryclarkdac1d172014-06-17 05:15:38 -07003837 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:
caryclark1049f122015-04-20 08:31:59 -07003864 if ((draw_computed & 0x9) == 1 || ((draw_computed & 8) != 0
3865 && (draw_computed & 7) == pathIndex)) {
caryclarkdac1d172014-06-17 05:15:38 -07003866 drawQuad(frags[0], frags[1], frags[2], frags[3],
3867 frags[4], frags[5]);
3868 drawThis = true;
3869 }
3870 break;
caryclark1049f122015-04-20 08:31:59 -07003871 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;
caryclarkdac1d172014-06-17 05:15:38 -07003879 case PATH_CUBIC:
caryclark1049f122015-04-20 08:31:59 -07003880 if ((draw_computed & 0xC) == 4 || ((draw_computed & 8) != 0
3881 && (draw_computed & 7) == pathIndex)) {
caryclarkdac1d172014-06-17 05:15:38 -07003882 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;
caryclark26ad22a2015-10-16 09:03:38 -07003903 case REC_TYPE_ALIGNED:
3904 if (draw_path < 4) {
3905 continue;
3906 }
caryclarkdac1d172014-06-17 05:15:38 -07003907 case REC_TYPE_PATH:
caryclark54359292015-03-26 07:52:43 -07003908 case REC_TYPE_PATH2:
caryclark26ad22a2015-10-16 09:03:38 -07003909 if (REC_TYPE_ALIGNED != recType && draw_path >= 4) {
3910 continue;
3911 }
caryclarkdac1d172014-06-17 05:15:38 -07003912 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";
caryclark55888e42016-07-18 10:01:36 -07003922 var frags2 = [];
caryclarkdac1d172014-06-17 05:15:38 -07003923 switch (fragType) {
3924 case PATH_LINE:
caryclark54359292015-03-26 07:52:43 -07003925 for (var i = 0; i < 4; ++ i) { frags2[i] = frags[i + 1]; }
3926 drawLine(frags2[0], frags2[1], frags2[2], frags2[3]);
caryclarkdac1d172014-06-17 05:15:38 -07003927 break;
3928 case PATH_QUAD:
caryclark54359292015-03-26 07:52:43 -07003929 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]);
caryclarkdac1d172014-06-17 05:15:38 -07003932 break;
caryclark1049f122015-04-20 08:31:59 -07003933 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;
caryclarkdac1d172014-06-17 05:15:38 -07003938 case PATH_CUBIC:
caryclark54359292015-03-26 07:52:43 -07003939 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]);
caryclarkdac1d172014-06-17 05:15:38 -07003942 break;
3943 default:
caryclark26ad22a2015-10-16 09:03:38 -07003944 console.log("unknown " + recType + " frag type: " + fragType);
caryclarkdac1d172014-06-17 05:15:38 -07003945 throw "stop execution";
3946 }
3947 if (collect_bounds) {
3948 break;
3949 }
caryclark54359292015-03-26 07:52:43 -07003950 drawCurveSpecials(test, frags2, fragType);
caryclarkdac1d172014-06-17 05:15:38 -07003951 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];
caryclark55888e42016-07-18 10:01:36 -07003971 var x3, y3, x3, y4, w;
caryclarkdac1d172014-06-17 05:15:38 -07003972 ctx.lineWidth = 3;
3973 ctx.strokeStyle = "rgba(0,0,255, 0.3)";
3974 focus_enabled = true;
3975 switch (fragType) {
3976 case ACTIVE_LINE_SPAN:
caryclark55888e42016-07-18 10:01:36 -07003977 drawLine(x1, y1, x2, y2);
caryclarkdac1d172014-06-17 05:15:38 -07003978 if (draw_id) {
caryclark55888e42016-07-18 10:01:36 -07003979 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);
caryclarkdac1d172014-06-17 05:15:38 -07003985 }
3986 break;
3987 case ACTIVE_QUAD_SPAN:
3988 x3 = frags[SPAN_X3];
3989 y3 = frags[SPAN_Y3];
caryclark55888e42016-07-18 10:01:36 -07003990 drawQuad(x1, y1, x2, y2, x3, y3);
caryclarkdac1d172014-06-17 05:15:38 -07003991 if (draw_id) {
caryclark55888e42016-07-18 10:01:36 -07003992 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);
caryclarkdac1d172014-06-17 05:15:38 -07003998 }
3999 break;
caryclark1049f122015-04-20 08:31:59 -07004000 case ACTIVE_CONIC_SPAN:
4001 x3 = frags[SPAN_X3];
4002 y3 = frags[SPAN_Y3];
caryclark1049f122015-04-20 08:31:59 -07004003 w = frags[SPAN_K_W];
caryclark55888e42016-07-18 10:01:36 -07004004 drawConicWithQuads(x1, y1, x2, y2, x3, y3, w);
caryclark1049f122015-04-20 08:31:59 -07004005 if (draw_id) {
caryclark55888e42016-07-18 10:01:36 -07004006 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);
caryclark1049f122015-04-20 08:31:59 -07004012 }
4013 break;
caryclarkdac1d172014-06-17 05:15:38 -07004014 case ACTIVE_CUBIC_SPAN:
4015 x3 = frags[SPAN_X3];
4016 y3 = frags[SPAN_Y3];
4017 x4 = frags[SPAN_X4];
4018 y4 = frags[SPAN_Y4];
caryclark55888e42016-07-18 10:01:36 -07004019 drawCubic(x1, y1, x2, y2, x3, y3, x4, y4);
caryclarkdac1d172014-06-17 05:15:38 -07004020 if (draw_id) {
caryclark55888e42016-07-18 10:01:36 -07004021 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);
caryclarkdac1d172014-06-17 05:15:38 -07004027 }
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;
caryclark1049f122015-04-20 08:31:59 -07004073 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;
caryclarkdac1d172014-06-17 05:15:38 -07004079 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:
caryclark54359292015-03-26 07:52:43 -07004096 angleBetween = frags[18] == "T";
4097 afterIndex = 0;
4098 if (draw_angle == 0 || draw_angle == 3 || (step_limit > 0 && tIndex < lastAngle)) {
caryclarkdac1d172014-06-17 05:15:38 -07004099 continue;
4100 }
4101 focus_enabled = true;
4102 ctx.lineWidth = 3;
4103 ctx.strokeStyle = "rgba(127,45,127, 0.3)";
caryclark54359292015-03-26 07:52:43 -07004104 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]);
caryclarkdac1d172014-06-17 05:15:38 -07004107 drawCurve(leftCurve);
4108 drawCurve(rightCurve);
caryclark54359292015-03-26 07:52:43 -07004109 ctx.strokeStyle = angleBetween ? "rgba(0,160,45, 0.3)" : "rgba(255,0,45, 0.5)";
caryclarkdac1d172014-06-17 05:15:38 -07004110 drawCurve(midCurve);
4111 if (draw_angle > 1) {
4112 drawOrder(leftCurve, 'L');
4113 drawOrder(rightCurve, 'R');
4114 }
4115 break;
caryclark54359292015-03-26 07:52:43 -07004116 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;
caryclark1049f122015-04-20 08:31:59 -07004131 case PATH_CONIC:
4132 drawConicWithQuads(frags[0], frags[1], frags[2], frags[3],
4133 frags[4], frags[5], frags[6]);
4134 break;
caryclark54359292015-03-26 07:52:43 -07004135 case PATH_CUBIC:
4136 drawCubic(frags[0], frags[1], frags[2], frags[3],
caryclark1049f122015-04-20 08:31:59 -07004137 frags[4], frags[5], frags[6], frags[7]);
caryclark54359292015-03-26 07:52:43 -07004138 break;
4139 default:
4140 console.log("unknown REC_TYPE_AFTERPART frag type: " + fragType);
4141 throw "stop execution";
4142 }
4143 ++afterIndex;
4144 break;
caryclark624637c2015-05-11 07:21:27 -07004145 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;
caryclarkdac1d172014-06-17 05:15:38 -07004155 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;
caryclark1049f122015-04-20 08:31:59 -07004211 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;
caryclark55888e42016-07-18 10:01:36 -07004223 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;
caryclark6c3b9cd2016-09-26 05:36:58 -07004232 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;
caryclark55888e42016-07-18 10:01:36 -07004245 case INTERSECT_CONIC_QUAD_NO:
4246 c1s = 0; c1l = 7; c2s = 7; c2l = 6;
4247 break;
caryclark1049f122015-04-20 08:31:59 -07004248 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;
caryclarkdac1d172014-06-17 05:15:38 -07004260 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) {
caryclark55888e42016-07-18 10:01:36 -07004343 case 4:
caryclarkdac1d172014-06-17 05:15:38 -07004344 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;
caryclark1049f122015-04-20 08:31:59 -07004359 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;
caryclarkdac1d172014-06-17 05:15:38 -07004368 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;
caryclark55888e42016-07-18 10:01:36 -07004385 case 4:
caryclarkdac1d172014-06-17 05:15:38 -07004386 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;
caryclark1049f122015-04-20 08:31:59 -07004401 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;
caryclarkdac1d172014-06-17 05:15:38 -07004410 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 }
caryclark54359292015-03-26 07:52:43 -07004427 if (draw_intersection != 3 || step_limit == 0 || tIndex >= lastSect) {
4428 for (var idx = 0; idx < f.length; idx += 4) {
caryclarkdac1d172014-06-17 05:15:38 -07004429 drawPoint(frags[f[idx]], frags[f[idx + 1]], true);
4430 }
4431 }
4432 if (!draw_intersectT) {
4433 break;
4434 }
4435 ctx.fillStyle = "red";
caryclark54359292015-03-26 07:52:43 -07004436 if (draw_intersection != 3 || step_limit == 0 || tIndex >= lastSect) {
4437 for (var idx = 0; idx < f.length; idx += 4) {
caryclarkdac1d172014-06-17 05:15:38 -07004438 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;
caryclark03b03ca2015-04-23 09:13:37 -07004461 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;
caryclarkdac1d172014-06-17 05:15:38 -07004477 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;
caryclark624637c2015-05-11 07:21:27 -07004634 var drawSomething = draw_add | draw_active | draw_angle | draw_coincidence | draw_sort | draw_mark;
caryclarkdac1d172014-06-17 05:15:38 -07004635 // 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);
caryclark624637c2015-05-11 07:21:27 -07004640 drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_coincidence ? coinCount : coinMax, draw_coincidence, coincidenceKey);
caryclarkdac1d172014-06-17 05:15:38 -07004641 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);
caryclark03b03ca2015-04-23 09:13:37 -07004643 drawBox(pos++, "rgba(127,127,0, 0.3)", "black", draw_top ? topCount : topMax, draw_top, topKey);
caryclarkdac1d172014-06-17 05:15:38 -07004644 drawBox(pos++, "rgba(127,0,127, 0.3)", "black", draw_mark ? markCount : markMax, draw_mark, markKey);
caryclark55888e42016-07-18 10:01:36 -07004645 drawBox(pos++, "black", "white",
caryclark26ad22a2015-10-16 09:03:38 -07004646 (new Array('P', 'P1', 'P2', 'P', 'p', 'p1', 'p2'))[draw_path], draw_path != 0, pathKey);
caryclarkdac1d172014-06-17 05:15:38 -07004647 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);
caryclarkdac1d172014-06-17 05:15:38 -07004671 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
4680function 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
4700function 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
4720function ptInTControl() {
4721 var e = window.event;
caryclark55888e42016-07-18 10:01:36 -07004722 var tgt = e.target || e.srcElement;
caryclarkdac1d172014-06-17 05:15:38 -07004723 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
4740function 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
4751function 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
4767function 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
4775function dumpAngleTest(test, id, t0, t1) {
4776 var curve = curveByID(test, id);
caryclark55888e42016-07-18 10:01:36 -07004777 console.log(" { {" + curveToString(curve) + "}, "
caryclarkdac1d172014-06-17 05:15:38 -07004778 + curve.length / 2 + ", " + t0 + ", " + t1 + ", {} }, //");
4779}
4780
4781function 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) {
caryclarkdac1d172014-06-17 05:15:38 -07004807 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
4820var activeKey = 'a';
4821var pathKey = 'b';
4822var pathBackKey = 'B';
4823var centerKey = 'c';
caryclark624637c2015-05-11 07:21:27 -07004824var coincidenceKey = 'C';
caryclarkdac1d172014-06-17 05:15:38 -07004825var addKey = 'd';
4826var deriviativesKey = 'f';
4827var angleKey = 'g';
4828var angleBackKey = 'G';
caryclarkdac1d172014-06-17 05:15:38 -07004829var intersectionKey = 'i';
4830var intersectionBackKey = 'I';
4831var sequenceKey = 'j';
4832var midpointKey = 'k';
4833var logKey = 'l';
4834var logToConsoleKey = 'L';
4835var markKey = 'm';
4836var sortKey = 'o';
4837var opKey = 'p';
4838var opBackKey = 'P';
4839var computedKey = 'q';
4840var computedBackKey = 'Q';
4841var stepKey = 's';
4842var stepBackKey = 'S';
4843var intersectTKey = 't';
caryclark03b03ca2015-04-23 09:13:37 -07004844var topKey = 'T';
caryclarkdac1d172014-06-17 05:15:38 -07004845var curveTKey = 'u';
4846var controlLinesBackKey = 'V';
4847var controlLinesKey = 'v';
4848var ptsKey = 'x';
4849var xyKey = 'y';
4850var logCurvesKey = 'z';
4851var focusKey = '`';
4852var idKey = '.';
4853var retinaKey = '\\';
4854
4855function 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;
caryclark55888e42016-07-18 10:01:36 -07004874 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004875 break;
4876 case addKey:
4877 draw_add ^= true;
caryclark55888e42016-07-18 10:01:36 -07004878 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004879 break;
4880 case angleKey:
caryclark54359292015-03-26 07:52:43 -07004881 draw_angle = (draw_angle + 1) % 4;
caryclarkdac1d172014-06-17 05:15:38 -07004882 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);
caryclark55888e42016-07-18 10:01:36 -07004890 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004891 break;
caryclark624637c2015-05-11 07:21:27 -07004892 case coincidenceKey:
4893 draw_coincidence ^= true;
4894 redraw();
4895 break;
caryclarkdac1d172014-06-17 05:15:38 -07004896 case controlLinesBackKey:
4897 control_lines = (control_lines + 3) % 4;
caryclark55888e42016-07-18 10:01:36 -07004898 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004899 break;
4900 case controlLinesKey:
4901 control_lines = (control_lines + 1) % 4;
caryclark55888e42016-07-18 10:01:36 -07004902 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004903 break;
4904 case computedBackKey:
4905 draw_computed = (draw_computed + 5) % 6;
caryclark55888e42016-07-18 10:01:36 -07004906 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004907 break;
4908 case computedKey:
4909 draw_computed = (draw_computed + 1) % 6;
caryclark55888e42016-07-18 10:01:36 -07004910 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004911 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;
caryclarkdac1d172014-06-17 05:15:38 -07004928 case idKey:
4929 draw_id ^= true;
4930 redraw();
4931 break;
4932 case intersectionBackKey:
4933 draw_intersection = (draw_intersection + 3) % 4;
caryclark55888e42016-07-18 10:01:36 -07004934 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004935 break;
4936 case intersectionKey:
4937 draw_intersection = (draw_intersection + 1) % 4;
caryclark55888e42016-07-18 10:01:36 -07004938 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004939 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:
caryclark26ad22a2015-10-16 09:03:38 -07004973 draw_path = (draw_path + 1) % (4 + (hasAlignedPath ? 3 : 0));
caryclark55888e42016-07-18 10:01:36 -07004974 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004975 break;
4976 case pathBackKey:
caryclark26ad22a2015-10-16 09:03:38 -07004977 draw_path = (draw_path + 3 + (hasAlignedPath ? 3 : 0)) % (4 + (hasAlignedPath ? 3 : 0));
caryclark55888e42016-07-18 10:01:36 -07004978 redraw();
caryclarkdac1d172014-06-17 05:15:38 -07004979 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;
caryclark03b03ca2015-04-23 09:13:37 -07005010 case topKey:
5011 draw_top ^= true;
5012 redraw();
5013 break;
caryclarkdac1d172014-06-17 05:15:38 -07005014 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
5057function 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
caryclark55888e42016-07-18 10:01:36 -07005104 window.onpageshow = window.onpagehide
caryclarkdac1d172014-06-17 05:15:38 -07005105 = window.onfocus = window.onblur = onchange;
5106
5107 function onchange (evt) {
5108 var v = 'visible', h = 'hidden',
caryclark55888e42016-07-18 10:01:36 -07005109 evtMap = {
5110 focus:v, focusin:v, pageshow:v, blur:h, focusout:h, pagehide:h
caryclarkdac1d172014-06-17 05:15:38 -07005111 };
5112
5113 evt = evt || window.event;
5114 if (evt.type in evtMap)
5115 document.body.className = evtMap[evt.type];
caryclark55888e42016-07-18 10:01:36 -07005116 else
caryclarkdac1d172014-06-17 05:15:38 -07005117 document.body.className = this[hidden] ? "hidden" : "visible";
5118 }
5119})();
5120
5121function calcXY() {
5122 var e = window.event;
caryclark55888e42016-07-18 10:01:36 -07005123 var tgt = e.target || e.srcElement;
caryclarkdac1d172014-06-17 05:15:38 -07005124 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
5130function calcLeftTop() {
5131 srcLeft = mouseX - screenWidth / 2 / scale;
5132 srcTop = mouseY - screenHeight / 2 / scale;
5133}
5134
5135var disableClick = false;
5136
5137function 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
5152function 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
5168function 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>