aquamark
v1.0.2
Published
Aquamark.js is a watermark util based on canvas & typescript
Downloads
4
Maintainers
Readme
Installation
Install using CDN
<script src="https://unpkg.com/browse/aquamark/dist/index.iife.js"></script>
Install using npm
$ npm install aquamark
Basic Usage
In Browser
<script src="https://unpkg.com/browse/aquamark/dist/index.iife.js"></script>
<script>
const aquamark = new Aquamark(/** props */)
aquamark.init()
</script>
In webpack
or vite
etc;
import Aquamark from "aquamark"
const aquamark = new Aquamark(/** props */)
aquamark.init()
Props
| name | type | description | required | default |
| ------- | ------------------- | ----------------- | -------- | ------------- |
| content | string
| watermark content | false
| 'auqamark.js' |
| rotate | number
( -180~180) | content rotate | false
| -22 |
| font | AuqamarkFont
| font-related | false
| |
| top | number
| | false
| 0 |
| left | number
| | false
| 0 |
| zIndex | number
| z-index | false
| 0 |
AquamarkFont
| name | type | description | required | default |
| ---------- | --------------------------------------------------- | ----------------- | -------- | ------------------ |
| color | string
| font color | false
| rgba(0, 0, 0, .15) |
| fontSize | number
| text size | false
| 22 |
| fontWeight | 'normal'
, 'light'
, 'weight'
, number
| text weight | false
| 'normal' |
| fontFamily | string
| text font-famlily | false
| 'normal' |
| textAlign | 'start'
, 'end'
, 'left'
, 'right'
, 'center'
| text align | false
| 'center' |
Methods
| name | description | parameters | | ---- | ----------------- | ---------- | | init | watermark initial | - |
License
Aquamark licensed on MIT LICENSE. ©2024-present Yev Wang