@@ -5,7 +5,15 @@ Add text or icon watermark to your images
55## sample
66
77<figure >
8- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/IOSMarker.gif " width =' 300 ' ><img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/AndroidMarker.gif " width =' 300 ' >
8+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/IOSMarker.gif " width =' 300 ' >
9+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/AndroidMarker.gif " width =' 300 ' >
10+ </figure >
11+
12+ <figure >
13+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/shadow_bg_fit.png " width =' 300 ' >
14+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/shadow_bg_sx.png " width =' 300 ' >
15+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/shadow.png " width =' 300 ' >
16+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/shadow_bg_sy.png " width =' 300 ' >
917</figure >
1018
1119## Installation
@@ -44,6 +52,7 @@ pod 'RNImageMarker', :path => '../node_modules/react-native-image-marker'
4452| ` scale ` | scale image |
4553| ` quality ` | image qulaity |
4654| ` filename ` | set filename for the result |
55+ | ` textBackgroundStyle ` | text background style |
4756
4857* ` ImageMarkOption `
4958
@@ -68,6 +77,19 @@ pod 'RNImageMarker', :path => '../node_modules/react-native-image-marker'
6877| ` dy ` | y offset|
6978| ` color ` | shadow color |
7079
80+ * ` textBackgroundStyle `
81+
82+ 'paddingX': number,
83+ 'paddingY': number,
84+ 'type': TextBackgroundType,
85+ 'color': string
86+ | name| description|
87+ | --| --|
88+ | ` paddingX ` | padding X |
89+ | ` paddingY ` | padding y|
90+ | ` type ` | default is fit the text, ` stretchX ` stretch to fill width, ` stretchY ` stretch to fill height |
91+ | ` color ` | bg color |
92+
7193## Usage
7294
7395``` javascript
@@ -86,14 +108,20 @@ import ImageMarker from "react-native-image-marker"
86108 X : 30 ,
87109 Y : 30 ,
88110 color: ' #FF0000' ,
89- fontName: ' Arial-BoldItalicMT' ,
90- fontSize: 44 ,
111+ fontName: ' Arial-BoldItalicMT' ,
112+ fontSize: 44 ,
91113 shadowStyle: {
92114 dx: 10.5 ,
93115 dy: 20.8 ,
94116 radius: 20.9 ,
95117 color: ' #ff00ff'
96118 },
119+ textBackgroundStyle: {
120+ type: ' stretchX' ,
121+ paddingX: 10 ,
122+ paddingY: 10 ,
123+ color: ' #0f0'
124+ },
97125 scale: 1 ,
98126 quality: 100
99127 }).then ((res ) => {
0 commit comments