Interface TextMarkOptions

Description

Options for text watermark

Example

backgroundImage: {
src: require('./images/logo.png'),
scale: 0.5,
rotate: 45,
alpha: 0.5
},
watermarkTexts: [
{
text: 'hello world',
positionOptions: {
X: 10,
Y: 10,
// or
// position: Position.center
},
style: {
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,
strikeThrough: true,
textAlign: 'left',
italic: true,
//or
// skewX: 45,
bold: true,
rotate: 45
}
}],
quality: 1,
filename: 'test',
saveFormat: ImageFormat.jpg,

Hierarchy

  • TextMarkOptions

Properties

backgroundImage: ImageOptions

FIXME: ImageSourcePropType type define bug

Description

background image options

Example

backgroundImage: {
src: require('./images/logo.png'),
scale: 0.5,
rotate: 45,
alpha: 0.5
}
filename?: string

Description

save image name

Example

filename: 'test'
maxSize?: number

Deprecated

since 1.2.0

Description

max image size see #49 #42 android only need RN version >= 0.60.0, fresco MaxBitmapSize ImagePipelineConfig.Builder.experiment().setMaxBitmapSize(), see #49

Default Value

2048

Example

maxSize: 2048
quality?: number

Description

image quality 0-100, 100 is best quality. If you want the quality to have more effect, try to set the image export format to the compressible format jpg. see #159

Default Value

100

Example

quality: 100
saveFormat?: ImageFormat

Description

save image format

Default Value

jpg

Example

saveFormat: ImageFormat.png
watermarkTexts: TextOptions[]

Description

text options

Example

watermarkTexts: [
{
text: 'hello world',
positionOptions: {
X: 10,
Y: 10,
// or
// position: Position.center
},
style: {
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,
strikeThrough: true,
textAlign: 'left',
italic: true,
//or
// skewX: 45,
bold: true,
rotate: 45
}
}]

Generated using TypeDoc