fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
3 lines (2 loc) • 1.2 kB
JavaScript
import{objectSpread2 as t,defineProperty as e}from"../_virtual/_rollupPluginBabelHelpers.min.mjs";class i{constructor(){e(this,"browserShadowBlurConstant",1),e(this,"DPI",96),e(this,"devicePixelRatio","undefined"!=typeof window?window.devicePixelRatio:1),e(this,"perfLimitSizeTotal",2097152),e(this,"maxCacheSideLimit",4096),e(this,"minCacheSideLimit",256),e(this,"disableStyleCopyPaste",!1),e(this,"enableGLFiltering",!0),e(this,"textureSize",4096),e(this,"forceGLPutImageData",!1),e(this,"cachesBoundsOfCurve",!1),e(this,"fontPaths",{}),e(this,"NUM_FRACTION_DIGITS",4)}}class s extends i{constructor(t){super(),this.configure(t)}configure(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this,t)}addFonts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.fontPaths=t(t({},this.fontPaths),e)}removeFonts(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{delete this.fontPaths[t]}))}clearFonts(){this.fontPaths={}}restoreDefaults(t){const e=new i,s=(null==t?void 0:t.reduce(((t,i)=>(t[i]=e[i],t)),{}))||e;this.configure(s)}}const o=new s;export{s as Configuration,o as config};
//# sourceMappingURL=config.min.mjs.map