UNPKG

fabric

Version:

Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.

11 lines (10 loc) 379 B
//#region src/gradient/parser/misc.ts function parseType(el) { return el.nodeName === "linearGradient" || el.nodeName === "LINEARGRADIENT" ? "linear" : "radial"; } function parseGradientUnits(el) { return el.getAttribute("gradientUnits") === "userSpaceOnUse" ? "pixels" : "percentage"; } //#endregion export { parseGradientUnits, parseType }; //# sourceMappingURL=misc.mjs.map