Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc committed May 12, 2017
1 parent 1287f76 commit e3d8411
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e3d8411

Please sign in to comment.