0.3.1 • Published 1 year ago
peintre v0.3.1
Peintre
A lightweight configurable Vue3 canvas painter component.
Feature
- Multi Layer √
- Change Tool Color&Size √
- Rectangle、Circle,etc Tool √
- Pressure Support √
- Mobile Touch Support √
- Switch Layer with Dragging √
- Change Tool Size with Scroll Event √
- Redo Support √
Live Demo
Installation
With npm
npm i -S peintre
Usage
import {Painter} from "peintre"
<Painter :pressure="false" :width="800" :height="600" :maxLine="500" :minLine="1"></Painter>
Props
Attribute | Description | Type | Default |
---|---|---|---|
width | canvas width | number | 800 |
height | canvas height | number | 600 |
maxLine | max context linewidth | number | 500 |
minLine | min context linewidth | number | 1 |
pressure | whether support pressure or not | boolean | false |
lang | Language | string | "zh" | "en" |