Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yisibell/mymark

A canvas watermark builder.
https://github.com/yisibell/mymark

canvas watermark

Last synced: about 1 month ago
JSON representation

A canvas watermark builder.

Awesome Lists containing this project

README

        










# mymark

A canvas watermark builder(水印生成工具)。

- [Release Notes](./CHANGELOG.md).

# Installation

```bash
# yarn
$ yarn add mymark

# npm
$ npm i mymark
```

# Usage

```js
// 导入
import { watermark } from 'mymark'
// 调用, options 参数具体见下表
watermark(options)
```

## 以 `` 标签的方式引用

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>watermark demo</title>
<style>
#app {
height: 95vh;
}
</style>
</head>
<body>
<div id="app">hello watermark!</div>
<script src="./mymark.umd.js">


// MyMark 被暴露到 window
const { watermark } = MyMark

watermark({ content: 'build by elenh' })