html2canvas-pro
Version:
Screenshots with JavaScript. Next generation!
34 lines • 1.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.imageRendering = exports.IMAGE_RENDERING = void 0;
var IMAGE_RENDERING;
(function (IMAGE_RENDERING) {
IMAGE_RENDERING[IMAGE_RENDERING["AUTO"] = 0] = "AUTO";
IMAGE_RENDERING[IMAGE_RENDERING["CRISP_EDGES"] = 1] = "CRISP_EDGES";
IMAGE_RENDERING[IMAGE_RENDERING["PIXELATED"] = 2] = "PIXELATED";
IMAGE_RENDERING[IMAGE_RENDERING["SMOOTH"] = 3] = "SMOOTH";
})(IMAGE_RENDERING || (exports.IMAGE_RENDERING = IMAGE_RENDERING = {}));
exports.imageRendering = {
name: 'image-rendering',
initialValue: 'auto',
prefix: false,
type: 2 /* PropertyDescriptorParsingType.IDENT_VALUE */,
parse: (_context, value) => {
switch (value.toLowerCase()) {
case 'crisp-edges':
case '-webkit-crisp-edges':
case '-moz-crisp-edges':
return IMAGE_RENDERING.CRISP_EDGES;
case 'pixelated':
case '-webkit-optimize-contrast':
return IMAGE_RENDERING.PIXELATED;
case 'smooth':
case 'high-quality':
return IMAGE_RENDERING.SMOOTH;
case 'auto':
default:
return IMAGE_RENDERING.AUTO;
}
}
};
//# sourceMappingURL=image-rendering.js.map