hdr-canvas 0.0.6 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -5940,9 +5940,28 @@ function initHDRCanvas(canvas) {
5940
5940
  const ctx = canvas.getContext("2d", hdr_options);
5941
5941
  return ctx;
5942
5942
  }
5943
+ function defaultGetContextHDR() {
5944
+ HTMLCanvasElement.prototype._getContext = HTMLCanvasElement.prototype.getContext;
5945
+ HTMLCanvasElement.prototype.getContext = function (type, options) {
5946
+ if (options !== undefined) {
5947
+ options = Object.assign({}, options, hdr_options);
5948
+ }
5949
+ else {
5950
+ options = hdr_options;
5951
+ }
5952
+ return this._getContext(type, options);
5953
+ };
5954
+ }
5955
+ function resetGetContext() {
5956
+ if (typeof HTMLCanvasElement.prototype._getContext === "function") {
5957
+ HTMLCanvasElement.prototype.getContext = HTMLCanvasElement.prototype._getContext;
5958
+ }
5959
+ }
5943
5960
 
5944
5961
  exports.Uint16Image = Uint16Image;
5945
5962
  exports.checkHDR = checkHDR;
5946
5963
  exports.checkHDRCanvas = checkHDRCanvas;
5964
+ exports.defaultGetContextHDR = defaultGetContextHDR;
5947
5965
  exports.initHDRCanvas = initHDRCanvas;
5966
+ exports.resetGetContext = resetGetContext;
5948
5967
  //# sourceMappingURL=hdr-canvas.cjs.map