Interface TextBackgroundStyle

Description

background style for text watermark

thanks @onka13 for #38

Example

textBackgroundStyle: {
paddingX: 10,
paddingY: 10,
type: TextBackgroundType.stretchX,
color: '#aacc22'
}
// or
textBackgroundStyle: {
padding: '10% 50 15%',
color: '#aacc22'
}
// or
textBackgroundStyle: {
padding: 10,
color: '#aacc22',
cornerRadius: {
topLeft: {
x: '10%',
y: 10,
},
topRight: {
x: 10,
y: 10,
},
}
}

Hierarchy

  • Padding
    • TextBackgroundStyle

Properties

color: string

Description

background color

Example

color: '#aacc22'
cornerRadius?: CornerRadius

Description

background corner radius

Example

cornerRadius: {
topLeft: {
x: '10%',
y: 10,
},
topRight: {
x: 10,
y: 10,
},
bottomLeft: {
x: 10,
y: 10,
},
bottomRight: {
x: '10%',
y: 10,
},
}
padding?: string | number

Description

padding for text background

Example

padding: 10
// or
padding: '10%'
// or
padding: '10% 20%'
// or
padding: '10% 20% 30%'
// or
padding: '10% 20% 30% 40%'
// or
padding: '10 20% 30 40%'
// or
padding: '10 20 30'
paddingBottom?: string | number

Description

padding bottom for text background

Example

paddingBottom: 10
// or
paddingBottom: '10%'
paddingHorizontal?: string | number

Description

padding left and right (horizontal) for text background

Example

paddingHorizontal: 10
// or
paddingHorizontal: '10%'

Since

2.0.0

paddingLeft?: string | number

Description

padding left for text background

Example

paddingLeft: 10
// or
paddingLeft: '10%'
paddingRight?: string | number

Description

padding top for text background

Example

paddingTop: 10
// or
paddingTop: '10%'
paddingTop?: string | number

Description

padding right for text background

Example

paddingRight: 10
// or
paddingRight: '10%'
paddingVertical?: string | number

Description

padding top and bottom (vertical) for text background

Example

paddingVertical: 10
// or
paddingVertical: '10%'

Since

2.0.0

paddingX?: string | number

Description

padding x, alias of paddingHorizontal

Example

paddingX: 10
// or
paddingX: '10%'
paddingY?: string | number

Description

padding y, alias of paddingVertical

Example

paddingY: 10
// or
paddingY: '10%'
type?: null | TextBackgroundType

Description

background type

Default Value

TextBackgroundType.stretchX

Example

type: TextBackgroundType.stretchX

Generated using TypeDoc