Skip to content
自定义背景水印
Branch: master
Clone or download
2207345508 Update README.md
修正: usage
Latest commit aced8cf May 11, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__ 上传水印背景插件 May 9, 2017
android
ios 上传水印背景插件 May 9, 2017
.babelrc
.buckconfig
.flowconfig
.gitattributes 上传水印背景插件 May 9, 2017
.gitignore
.watchmanconfig
README.md
SvgText.js 上传水印背景插件 May 9, 2017
WaterMark.js 上传水印背景插件 May 9, 2017
app.json
index.android.js 上传水印背景插件 May 9, 2017
package.json README 公有化 May 11, 2017

README.md

react-native-textwatermark

自定义文字水印,(ios / android)

Install

npm install react-native-textwatermark

Usage

import React, { Component } from 'react';
import  {WaterMark , getWatermark} from 'react-native-textwatermark'

export default class ExampleComponent extends Component {
  constructor(props, context) {
    super(props, context);
  }
  
  render() {
    return (
      <WaterMark
      text = {'hello world'}
      />
     );
  }
};

Container Style

 <WaterMark
        text = {'hello world'}
        canvasWid:  width ,                                                          //水印画布的宽度
        canvasHei:  height,                                                          //水印画布的高度
        rotate:     "335",                                                           //文字旋转角度
        txtSpace:   50,                                                              //水印文字之间的行间距
        txtLines:   Platform.OS ==='ios' ?3 :4,                                      //水印的列数
        txtOriginY: 0,                                                               //文字距离画布上边界的距离
        txtFont:    13,                                                              //水印字体大小
        txtColor:   "rgba(217,217,217,0.5)",                                         //水印字体颜色
      />
You can’t perform that action at this time.