code: function getPixelSetter() {
      var offset = 0;
      return function(colors, c) {
          colors[offset] = c.r;
          colors[offset + 1] = c.g;
          colors[offset + 2] = c.b;
          colors[offset + 3] = c.a;
          offset += 4;
      };
  }
docs: Utility for setting pixels.