ng-canvas-painter =================
ng-canvas-painter
=================
Angular 11+ component to paint on a canvas on desktop or touch devices
After installing the above dependencies, install ng-canvas-painter via:
``shell`
npm install --save ng-canvas-painter
in your app.module.ts`js
import {NgCanvasPainterModule} from 'ng-canvas-painter';@NgModule({
...
imports: [NgCanvasPainterModule]
})
export class AppModule {
...
}
`* Add the
ng-canvas-painter tag to your template`html
(undoLength)="onUndoLengthChanged($event)" (redoLength)="onRedoLengthChanged($event)"
(isEmpty)="onIsEmptyChanged($event)">
`$3
`js
{
clipBounds: { x: 0, y: 0, width: 0, height: 0 } // Set a region that can be drawn on
canvasWidth: 600, // px
canvasHeight: 600, // px
color: '#000',
lineWidth: 10, // px
cacheSize: 10 // boolean or a number of versions to keep in memory
}
`Credits
ng-canvas-painter` is an open-source project.Special thanks to pwambach and their work with the AngularJS directive.
Special thanks to shivs25 and their work work with the Angular 4 directive.