I'm learning Android by making an app where a rocket scoots about on
the screen. So far, so good, and the LunarLander sample code has been
a goldmine of useful information.

Here's the problem. When I rotate my rocket (a PNG image with
transparency), it occasionally leaves little pixel "droppings" on the
background. If I use the rocket from LunarLander, no problem. So, that
rules out the code, so I must have something odd about my image. It
started as a 24-bit PNG image, but I scaled it down to an 8-bit PNG
after studying the LunderLander image file. I still have the same
problem, though. So, what's wrong? Is the a special setting I should
use in a program that saves PNGs? Other info is:

1) My rocket is a lot longer than it is wide, unlike the lunar lander
image.
2) The original image was made with anti-aliasing on. Could that have
had an effect when I turned the background color to white?
3) The code basically is (same as in LunarLander):

canvas.save();
canvas.rotate((float)mHeading, (float) mX, (float) mY);
mShipImage.setBounds(xLeft, yTop, xLeft+mShipWidth, yTop+mShipHeight);
mShipImage.draw();
invalidate(xLeft-20, yTop-20, xLeft+mShipWidth+20, yTop+mShipHeight
+20);
canvas.restore();

Any suggestions/solutions welcome. All that's left to getting this
thing running is cleaning up the image redraw.

---Tom



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to