Special effects world - line gradient

zhaozj2021-02-08  225

Although the line gradient is not as delicate, smooth, but it can bring another feeling. If you have seen the Quick Tour from AutoCAD R14, you will know that the line gradient is actually more charm than fade.

The line gradient is actually an alternative to achieving full-screen fade in high color mode, as it does not need to directly access frame caches, but use BlI operations that are accelerated by the display hardware. In DirectDraw, any function, as long as one involves hardware acceleration, its speed cannot be measured only to measure only several times the software simulation speed, because the speed of the hardware is often several times, even hundreds of times. Although, for the developer, you must take into account the various situations supported by the user's hardware, but you don't have to worry about whether Bli is hardware, Because it and the change page as a top graphics operation, it is went to almost all brands of graphics cards.

The line gradient is in the implementation process, and it is not as complex as the previous routines, you only need to call the Blit function on the DirectDrawSurface interface to call each pixel line BLIT on the main page. Of course, each blit pixel line is randomly generated, so that the dynamic effect can be produced. But it should be noted that you need to have a logic to control these random numbers, allowing them to be different each time. Finally, because the line gradient speed is very fast, you must be controlled, otherwise it will only pass on your screen.

Download linefade.zip (200k)

Lao Wang 1999-2-23

转载请注明原文地址:https://www.9cbs.com/read-1294.html

New Post(0)