Interface TextStyle

Description

TextStyle for text watermark

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: 45,
strikeThrough: true,
textAlign: 'left',
italic: true,
bold: true,
rotate: 45
}

Hierarchy

  • TextStyle

Properties

bold?: boolean

Description

text bold

Default Value

false

Example

bold: true
color?: string

Description

font color

Example

color: '#aacc22'
fontName?: string

Description

font name

Example

fontName: 'Arial'
fontSize?: number

Description

font size, Android use sp, iOS use pt

Example

fontSize: 12
italic?: boolean

Description

text italic

Default Value

false

Example

italic: true
rotate?: number

Description

rotate text

Default Value

0

Example

rotate: 45
shadowStyle?: null | ShadowLayerStyle

Description

text shadow style

Example

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

Description

css italic with degree, you can use italic instead

Example

skewX: 45
strikeThrough?: boolean

Description

text stroke

Default Value

false

Example

strikeThrough: true
textAlign?: "left" | "center" | "right"

Description

text align

Default Value

'left'

Example

textAlign: 'left'
textBackgroundStyle?: null | TextBackgroundStyle

Description

text background style

Example

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

Description

text underline style

Default Value

false

Example

underline: true

Generated using TypeDoc