aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/SkV8Example/path.js
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-10-24 20:02:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-24 20:02:31 -0700
commit59b3815eaa76ee7116f9f07b4ef6c924eb10cadb (patch)
treeb23d2e06215b4ba4437fb3476eab118a1bbd347e /experimental/SkV8Example/path.js
parentd3de40dfdf2340578f06dd8bddcf523ffff88462 (diff)
Move .js files to their own directory
Diffstat (limited to 'experimental/SkV8Example/path.js')
-rw-r--r--experimental/SkV8Example/path.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/experimental/SkV8Example/path.js b/experimental/SkV8Example/path.js
deleted file mode 100644
index 81eb0d772b..0000000000
--- a/experimental/SkV8Example/path.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @fileoverview Sample onDraw script for use with SkV8Example.
- */
-var onDraw = function(){
- var p = new Path2D();
- p.moveTo(0, 0);
- p.bezierCurveTo(0, 100, 100, 0, 200, 200);
- p.close();
- p.moveTo(0, 300);
- p.arc(0, 300, 40, Math.PI/2, 3/2*Math.PI);
- function f(context) {
- context.translate(10, 10);
- for (var i=0; i<256; i++) {
- context.strokeStyle = '#0000' + toHex(i);
- context.stroke(p);
- context.translate(1, 0);
- }
- context.fillStyle = '#ff0000';
- print(context.width, context.height);
- context.resetTransform();
- context.fillRect(context.width/2, context.height/2, 20, 20);
- };
- return f;
-}();
-
-
-function toHex(n) {
- var s = n.toString(16);
- if (s.length == 1) {
- s = "0" + s;
- }
- return s;
-}