ImageWatermarkLayer
此内容尚不支持你的语言。
Defined in: index.ts:1028
Options for one image watermark layer.
Example
Section titled “Example”src: require('./images/logo.png'), scale: 0.5, rotate: 45, alpha: 0.5 position: { X: 10, Y: 10, // or // position: Position.center}Extends
Section titled “Extends”Properties
Section titled “Properties”alpha?
Section titled “alpha?”
optionalalpha?:number
Defined in: index.ts:834
Image opacity from 0 (transparent) to 1 (opaque).
Default Value
Section titled “Default Value”1Example
Section titled “Example”alpha: 0.5Inherited from
Section titled “Inherited from”blendMode?
Section titled “blendMode?”
optionalblendMode?:BlendMode
Defined in: index.ts:857
How this watermark image is composited with the pixels already on the canvas. Background images intentionally do not expose this option.
Default Value
Section titled “Default Value”'normal'Inherited from
Section titled “Inherited from”WatermarkImageOptions.blendMode
layout?
Section titled “layout?”
optionallayout?:WatermarkLayout
Defined in: index.ts:864
Render this watermark once or repeat it across the image. Tiled layouts
cannot be combined with position.
Default Value
Section titled “Default Value”{ type: 'single' }
Inherited from
Section titled “Inherited from”position?
Section titled “position?”
optionalposition?:PositionOptions
Defined in: index.ts:858
Inherited from
Section titled “Inherited from”WatermarkImageOptions.position
rotate?
Section titled “rotate?”
optionalrotate?:number
Defined in: index.ts:827
rotate image rotate 0-360
Default Value
Section titled “Default Value”0Example
Section titled “Example”rotate: 45Inherited from
Section titled “Inherited from”scale?
Section titled “scale?”
optionalscale?:number
Defined in: index.ts:820
image scale >0
Default Value
Section titled “Default Value”1Example
Section titled “Example”scale: 1Inherited from
Section titled “Inherited from”src:
any
Defined in: index.ts:813
Image source. Supports React Native image sources and base64 data URLs.
Example
Section titled “Example”src: require('./images/logo.png')Inherited from
Section titled “Inherited from”trimTransparentPadding?
Section titled “trimTransparentPadding?”
optionaltrimTransparentPadding?:boolean
Defined in: index.ts:870
Remove fully transparent outer rows and columns before scaling, rotating, and positioning the watermark.
Default Value
Section titled “Default Value”falseInherited from
Section titled “Inherited from”WatermarkImageOptions.trimTransparentPadding
type:
"image"
Defined in: index.ts:1029