-var trivialStrategy = function(ctx, color, strokeWidth) {
- return new function() {
- this.init = function() {
- ctx.beginPath();
- ctx.strokeStyle = color;
- ctx.lineWidth = strokeWidth;
- };
- this.finish = function() {
- ctx.stroke(); // should this include closePath?
- };
- this.startSegment = function() { };
- this.endSegment = function() { };
- this.drawLine = function(x1, y1, x2, y2) {
- ctx.moveTo(x1, y1);
- ctx.lineTo(x2, y2);
- };
- // don't skip pixels.
- this.skipPixel = function() {
- return false;
- };
- };
-};
-