TextStyle
此内容尚不支持你的语言。
Defined in: index.ts:221
TextStyle for text watermark
Example
Section titled “Example”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 }Properties
Section titled “Properties”
optionalbold?:boolean
Defined in: index.ts:309
text bold
Default Value
Section titled “Default Value”falseExample
Section titled “Example”bold: truecolor?
Section titled “color?”
optionalcolor?:string
Defined in: index.ts:228
font color
Default Value
Section titled “Default Value”'#000000'Example
Section titled “Example”color: '#aacc22'fontName?
Section titled “fontName?”
optionalfontName?:string
Defined in: index.ts:234
font name
Example
Section titled “Example”fontName: 'Arial'fontSize?
Section titled “fontSize?”
optionalfontSize?:number
Defined in: index.ts:240
font size used when rendering text onto the output image
Example
Section titled “Example”fontSize: 12fontSizeRatio?
Section titled “fontSizeRatio?”
optionalfontSizeRatio?:number
Defined in: index.ts:246
font size ratio relative to the background image width
Example
Section titled “Example”fontSizeRatio: 0.03italic?
Section titled “italic?”
optionalitalic?:boolean
Defined in: index.ts:302
text italic
Default Value
Section titled “Default Value”falseExample
Section titled “Example”italic: truerotate?
Section titled “rotate?”
optionalrotate?:number
Defined in: index.ts:316
rotate text
Default Value
Section titled “Default Value”0Example
Section titled “Example”rotate: 45shadowStyle?
Section titled “shadowStyle?”
optionalshadowStyle?:ShadowLayerStyle|null
Defined in: index.ts:257
text shadow style
Example
Section titled “Example”shadowStyle: { dx: 10, dy: 10, radius: 10, color: '#aacc22' }skewX?
Section titled “skewX?”
optionalskewX?:number
Defined in: index.ts:281
Horizontal text shear factor. Use italic for font-provided italics.
Example
Section titled “Example”skewX: -0.25strikeThrough?
Section titled “strikeThrough?”
optionalstrikeThrough?:boolean
Defined in: index.ts:288
text strikethrough
Default Value
Section titled “Default Value”falseExample
Section titled “Example”strikeThrough: truetextAlign?
Section titled “textAlign?”
optionaltextAlign?:"center"|"left"|"right"
Defined in: index.ts:295
text align
Default Value
Section titled “Default Value”'left'Example
Section titled “Example”textAlign: 'left'textBackgroundStyle?
Section titled “textBackgroundStyle?”
optionaltextBackgroundStyle?:TextBackgroundStyle|null
Defined in: index.ts:268
text background style
Example
Section titled “Example”textBackgroundStyle: { paddingX: 10, paddingY: 10, type: TextBackgroundType.stretchX, color: '#aacc22' }underline?
Section titled “underline?”
optionalunderline?:boolean
Defined in: index.ts:275
text underline style
Default Value
Section titled “Default Value”falseExample
Section titled “Example”underline: true