File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 99- ` dataMappingGuide.js `
1010
1111## 2. Synopsis
12+ ` var obj=dataMappingGuide(canvas,src); `
13+ This function returns an object with some methods to control.
14+
15+ ### Parameters
16+ - ` canvas ` : a canvas element
17+ - ` src ` : an optional filename or pathname of an image for background
18+
19+ ### Main methods
20+ #### 1) resizing and background
21+ - ` resize(w,h,src) ` ; it sets canvas size and background image
22+ - ` setDivisions(x,y) ` ; it sets horizontal and vertical divisions
23+ - ` w ` and ` h ` : new values for canvas width and canvas height
24+ - ` src ` : filename or pathname of an image; 'none' is default value
25+ - ` x ` and ` y ` : numbers for horizontal and vertical divisions
26+
27+ #### 2) colors
28+ - ` setColor(rgb,alpha) ` ; it sets rgb color and alpha value
29+ - ` rgb ` : rgb color value
30+ - ` alpha ` : an optional value between 0.0 (fully transparent) and 1.0 (fully opaque)
31+
32+ #### 3) focus area
33+ - ` xy(x,y) ` ; it puts focus on a area that is specified using integer coordinates
34+ - ` x ` and ` y ` : positive integer indices for horizontal and vertical divisions
35+
36+ #### Focus area indices
37+ An example of 3x3 divided focus area:
38+ _|1|2|3|
39+ 1|x|x|x|
40+ 2|x|x|x|
41+ 3|x|x|x|
42+
You can’t perform that action at this time.
0 commit comments