0

I have a large image draw by canvas and I want to know when canvas finishes drawing.

TechySharnav
  • 4,869
  • 2
  • 11
  • 29
Yansen
  • 3
  • 1

1 Answers1

0

canvas drawing in synchronous so when you draw like this

 canvas.getContext('2d').fillRect(25, 25, 100, 100);

the next line get excuted when the drawing is finished so you can do what you wanted to do after drawing like this

canvas.getContext('2d').fillRect(25, 25, 100, 100);
//draw finished do something
Sarkar
  • 1,225
  • 7
  • 21