All files / gameFiles/backend StrokeData.js

0% Statements 0/19
100% Branches 1/1
100% Functions 1/1
0% Lines 0/19

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21                                         
 
/**
 * This class represents all data associated to an indiviudal stroke drawn on the canvas
 */
class StrokeData{
    /**
     * Creates an instance of a StrokeData object to store data of individual drawing strokes on the canvas
     * 
     * @param {number} xCoord The X-coordinate of the drawing position on the canvas
     * @param {number} yCoord The Y-coordinate of the drawing position on the canvas
     * @param {string} color The selected color at the time of creation of StrokeData object
     * @param {number} size The size of the drawing used for proper scaling of the drawing
     */
    constructor(xCoord, yCoord, color, size){
        this.xCoord = xCoord;
        this.yCoord = yCoord;
        this.color = color;
        this.size = size;
    }
}