UNPKG

t-fighting-design

Version:

Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.

2 lines (1 loc) 578 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./index3.js"),l=t=>{const i=document.createElement("canvas"),n=window.devicePixelRatio||1;i.width=t.width*n,i.height=t.height*n,i.style.width=t.width+"px",i.style.height=t.height+"px";const e=i.getContext("2d");return e&&(e.rotate(-8*Math.PI/100),e.font=`${a.sizeChange(t.fontSize)} serif`,e.fillStyle=t.fontColor,e.textAlign="left",e.textBaseline="middle",e.fillText(t.content,t.width/20,t.height)),i.toDataURL("image/png")};exports.createWatermark=l;