blob: 37c44c7a3ef24ad05b22880a5a52de61646a12c7 [file] [log] [blame]
caryclarkdac1d172014-06-17 05:15:38 -07001<html>
2<head>
3<div height="0" hidden="true">
Cary Clark7eb01e02016-12-08 14:36:32 -05004
5 Skia UnitTests: --match Simplify$ --resourcePath resources\ -v -V SK_DEBUG
6
7Skia UnitTests: --match Simplify$ --resourcePath resources\ -v -V SK_DEBUG
8
9<div id="joel_2">
10SkDCubic::ComplexBreak
11{{{403.282989501953125, 497.196990966796875}, {403.42401123046875, 497.243988037109375}, {391.110992431640625, 495.555999755859375}, {391.110992431640625, 495.555999755859375}}},
12inflectionsTs[0]=1 {{{403.42401123046875, 497.243988037109375}, {378.7979736328125, 493.868011474609375}}},
13maxCurvature[0]=0.502921076 {{{415.5605946972181641, 498.8838844379989155}, {378.8318672594865006, 493.8897667505245295}}},
14maxCurvature[1]=0.00584573653 {{{402.8611256294230998, 497.0566467700529643}, {403.7072560005168498, 497.3386291919279643}}},
15maxCurvature[2]=1 {{{-235.2805739523428201, 408.7003728645441925}, {1017.50255881562407, 582.4116266471745575}}},
16SkDCubic::ComplexBreak
17{{{378.938995361328125, 485.69500732421875}, {378.790985107421875, 483.57000732421875}, {383.063995361328125, 485.25}, {384.87701416015625, 485.842987060546875}}},
18inflectionsTs[0]=0.902182922 {{{377.5954936265454194, 483.3658459632096083}, {390.9661239382471081, 487.9188557410542444}}},
19maxCurvature[0]=0.147284654 {{{376.1242685781696196, 488.3189209317107498}, {382.1543795482792234, 481.657199359124661}}},
20maxCurvature[1]=0.665451111 {{{382.9330766387548124, 491.4410294434536581}, {382.0450151153173124, 478.6910294434536581}}},
21SkDCubic::ComplexBreak
22{{{378.040008544921875, 503.029998779296875}, {378.040008544921875, 503.029998779296875}, {391.415008544921875, 505.795989990234375}, {391.39898681640625, 505.865997314453125}}},
23inflectionsTs[0]=0 {{{364.665008544921875, 500.264007568359375}, {391.415008544921875, 505.795989990234375}}},
24maxCurvature[0]=0.999930835 {{{391.4414983461760471, 505.6548420424298342}, {391.3564815511855954, 506.0771234565896179}}},
25maxCurvature[1]=0.49997578 {{{384.7250201963161089, 504.4216435381547967}, {384.7250201963161089, 504.4216435381547967}}},
26maxCurvature[2]=0 {{{378.040008544921875, 503.029998779296875}, {378.040008544921875, 503.029998779296875}}},
27seg=1 {{{403.28299f, 497.196991f}, {403.284241f, 497.197388f}, {403.28418f, 497.197632f}}}
28seg=2 {{{403.28418f, 497.197632f}, {403.280487f, 497.224304f}, {391.110992f, 495.556f}, {391.110992f, 495.556f}}}
29seg=3 {{{403.28299f, 497.196991f}, {403.424011f, 497.243988f}, {391.110992f, 495.556f}, {391.110992f, 495.556f}}}
30seg=4 {{{391.110992f, 495.556f}, {392.290985f, 493.165009f}}}
31seg=5 {{{392.290985f, 493.165009f}, {392.290985f, 493.165009f}, {388.993988f, 492.056f}, {386.649994f, 491.821014f}}}
32seg=6 {{{386.649994f, 491.821014f}, {384.243988f, 491.45401f}, {381.602997f, 490.773987f}, {381.602997f, 490.773987f}}}
33seg=7 {{{381.602997f, 490.773987f}, {383.391998f, 488.382996f}}}
34seg=8 {{{383.391998f, 488.382996f}, {383.391998f, 488.382996f}, {379.118988f, 487.453003f}, {378.938995f, 485.695007f}}}
35seg=9 {{{378.938995f, 485.695007f}, {378.80545f, 483.777863f}, {382.270355f, 484.957733f}, {384.280823f, 485.642365f}}}
36seg=10 {{{384.280823f, 485.642365f}, {384.498779f, 485.716583f}, {384.699677f, 485.784973f}, {384.877014f, 485.842987f}}}
37seg=11 {{{378.938995f, 485.695007f}, {378.790985f, 483.570007f}, {383.063995f, 485.25f}, {384.877014f, 485.842987f}}}
38seg=12 {{{384.877014f, 485.842987f}, {387.696991f, 484.351013f}}}
39seg=13 {{{387.696991f, 484.351013f}, {382.752014f, 483.834991f}, {376.595001f, 482.123993f}, {374.477997f, 480.312012f}}}
40seg=14 {{{374.477997f, 480.312012f}, {356.220001f, 496.303986f}}}
41seg=15 {{{356.220001f, 496.303986f}, {368.095001f, 510.498993f}}}
42seg=16 {{{368.095001f, 510.498993f}, {373.884003f, 510.201996f}}}
43seg=17 {{{373.884003f, 510.201996f}, {374.477997f, 509.006989f}}}
44seg=18 {{{374.477997f, 509.006989f}, {370.915985f, 506.912994f}}}
45seg=19 {{{370.915985f, 506.912994f}, {371.807007f, 506.022003f}}}
46seg=20 {{{371.807007f, 506.022003f}, {371.807007f, 506.022003f}, {374.807007f, 507.279999f}, {377.752014f, 507.514008f}}}
47seg=21 {{{377.752014f, 507.514008f}, {380.752014f, 507.881012f}, {387.399994f, 508.108002f}, {387.399994f, 508.108002f}}}
48seg=22 {{{387.399994f, 508.108002f}, {388.884003f, 506.764008f}}}
49seg=23 {{{388.884003f, 506.764008f}, {388.884003f, 506.764008f}, {378.345001f, 504.997986f}, {378.345001f, 504.819f}}}
50seg=24 {{{378.345001f, 504.819f}, {378.040009f, 503.029999f}}}
51seg=25 {{{378.040009f, 503.029999f}, {378.040009f, 503.029999f}, {391.415009f, 505.79599f}, {391.398987f, 505.865997f}}}
52seg=26 {{{391.398987f, 505.865997f}, {386.062988f, 502.131989f}}}
53seg=27 {{{386.062988f, 502.131989f}, {387.546997f, 500.334991f}}}
54seg=28 {{{387.546997f, 500.334991f}, {398.375f, 501.976013f}}}
55seg=29 {{{398.375f, 501.976013f}, {403.28299f, 497.196991f}}}
56debugShowCubicQuadIntersection wtTs[0]=0 {{{403.28418,497.197632}, {403.280487,497.224304}, {391.110992,495.556}, {391.110992,495.556}}} {{403.28418,497.197632}} wnTs[0]=1 {{{403.28299,497.196991}, {403.284241,497.197388}, {403.28418,497.197632}}}
57debugShowCubicQuadIntersection wtTs[0]=0 {{{403.28299,497.196991}, {403.424011,497.243988}, {391.110992,495.556}, {391.110992,495.556}}} {{403.28299,497.196991}} wtTs[1]=0.005859375 {{403.28418,497.197632}} wnTs[0]=0 {{{403.28299,497.196991}, {403.284241,497.197388}, {403.28418,497.197632}}} wnTs[1]=0.985625909
58SkOpSegment::addT insert t=0.005859375 segID=3 spanID=59
59debugShowQuadLineIntersection wtTs[0]=0 {{{403.28299,497.196991}, {403.284241,497.197388}, {403.28418,497.197632}}} {{403.28299,497.196991}} wnTs[0]=1 {{{398.375,501.976013}, {403.28299,497.196991}}}
60debugShowCubicIntersection wtTs[0]=0 {{{403.28418,497.197632}, {403.280487,497.224304}, {391.110992,495.556}, {391.110992,495.556}}} {{403.28418,497.197632}} wtTs[1]=1 {{391.110992,495.556}} wnTs[0]=0.00578961 {{{403.28299,497.196991}, {403.424011,497.243988}, {391.110992,495.556}, {391.110992,495.556}}} wnTs[1]=1
61debugShowCubicLineIntersection wtTs[0]=1 {{{403.28418,497.197632}, {403.280487,497.224304}, {391.110992,495.556}, {391.110992,495.556}}} {{391.110992,495.556}} wnTs[0]=0 {{{391.110992,495.556}, {392.290985,493.165009}}}
62debugShowCubicLineIntersection wtTs[0]=0.00758417328 {{{403.28418,497.197632}, {403.280487,497.224304}, {391.110992,495.556}, {391.110992,495.556}}} {{403.282013,497.197937}} wnTs[0]=0.9998 {{{398.375,501.976013}, {403.28299,497.196991}}}
63SkOpSegment::addT insert t=0.00758417328 segID=2 spanID=60
64SkOpSegment::addT insert t=0.999799809 segID=29 spanID=61
65debugShowCubicLineIntersection wtTs[0]=1 {{{403.28299,497.196991}, {403.424011,497.243988}, {391.110992,495.556}, {391.110992,495.556}}} {{391.110992,495.556}} wnTs[0]=0 {{{391.110992,495.556}, {392.290985,493.165009}}}
66debugShowCubicLineIntersection wtTs[0]=0 {{{403.28299,497.196991}, {403.424011,497.243988}, {391.110992,495.556}, {391.110992,495.556}}} {{403.28299,497.196991}} wtTs[1]=0.0134156992 {{403.282013,497.197968}} wnTs[0]=1 {{{398.375,501.976013}, {403.28299,497.196991}}} wnTs[1]=0.999798501
67SkOpSegment::addT insert t=0.0134156992 segID=3 spanID=62
68debugShowCubicLineIntersection wtTs[0]=0 {{{392.290985,493.165009}, {392.290985,493.165009}, {388.993988,492.056}, {386.649994,491.821014}}} {{392.290985,493.165009}} wnTs[0]=1 {{{391.110992,495.556}, {392.290985,493.165009}}}
69debugShowCubicIntersection wtTs[0]=1 {{{392.290985,493.165009}, {392.290985,493.165009}, {388.993988,492.056}, {386.649994,491.821014}}} {{386.649994,491.821014}} wnTs[0]=0 {{{386.649994,491.821014}, {384.243988,491.45401}, {381.602997,490.773987}, {381.602997,490.773987}}}
70debugShowCubicLineIntersection wtTs[0]=1 {{{386.649994,491.821014}, {384.243988,491.45401}, {381.602997,490.773987}, {381.602997,490.773987}}} {{381.602997,490.773987}} wnTs[0]=0 {{{381.602997,490.773987}, {383.391998,488.382996}}}
71debugShowCubicLineIntersection wtTs[0]=0 {{{383.391998,488.382996}, {383.391998,488.382996}, {379.118988,487.453003}, {378.938995,485.695007}}} {{383.391998,488.382996}} wnTs[0]=1 {{{381.602997,490.773987}, {383.391998,488.382996}}}
72debugShowCubicIntersection wtTs[0]=1 {{{383.391998,488.382996}, {383.391998,488.382996}, {379.118988,487.453003}, {378.938995,485.695007}}} {{378.938995,485.695007}} wnTs[0]=0 {{{378.938995,485.695007}, {378.80545,483.777863}, {382.270355,484.957733}, {384.280823,485.642365}}}
73debugShowCubicIntersection wtTs[0]=1 {{{383.391998,488.382996}, {383.391998,488.382996}, {379.118988,487.453003}, {378.938995,485.695007}}} {{378.938995,485.695007}} wnTs[0]=0 {{{378.938995,485.695007}, {378.790985,483.570007}, {383.063995,485.25}, {384.877014,485.842987}}}
74debugShowCubicIntersection wtTs[0]=1 {{{378.938995,485.695007}, {378.80545,483.777863}, {382.270355,484.957733}, {384.280823,485.642365}}} {{384.280823,485.642365}} wnTs[0]=0 {{{384.280823,485.642365}, {384.498779,485.716583}, {384.699677,485.784973}, {384.877014,485.842987}}}
75debugShowCubicIntersection wtTs[0]=0 {{{378.938995,485.695007}, {378.80545,483.777863}, {382.270355,484.957733}, {384.280823,485.642365}}} {{378.938995,485.695007}} wtTs[1]=1 {{384.280823,485.642365}} wnTs[0]=0 {{{378.938995,485.695007}, {378.790985,483.570007}, {383.063995,485.25}, {384.877014,485.842987}}} wnTs[1]=0.902185418
76SkOpSegment::addT insert t=0.902185418 segID=11 spanID=63
77SkTSect<struct SkDCubic,struct SkDCubic>::addForPerp priorSpan=-1 t=0.926637941 opp=-1
78-1=(0,0.929688) []
79SkTSect<struct SkDCubic,struct SkDCubic>::addForPerp addBounded span=-1 opp=-1
80-1=(0.9375,0.945313) [-1]
81SkTSect<struct SkDCubic,struct SkDCubic>::addForPerp addBounded span=-1 opp=-1
82-1=(0.9375,0.945313) [*-1*,*-1*]
83SkTSect<struct SkDCubic,struct SkDCubic>::addForPerp addBounded span=-1 opp=-1
84debugShowCubicIntersection wtTs[0]=0.25 {{{384.280823,485.642365}, {384.498779,485.716583}, {384.699677,485.784973}, {384.877014,485.842987}}} {{384.440979,485.696869}} wtTs[1]=1 {{384.877014,485.842987}} wnTs[0]=0.926638 {{{378.938995,485.695007}, {378.790985,483.570007}, {383.063995,485.25}, {384.877014,485.842987}}} wnTs[1]=1
85SkOpSegment::addT insert t=0.25 segID=10 spanID=64
86SkOpSegment::addT insert t=0.926637941 segID=11 spanID=65
87debugShowCubicLineIntersection wtTs[0]=1 {{{384.280823,485.642365}, {384.498779,485.716583}, {384.699677,485.784973}, {384.877014,485.842987}}} {{384.877014,485.842987}} wnTs[0]=0 {{{384.877014,485.842987}, {387.696991,484.351013}}}
88debugShowCubicLineIntersection wtTs[0]=1 {{{378.938995,485.695007}, {378.790985,483.570007}, {383.063995,485.25}, {384.877014,485.842987}}} {{384.877014,485.842987}} wnTs[0]=0 {{{384.877014,485.842987}, {387.696991,484.351013}}}
89debugShowCubicLineIntersection wtTs[0]=0 {{{387.696991,484.351013}, {382.752014,483.834991}, {376.595001,482.123993}, {374.477997,480.312012}}} {{387.696991,484.351013}} wnTs[0]=1 {{{384.877014,485.842987}, {387.696991,484.351013}}}
90debugShowCubicLineIntersection wtTs[0]=1 {{{387.696991,484.351013}, {382.752014,483.834991}, {376.595001,482.123993}, {374.477997,480.312012}}} {{374.477997,480.312012}} wnTs[0]=0 {{{374.477997,480.312012}, {356.220001,496.303986}}}
91debugShowLineIntersection wtTs[0]=1 {{{374.477997,480.312012}, {356.220001,496.303986}}} {{356.220001,496.303986}} wnTs[0]=0 {{{356.220001,496.303986}, {368.095001,510.498993}}}
92debugShowLineIntersection wtTs[0]=1 {{{356.220001,496.303986}, {368.095001,510.498993}}} {{368.095001,510.498993}} wnTs[0]=0 {{{368.095001,510.498993}, {373.884003,510.201996}}}
93debugShowLineIntersection wtTs[0]=1 {{{368.095001,510.498993}, {373.884003,510.201996}}} {{373.884003,510.201996}} wnTs[0]=0 {{{373.884003,510.201996}, {374.477997,509.006989}}}
94debugShowLineIntersection wtTs[0]=1 {{{373.884003,510.201996}, {374.477997,509.006989}}} {{374.477997,509.006989}} wnTs[0]=0 {{{374.477997,509.006989}, {370.915985,506.912994}}}
95debugShowLineIntersection wtTs[0]=1 {{{374.477997,509.006989}, {370.915985,506.912994}}} {{370.915985,506.912994}} wnTs[0]=0 {{{370.915985,506.912994}, {371.807007,506.022003}}}
96debugShowCubicLineIntersection no intersect {{{371.807007,506.022003}, {371.807007,506.022003}, {374.807007,507.279999}, {377.752014,507.514008}}} {{{374.477997,509.006989}, {370.915985,506.912994}}}
97debugShowCubicLineIntersection wtTs[0]=0 {{{371.807007,506.022003}, {371.807007,506.022003}, {374.807007,507.279999}, {377.752014,507.514008}}} {{371.807007,506.022003}} wnTs[0]=1 {{{370.915985,506.912994}, {371.807007,506.022003}}}
98debugShowCubicIntersection wtTs[0]=1 {{{371.807007,506.022003}, {371.807007,506.022003}, {374.807007,507.279999}, {377.752014,507.514008}}} {{377.752014,507.514008}} wnTs[0]=0 {{{377.752014,507.514008}, {380.752014,507.881012}, {387.399994,508.108002}, {387.399994,508.108002}}}
99debugShowCubicLineIntersection wtTs[0]=1 {{{377.752014,507.514008}, {380.752014,507.881012}, {387.399994,508.108002}, {387.399994,508.108002}}} {{387.399994,508.108002}} wnTs[0]=0 {{{387.399994,508.108002}, {388.884003,506.764008}}}
100debugShowCubicLineIntersection wtTs[0]=0 {{{388.884003,506.764008}, {388.884003,506.764008}, {378.345001,504.997986}, {378.345001,504.819}}} {{388.884003,506.764008}} wnTs[0]=1 {{{387.399994,508.108002}, {388.884003,506.764008}}}
101debugShowCubicLineIntersection wtTs[0]=1 {{{388.884003,506.764008}, {388.884003,506.764008}, {378.345001,504.997986}, {378.345001,504.819}}} {{378.345001,504.819}} wnTs[0]=0 {{{378.345001,504.819}, {378.040009,503.029999}}}
102debugShowCubicIntersection no intersect {{{388.884003,506.764008}, {388.884003,506.764008}, {378.345001,504.997986}, {378.345001,504.819}}} {{{378.040009,503.029999}, {378.040009,503.029999}, {391.415009,505.79599}, {391.398987,505.865997}}}
103debugShowCubicLineIntersection no intersect {{{388.884003,506.764008}, {388.884003,506.764008}, {378.345001,504.997986}, {378.345001,504.819}}} {{{391.398987,505.865997}, {386.062988,502.131989}}}
104debugShowCubicLineIntersection wtTs[0]=0 {{{378.040009,503.029999}, {378.040009,503.029999}, {391.415009,505.79599}, {391.398987,505.865997}}} {{378.040009,503.029999}} wnTs[0]=1 {{{378.345001,504.819}, {378.040009,503.029999}}}
105debugShowCubicLineIntersection wtTs[0]=0.987732177 {{{378.040009,503.029999}, {378.040009,503.029999}, {391.415009,505.79599}, {391.398987,505.865997}}} {{391.393585,505.862213}} wtTs[1]=1 {{391.398987,505.865997}} wnTs[0]=0.0010133 {{{391.398987,505.865997}, {386.062988,502.131989}}} wnTs[1]=0
106SkOpSegment::addT insert t=0.987732177 segID=25 spanID=66
107SkOpSegment::addT insert t=0.00101329714 segID=26 spanID=67
108debugShowLineIntersection wtTs[0]=1 {{{391.398987,505.865997}, {386.062988,502.131989}}} {{386.062988,502.131989}} wnTs[0]=0 {{{386.062988,502.131989}, {387.546997,500.334991}}}
109debugShowLineIntersection wtTs[0]=1 {{{386.062988,502.131989}, {387.546997,500.334991}}} {{387.546997,500.334991}} wnTs[0]=0 {{{387.546997,500.334991}, {398.375,501.976013}}}
110debugShowLineIntersection wtTs[0]=1 {{{387.546997,500.334991}, {398.375,501.976013}}} {{398.375,501.976013}} wnTs[0]=0 {{{398.375,501.976013}, {403.28299,497.196991}}}
111----------------xxxx-x-x--------------00: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
11201: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
11302: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
11403: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
11504: coinSeg/Span/PtT=11/65/65 endSpan=19 oppSeg/Span/PtT=11/63/63 oppEndSpan=19 ExpandCoin
11605: coinSeg/Span/PtT=11/65/65 endSpan=22 Fail
11706: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
11807: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
11908: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
12009: seg/base=11/65 seg/base=10/64 MarkCoinStart
12110: seg/base=11/22 seg/base=10/20 MarkCoinEnd
12211: seg/base=11/21 seg/base=9/17 MarkCoinStart
12312: seg/base=11/63 seg/base=9/18 MarkCoinEnd
12413: seg/base=3/59 seg/base=2/3 MarkCoinStart
12514: seg/base=3/6 seg/base=2/4 MarkCoinEnd
12615: seg/base=2/60 MarkCoinInsert
12716: seg/base=3/62 MarkCoinInsert
12817: seg/base=1/1 seg/base=3/5 MarkCoinStart
12918: seg/base=1/2 seg/base=3/59 MarkCoinEnd
130SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
131SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
132SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
133SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
134SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
135SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
136SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
137SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
138SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
139SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
140SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
141SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
142SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
143SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
144SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
145SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
146SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
147SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
148SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
149SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
150SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
151SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
152SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
153SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
154SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
155SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
156SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
157SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
158SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
159SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
160SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
161SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
162SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
163SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
164SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
165SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
166SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
167SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
168----------------xxxx-x-x--------------00: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
16901: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
17002: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
17103: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
17204: coinSeg/Span/PtT=11/65/65 endSpan=19 oppSeg/Span/PtT=11/63/63 oppEndSpan=19 ExpandCoin
17305: coinSeg/Span/PtT=11/65/65 endSpan=22 Fail
17406: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
17507: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
17608: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
17709: seg/base=11/65 seg/base=10/64 MarkCoinStart
17810: seg/base=11/22 seg/base=10/20 MarkCoinEnd
17911: seg/base=11/21 seg/base=9/17 MarkCoinStart
18012: seg/base=11/63 seg/base=9/18 MarkCoinEnd
18113: seg/base=3/59 seg/base=2/3 MarkCoinStart
18214: seg/base=3/6 seg/base=2/4 MarkCoinEnd
18315: seg/base=2/60 MarkCoinInsert
18416: seg/base=3/62 MarkCoinInsert
18517: seg/base=1/1 seg/base=3/5 MarkCoinStart
18618: seg/base=1/2 seg/base=3/59 MarkCoinEnd
187SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
188SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
189SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
190SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
191SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
192SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
193SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
194SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
195SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
196SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
197SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
198SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
199SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
200SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
201SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
202SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
203SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
204SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
205SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
206SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
207SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
208SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
209SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
210SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
211SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
212SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
213SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
214SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
215SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
216SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
217SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
218SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
219SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
220SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
221SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
222SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
223SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
224SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
225----------------xxxx-x-x--------------00: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
22601: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
22702: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
22803: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
22904: coinSeg/Span/PtT=11/65/65 endSpan=19 oppSeg/Span/PtT=11/63/63 oppEndSpan=19 ExpandCoin
23005: coinSeg/Span/PtT=11/65/65 endSpan=22 Fail
23106: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
23207: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
23308: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
23409: seg/base=11/65 seg/base=10/64 MarkCoinStart
23510: seg/base=11/22 seg/base=10/20 MarkCoinEnd
23611: seg/base=11/21 seg/base=9/17 MarkCoinStart
23712: seg/base=11/63 seg/base=9/18 MarkCoinEnd
23813: seg/base=3/59 seg/base=2/3 MarkCoinStart
23914: seg/base=3/6 seg/base=2/4 MarkCoinEnd
24015: seg/base=2/60 MarkCoinInsert
24116: seg/base=3/62 MarkCoinInsert
24217: seg/base=1/1 seg/base=3/5 MarkCoinStart
24318: seg/base=1/2 seg/base=3/59 MarkCoinEnd
244SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
245SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
246SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
247SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
248SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
249SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
250SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
251SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
252SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
253SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
254SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
255SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
256SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
257SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
258SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
259SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
260SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
261SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
262SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
263SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
264SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
265SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
266SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
267SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
268SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
269SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
270SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
271SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
272SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
273SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
274SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
275SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
276SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
277SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
278SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
279SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
280SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
281SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
282----------------xxxx-x-x--------------00: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
28301: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
28402: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
28503: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
28604: coinSeg/Span/PtT=11/65/65 endSpan=19 oppSeg/Span/PtT=11/63/63 oppEndSpan=19 ExpandCoin
28705: coinSeg/Span/PtT=11/65/65 endSpan=22 Fail
28806: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
28907: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
29008: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
29109: seg/base=11/65 seg/base=10/64 MarkCoinStart
29210: seg/base=11/22 seg/base=10/20 MarkCoinEnd
29311: seg/base=11/21 seg/base=9/17 MarkCoinStart
29412: seg/base=11/63 seg/base=9/18 MarkCoinEnd
29513: seg/base=3/59 seg/base=2/3 MarkCoinStart
29614: seg/base=3/6 seg/base=2/4 MarkCoinEnd
29715: seg/base=2/60 MarkCoinInsert
29816: seg/base=3/62 MarkCoinInsert
29917: seg/base=1/1 seg/base=3/5 MarkCoinStart
30018: seg/base=1/2 seg/base=3/59 MarkCoinEnd
301SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
302SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
303SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
304SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
305SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
306SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
307SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
308SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
309SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
310SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
311SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
312SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
313SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
314SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
315SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
316SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
317SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
318SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
319SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
320SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
321SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
322SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
323SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
324SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
325SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
326SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
327SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
328SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
329SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
330SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
331SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
332SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
333SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
334SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
335SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
336SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
337SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
338SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
339----------------xxxx-x-x--------------00: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
34001: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
34102: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
34203: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
34304: coinSeg/Span/PtT=11/65/65 endSpan=19 oppSeg/Span/PtT=11/63/63 oppEndSpan=19 ExpandCoin
34405: coinSeg/Span/PtT=11/65/65 endSpan=22 Fail
34506: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
34607: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
34708: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
34809: seg/base=11/65 seg/base=10/64 MarkCoinStart
34910: seg/base=11/22 seg/base=10/20 MarkCoinEnd
35011: seg/base=11/21 seg/base=9/17 MarkCoinStart
35112: seg/base=11/63 seg/base=9/18 MarkCoinEnd
35213: seg/base=3/59 seg/base=2/3 MarkCoinStart
35314: seg/base=3/6 seg/base=2/4 MarkCoinEnd
35415: seg/base=2/60 MarkCoinInsert
35516: seg/base=3/62 MarkCoinInsert
35617: seg/base=1/1 seg/base=3/5 MarkCoinStart
35718: seg/base=1/2 seg/base=3/59 MarkCoinEnd
358SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
359SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
360SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
361SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
362SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
363SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
364SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
365SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
366SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
367SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
368SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
369SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
370SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
371SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
372SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
373SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
374SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
375SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
376SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
377SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
378SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
379SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
380SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
381SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
382SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
383SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
384SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
385SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
386SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
387SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
388SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
389SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
390SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
391SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
392SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
393SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
394SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
395SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
396----------------xxxx-x-x--------------00: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
39701: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
39802: coinSeg/Span/PtT=11/63/63 endSpan=65 oppSeg/Span/PtT=10/19/19 oppEndSpan=64 MissingCoin
39903: coinSeg/Span/PtT=10/19/19 endSpan=64 oppSeg/Span/PtT=11/63/63 oppEndSpan=65 MissingCoin
40004: coinSeg/Span/PtT=11/65/65 endSpan=19 oppSeg/Span/PtT=11/63/63 oppEndSpan=19 ExpandCoin
40105: coinSeg/Span/PtT=11/65/65 endSpan=22 Fail
40206: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
40307: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
40408: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
40509: seg/base=11/65 seg/base=10/64 MarkCoinStart
40610: seg/base=11/22 seg/base=10/20 MarkCoinEnd
40711: seg/base=11/21 seg/base=9/17 MarkCoinStart
40812: seg/base=11/63 seg/base=9/18 MarkCoinEnd
40913: seg/base=3/59 seg/base=2/3 MarkCoinStart
41014: seg/base=3/6 seg/base=2/4 MarkCoinEnd
41115: seg/base=2/60 MarkCoinInsert
41216: seg/base=3/62 MarkCoinInsert
41317: seg/base=1/1 seg/base=3/5 MarkCoinStart
41418: seg/base=1/2 seg/base=3/59 MarkCoinEnd
415SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
416SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
417SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
418SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
419SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
420SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
421SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
422SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
423SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
424SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
425SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
426SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
427SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
428SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
429SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
430SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
431SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
432SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
433SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
434SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
435SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
436SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
437SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
438SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
439SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
440SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
441SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
442SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
443SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
444SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
445SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
446SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
447SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
448SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
449SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
450SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
451SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
452SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
453-----------------xxx-x----------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
45401: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
45502: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
45603: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
45704: seg/base=11/63 seg/base=10/19 MarkCoinStart
45805: seg/base=11/22 seg/base=10/20 MarkCoinEnd
45906: seg/base=10/64 MarkCoinInsert
46007: seg/base=11/65 MarkCoinInsert
46108: seg/base=11/21 seg/base=9/17 MarkCoinStart
46209: seg/base=11/63 seg/base=9/18 MarkCoinEnd
46310: seg/base=3/59 seg/base=2/3 MarkCoinStart
46411: seg/base=3/6 seg/base=2/4 MarkCoinEnd
46512: seg/base=2/60 MarkCoinInsert
46613: seg/base=3/62 MarkCoinInsert
46714: seg/base=1/1 seg/base=3/5 MarkCoinStart
46815: seg/base=1/2 seg/base=3/59 MarkCoinEnd
469SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
470SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
471SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
472SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
473SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
474SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
475SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
476SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
477SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
478SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
479SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
480SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
481SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
482SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
483SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
484SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
485SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
486SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
487SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
488SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
489SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
490SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
491SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
492SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
493SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
494SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
495SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
496SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
497SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
498SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
499SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
500SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
501SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
502SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
503SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
504SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
505SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
506SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
507-----------------xxx-x----------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
50801: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
50902: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
51003: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
51104: seg/base=11/63 seg/base=10/19 MarkCoinStart
51205: seg/base=11/22 seg/base=10/20 MarkCoinEnd
51306: seg/base=10/64 MarkCoinInsert
51407: seg/base=11/65 MarkCoinInsert
51508: seg/base=11/21 seg/base=9/17 MarkCoinStart
51609: seg/base=11/63 seg/base=9/18 MarkCoinEnd
51710: seg/base=3/59 seg/base=2/3 MarkCoinStart
51811: seg/base=3/6 seg/base=2/4 MarkCoinEnd
51912: seg/base=2/60 MarkCoinInsert
52013: seg/base=3/62 MarkCoinInsert
52114: seg/base=1/1 seg/base=3/5 MarkCoinStart
52215: seg/base=1/2 seg/base=3/59 MarkCoinEnd
523SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
524SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
525SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
526SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
527SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
528SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
529SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
530SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
531SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
532SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
533SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
534SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
535SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
536SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
537SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
538SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
539SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
540SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
541SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
542SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
543SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
544SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
545SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
546SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
547SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
548SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
549SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
550SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
551SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
552SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
553SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
554SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
555SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
556SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
557SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
558SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
559SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
560SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
561-----------------xxx-x----------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
56201: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
56302: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
56403: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
56504: seg/base=11/63 seg/base=10/19 MarkCoinStart
56605: seg/base=11/22 seg/base=10/20 MarkCoinEnd
56706: seg/base=10/64 MarkCoinInsert
56807: seg/base=11/65 MarkCoinInsert
56908: seg/base=11/21 seg/base=9/17 MarkCoinStart
57009: seg/base=11/63 seg/base=9/18 MarkCoinEnd
57110: seg/base=3/59 seg/base=2/3 MarkCoinStart
57211: seg/base=3/6 seg/base=2/4 MarkCoinEnd
57312: seg/base=2/60 MarkCoinInsert
57413: seg/base=3/62 MarkCoinInsert
57514: seg/base=1/1 seg/base=3/5 MarkCoinStart
57615: seg/base=1/2 seg/base=3/59 MarkCoinEnd
577SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
578SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
579SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
580SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
581SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
582SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
583SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
584SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
585SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
586SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
587SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
588SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
589SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
590SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
591SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
592SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
593SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
594SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
595SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
596SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
597SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
598SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
599SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
600SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
601SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
602SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
603SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
604SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
605SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
606SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
607SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
608SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
609SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
610SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
611SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
612SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
613SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
614SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
615-----------------xxx-x----------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
61601: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
61702: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
61803: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
61904: seg/base=11/63 seg/base=10/19 MarkCoinStart
62005: seg/base=11/22 seg/base=10/20 MarkCoinEnd
62106: seg/base=10/64 MarkCoinInsert
62207: seg/base=11/65 MarkCoinInsert
62308: seg/base=11/21 seg/base=9/17 MarkCoinStart
62409: seg/base=11/63 seg/base=9/18 MarkCoinEnd
62510: seg/base=3/59 seg/base=2/3 MarkCoinStart
62611: seg/base=3/6 seg/base=2/4 MarkCoinEnd
62712: seg/base=2/60 MarkCoinInsert
62813: seg/base=3/62 MarkCoinInsert
62914: seg/base=1/1 seg/base=3/5 MarkCoinStart
63015: seg/base=1/2 seg/base=3/59 MarkCoinEnd
631SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
632SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
633SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
634SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
635SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
636SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
637SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
638SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
639SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
640SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
641SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
642SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
643SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
644SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
645SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
646SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
647SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
648SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
649SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
650SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
651SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
652SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
653SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
654SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
655SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
656SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
657SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
658SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
659SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
660SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
661SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
662SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
663SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
664SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
665SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
666SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
667SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
668SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
669-----------------xxx-x----------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
67001: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
67102: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
67203: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
67304: seg/base=11/63 seg/base=10/19 MarkCoinStart
67405: seg/base=11/22 seg/base=10/20 MarkCoinEnd
67506: seg/base=10/64 MarkCoinInsert
67607: seg/base=11/65 MarkCoinInsert
67708: seg/base=11/21 seg/base=9/17 MarkCoinStart
67809: seg/base=11/63 seg/base=9/18 MarkCoinEnd
67910: seg/base=3/59 seg/base=2/3 MarkCoinStart
68011: seg/base=3/6 seg/base=2/4 MarkCoinEnd
68112: seg/base=2/60 MarkCoinInsert
68213: seg/base=3/62 MarkCoinInsert
68314: seg/base=1/1 seg/base=3/5 MarkCoinStart
68415: seg/base=1/2 seg/base=3/59 MarkCoinEnd
685SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
686SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
687SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
688SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
689SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
690SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
691SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
692SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
693SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
694SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
695SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
696SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
697SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
698SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
699SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
700SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
701SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
702SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
703SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
704SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
705SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
706SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
707SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
708SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
709SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
710SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
711SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
712SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
713SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
714SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
715SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
716SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
717SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
718SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
719SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
720SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
721SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
722SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
723-----------------x--------------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
72401: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
72502: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
72603: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
727SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
728SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
729SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
730SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
731SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
732SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
733SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
734SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
735SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
736SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
737SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
738SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
739SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
740SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
741SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
742SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
743SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
744SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
745SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
746SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
747SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
748SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
749SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
750SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
751SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
752SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
753SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
754SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
755SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
756SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
757SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
758SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
759SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
760SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
761SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
762SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
763SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
764SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
765-----------------x--------------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
76601: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
76702: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
76803: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
769SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
770SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
771SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
772SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
773SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
774SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
775SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
776SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
777SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
778SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
779SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
780SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
781SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
782SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
783SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
784SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
785SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
786SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
787SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
788SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
789SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
790SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
791SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
792SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
793SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
794SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
795SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
796SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
797SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
798SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
799SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
800SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
801SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
802SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
803SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
804SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
805SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
806SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
807-----------------x--------------------00: coinSeg/Span/PtT=11/63/63 endSpan=22 Fail
80801: coinSeg/Span/PtT=11/21/21 endSpan=63 Fail
80902: coinSeg/Span/PtT=3/59/59 endSpan=6 Fail
81003: coinSeg/Span/PtT=1/1/1 endSpan=2 Fail
811SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
812SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
813SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
814SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
815SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
816SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
817SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
818SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
819SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
820SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
821SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
822SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
823SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
824SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
825SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
826SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
827SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
828SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
829SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
830SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
831SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
832SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
833SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
834SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
835SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
836SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
837SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
838SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
839SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
840SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
841SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
842SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
843SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
844SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
845SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
846SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
847SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
848SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
849--------------------------------------SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=1
850SkOpSegment::debugShowActiveSpans id=2 (403.28418,497.197632 403.28418,497.197834 403.28343,497.197937 403.282013,497.197937) t=0 tEnd=0.00758417328 windSum=? windValue=1
851SkOpSegment::debugShowActiveSpans id=2 (403.282013,497.197937 403.096602,497.199084 391.110992,495.556 391.110992,495.556) t=0.00758417328 tEnd=1 windSum=? windValue=1
852SkOpSegment::debugShowActiveSpans id=3 (403.28299,497.196991 403.283816,497.197266 403.28418,497.197475 403.28418,497.197632) t=0 tEnd=0.005859375 windSum=? windValue=1
853SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=1
854SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=1
855SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
856SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
857SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
858SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
859SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
860SkOpSegment::debugShowActiveSpans id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 tEnd=1 windSum=? windValue=1
861SkOpSegment::debugShowActiveSpans id=10 (384.280823,485.642365 384.335312,485.660919 384.388724,485.679114 384.440979,485.696869) t=0 tEnd=0.25 windSum=? windValue=1
862SkOpSegment::debugShowActiveSpans id=10 (384.440979,485.696869 384.597744,485.750134 384.744011,485.799477 384.877014,485.842987) t=0.25 tEnd=1 windSum=? windValue=1
863SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=1
864SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=1
865SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=1
866SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
867SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
868SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
869SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
870SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
871SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
872SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
873SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
874SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
875SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
876SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
877SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
878SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
879SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
880SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
881SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
882SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
883SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
884SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
885SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
886SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
887SkOpSegment::markDone id=10 (384.280823,485.642365 384.498779,485.716583 384.699677,485.784973 384.877014,485.842987) t=0 [19] (384.280823,485.642365) tEnd=0.25 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0
888SkOpSegment::markDone id=10 (384.280823,485.642365 384.498779,485.716583 384.699677,485.784973 384.877014,485.842987) t=0.25 [64] (384.440979,485.696869) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0
889SkOpSegment::markDone id=9 (378.938995,485.695007 378.80545,483.777863 382.270355,484.957733 384.280823,485.642365) t=0 [17] (378.938995,485.695007) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0
890SkOpSegment::markDone id=2 (403.28418,497.197632 403.280487,497.224304 391.110992,495.556 391.110992,495.556) t=0 [3] (403.28418,497.197632) tEnd=0.00758417328 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0
891SkOpSegment::markDone id=2 (403.28418,497.197632 403.280487,497.224304 391.110992,495.556 391.110992,495.556) t=0.00758417328 [60] (403.282013,497.197937) tEnd=1 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0
892SkOpSegment::markDone id=3 (403.28299,497.196991 403.424011,497.243988 391.110992,495.556 391.110992,495.556) t=0 [5] (403.28299,497.196991) tEnd=0.005859375 newWindSum=? newOppSum=? oppSum=? windSum=? windValue=0 oppValue=0
893--------------------------------------SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=2
894SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=2
895SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=2
896SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
897SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
898SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
899SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
900SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
901SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
902SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
903SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
904SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
905SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
906SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
907SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
908SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
909SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
910SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
911SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
912SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
913SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
914SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
915SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
916SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
917SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
918SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
919SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
920SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
921SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
922SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
923SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
924SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
925--------------------------------------SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=2
926SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=2
927SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=2
928SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
929SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
930SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
931SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
932SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
933SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
934SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
935SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
936SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
937SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
938SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
939SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
940SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
941SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
942SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
943SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
944SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
945SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
946SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
947SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
948SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
949SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
950SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
951SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
952SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
953SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
954SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
955SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
956SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
957SkOpSegment::sortAngles [1] tStart=0 [1]
958SkOpSegment::sortAngles [1] tStart=1 [2]
959SkOpSegment::sortAngles [3] tStart=0.005859375 [59]
960SkOpSegment::sortAngles [3] tStart=0.0134156992 [62]
961SkOpAngle::after [3/4] 31/31 tStart=0.0134156992 tEnd=0.005859375 < [29/20] 17/17 tStart=0.999799809 tEnd=0 < [3/5] 17/13 tStart=0.0134156992 tEnd=1 F 11
962SkOpAngle::afterPart {{{403.282013,497.197937}, {403.28418,497.197601}, {403.28418,497.197804}, {403.28418,497.197601}}} id=3
963SkOpAngle::afterPart {{{403.282013,497.197937}, {398.375,501.976013}}} id=29
964SkOpAngle::afterPart {{{403.282013,497.197937}, {403.095864,497.198984}, {391.110992,495.555969}, {391.110992,495.555969}}} id=3
965SkOpAngle::after [3/4] 31/31 tStart=0.0134156992 tEnd=0.005859375 < [29/21] 1/1 tStart=0.999799809 tEnd=1 < [3/5] 17/13 tStart=0.0134156992 tEnd=1 T 4
966SkOpAngle::afterPart {{{403.282013,497.197937}, {403.28418,497.197601}, {403.28418,497.197804}, {403.28418,497.197601}}} id=3
967SkOpAngle::afterPart {{{403.282013,497.197937}, {403.28299,497.196991}}} id=29
968SkOpAngle::afterPart {{{403.282013,497.197937}, {403.095864,497.198984}, {391.110992,495.555969}, {391.110992,495.555969}}} id=3
969SkOpSegment::sortAngles [3] tStart=1 [6]
970SkOpSegment::sortAngles [4] tStart=0 [7]
971SkOpSegment::sortAngles [8] tStart=1 [16]
972SkOpSegment::sortAngles [11] tStart=0 [21]
973SkOpSegment::sortAngles [11] tStart=0.902185418 [63]
974SkOpSegment::sortAngles [11] tStart=0.926637941 [65]
975SkOpSegment::sortAngles [11] tStart=1 [22]
976SkOpSegment::sortAngles [12] tStart=0 [23]
977SkOpSegment::sortAngles [25] tStart=0.987732177 [66]
978SkOpAngle::after [25/16] 13/13 tStart=0.987732177 tEnd=0 < [26/18] 29/29 tStart=0.00101329714 tEnd=0 < [25/17] 29/29 tStart=0.987732177 tEnd=1 T 11
979SkOpAngle::afterPart {{{391.393585,505.862213}, {391.088863,505.72854}, {378.040009,503.029999}, {378.040009,503.029999}}} id=25
980SkOpAngle::afterPart {{{391.393585,505.862213}, {391.398987,505.865997}}} id=26
981SkOpAngle::afterPart {{{391.393585,505.862213}, {391.39737,505.863873}, {391.399183,505.865138}, {391.398987,505.865997}}} id=25
982SkOpAngle::after [25/16] 13/13 tStart=0.987732177 tEnd=0 < [26/19] 13/13 tStart=0.00101329714 tEnd=1 < [26/18] 29/29 tStart=0.00101329714 tEnd=0 F 12
983SkOpAngle::afterPart {{{391.393585,505.862213}, {391.088863,505.72854}, {378.040009,503.029999}, {378.040009,503.029999}}} id=25
984SkOpAngle::afterPart {{{391.393585,505.862213}, {386.062988,502.131989}}} id=26
985SkOpAngle::afterPart {{{391.393585,505.862213}, {391.398987,505.865997}}} id=26
986SkOpAngle::after [26/18] 29/29 tStart=0.00101329714 tEnd=0 < [26/19] 13/13 tStart=0.00101329714 tEnd=1 < [25/17] 29/29 tStart=0.987732177 tEnd=1 F 5
987SkOpAngle::afterPart {{{391.393585,505.862213}, {391.398987,505.865997}}} id=26
988SkOpAngle::afterPart {{{391.393585,505.862213}, {386.062988,502.131989}}} id=26
989SkOpAngle::afterPart {{{391.393585,505.862213}, {391.39737,505.863873}, {391.399183,505.865138}, {391.398987,505.865997}}} id=25
990SkOpAngle::after [25/17] 29/29 tStart=0.987732177 tEnd=1 < [26/19] 13/13 tStart=0.00101329714 tEnd=1 < [25/16] 13/13 tStart=0.987732177 tEnd=0 T 11
991SkOpAngle::afterPart {{{391.393585,505.862213}, {391.39737,505.863873}, {391.399183,505.865138}, {391.398987,505.865997}}} id=25
992SkOpAngle::afterPart {{{391.393585,505.862213}, {386.062988,502.131989}}} id=26
993SkOpAngle::afterPart {{{391.393585,505.862213}, {391.088863,505.72854}, {378.040009,503.029999}, {378.040009,503.029999}}} id=25
994SkOpSegment::sortAngles [26] tStart=0.00101329714 [67]
995SkOpSegment::sortAngles [29] tStart=0.999799809 [61]
996SkOpSegment::sortAngles [29] tStart=1 [58]
997coinSpan - id=11 t=0.902185418 tEnd=1
998coinSpan + id=10 t=0 tEnd=1
999coinSpan - id=11 t=0 tEnd=0.902185418
1000coinSpan + id=9 t=0 tEnd=1
1001coinSpan - id=3 t=0.005859375 tEnd=1
1002coinSpan + id=2 t=0 tEnd=1
1003coinSpan - id=1 t=0 tEnd=1
1004coinSpan + id=3 t=0 tEnd=0.005859375
1005SkOpSegment::debugShowActiveSpans id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 tEnd=1 windSum=? windValue=2
1006SkOpSegment::debugShowActiveSpans id=3 (403.28418,497.197632 403.28418,497.197834 403.283439,497.197968 403.282013,497.197968) t=0.005859375 tEnd=0.0134156992 windSum=? windValue=2
1007SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=? windValue=2
1008SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
1009SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
1010SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
1011SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
1012SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
1013SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1014SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1015SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1016SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=? windValue=1
1017SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=? windValue=1
1018SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=? windValue=1
1019SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=? windValue=1
1020SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=? windValue=1
1021SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=? windValue=1
1022SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=? windValue=1
1023SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=? windValue=1
1024SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=? windValue=1
1025SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=? windValue=1
1026SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=? windValue=1
1027SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=? windValue=1
1028SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=? windValue=1
1029SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=? windValue=1
1030SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=? windValue=1
1031SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=? windValue=1
1032SkOpSegment::debugShowActiveSpans id=26 (391.393585,505.862213 386.062988,502.131989) t=0.00101329714 tEnd=1 windSum=? windValue=1
1033SkOpSegment::debugShowActiveSpans id=27 (386.062988,502.131989 387.546997,500.334991) t=0 tEnd=1 windSum=? windValue=1
1034SkOpSegment::debugShowActiveSpans id=28 (387.546997,500.334991 398.375,501.976013) t=0 tEnd=1 windSum=? windValue=1
1035SkOpSegment::debugShowActiveSpans id=29 (398.375,501.976013 403.282013,497.197937) t=0 tEnd=0.999799809 windSum=? windValue=1
1036SkOpSegment::debugShowActiveSpans id=29 (403.282013,497.197937 403.28299,497.196991) t=0.999799809 tEnd=1 windSum=? windValue=1
1037SkOpSpan::sortableTop dir=kTop seg=1 t=0.5 pt=(403.283905,497.197357)
1038SkOpSpan::sortableTop [0] valid=1 operand=0 span=1 ccw=1 seg=1 {{{403.28299f, 497.196991f}, {403.284241f, 497.197388f}, {403.28418f, 497.197632f}}} t=0.5 pt=(403.283905,497.197357) slope=(0.000595092773,0.00032043457)
1039SkOpSpan::sortableTop [1] valid=0 operand=0 span=59 ccw=0 seg=3 {{{403.28299f, 497.196991f}, {403.424011f, 497.243988f}, {391.110992f, 495.556f}, {391.110992f, 495.556f}}} t=0.00848215884 pt=(403.283905,497.197815) slope=(0,0)
1040SkOpSpan::sortableTop dir=kTop seg=3 t=0.00963753708 pt=(403.28363,497.197876)
1041SkOpSpan::sortableTop [0] valid=1 operand=0 span=1 ccw=1 seg=1 {{{403.28299f, 497.196991f}, {403.284241f, 497.197388f}, {403.28418f, 497.197632f}}} t=0.304822061 pt=(403.28363,497.197205) slope=(0.000851216167,0.00035021636)
1042SkOpSpan::sortableTop [1] valid=1 operand=0 span=59 ccw=0 seg=3 {{{403.28299f, 497.196991f}, {403.424011f, 497.243988f}, {391.110992f, 495.556f}, {391.110992f, 495.556f}}} t=0.00963753708 pt=(403.28363,497.197876) slope=(-0.290191228,0.0416190962)
1043SkOpSegment::markWinding id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 [1] (403.28299,497.196991) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=2 oppValue=0
1044SkOpSegment::nextChase mismatched signs
1045SkOpSegment::markWinding id=3 (403.28299,497.196991 403.424011,497.243988 391.110992,495.556 391.110992,495.556) t=0.005859375 [59] (403.28418,497.197632) tEnd=0.0134156992 newWindSum=-2 newOppSum=0 oppSum=? windSum=? windValue=2 oppValue=0
1046SkOpSegment::markWinding id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 [1] (403.28299,497.196991) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=2 oppValue=0
1047SkOpSegment::nextChase mismatched signs
1048SkOpSegment::nextChase mismatched signs
1049SkOpSegment::findNextWinding simple
1050SkOpSegment::markDone id=3 (403.28299,497.196991 403.424011,497.243988 391.110992,495.556 391.110992,495.556) t=0.005859375 [59] (403.28418,497.197632) tEnd=0.0134156992 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=2 oppValue=0
1051bridgeWinding current id=3 from=(403.282013,497.197968) to=(403.28418,497.197632)
1052SkOpSegment::nextChase mismatched signs
1053SkOpSegment::markWinding id=29 (398.375,501.976013 403.28299,497.196991) t=0.999799809 [61] (403.282013,497.197937) tEnd=1 newWindSum=-1 windSum=? windValue=1
1054SkOpSegment::markAngle last seg=29 span=61 windSum=-1
1055SkOpSegment::findNextWinding
1056SkOpAngle::dumpOne [1/1] next=29/22 sect=29/29 s=0 [1] e=1 [2] sgn=-1 windVal=2 windSum=-2 oppVal=0 oppSum=0
1057SkOpAngle::dumpOne [29/22] next=1/1 sect=17/17 s=1 [58] e=0.999799809 [61] sgn=1 windVal=1 windSum=-1
1058SkOpSegment::findNextWinding chase.append segment=29 span=61 windSum=-1
1059SkOpSegment::markDone id=1 (403.28299,497.196991 403.284241,497.197388 403.28418,497.197632) t=0 [1] (403.28299,497.196991) tEnd=1 newWindSum=-2 newOppSum=0 oppSum=0 windSum=-2 windValue=2 oppValue=0
1060SkOpSegment::findNextWinding from:[1] to:[29] start=4226608 end=4227160
1061bridgeWinding current id=1 from=(403.28418,497.197632) to=(403.28299,497.196991)
1062path.moveTo(403.282013,497.197968);
1063path.lineTo(403.28418,497.197632);
1064SkOpSegment::markWinding id=3 (403.28299,497.196991 403.424011,497.243988 391.110992,495.556 391.110992,495.556) t=0.0134156992 [62] (403.282013,497.197968) tEnd=1 newWindSum=2 windSum=? windValue=2
1065SkOpSegment::nextChase mismatched signs
1066SkOpSegment::markAngle last seg=4 span=7 windSum=?
1067SkOpSegment::markWinding id=29 (398.375,501.976013 403.28299,497.196991) t=0 [57] (398.375,501.976013) tEnd=0.999799809 newWindSum=2 windSum=? windValue=1
1068SkOpSegment::markWinding id=28 (387.546997,500.334991 398.375,501.976013) t=0 [55] (387.546997,500.334991) tEnd=1 newWindSum=2 windSum=? windValue=1
1069SkOpSegment::markWinding id=27 (386.062988,502.131989 387.546997,500.334991) t=0 [53] (386.062988,502.131989) tEnd=1 newWindSum=2 windSum=? windValue=1
1070SkOpSegment::markWinding id=26 (391.398987,505.865997 386.062988,502.131989) t=0.00101329714 [67] (391.393585,505.862213) tEnd=1 newWindSum=2 windSum=? windValue=1
1071SkOpSegment::markAngle last seg=26 span=67 windSum=2
1072SkOpSegment::findNextWinding
1073SkOpAngle::dumpOne [29/21] next=3/5 sect=1/1 s=0.999799809 [61] e=1 [58] sgn=-1 windVal=1 windSum=-1
1074SkOpAngle::dumpOne [3/5] next=29/20 sect=17/13 s=0.0134156992 [62] e=1 [6] sgn=-1 windVal=2 windSum=2
1075SkOpAngle::dumpOne [29/20] next=3/4 sect=17/17 s=0.999799809 [61] e=0 [57] sgn=1 windVal=1 windSum=2
1076SkOpAngle::dumpOne [3/4] next=29/21 sect=31/31 s=0.0134156992 [62] e=0.005859375 [59] sgn=1 windVal=2 windSum=-2 oppVal=0 oppSum=0 done
1077SkOpSegment::findNextWinding chase.append segment=4 span=7 windSum=-2147483647
1078SkOpSegment::markDone id=29 (398.375,501.976013 403.28299,497.196991) t=0 [57] (398.375,501.976013) tEnd=0.999799809 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1079SkOpSegment::markDone id=28 (387.546997,500.334991 398.375,501.976013) t=0 [55] (387.546997,500.334991) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1080SkOpSegment::markDone id=27 (386.062988,502.131989 387.546997,500.334991) t=0 [53] (386.062988,502.131989) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1081SkOpSegment::markDone id=26 (391.398987,505.865997 386.062988,502.131989) t=0.00101329714 [67] (391.393585,505.862213) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1082SkOpSegment::findNextWinding chase.append segment=26 span=67 windSum=2
1083SkOpSegment::nextChase mismatched signs
1084SkOpSegment::markDone id=29 (398.375,501.976013 403.28299,497.196991) t=0.999799809 [61] (403.282013,497.197937) tEnd=1 newWindSum=-1 newOppSum=? oppSum=? windSum=-1 windValue=1 oppValue=0
1085SkOpSegment::findNextWinding from:[29] to:[3] start=4227304 end=4218168
1086bridgeWinding current id=29 from=(403.28299,497.196991) to=(403.282013,497.197937)
1087path.lineTo(403.28299,497.196991);
1088path.lineTo(403.282013,497.197937);
1089path.close();
1090SkOpSegment::markWinding id=25 (378.040009,503.029999 378.040009,503.029999 391.415009,505.79599 391.398987,505.865997) t=0 [49] (378.040009,503.029999) tEnd=0.987732177 newWindSum=2 windSum=? windValue=1
1091SkOpSegment::markWinding id=24 (378.345001,504.819 378.040009,503.029999) t=0 [47] (378.345001,504.819) tEnd=1 newWindSum=2 windSum=? windValue=1
1092SkOpSegment::markWinding id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 [45] (388.884003,506.764008) tEnd=1 newWindSum=2 windSum=? windValue=1
1093SkOpSegment::markWinding id=22 (387.399994,508.108002 388.884003,506.764008) t=0 [43] (387.399994,508.108002) tEnd=1 newWindSum=2 windSum=? windValue=1
1094SkOpSegment::markWinding id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 [41] (377.752014,507.514008) tEnd=1 newWindSum=2 windSum=? windValue=1
1095SkOpSegment::markWinding id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 [39] (371.807007,506.022003) tEnd=1 newWindSum=2 windSum=? windValue=1
1096SkOpSegment::markWinding id=19 (370.915985,506.912994 371.807007,506.022003) t=0 [37] (370.915985,506.912994) tEnd=1 newWindSum=2 windSum=? windValue=1
1097SkOpSegment::markWinding id=18 (374.477997,509.006989 370.915985,506.912994) t=0 [35] (374.477997,509.006989) tEnd=1 newWindSum=2 windSum=? windValue=1
1098SkOpSegment::markWinding id=17 (373.884003,510.201996 374.477997,509.006989) t=0 [33] (373.884003,510.201996) tEnd=1 newWindSum=2 windSum=? windValue=1
1099SkOpSegment::markWinding id=16 (368.095001,510.498993 373.884003,510.201996) t=0 [31] (368.095001,510.498993) tEnd=1 newWindSum=2 windSum=? windValue=1
1100SkOpSegment::markWinding id=15 (356.220001,496.303986 368.095001,510.498993) t=0 [29] (356.220001,496.303986) tEnd=1 newWindSum=2 windSum=? windValue=1
1101SkOpSegment::markWinding id=14 (374.477997,480.312012 356.220001,496.303986) t=0 [27] (374.477997,480.312012) tEnd=1 newWindSum=2 windSum=? windValue=1
1102SkOpSegment::markWinding id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 [25] (387.696991,484.351013) tEnd=1 newWindSum=2 windSum=? windValue=1
1103SkOpSegment::markWinding id=12 (384.877014,485.842987 387.696991,484.351013) t=0 [23] (384.877014,485.842987) tEnd=1 newWindSum=2 windSum=? windValue=1
1104SkOpSegment::nextChase mismatched signs
1105SkOpSegment::markAngle last seg=11 span=22
1106SkOpSegment::markWinding id=26 (391.398987,505.865997 386.062988,502.131989) t=0 [51] (391.398987,505.865997) tEnd=0.00101329714 newWindSum=1 windSum=? windValue=1
1107SkOpSegment::markWinding id=25 (378.040009,503.029999 378.040009,503.029999 391.415009,505.79599 391.398987,505.865997) t=0.987732177 [66] (391.393585,505.862213) tEnd=1 newWindSum=1 windSum=? windValue=1
1108SkOpSegment::markAngle last seg=25 span=66 windSum=1
1109SkOpSegment::markWinding id=25 (378.040009,503.029999 378.040009,503.029999 391.415009,505.79599 391.398987,505.865997) t=0.987732177 [66] (391.393585,505.862213) tEnd=1 newWindSum=1 windSum=1 windValue=1
1110SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=2 windValue=2
1111SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
1112SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
1113SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
1114SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
1115SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
1116SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1117SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1118SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1119SkOpSegment::debugShowActiveSpans id=12 (384.877014,485.842987 387.696991,484.351013) t=0 tEnd=1 windSum=2 windValue=1
1120SkOpSegment::debugShowActiveSpans id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 tEnd=1 windSum=2 windValue=1
1121SkOpSegment::debugShowActiveSpans id=14 (374.477997,480.312012 356.220001,496.303986) t=0 tEnd=1 windSum=2 windValue=1
1122SkOpSegment::debugShowActiveSpans id=15 (356.220001,496.303986 368.095001,510.498993) t=0 tEnd=1 windSum=2 windValue=1
1123SkOpSegment::debugShowActiveSpans id=16 (368.095001,510.498993 373.884003,510.201996) t=0 tEnd=1 windSum=2 windValue=1
1124SkOpSegment::debugShowActiveSpans id=17 (373.884003,510.201996 374.477997,509.006989) t=0 tEnd=1 windSum=2 windValue=1
1125SkOpSegment::debugShowActiveSpans id=18 (374.477997,509.006989 370.915985,506.912994) t=0 tEnd=1 windSum=2 windValue=1
1126SkOpSegment::debugShowActiveSpans id=19 (370.915985,506.912994 371.807007,506.022003) t=0 tEnd=1 windSum=2 windValue=1
1127SkOpSegment::debugShowActiveSpans id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 tEnd=1 windSum=2 windValue=1
1128SkOpSegment::debugShowActiveSpans id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 tEnd=1 windSum=2 windValue=1
1129SkOpSegment::debugShowActiveSpans id=22 (387.399994,508.108002 388.884003,506.764008) t=0 tEnd=1 windSum=2 windValue=1
1130SkOpSegment::debugShowActiveSpans id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 tEnd=1 windSum=2 windValue=1
1131SkOpSegment::debugShowActiveSpans id=24 (378.345001,504.819 378.040009,503.029999) t=0 tEnd=1 windSum=2 windValue=1
1132SkOpSegment::debugShowActiveSpans id=25 (378.040009,503.029999 378.040009,503.029999 391.088863,505.72854 391.393585,505.862213) t=0 tEnd=0.987732177 windSum=2 windValue=1
1133SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=1 windValue=1
1134SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=1 windValue=1
1135SkOpSegment::markDone id=25 (378.040009,503.029999 378.040009,503.029999 391.415009,505.79599 391.398987,505.865997) t=0 [49] (378.040009,503.029999) tEnd=0.987732177 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1136SkOpSegment::markDone id=24 (378.345001,504.819 378.040009,503.029999) t=0 [47] (378.345001,504.819) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1137SkOpSegment::markDone id=23 (388.884003,506.764008 388.884003,506.764008 378.345001,504.997986 378.345001,504.819) t=0 [45] (388.884003,506.764008) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1138SkOpSegment::markDone id=22 (387.399994,508.108002 388.884003,506.764008) t=0 [43] (387.399994,508.108002) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1139SkOpSegment::markDone id=21 (377.752014,507.514008 380.752014,507.881012 387.399994,508.108002 387.399994,508.108002) t=0 [41] (377.752014,507.514008) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1140SkOpSegment::markDone id=20 (371.807007,506.022003 371.807007,506.022003 374.807007,507.279999 377.752014,507.514008) t=0 [39] (371.807007,506.022003) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1141SkOpSegment::markDone id=19 (370.915985,506.912994 371.807007,506.022003) t=0 [37] (370.915985,506.912994) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1142SkOpSegment::markDone id=18 (374.477997,509.006989 370.915985,506.912994) t=0 [35] (374.477997,509.006989) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1143SkOpSegment::markDone id=17 (373.884003,510.201996 374.477997,509.006989) t=0 [33] (373.884003,510.201996) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1144SkOpSegment::markDone id=16 (368.095001,510.498993 373.884003,510.201996) t=0 [31] (368.095001,510.498993) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1145SkOpSegment::markDone id=15 (356.220001,496.303986 368.095001,510.498993) t=0 [29] (356.220001,496.303986) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1146SkOpSegment::markDone id=14 (374.477997,480.312012 356.220001,496.303986) t=0 [27] (374.477997,480.312012) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1147SkOpSegment::markDone id=13 (387.696991,484.351013 382.752014,483.834991 376.595001,482.123993 374.477997,480.312012) t=0 [25] (387.696991,484.351013) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1148SkOpSegment::markDone id=12 (384.877014,485.842987 387.696991,484.351013) t=0 [23] (384.877014,485.842987) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=1 oppValue=0
1149SkOpSegment::nextChase mismatched signs
1150bridgeWinding chase.append id=11
1151SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=2 windValue=2
1152SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
1153SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
1154SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
1155SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
1156SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
1157SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1158SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1159SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1160SkOpSegment::debugShowActiveSpans id=25 (391.393585,505.862213 391.39737,505.863873 391.399183,505.865138 391.398987,505.865997) t=0.987732177 tEnd=1 windSum=1 windValue=1
1161SkOpSegment::debugShowActiveSpans id=26 (391.398987,505.865997 391.393585,505.862213) t=0 tEnd=0.00101329714 windSum=1 windValue=1
1162SkOpSegment::findNextWinding simple
1163SkOpSegment::markDone id=25 (378.040009,503.029999 378.040009,503.029999 391.415009,505.79599 391.398987,505.865997) t=0.987732177 [66] (391.393585,505.862213) tEnd=1 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0
1164bridgeWinding current id=25 from=(391.393585,505.862213) to=(391.398987,505.865997)
1165path.moveTo(391.393585,505.862213);
1166path.cubicTo(391.397369,505.863861, 391.39917,505.865143, 391.398987,505.865997);
1167SkOpSegment::findNextWinding
1168SkOpAngle::dumpOne [26/18] next=25/17 sect=29/29 s=0.00101329714 [67] e=0 [51] sgn=1 windVal=1 windSum=1
1169SkOpAngle::dumpOne [25/17] next=26/19 sect=29/29 s=0.987732177 [66] e=1 [50] sgn=-1 windVal=1 windSum=1 done
1170SkOpAngle::dumpOne [26/19] next=25/16 sect=13/13 s=0.00101329714 [67] e=1 [52] sgn=-1 windVal=1 windSum=2 done
1171SkOpAngle::dumpOne [25/16] next=26/18 sect=13/13 s=0.987732177 [66] e=0 [49] sgn=1 windVal=1 windSum=2 done
1172SkOpSegment::markDone id=26 (391.398987,505.865997 386.062988,502.131989) t=0 [51] (391.398987,505.865997) tEnd=0.00101329714 newWindSum=1 newOppSum=? oppSum=? windSum=1 windValue=1 oppValue=0
1173SkOpSegment::findNextWinding from:[26] to:[25] start=4228008 end=4225360
1174bridgeWinding current id=26 from=(391.398987,505.865997) to=(391.393585,505.862213)
1175path.lineTo(391.393585,505.862213);
1176path.close();
1177SkOpSegment::debugShowActiveSpans id=3 (403.282013,497.197968 403.095864,497.199014 391.110992,495.556 391.110992,495.556) t=0.0134156992 tEnd=1 windSum=2 windValue=2
1178SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
1179SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
1180SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
1181SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
1182SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
1183SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1184SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1185SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1186SkOpSegment::findNextWinding
1187SkOpAngle::dumpOne [3/5] next=29/20 sect=17/13 s=0.0134156992 [62] e=1 [6] sgn=-1 windVal=2 windSum=2
1188SkOpAngle::dumpOne [29/20] next=3/4 sect=17/17 s=0.999799809 [61] e=0 [57] sgn=1 windVal=1 windSum=2 done
1189SkOpAngle::dumpOne [3/4] next=29/21 sect=31/31 s=0.0134156992 [62] e=0.005859375 [59] sgn=1 windVal=2 windSum=-2 oppVal=0 oppSum=0 done
1190SkOpAngle::dumpOne [29/21] next=3/5 sect=1/1 s=0.999799809 [61] e=1 [58] sgn=-1 windVal=1 windSum=-1 done
1191SkOpSegment::nextChase mismatched signs
1192SkOpSegment::markDone id=3 (403.28299,497.196991 403.424011,497.243988 391.110992,495.556 391.110992,495.556) t=0.0134156992 [62] (403.282013,497.197968) tEnd=1 newWindSum=2 newOppSum=? oppSum=? windSum=2 windValue=2 oppValue=0
1193SkOpSegment::findNextWinding from:[3] to:[29] start=4227160 end=4226608
1194bridgeWinding current id=3 from=(391.110992,495.556) to=(403.282013,497.197968)
1195path.moveTo(391.110992,495.556);
1196path.cubicTo(391.110992,495.556, 403.095856,497.199005, 403.282013,497.197968);
1197SkOpSegment::debugShowActiveSpans id=4 (391.110992,495.556 392.290985,493.165009) t=0 tEnd=1 windSum=? windValue=1
1198SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=? windValue=1
1199SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=? windValue=1
1200SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=? windValue=1
1201SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=? windValue=1
1202SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1203SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1204SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1205SkOpSpan::sortableTop dir=kLeft seg=4 t=0.5 pt=(391.700989,494.360504)
1206SkOpSpan::sortableTop [0] valid=1 operand=0 span=27 ccw=0 seg=14 {{{374.477997f, 480.312012f}, {356.220001f, 496.303986f}}} t=0.878471447 pt=(358.438873,494.360504) slope=(-18.2579956,15.9919739)
1207SkOpSpan::sortableTop [1] valid=1 operand=0 span=7 ccw=1 seg=4 {{{391.110992f, 495.556f}, {392.290985f, 493.165009f}}} t=0.5 pt=(391.700989,494.360504) slope=(1.17999268,-2.39099121)
1208SkOpSegment::markWinding id=4 (391.110992,495.556 392.290985,493.165009) t=0 [7] (391.110992,495.556) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0
1209SkOpSegment::markWinding id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 [9] (392.290985,493.165009) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0
1210SkOpSegment::markWinding id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 [11] (386.649994,491.821014) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0
1211SkOpSegment::markWinding id=7 (381.602997,490.773987 383.391998,488.382996) t=0 [13] (381.602997,490.773987) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0
1212SkOpSegment::markWinding id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 [15] (383.391998,488.382996) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=1 oppValue=0
1213SkOpSegment::nextChase mismatched signs
1214SkOpSegment::markWinding id=4 (391.110992,495.556 392.290985,493.165009) t=0 [7] (391.110992,495.556) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0
1215SkOpSegment::nextChase mismatched signs
1216SkOpSegment::nextChase mismatched signs
1217SkOpSegment::findNextWinding
1218SkOpAngle::dumpOne [4/7] next=3/6 sect=5/5 s=0 [7] e=1 [8] sgn=-1 windVal=1 windSum=1 oppVal=0 oppSum=0
1219SkOpAngle::dumpOne [3/6] next=4/7 sect=29/29 s=1 [6] e=0.0134156992 [62] sgn=1 windVal=2 windSum=2 done
1220SkOpSegment::markDone id=4 (391.110992,495.556 392.290985,493.165009) t=0 [7] (391.110992,495.556) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0
1221SkOpSegment::debugShowActiveSpans id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1222SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1223SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1224SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1225SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1226SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1227SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1228SkOpSegment::findNextWinding simple
1229SkOpSegment::markDone id=5 (392.290985,493.165009 392.290985,493.165009 388.993988,492.056 386.649994,491.821014) t=0 [9] (392.290985,493.165009) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0
1230bridgeWinding current id=5 from=(386.649994,491.821014) to=(392.290985,493.165009)
1231path.moveTo(386.649994,491.821014);
1232path.cubicTo(388.993988,492.056, 392.290985,493.165009, 392.290985,493.165009);
1233SkOpSegment::debugShowActiveSpans id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1234SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1235SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1236SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1237SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1238SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1239SkOpSegment::findNextWinding simple
1240SkOpSegment::markDone id=6 (386.649994,491.821014 384.243988,491.45401 381.602997,490.773987 381.602997,490.773987) t=0 [11] (386.649994,491.821014) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0
1241bridgeWinding current id=6 from=(381.602997,490.773987) to=(386.649994,491.821014)
1242path.moveTo(381.602997,490.773987);
1243path.cubicTo(381.602997,490.773987, 384.243988,491.45401, 386.649994,491.821014);
1244SkOpSegment::debugShowActiveSpans id=7 (381.602997,490.773987 383.391998,488.382996) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1245SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1246SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1247SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1248SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1249SkOpSegment::findNextWinding simple
1250SkOpSegment::markDone id=7 (381.602997,490.773987 383.391998,488.382996) t=0 [13] (381.602997,490.773987) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0
1251bridgeWinding current id=7 from=(383.391998,488.382996) to=(381.602997,490.773987)
1252path.moveTo(383.391998,488.382996);
1253path.lineTo(381.602997,490.773987);
1254SkOpSegment::debugShowActiveSpans id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 tEnd=1 windSum=1 oppSum=0 windValue=1 oppValue=0
1255SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1256SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1257SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1258SkOpSegment::findNextWinding simple
1259SkOpSegment::markDone id=8 (383.391998,488.382996 383.391998,488.382996 379.118988,487.453003 378.938995,485.695007) t=0 [15] (383.391998,488.382996) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=1 oppValue=0
1260bridgeWinding current id=8 from=(378.938995,485.695007) to=(383.391998,488.382996)
1261path.moveTo(378.938995,485.695007);
1262path.cubicTo(379.118988,487.453003, 383.391998,488.382996, 383.391998,488.382996);
1263SkOpSegment::debugShowActiveSpans id=11 (378.938995,485.695007 378.805463,483.777863 382.270366,484.957757 384.280823,485.642365) t=0 tEnd=0.902185418 windSum=? windValue=2
1264SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=? windValue=2
1265SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=? windValue=2
1266SkOpSpan::sortableTop dir=kTop seg=11 t=0.451092709 pt=(380.805908,484.693024)
1267SkOpSpan::sortableTop [0] valid=1 operand=0 span=25 ccw=0 seg=13 {{{387.696991f, 484.351013f}, {382.752014f, 483.834991f}, {376.595001f, 482.123993f}, {374.477997f, 480.312012f}}} t=0.447162422 pt=(380.805908,483.039764) slope=(-14.9362868,-4.09791125)
1268SkOpSpan::sortableTop [1] valid=1 operand=0 span=21 ccw=1 seg=11 {{{378.938995f, 485.695007f}, {378.790985f, 483.570007f}, {383.063995f, 485.25f}, {384.877014f, 485.842987f}}} t=0.451092709 pt=(380.805908,484.693024) slope=(7.32116938,0.937087304)
1269SkOpSegment::markWinding id=11 (378.938995,485.695007 378.790985,483.570007 383.063995,485.25 384.877014,485.842987) t=0 [21] (378.938995,485.695007) tEnd=0.902185418 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=2 oppValue=0
1270SkOpSegment::nextChase mismatched signs
1271SkOpSegment::markWinding id=11 (378.938995,485.695007 378.790985,483.570007 383.063995,485.25 384.877014,485.842987) t=0.902185418 [63] (384.280823,485.642365) tEnd=0.926637941 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=2 oppValue=0
1272SkOpSegment::nextChase mismatched signs
1273SkOpSegment::markWinding id=11 (378.938995,485.695007 378.790985,483.570007 383.063995,485.25 384.877014,485.842987) t=0.926637941 [65] (384.440979,485.696869) tEnd=1 newWindSum=1 newOppSum=0 oppSum=? windSum=? windValue=2 oppValue=0
1274SkOpSegment::nextChase mismatched signs
1275SkOpSegment::markWinding id=11 (378.938995,485.695007 378.790985,483.570007 383.063995,485.25 384.877014,485.842987) t=0 [21] (378.938995,485.695007) tEnd=0.902185418 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=2 oppValue=0
1276SkOpSegment::nextChase mismatched signs
1277SkOpSegment::markDone id=11 (378.938995,485.695007 378.790985,483.570007 383.063995,485.25 384.877014,485.842987) t=0 [21] (378.938995,485.695007) tEnd=0.902185418 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=2 oppValue=0
1278SkOpSegment::nextChase mismatched signs
1279bridgeWinding chase.append id=8
1280SkOpSegment::debugShowActiveSpans id=11 (384.280823,485.642365 384.335313,485.66092 384.388726,485.679113 384.440979,485.696869) t=0.902185418 tEnd=0.926637941 windSum=1 oppSum=0 windValue=2 oppValue=0
1281SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=1 oppSum=0 windValue=2 oppValue=0
1282SkOpSegment::markDone id=11 (378.938995,485.695007 378.790985,483.570007 383.063995,485.25 384.877014,485.842987) t=0.902185418 [63] (384.280823,485.642365) tEnd=0.926637941 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=2 oppValue=0
1283SkOpSegment::nextChase mismatched signs
1284SkOpSegment::nextChase mismatched signs
1285SkOpSegment::debugShowActiveSpans id=11 (384.440979,485.696869 384.597748,485.750141 384.744007,485.799484 384.877014,485.842987) t=0.926637941 tEnd=1 windSum=1 oppSum=0 windValue=2 oppValue=0
1286SkOpSegment::markDone id=11 (378.938995,485.695007 378.790985,483.570007 383.063995,485.25 384.877014,485.842987) t=0.926637941 [65] (384.440979,485.696869) tEnd=1 newWindSum=1 newOppSum=0 oppSum=0 windSum=1 windValue=2 oppValue=0
1287SkOpSegment::nextChase mismatched signs
1288</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 = [
Cary Clark7eb01e02016-12-08 14:36:32 -05001295 joel_2,
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>