From e3d84117c9edd78ca4d07de5676d5595ed109378 Mon Sep 17 00:00:00 2001 From: hustcc Date: Fri, 12 May 2017 19:54:34 +0800 Subject: [PATCH] update README --- README.md | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 6f736a1..9a8dca5 100644 --- a/README.md +++ b/README.md @@ -32,21 +32,17 @@ alimask('王小为(小为) 888888', { color: 'green' }); # 2. API -The unique API is: **alimask(ext, options)**. - -width: 250, - height: 80, - color: '#ebebeb', - fillColor: 'white', - font: '10px Arial' - - - **width** (Number): default is `250`. - - **height** (Number): default is `80` - - **color** (String): the text color, default is `#ebebeb`. - - **fillColor** (String): the background color, default is `white`. - - **font** (String): the text font style, default is `10px Arial`. - -The api return **the base64 string of water mask image**. +The unique API is: **alimask(text, options)**. + + - **text** (String): required, the text in the watermark image. + - **options** (Object): optional, the options of watermark, with keys below: + - **width** (Number): default is `250`. + - **height** (Number): default is `80` + - **color** (String): the text color, default is `#ebebeb`. + - **fillColor** (String): the background color, default is `white`. + - **font** (String): the text font style, default is `10px Arial`. + +The api return **the base64 string of watermark image** which can be used in css background / img tag. # 3. Build & Test