leaferjs / leafer-ui

一款好用的 Canvas 渲染引擎,革新的体验。高效绘图 、UI 交互(小游戏、互动应用、组态)、图形编辑,前端开发必备~
https://www.leaferjs.com
MIT License
2.38k stars 82 forks source link

径向渐变会翻转元素 #94

Open QmagicianEX opened 7 months ago

QmagicianEX commented 7 months ago

// 添加文字 addText() { const text = new Text({ editable: true, x: 100, y: 100, width: 290, height: 50, text: this.defaultText, fontFamily: 'system-ui',//'Microsoft YaHei', italic: false, textDecoration: 'none', fontSize: 48, fontWeight: 400, lineHeight: { type: 'percent', value: 150, // 150% }, letterSpacing: 0, fill: { "type": "radial", "stops": [ { "offset": 0, "color": "rgb(68, 71, 119)" }, { "offset": 1, "color": "rgb(0, 0, 255)" } ] }, padding: [0, 0, 0, 0], textAlign: 'left', verticalAlign: 'top', textWrap: 'normal', textOverflow: 'show', stroke: 'black', strokeAlign: 'outside', strokeWidth: 0, strokeCap: 'none', strokeJoin: 'miter' }) this.app.tree.add(text) this.app.editor.target = text }

leaferjs commented 7 months ago

收到,谢谢反馈~