diff options
author | caryclark <caryclark@google.com> | 2014-07-29 12:13:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-29 12:13:28 -0700 |
commit | fa6d65619d2e8707f3b40dbade42e75f1c980689 (patch) | |
tree | 1e1d57eb372e68e057b18811a674b362d62b0714 /tools/pathops_sorter.htm | |
parent | 25a67bcb7ac70d3077e91126c4b8924a53557a38 (diff) |
add cubic red option to pathops tool
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/428963004
Diffstat (limited to 'tools/pathops_sorter.htm')
-rw-r--r-- | tools/pathops_sorter.htm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/tools/pathops_sorter.htm b/tools/pathops_sorter.htm index 79a2c16955..87017a8ab4 100644 --- a/tools/pathops_sorter.htm +++ b/tools/pathops_sorter.htm @@ -958,11 +958,25 @@ op intersect {{{367.967712,5102.61084}, {368.278717,5105.71045}}}}, </div> +<div id="issue2753"> +{{50.6,117.001}, {50.6,117.001}, {164.601,85.2}, {188.201,117.601}}, +{{188.201,117.601}, {188.201,117.601}, {174.801,93}, {39,124.001}}, +computed quadratics set +{{50.6,117.001}, {52.4926111,116.112083}, {81.0298889,109.956333}}, +{{81.0298889,109.956333}, {109.567167,103.800583}, {142.037778,103.045}}, +{{142.037778,103.045}, {174.508389,102.289417}, {188.201,117.601}}, +computed quadratics set +{{188.201,117.601}, {189.210269,116.85838}, {179.697259,112.371148}}, +{{179.697259,112.371148}, {170.18425,107.883917}, {138.037741,108.563519}}, +{{138.037741,108.563519}, {105.891231,109.24312}, {39,124.001}}, +</div> + </div> <script type="text/javascript"> var testDivs = [ + issue2753, skpwww_9to5mac_com_64, skpcarrot_is24x, skpwww_wartepop_blogspot_com_br_6, @@ -1152,6 +1166,7 @@ op intersect var draw_t = false; var draw_closest_t = false; + var draw_cubic_red = false; var draw_derivative = false; var draw_endpoints = true; var draw_midpoint = 0; @@ -1713,7 +1728,7 @@ function dxy_at_t(curve, t) { } ctx.lineWidth = 1; if (draw_tangents != 0) { - if (firstInside == curves) { + if (draw_cubic_red ? curve.length == 8 : firstInside == curves) { ctx.strokeStyle = "rgba(255,0,0, 0.3)"; } else { ctx.strokeStyle = "rgba(0,0,255, 0.3)"; @@ -1742,7 +1757,7 @@ function dxy_at_t(curve, t) { (curve[4] - srcLeft) * scale, (curve[5] - srcTop) * scale, (curve[6] - srcLeft) * scale, (curve[7] - srcTop) * scale); } - if (firstInside == curves) { + if (draw_cubic_red ? curve.length == 8 : firstInside == curves) { ctx.strokeStyle = "rgba(255,0,0, 1)"; } else { ctx.strokeStyle = "rgba(0,0,255, 1)"; @@ -1824,7 +1839,7 @@ function dxy_at_t(curve, t) { ctx.closePath(); ctx.fillStyle = "white"; ctx.fill(); - if (firstInside == curves) { + if (draw_cubic_red ? curve.length == 8 : firstInside == curves) { ctx.strokeStyle = "rgba(255,0,0, 1)"; ctx.fillStyle = "rgba(255,0,0, 1)"; } else { @@ -1940,6 +1955,10 @@ function dxy_at_t(curve, t) { calcLeftTop(); redraw(); break; + case 'b': + draw_cubic_red ^= true; + redraw(); + break; case 'c': drawTop(); break; |