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