Hover-state of the individual areas of canvas


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
3 views
Hello! There is a problem of implementation of the hover-state of the individual areas of canvas.
Suppose that on canvas 40x80 two squares 40 pixels. To understand what to highlight (when you assign a mousemove handler) problem is the problem is to modify (e.g. darken) the area is only 1 time, and when the pointer left the necessary space to return the original region. I apologize if the question is stupid — I'm just a master of canvas. Thanks in advance for the advice.
by | 3 views

1 Answer

0 like 0 dislike
depends on how You work with him.
1) if what is drawn is unknown, the tag is the method .toDataURL() — to bas64, i.e. you can save what is now drawn in png24 and then return back (can be on the timer with the transparency of this image to overlay);
2) you can impose on each other a few canvas tags if background: transparent dynamics can be displayed on it;
3) if there is any sequence of commands to "paint", then just clear the canvas and her vosproizvesti.
and, judging by the "two squares 40 pixels", for You a third option: memorize what and where it is necessary to withdraw and no problems at all.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked May 21, 2019 by danyvasnafig
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
28,014 users