Skip to content

文本填充设置渐变填充有问题,线性填充没问题 #898

Description

@FZliweiliang

// #创建 Text [标准创建 (Leafer)]
import { Leafer, Text } from 'leafer-ui'

const leafer = new Leafer({ view: window })

const text = new Text({
text: 'Welcome to LeaferJS',
"fill": {
"type": "radial",
"stops": [
{
"offset": 0,
"color": "#ffffff"
},
{
"offset": 1,
"color": "#105ef5"
}
],
"from": "center",
"to": "bottom"
},
})

const text2 = new Text({
x:200,
y:200,
text: 'Welcome to LeaferJS',
"fill": {
"type": "radial",
"stops": [
{
"offset": 0,
"color": "#ffffff"
},
{
"offset": 1,
"color": "#105ef5"
}
],
"from": "center",
"to": "bottom"
},
})

leafer.add(text)
leafer.add(text2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions