A tool that helps extract data from analog map.
GitHub: https://github.com/YujiSODE/dataMappingGuide
Copyright (c) 2018 Yuji SODE <yuji.sode@gmail.com>
This software is released under the MIT License.
See LICENSE or http://opensource.org/licenses/mit-license.php
dataMappingGuide.js
var obj=dataMappingGuide(canvas,src);
This function returns an object with some methods to control.
canvas: a canvas elementsrc: an optional filename or pathname of an image for background
resize(w,h,src); it sets canvas size and background imagesetDivisions(x,y); it sets horizontal and vertical divisionswandh: new values for canvas width and canvas heightsrc: filename or pathname of an image; 'none' is default valuexandy: numbers for horizontal and vertical divisions
setColor(rgb,alpha); it sets rgb color and alpha valuergb: rgb color valuealpha: an optional value between 0.0 (fully transparent) and 1.0 (fully opaque)
xy(x,y); it puts focus on a area that is specified using integer coordinatesxandy: positive integer indices for horizontal and vertical divisions
An example of 3x3 divided focus area:
_|1|2|3|
1|x|x|x|
2|x|x|x|
3|x|x|x|