Intel Animation for Java* Package TutorialLesson 7: Using Text and SpritesThis applet shows text in sprites. To make a sprite with text, create an awt.Image and draw the text. Then make a SingleImage from the awt.Image and create the sprite as usual. This is described in more detail below. 1. Create an awt.Image and draw the text
2. Create a SingleImage
3. Set the transparency color of the SingleImage
4. Create the sprite
5. Assign the SingleImage to the sprite
6. Assign the sprite to a surface
7. Position the sprite on the surface
8. Draw the sprite on the screen
This applet sets the transparency color to the color of the first pixel in the awt.Image. See the source code for more details.
This page was last updated on Feb 11th, 1997.
|