My first question is:
Is g.setClip time consuming?
in my canvas, I draw many sprites using:
for(…) {
g.setClip(x, y, imgW,imgH);
g.drawImage(myImage, imgX, imgY, MY_FLAGS);
g.setClip(0, 0, screenWidth, screenHeight);
}
I’d like to know the purpose of a call to:
g.setClip(0, 0, screenWidth, screenHeight);
Is it to flag the part of the screen to refresh?
Can call it only one time after all my sprites are drawn?
Or do i have to call it for each sprite?
Franck