PHP Classes

File: toastui/src/js/drawingMode/freeDrawing.js

Recommend this page to a friend!
  Classes of Mark de Leon   PHP Document Scanner using SANE or eSCL AirPrint   toastui/src/js/drawingMode/freeDrawing.js   Download  
File: toastui/src/js/drawingMode/freeDrawing.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Document Scanner using SANE or eSCL AirPrint
Web interface to scan printed documents
Author: By
Last change:
Date: 4 years ago
Size: 1,064 bytes
 

Contents

Class file image Download
/** * @author NHN Ent. FE Development Team <dl_javascript@nhn.com> * @fileoverview FreeDrawingMode class */ import DrawingMode from '../interface/drawingMode'; import consts from '../consts'; const {drawingModes} = consts; const components = consts.componentNames; /** * FreeDrawingMode class * @class * @ignore */ class FreeDrawingMode extends DrawingMode { constructor() { super(drawingModes.FREE_DRAWING); } /** * start this drawing mode * @param {Graphics} graphics - Graphics instance * @param {{width: ?number, color: ?string}} [options] - Brush width & color * @override */ start(graphics, options) { const freeDrawing = graphics.getComponent(components.FREE_DRAWING); freeDrawing.start(options); } /** * stop this drawing mode * @param {Graphics} graphics - Graphics instance * @override */ end(graphics) { const freeDrawing = graphics.getComponent(components.FREE_DRAWING); freeDrawing.end(); } } module.exports = FreeDrawingMode;