-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFIGURES.html
528 lines (476 loc) · 28 KB
/
FIGURES.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
<!DOCTYPE html>
<html>
<head>
<!--
TODO: discoverable nNeighbors control
TODO: more descriptive than "dragging thing with"
TODO: show values somewhere on screen instead of console log
-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Figures for The Spiral Moment Lemma: There's No Single-Exit Lagoon</title>
<style type="text/css">
body {font-size:large;}
/* "smaller" seems to mean 80% */
#theSource {font-size: 58.119653701782230115213678800500929355622%;} /* minimum that stays black instead of turning gray */
div.figure {
width:60%; /* XXX ARGH! don't want to have to do this! */
margin:auto;
outline: 1px dashed #d0d0d0;
}
svg.figure {
outline: 1px dashed black;
/* this makes it an arrow cursor throughout the svg
(if we don't do this, it turns into the text cursor
when hovering over text elements */
cursor: default;
}
circle.movable {
/* change to pointer (finger) when over a movable */
cursor: pointer;
}
text {
/* make it so the text doesn't get highlighted
if the mouse is over it during dragging,
since that got pretty distracting.
the user-select one is commented out because it provokes a warning in firefox.
XXX actually this doesn't happen any more even without this, I don't think... ?? figure out why or why not
*/
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
/* user-select: none; */
/* fill: green; */
}
</style>
<!-- 1.9.1 provokes warnings in firefox:
Unknown property 'box-sizing'. Declaration dropped.
:-(
-->
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script>
// make $ not be an alias for jQuery
// since I think that's ridiculous
jQuery.noConflict();
</script>
<script src="ZeroClipboard.js"></script>
<script src="initFigureInteraction.js"></script> <!-- do NOT self-close, that causes weirdness -->
<script src="vertexColoredPath.js"></script>
<script>
jQuery(document).ready(function() {
console.log("in jquery document-ready function!");
var figure4div = jQuery('#figure4div');
var templateDiv = jQuery('#figureTemplateDiv');
var templateSVG = templateDiv.children();
var theSource = jQuery('#theSource');
var theButton = jQuery('#copy-button');
var theButtonFigure4 = jQuery('#figure4-copy-button');
if (true)
{
//console.log("jQuery('.testVertexColoredPath') = ",jQuery('.testVertexColoredPath'));
console.log("(setting up colored paths)");
setupVertexColoredPaths(jQuery('.testVertexColoredPath'));
// do it twice to test
console.log("(setting up colored paths again to make sure that works)");
setupVertexColoredPaths(jQuery('.testVertexColoredPath'));
}
if (true)
{
var callThisWhenFigure4SourceChanges = function() {
var figureDivClone = figure4div.clone();
figureDivClone.find('.vertexColoredPathSegments').prev().show(0);
figureDivClone.find('.vertexColoredPathSegments').remove();
var innerHTML = " "+jQuery.trim(figureDivClone.html());
// this gets called when the svg source changes
theButtonFigure4.attr('data-clipboard-text', " "+innerHTML);
};
var callThisWhenTemplateSourceChanges = function() {
var figureDivClone = templateDiv.clone();
figureDivClone.find('.vertexColoredPathSegments').prev().show(0);
figureDivClone.find('.vertexColoredPathSegments').remove();
var innerHTML = " "+jQuery.trim(figureDivClone.html());
// this gets called when the svg source changes
//theSource.text(" "+jQuery.trim(figureDivClone[0].innerHTML));
theSource.text(innerHTML);
console.log(" setting template text to display and to copy-to-clipboard button");
theButton.attr('data-clipboard-text', " "+innerHTML);
};
initFigures567Interaction(callThisWhenFigure4SourceChanges,
callThisWhenTemplateSourceChanges);
// and do them once on start
callThisWhenFigure4SourceChanges();
callThisWhenTemplateSourceChanges();
}
// https://github.com/zeroclipboard/ZeroClipboard/issues/52
// have to use just a single ZeroClipboard.
if (true)
{
// NOTE ZeroClipboard only works over a web server
// (not via file://).
// To start a web server:
// python -m SimpleHTTPServer
var clip = new ZeroClipboard([theButton[0],theButtonFigure4[0]], { moviePath: "ZeroClipboard.swf" } );
clip.on('complete', function(client,args) {
var button = this;
console.log("Copied "+jQuery(button).attr('data-clipboard-text').length+" bytes of text to clipboard "+(button==theButton[0]?"(figures 5,6,7 template)":button==theButtonFigure4[0]?"(figure 4)":"(???)"));
});
}
console.log("out jquery document-ready function!");
}); // jquery document ready function
</script>
</head>
<body>
<p>
<ul id="assertOutputList"></ul>
<p>
<!-- ======================================================================== -->
<hr>
<div id="figure4div" class="figure" width="450" height="330">
<svg class="figure" xmlns="http://www.w3.org/2000/svg" version="1.1" width="450" height="330">
<g class="theGraphic" transform="translate(150,300) scale(200,-200)">
<!-- note, the super-light gray here might not be appropriate for printing or most displays; my display maybe isn't like most -->
<path class="yAxis" vector-effect="non-scaling-stroke" style="stroke:#f0f0f0; stroke-width:2; fill: none; stroke-opacity:1" d="M 0 1 L 0 0"></path>
<path class="p0p1DottedPath" vector-effect="non-scaling-stroke" style="stroke:#e0e0e0; stroke-width:2; stroke-dasharray:5,5; fill:none" d="M 0.395 0.675 L 0 0 M 0.395 0.97 L 0 0"></path>
<path class="dudleyNeighborsPath" vector-effect="non-scaling-stroke" style="stroke-width: 2px; fill: none; stroke-opacity: 1;" stroke="rgb(128,128,255)" d=" M 0.65 0 L 0.7964538239835902 0.11446675321721539 L 0 0 M 0.7964538239835902 0.11446675321721539 L 0.9557477786861427 0.2805153332887296 L 0 0 M 0.9557477786861427 0.2805153332887296 L 1.12169122102953 0.5120290076993976 L 0 0 M 0.65 0 L 0.5197409006028711 -0.07469742954919617 L 0 0 M 0.5197409006028711 -0.07469742954919617 L 0.4070013811972714 -0.11945633632805765 L 0 0 M 0.4070013811972714 -0.11945633632805765 L 0.3117110509892494 -0.1422896935758044 L 0 0" vertex-opacities=" 1 0.6666666666666667 1 0.6666666666666667 0.33333333333333337 0.6666666666666667 0.33333333333333337 0 0.33333333333333337 1 0.6666666666666667 1 0.6666666666666667 0.33333333333333337 0.6666666666666667 0.33333333333333337 0 0.33333333333333337"></path>
<path class="dudleyMainPath" vector-effect="non-scaling-stroke" style="stroke: blue; stroke-width: 4; fill: none; stroke-miterlimit:1.414" d="M 0 0 L 0.65 0 L 0.65 0 L 0 0"></path>
<path class="priscillaNeighborsPath" vector-effect="non-scaling-stroke" style="stroke-width: 2px; fill: none; stroke-opacity: 1;" stroke="red" d=" M 0.33879976293631986 1.3610383797923649 L 0.395 0.97 L 0.6011691954550926 0.7062180177791795 M 0.18980688398494144 1.8686741351300733 L 0.33879976293631986 1.3610383797923649 L 0.6623410445898534 1.0506583076356069 M -0.1044005186514198 2.513188128940457 L 0.18980688398494144 1.8686741351300733 L 0.6778085524893311 1.5188862578175295 M 0.5193655071830998 0.4581285619933082 L 0.395 0.675 L 0.36366251111060466 0.45695535246256586 M 0.4325473480617617 0.2834470170026336 L 0.36366251111060466 0.45695535246256586 L 0.31733727911334053 0.2991199961580543 M 0.3498208535506136 0.1635564650978084 L 0.31733727911334053 0.2991199961580543 L 0.2663300499354431 0.18737952771280122" vertex-opacities=" 0.33333333333333337 0.5 0 0.16666666666666669 0.33333333333333337 0 0 0.16666666666666669 0 0 0.5 0.33333333333333337 0 0.33333333333333337 0.16666666666666669 0 0.16666666666666669 0"></path>
<path class="priscillaMainPath" vector-effect="non-scaling-stroke" stroke="red" stroke-opacity="1" style="stroke-width: 4; fill: none" d="M 0.395 0.675 L 0.395 0.97"></path>
<g class="p0transform" transform="translate(0.395,0.675)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="p0Point movable" cx="0" cy="0" r="3" stroke-width="1" style="stroke: red; fill: white;"></circle>
<g transform="translate(8,-6)">
<text class="p0text">
<tspan x="0" y="0">p</tspan>
<tspan x="0" y="3">_</tspan>
</text>
</g>
</g>
</g>
<g class="p1transform" transform="translate(0.395,0.97)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="p1Point movable" cx="0" cy="0" r="3" stroke-width="1" style="stroke: red; fill: white;"></circle>
<g transform="translate(6,-6)">
<text class="p0text">
<tspan x="0" y="0">p</tspan>
<tspan x="0" y="-15">_</tspan>
</text>
</g>
</g>
</g>
<g transform="translate(0,0)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="originPoint movable" cx="0" cy="0" r="3" stroke-width="1" style="stroke:blue;fill:white"></circle>
<g transform="translate(-10,15)">
<text>0</text>
</g>
</g>
</g>
<g class="dtransform" transform="translate(0.65,0)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="dPoint movable" cx="0" cy="0" r="3" stroke-width="1" style="stroke:blue;fill:white"></circle>
<g transform="translate(4,12)">
<text class="dtext">d</text>
</g>
</g>
</g>
</g>
</svg>
</div>
<br>
Figure 4
<button id="figure4-copy-button" data-clipboard-text="(should get replaced by figure 4 source)" title="Click to copy me.">Copy html source to Clipboard</button>
<hr>
<div id="figure5div" class="figure" width="450" height="330">
(placeholder -- this should get replaced by the figure 5 svg)
</div>
<br>
Figure 5
<hr>
<div id="figure6div" class="figure" width="450" height="330">
(placeholder -- this should get replaced by the figure 6 svg)
</div>
<br>
Figure 6
<hr>
<div id="figure7div" class="figure" width="450" height="330">
(placeholder -- this should get replaced by the figure 7 svg)
</div>
<br>
Figure 7
<hr>
<div id="figureTemplateDiv" class="figure" width="450" height="330">
<svg class="figure" xmlns="http://www.w3.org/2000/svg" version="1.1" width="450" height="330">
<!--?xml version="1.0" standalone="no"?-->
<g class="theGraphic" transform="translate(150,300) scale(200,-200)">
<!-- note, the super-light gray here might not be appropriate for printing or most displays; my display maybe isn't like most -->
<path class="yAxis" vector-effect="non-scaling-stroke" style="stroke:#f0f0f0; stroke-width:2; fill: none; stroke-opacity:1" d="M 0 1 L 0 0"></path>
<g class="arcsStuff">
<path class="m1arc" vector-effect="non-scaling-stroke" style="stroke:#e0e0e0; stroke-width:2; fill: none; stroke-opacity:1" d="M 0 0 L 0.056920997883030844 0.01897366596101028 A0.06000000000000002,0.06000000000000002 0 0,1 0,0.06000000000000002 L 0 0"></path>
<path class="m2arc" vector-effect="non-scaling-stroke" style="stroke:#e0e0e0; stroke-width:2; fill: none; stroke-opacity:1" d="M 0 0 L 0.19200000000000006 0.14400000000000007 A0.24000000000000007,0.24000000000000007 0 0,1 0,0.24000000000000007 L 0 0"></path>
<path class="m3arc" vector-effect="non-scaling-stroke" style="stroke:#e0e0e0; stroke-width:2; fill: none; stroke-opacity:1" d="M 0 0.10000000000000003 L 0.056920997883030844 0.1189736659610103 A0.06000000000000002,0.06000000000000002 0 0,1 0,0.16000000000000006 L 0 0.10000000000000003"></path>
</g>
<g class="dhatStuff"> <!-- note there's more than one dhatStuff -->
<path class="dhatDottedPath" vector-effect="non-scaling-stroke" style="stroke:#808080; stroke-width:2; stroke-dasharray:5,5; fill: none; stroke-opacity:1" d="M 0.6000000000000001 0.2 L 0.6000000000000001 0.4500000000000001"></path>
</g>
<g class="orthoDottedPathStuff">
<path class="orthoDottedPath" vector-effect="non-scaling-stroke" style="stroke:#808080; stroke-width:2; stroke-dasharray:5,5; fill: none; stroke-opacity:1" d="M 0 0 L 0.8 0 L 0.8 0.6000000000000001 M 0 0 L 0.6000000000000001 0 L 0.6000000000000001 0.2"></path>
</g>
<path class="dudleyNeighborsPath" stroke-miterlimit="100000" vector-effect="non-scaling-stroke" style="stroke-width: 2px; fill: none;" stroke="rgb(128,128,255)" stroke-opacity="1" d=" M 0.8 0.6000000000000001 L 0.9000000000000001 1.3000000000000003 L 0 0 M 0.6000000000000001 0.2 L 0.4000000000000001 -5.551115123125783e-17 L 0 0" vertex-opacities=" 1 0 1 1 0 1"></path>
<path class="dudleyMainPath" vector-effect="non-scaling-stroke" style="stroke: blue; stroke-width: 4; fill: none; stroke-miterlimit:1.414" d="M 0 0 L 0.6000000000000001 0.2 L 0.8 0.6000000000000001 L 0 0"></path>
<path class="priscillaNeighborsPath" vector-effect="non-scaling-stroke" style="stroke-width: 2px; fill: none; stroke-opacity: 1;" stroke="red" d=" M -2.160000000000001 2.88 L -0.6000000000000003 1.8 L 0.3899494936611664 1.6585786437626908 M 0.3630852169962633 0.3035814496704034 L 0.1666666666666667 0.49999999999999994 L 0.16666666666666669 0.22222222222222215 M 0.47140452079103173 0.7642977396044842 L 0.7071067811865476 0.6464466094067263" vertex-opacities=" 0 0.5 0 0 0.5 0 1 0"></path>
<path class="priscillaMainPath" vector-effect="non-scaling-stroke" stroke="red" stroke-opacity="1" style="stroke-width: 2; fill: none" d="M 0.1666666666666667 0.49999999999999994 L 0 1 L -0.6000000000000003 1.8 M 0 1 L 0.47140452079103173 0.7642977396044842"> </path>
<g class="ptransform" transform="translate(0,1)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="pPoint movable" cx="0" cy="0" r="4" stroke-width="2" style="stroke: red; fill: white;"></circle>
<g transform="translate(10,-10)">
<text>p</text>
</g>
</g>
</g>
<g transform="translate(0,0)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="originPoint movable" cx="0" cy="0" r="3" stroke-width="1" style="stroke:blue;fill:white"></circle>
<g transform="translate(-10,15)">
<text>0</text>
</g>
</g>
</g>
<g class="dhatStuff"> <!-- note there's more than one dhatStuff -->
<g class="dhattransform" transform="translate(0.6000000000000001,0.4500000000000001)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle cx="0" cy="0" r="4" style="stroke:none;fill:blue"></circle>
<g transform="translate(-15,0)">
<text class="d0text">
<tspan x="0" y="0">d</tspan>
<tspan x="1" y="-9">^</tspan>
</text>
</g>
</g>
</g>
</g>
<g class="d0transform" transform="translate(0.6000000000000001,0.2)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="d0Point movable" cx="0" cy="0" r="3" stroke-width="1" style="stroke:blue;fill:white"></circle>
<g transform="translate(5,10)">
<text class="d0text">
<tspan x="0" y="0">d</tspan>
<tspan x="0" y="0">_</tspan>
</text>
</g>
</g>
</g>
<g class="d1transform" transform="translate(0.8,0.6000000000000001)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<circle class="d1Point movable" cx="0" cy="0" r="3" stroke-width="1" style="stroke:blue;fill:white"></circle>
<g transform="translate(10,5)">
<text class="d1text">
<tspan x="0" y="0">d</tspan>
<tspan x="0" y="-19">_</tspan>
</text>
</g>
</g>
</g>
<g class="orthoDottedPathStuff">
<g class="xd0transform" transform="translate(0.6000000000000001,0)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<g transform="translate(-15,17)">
<text class="xd0text">
<tspan>x</tspan><tspan dy="5" font-size="70%">d</tspan>
<tspan x="0" y="3">_</tspan>
<tspan x="6" y="3">_</tspan>
</text>
</g>
</g>
</g>
<g class="xd1transform" transform="translate(0.8,0)">
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<g transform="translate(0,17)">
<text class="xd1text">
<tspan>x</tspan><tspan dy="5" font-size="70%">d</tspan>
<tspan x="0" y="-15">_</tspan>
<tspan x="6" y="-15">_</tspan>
</text>
</g>
</g>
</g>
</g>
</g>
</svg>
</div> <!-- figureTemplateDiv -->
<br>
Figures 5,6,7 template (all elements that appear in any of them).
<hr>
<div id="vertexColoredPathTestDiv" class="figure" width="400" height="400">
<svg class="figure" xmlns="http://www.w3.org/2000/svg" version="1.1" width="400" height="400">
<defs>
<linearGradient id="testGradient" gradientUnits="userSpaceOnUse" x1="0" x2="1" y1="0" y2="0">
<stop offset="0%" stop-color="red"/>
<stop offset="50%" stop-color="black" stop-opacity="0"/>
<stop offset="100%" stop-color="blue"/>
</linearGradient>
<linearGradient id="blueGradient" gradientUnits="userSpaceOnUse" x1="0" x2="1" y1="0" y2="0">
<stop offset="0%" stop-color="blue" stop-opacity="0"/>
<stop offset="100%" stop-color="blue" stop-opacity="1"/>
</linearGradient>
</defs>
<g class="theGraphic" transform="translate(200,100) scale(200,-200)">
<g display="block">
<path class="testPath" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none; stroke-opacity:1"
stroke="url(#testGradient)"
transform="matrix(.5,.5, -.5,.5, .5,.5)"
d="M 0 0 L 1 0";
></path>
<g transform="translate(-.5,0)">
<g transform="scale(.25)">
<path class="testVertexColoredPath" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
stroke="url(#testGradient)"
stroke-opacity="1"
vertex-colors="red yellow green cyan blue magenta red"
vertex-opacities="0 1 0 1 0 1 0"
d="M 1 0 L .5 .866 L -.5 .866 L -1 0 L -.5 -.866 L .5 -.866 L 1 0"
></path>
</g>
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<text transform="translate(-30,0)">vert rgba</text>
</g>
</g>
<g transform="translate(0,0)">
<g transform="scale(.25)">
<path class="testVertexColoredPath" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
stroke="url(#testGradient)"
stroke-opacity=".25"
vertex-colors="red yellow green cyan blue magenta red"
d="M 1 0 L .5 .866 L -.5 .866 L -1 0 L -.5 -.866 L .5 -.866 L 1 0"
></path>
</g>
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<text transform="translate(-30,0)">vert rgb</text>
</g>
</g>
<g transform="translate(.5,0)">
<g transform="scale(.25)">
<path class="testVertexColoredPath" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
stroke="red"
stroke-opacity="url(#testGradient)"
vertex-opacities="1 0 1 0 1 0 1"
d="M 1 0 L .5 .866 L -.5 .866 L -1 0 L -.5 -.866 L .5 -.866 L 1 0"
></path>
</g>
<g class="undoScaleForSvgText" transform="scale(0.005,-0.005)">
<text transform="translate(-30,0)">vert alpha</text>
</g>
</g>
<linearGradient id="anotherGradient">
<stop offset="0%" stop-color="green" stop-opacity="1"/>
<stop offset="100%" stop-color="red" stop-opacity="1"/>
</linearGradient>
<linearGradient id="yetAnotherGradient" gradientUnits="userSpaceOnUse" x2="1">
<stop offset="0%" stop-color="green" stop-opacity="1"/>
<stop offset="100%" stop-color="red" stop-opacity="1"/>
</linearGradient>
<g transform="translate(-.5,-.5)">
<g transform="scale(.25)">
<path stroke="url(#anotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
d="M 0 0 L 1 1"/>
<path stroke="url(#anotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
d="M 1.5 1 L .5 0"/>
<path stroke="url(#anotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
d="M 0 1 L 1 0"/>
<path stroke="url(#anotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
d="M 1.5 0 L 0.5 1"/>
</g>
</g>
<g transform="translate(0,-.5)">
<g transform="scale(.25)">
<path stroke="url(#yetAnotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
transform="matrix(1,1 -1,1 0,0)"
d="M 0 0 L 1 0"/>
<path stroke="url(#yetAnotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
transform="matrix(-1,-1 1,-1 1.5,1)"
d="M 0 0 L 1 0"/>
<path stroke="url(#yetAnotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
transform="matrix(1,-1 1,1 0,1)"
d="M 0 0 L 1 0"/>
<path stroke="url(#yetAnotherGradient)" vector-effect="non-scaling-stroke" style="stroke-width:2; fill:none"
transform="matrix(-1,1 -1,-1 1.5,0)"
d="M 0 0 L 1 0"/>
</g>
</g>
<!--
http://stackoverflow.com/questions/381668/can-a-two-dimensional-gradient-be-created-or-faked-in-svg
-->
<linearGradient id="blackToGreenNW" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2=".5" y2=".5">
<stop offset="0%" stop-color="black" stop-opacity="1"/>
<stop offset="100%" stop-color="green" stop-opacity="1"/>
</linearGradient>
<linearGradient id="transparentToBlueN" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="blue" stop-opacity="0"/>
<stop offset="100%" stop-color="blue" stop-opacity="1"/>
</linearGradient>
<g transform="translate(-.5,-1.25)">
<g transform="scale(.5)">
<path stroke="none" fill="url(#blackToGreenNW)" d="M 0 0 L 1 0 L 0 1"/>
<path stroke="none" fill="url(#transparentToBlueN)" d="M 0 0 L 1 0 L 0 1"/>
</g>
</g>
</g>
</g>
</svg>
</div> <!-- vertexColoredPathTestDiv -->
<br>
Test of vertex-colored paths.
<hr>
<!-- ======================================================================== -->
<ul style="font-size:70%;list-style:none">
<li id="mouseins_subelements">
0 mouseins sub-elements
</li>
<li id="mouseins_svg">
0 mouseins svg
</li>
<li id="mouseenters">
0 mouseenters
</li>
<li>
<ul style="list-style:none">
<li id="mousemoves">
0 mousemoves
</li>
<li>
<ul style="list-style:none">
<li id="mousedowns">
0 mousedowns
</li>
<li>
<ul style="list-style:none">
<li id="mousedrags">
0 mousedrags
</li>
</ul>
</li>
<li id="mouseups">
0 mouseups
</li>
</ul>
</li>
</ul>
</li>
<li id="mouseleaves">
0 mouseleaves
</li>
<li id="mouseouts_svg">
0 mouseouts svg
</li>
<li id="mouseouts_subelements">
0 mouseouts sub-elements
</li>
</ul>
<button id="copy-button" data-clipboard-text="(should get replaced by figures 5,6,7 template source" title="Click to copy me.">Copy to Clipboard</button>
<pre id="theSource">
(this should get replaced by the svg source code the first time it changes)
</pre>
<!-- decoy, make sure this works -->
<p class="theGraphic">
</body>
</html>