Ejemplo n.º 1
0
 tool.saveAndRestore(ctx, function(ctx) {
     var angle = Math.round(that.date.getHours()) * that.hPart;
     ctx.strokeStyle = '#E11D38';
     ctx.lineWidth = 4 * l;
     ctx.rotate(angle);
     shape.line(ctx, 0, -that.sizeHour, 0, 0);
     ctx.stroke();
     shape.circle(ctx, 0, -that.sizeHour, s * 4);
     ctx.fill();
 });
Ejemplo n.º 2
0
 tool.saveAndRestore(ctx, function(ctx) {
     ctx.strokeStyle = '#FF7600';
     ctx.lineWidth = 2 * l;
     var angle = Math.round(that.date.getMinutes()) * that.mnPart;
     ctx.rotate(angle);
     shape.line(ctx, 0, -that.sizeMinute, 0, 0);
     ctx.stroke();
     shape.circle(ctx, 0, -that.sizeMinute, s * 3);
     ctx.fill();
 });
Ejemplo n.º 3
0
 tool.saveAndRestore(ctx, function(ctx) {
     var angle = that.date.getMilliseconds() * that.msPart;
     ctx.strokeStyle = '#00462A';
     ctx.lineWidth = 0.5 * l;
     ctx.rotate(angle);
     shape.line(ctx, 0, -that.sizeMillisecond, 0, 0);
     ctx.fill();
     shape.circle(ctx, 0, -that.sizeMillisecond, s);
     ctx.fill();
 });
Ejemplo n.º 4
0
 tool.saveAndRestore(ctx, function(ctx) {
     ctx.strokeStyle = '#71266E';
     ctx.lineWidth = 1 * l;
     var angle = Math.round(that.date.getSeconds()) * that.sPart;
     ctx.rotate(angle);
     shape.line(ctx, 0, -that.sizeSecond, 0, 0);
     ctx.stroke();
     shape.circle(ctx, 0, -that.sizeSecond, s * 2);
     ctx.fill();
 });
Ejemplo n.º 5
0
 BASE2D.prototype.draw = function(ctx) {
     shape.circle(ctx, 0, 0, this.u.x);
 };