跳转到内容
菜单
自动
简体中文
v1 处于长期维护状态,将继续接收兼容性、安全和严重错误修复。查看 v2 当前版本

TextStyle

此内容尚不支持你的语言。

Defined in: index.ts:292

TextStyle for text watermark

textStyle: {
color: '#aacc22',
fontName: 'Arial',
fontSize: 12,
shadowStyle: {
dx: 10,
dy: 10,
radius: 10,
color: '#aacc22'
},
textBackgroundStyle: {
paddingX: 10,
paddingY: 10,
type: TextBackgroundType.stretchX,
color: '#aacc22'
},
underline: true,
skewX: -0.25,
strikeThrough: true,
textAlign: 'left',
italic: true,
bold: true,
rotate: 45
}

optional bold?: boolean

Defined in: index.ts:390

text bold

false
bold: true

optional color?: string

Defined in: index.ts:299

font color

'#000000'
color: '#aacc22'

optional fontName?: string

Defined in: index.ts:305

font name

fontName: 'Arial'

optional fontSize?: number

Defined in: index.ts:311

font size used when rendering text onto the output image

fontSize: 12

optional fontSizeRatio?: number

Defined in: index.ts:317

font size ratio relative to the background image width

fontSizeRatio: 0.03

optional italic?: boolean

Defined in: index.ts:383

text italic

false
italic: true

optional rotate?: number

Defined in: index.ts:397

rotate text

0
rotate: 45

optional shadowStyle?: ShadowLayerStyle | null

Defined in: index.ts:328

text shadow style

shadowStyle: {
dx: 10,
dy: 10,
radius: 10,
color: '#aacc22'
}

optional skewX?: number

Defined in: index.ts:362

Horizontal text shear factor. Use italic for font-provided italics.

skewX: -0.25

optional strikeThrough?: boolean

Defined in: index.ts:369

text strikethrough

false
strikeThrough: true

optional strokeStyle?: TextStrokeStyle | null

Defined in: index.ts:349

Optional outline drawn around the text before the fill. The width is measured in output-image pixels. Set width to 0 to disable it.

strokeStyle: {
color: '#00000099',
width: 2,
}

optional textAlign?: "center" | "left" | "right"

Defined in: index.ts:376

text align

'left'
textAlign: 'left'

optional textBackgroundStyle?: TextBackgroundStyle | null

Defined in: index.ts:339

text background style

textBackgroundStyle: {
paddingX: 10,
paddingY: 10,
type: TextBackgroundType.stretchX,
color: '#aacc22'
}

optional underline?: boolean

Defined in: index.ts:356

text underline style

false
underline: true