Hi,

I can hardly understanding why LunarLander save the Canvas and restore
it after rotating the Canvas to simulate the rotation of the rocket.
I commented the 2 lines out and reinstall the apk, but I found nothing
changed.
Could anybody kindly help me understanding what 'matrix' and 'clip'
are saved to the stack here as the SDK document dipicts?

            // canvas.save();
            canvas.rotate((float) mHeading, (float) mX, mCanvasHeight
                    - (float) mY);
            if (mMode == STATE_LOSE) {
                mCrashedImage.setBounds(xLeft, yTop, xLeft +
mLanderWidth, yTop
                        + mLanderHeight);
                mCrashedImage.draw(canvas);
            } else if (mEngineFiring) {
                mFiringImage.setBounds(xLeft, yTop, xLeft +
mLanderWidth, yTop
                        + mLanderHeight);
                mFiringImage.draw(canvas);
            } else {
                mLanderImage.setBounds(xLeft, yTop, xLeft +
mLanderWidth, yTop
                        + mLanderHeight);
                mLanderImage.draw(canvas);
            }
            // canvas.restore();

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to