Animation Example
The animation demo for this section is one in which a background, a clear night’s sky, is invaded by a flying saucer that bounces about, probably looking for someone to abduct. The program is actually quite simple—in fact, much simpler than the Win32 version, which involved using a series of BitBlt() and masking operations to achieve transparency.
Note
The Win32 Version of the application is still around and compiled under VCL.NET. You’ll find it under the CD directory:
\Code\Chapter 07\AnimateVCL
First, let’s look at the class that contains the sprite, the flying saucer. This is shown in Listing 7.22.
Listing 7.22. Declaration of the Sprite
1: type 2: 3: TSpriteDirection = (sdLeft, sdRight, sdUp, sdDown); 4: TSpriteDirections ... |
Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.