1
1
<div align =" center " >
2
2
<a href="https://jimmydaddy.github.io/react-native-image-marker/" title="react native image marker">
3
- <img src="https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /icon.png" alt="react native image marker Logo" width="150" />
3
+ <img src="https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /icon.png" alt="react native image marker Logo" width="150" />
4
4
</a>
5
5
<a href="https://jimmydaddy.github.io/react-native-image-marker/"><h1 style="color: #424E6D">react native image marker</h1></a>
6
6
<h6>Add text or icon watermarks to images</h6>
29
29
* text align
30
30
* padding
31
31
* relative position
32
+ * background border radius
32
33
* Compatible with both Android and iOS
33
34
34
35
## Sample
35
36
36
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/IOSMarker.gif " width =' 150 ' >
37
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset/AndroidMarker.gif " width =' 150 ' >
38
-
37
+ <p >
38
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets/IOSMarker.gif " width =' 150 ' >
39
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets/AndroidMarker.gif " width =' 150 ' >
40
+ </p >
39
41
40
42
## Usage
41
43
53
55
##### Sample
54
56
55
57
56
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /shadow_bg_fit.png " width =' 150 ' >
58
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /shadow_bg_fit.png " width =' 150 ' >
57
59
58
60
59
61
##### Example
@@ -110,7 +112,7 @@ Marker.markText(options);
110
112
##### Sample
111
113
112
114
113
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /shadow_bg_sx.png " width =' 150 ' >
115
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /shadow_bg_sx.png " width =' 150 ' >
114
116
115
117
##### Example
116
118
@@ -165,7 +167,7 @@ Marker.markText(options);
165
167
##### Sample
166
168
167
169
168
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /shadow_bg_sy.png " width =' 150 ' >
170
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /shadow_bg_sy.png " width =' 150 ' >
169
171
170
172
##### Example
171
173
@@ -211,6 +213,71 @@ ImageMarker.markText(options);
211
213
212
214
```
213
215
216
+ #### Text background border radius
217
+
218
+ ##### API
219
+
220
+
221
+ [ TextBackgroundType.cornerRadius] ( https://jimmydaddy.github.io/react-native-image-marker/enums/TextBackgroundType.html#cornerRadius )
222
+
223
+ ##### Sample
224
+
225
+
226
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets/textbgcornerradius.png " width =' 150 ' >
227
+
228
+ ##### Example
229
+
230
+
231
+ ``` typescript
232
+ import Marker , { Position } from " react-native-image-marker"
233
+ ···
234
+ const options = {
235
+ // background image
236
+ backgroundImage: {
237
+ src: require (' ./images/test.jpg' ),
238
+ scale: 1 ,
239
+ },
240
+ watermarkTexts: [{
241
+ text: ' text marker normal' ,
242
+ positionOptions: {
243
+ position: Position .center ,
244
+ },
245
+ style: {
246
+ color: ' #FC0700' ,
247
+ fontSize: 30 ,
248
+ fontName: ' Arial' ,
249
+ shadowStyle: {
250
+ dx: 10 ,
251
+ dy: 10 ,
252
+ radius: 10 ,
253
+ color: ' #008F6D' ,
254
+ },
255
+ textBackgroundStyle: {
256
+ padding: ' 10%' ,
257
+ color: ' #0fA' ,
258
+ cornerRadius: {
259
+ topLeft: {
260
+ x: ' 20%' ,
261
+ y: ' 50%' ,
262
+ },
263
+ topRight: {
264
+ x: ' 20%' ,
265
+ y: ' 50%' ,
266
+ },
267
+ },
268
+ },
269
+ },
270
+ }],
271
+ scale: 1 ,
272
+ quality: 100 ,
273
+ filename: ' test' ,
274
+ saveFormat: ImageFormat .png ,
275
+ maxSize: 1000 ,
276
+ };
277
+ ImageMarker .markText (options );
278
+
279
+ ```
280
+
214
281
#### Text with shadow
215
282
216
283
##### API
@@ -221,7 +288,7 @@ ImageMarker.markText(options);
221
288
##### Sample
222
289
223
290
224
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /shadow.png " width =' 150 ' >
291
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /shadow.png " width =' 150 ' >
225
292
226
293
##### Example
227
294
@@ -273,7 +340,7 @@ Marker.markText(options);
273
340
##### Sample
274
341
275
342
276
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /multipletexts.png " width =' 150 ' >
343
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /multipletexts.png " width =' 150 ' >
277
344
278
345
##### Example
279
346
@@ -326,9 +393,9 @@ Marker.markText({
326
393
327
394
328
395
<p >
329
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /rotatetexts_1.png " width =' 150 ' >
330
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /textswihoutbg.png " width =' 150 ' >
331
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /rotatetexts.png " width =' 150 ' >
396
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /rotatetexts_1.png " width =' 150 ' >
397
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /textswihoutbg.png " width =' 150 ' >
398
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /rotatetexts.png " width =' 150 ' >
332
399
</p >
333
400
334
401
##### Example
@@ -388,7 +455,7 @@ Marker.markText({
388
455
##### Sample
389
456
390
457
391
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /imagewatermark.png " width =' 150 ' >
458
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /imagewatermark.png " width =' 150 ' >
392
459
393
460
##### Example
394
461
@@ -421,7 +488,7 @@ Marker.markImage({
421
488
422
489
423
490
424
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /multiple_icon_markers.png " width =' 150 ' >
491
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /multiple_icon_markers.png " width =' 150 ' >
425
492
426
493
427
494
##### Example
@@ -461,8 +528,8 @@ Marker.markImage({
461
528
462
529
463
530
<p >
464
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /rotatebg.png " width =' 150 ' >
465
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /rotateimageicon.png " width =' 150 ' >
531
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /rotatebg.png " width =' 150 ' >
532
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /rotateimageicon.png " width =' 150 ' >
466
533
</p >
467
534
468
535
##### Example
@@ -540,7 +607,7 @@ Marker.markText({
540
607
##### Sample
541
608
542
609
543
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /rotateicon.png " width =' 150 ' >
610
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /rotateicon.png " width =' 150 ' >
544
611
545
612
##### Example
546
613
@@ -569,7 +636,7 @@ Marker.markImage({
569
636
##### Sample
570
637
571
638
572
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /alphabgonly.png " width =' 150 ' >
639
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /alphabgonly.png " width =' 150 ' >
573
640
574
641
##### Example
575
642
@@ -598,7 +665,7 @@ Marker.markImage({
598
665
##### Sample
599
666
600
667
601
- <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/asset /alphicononly.png " width =' 150 ' >
668
+ <img src =" https://raw.githubusercontent.com/JimmyDaddy/react-native-image-marker/master/assets /alphicononly.png " width =' 150 ' >
602
669
603
670
##### Example
604
671
@@ -686,6 +753,11 @@ This library use [Fresco](https://github.com/facebook/fresco) to decode image on
686
753
If you want to run the example locally, you can do the following:
687
754
688
755
``` bash
756
+
757
+ git clone git@github.com:JimmyDaddy/react-native-image-marker.git
758
+
759
+ cd ./react-native-image-marker
760
+
689
761
# Android
690
762
# Open an android emulator or connect a real device at first
691
763
yarn example android
0 commit comments