summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a8ef67a)
I was confused by a wrong example I saw online, it's supposed to be used
before stroke() as it was in the original version. It's not needed
after fill() since that automatically closes the path.
var coords = computeCoordinates();
ctx.lineTo(coords[0], coords[1]);
}
var coords = computeCoordinates();
ctx.lineTo(coords[0], coords[1]);
}
}
Dygraph.shapeFunction_ = function(sides, rotationRadians, delta) {
}
Dygraph.shapeFunction_ = function(sides, rotationRadians, delta) {
ctx.strokeStyle = color;
ctx.fillStyle = "white";
ctx.arc(cx, cy, radius, 0, 2 * Math.PI, false);
ctx.strokeStyle = color;
ctx.fillStyle = "white";
ctx.arc(cx, cy, radius, 0, 2 * Math.PI, false);
},
STAR : Dygraph.shapeFunction_(5, 0, 4 * Math.PI / 5),
PLUS : function(g, name, ctx, cx, cy, color, radius) {
},
STAR : Dygraph.shapeFunction_(5, 0, 4 * Math.PI / 5),
PLUS : function(g, name, ctx, cx, cy, color, radius) {
ctx.beginPath();
ctx.moveTo(cx + radius, cy);
ctx.lineTo(cx - radius, cy);
ctx.beginPath();
ctx.moveTo(cx + radius, cy);
ctx.lineTo(cx - radius, cy);
ctx.beginPath();
ctx.moveTo(cx, cy + radius);
ctx.lineTo(cx, cy - radius);
ctx.beginPath();
ctx.moveTo(cx, cy + radius);
ctx.lineTo(cx, cy - radius);
},
EX : function(g, name, ctx, cx, cy, color, radius) {
ctx.strokeStyle = color;
},
EX : function(g, name, ctx, cx, cy, color, radius) {
ctx.strokeStyle = color;
ctx.moveTo(cx + radius, cy - radius);
ctx.lineTo(cx - radius, cy + radius);
ctx.closePath();
ctx.moveTo(cx + radius, cy - radius);
ctx.lineTo(cx - radius, cy + radius);
ctx.closePath();