UNPKG

@haxtheweb/haxcms-nodejs

Version:

HAXcms single and multisite nodejs server, api, and administration

1 lines 660 B
import{HachureFiller as e}from"./hachure-filler.js";import{ZigZagFiller as r}from"./zigzag-filler.js";import{HatchFiller as i}from"./hatch-filler.js";import{DotFiller as a}from"./dot-filler.js";import{DashedFiller as l}from"./dashed-filler.js";import{ZigZagLineFiller as t}from"./zigzag-line-filler.js";const o={};export function getFiller(s,f){let c=s.fillStyle||"hachure";if(!o[c])switch(c){case"zigzag":o[c]||(o[c]=new r(f));break;case"cross-hatch":o[c]||(o[c]=new i(f));break;case"dots":o[c]||(o[c]=new a(f));break;case"dashed":o[c]||(o[c]=new l(f));break;case"zigzag-line":o[c]||(o[c]=new t(f));break;default:c="hachure",o[c]||(o[c]=new e(f))}return o[c]}