View the section of Android code given below:
public void draw(Canvas canvas) {
Rect destRect = new Rect(getX(), getY(), getX() + spriteWidth, getY() + spriteHeight);
canvas.drawBitmap(bitmap, sourceRect, destRect, null);
canvas.drawBitmap(bitmap, 20, 150, null);
Paint Paint = new Paint();
paint.setARGB(50, 0, 255, 0);
canvas.drawRect(20 + (currentFrame * destRect.width()), 150, 20 + (currentFrame *destRect.width()) +destRect.width(), 150 + destRect.height(), paint);
The code is executed using eclipse. What does the above code do?
Correct Answer:
It displays a frame at the coordinates (20, 150) and creates a new paint object so we can paint over the current frame on the original image.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Android Game Development MCQ Questions