aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/Intersection/op.htm
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-17 21:02:47 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-17 21:02:47 +0000
commit73ca6243b31e225e9fd5b75a96cbc82d62557de6 (patch)
treef23c55585c47e26f28afdd7b8635b7065a81f06b /experimental/Intersection/op.htm
parent148a3961b1c82a891012f2feb2a875cea2593170 (diff)
shape ops work in progress
mostly working on cubic/cubic intersect git-svn-id: http://skia.googlecode.com/svn/trunk@7266 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/op.htm')
-rw-r--r--experimental/Intersection/op.htm29
1 files changed, 26 insertions, 3 deletions
diff --git a/experimental/Intersection/op.htm b/experimental/Intersection/op.htm
index 50c26e90c2..8c8a9919ea 100644
--- a/experimental/Intersection/op.htm
+++ b/experimental/Intersection/op.htm
@@ -3295,11 +3295,35 @@ path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction);
path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
</div>
+<div id="testQuadralateral1">
+ path.moveTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(0, 0);
+ path.lineTo(3, 2);
+ path.close();
+ path.moveTo(0, 0);
+ path.lineTo(2, 1);
+ path.lineTo(2, 2);
+ path.lineTo(2, 3);
+ path.close();
+</div>
+
+<div id="testCubic1">
+ path.moveTo(0, 0);
+ path.cubicTo(0, 1, 1, 1, 1, 0);
+ path.close();
+ path.moveTo(1, 0);
+ path.cubicTo(0, 0, 0, 1, 1, 1);
+ path.close();
+</div>
+
</div>
<script type="text/javascript">
var testDivs = [
+ testCubic1,
+ testQuadralateral1,
testLine85,
testLine84x,
testLine83,
@@ -3763,9 +3787,8 @@ function draw(test, title, _at_x, _at_y, scale) {
}
ctx.closePath();
}
- if (hasXor) {
- ctx.fillType=xor; // how is this done?
- }
+ // uncomment if ever part of the standard
+ // ctx.fillRule=hasXor ? evenodd : nonzero;
ctx.stroke();
ctx.fillStyle="rgba(192,192,255, 0.3)";
ctx.fill();