Skip to content
Menu
Auto
English
v1 is in long-term maintenance and continues to receive compatibility, security, and critical bug fixes. See the v2.

TextOptions

Defined in: index.ts:564

Text options for text watermark

text: 'hello world',
position: {
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,
skewX: -0.25,
strikeThrough: true,
textAlign: 'left',
italic: true,
bold: true,
rotate: 45
}

optional alpha?: number

Defined in: index.ts:579

Opacity applied to the complete text layer, including its fill, outline, shadow, and background.

1
alpha: 0.65

optional blendMode?: BlendMode

Defined in: index.ts:584

How this text layer is composited with the pixels already on the canvas.

'normal'

optional layout?: WatermarkLayout

Defined in: index.ts:615

Render this watermark once or repeat it across the image. Tiled layouts cannot be combined with position or the deprecated positionOptions.

{ type: 'single' }


optional position?: PositionOptions

Defined in: index.ts:608

text position options

position: {
X: 10,
Y: 10,
// or
// position: Position.center
}

optional positionOptions?: PositionOptions

Defined in: index.ts:596

positionOptions: {
X: 10,
Y: 10,
// or
// position: Position.center
}

optional style?: TextStyle

Defined in: index.ts:646

text style

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: -0.25,
bold: true,
rotate: 45
}

text: string

Defined in: index.ts:570

text content

text: 'hello world'