Animation foundation snow fluttering

zhaozj2021-02-16  54

Animation foundation snow fluttering

Name: Yang Hua, Liaison Tel: 13844144016, E-mail: Codehunter@sohu.com, Communication Address: Changchun Renmin Street Jilin University Nanling Campus Management School 9883, Zip code: 130024. About the author: I am a large four Corigo, a large number of management information systems of Jilin University, and like it. I am willing to release the article on the website.

Summary: This article discusses the GDI-based animation programming under Windows in this article. Through this study, readers should have basic understandings for GDI animation programming, and can develop some simple animations.

Key words: animation, GDI, VCL, C Builder programming.

Easy: It is easy.

I want everyone to be very interested in animation programming. Who doesn't want to have a game to play, then the author will discuss the basic issue of animated programming with everyone. This article is intended to guide readers to conduct further research in a simple and clear example. Here, I will use a snowy animation as an example and compile it in Windows ME and C Builder 5, if you want to get the electronic version of this article and its source code, please go to http: // Download on the Codehunter.1yes.net website, or visit the "Computer Programming and Maintenance" magazine website http://www.comprg.com.cn. Come on ...

One. The basic knowledge of animations so called animation also makes an image "live" process. Using animations can clearly exhibit an event, or show a live-alive screen. Animation is made of animation objects and background. An animated object refers to an image that can be moved around the screen. It is a collection of entire bitmaps that can move on the video screen. When we write a movie program, it is mainly to process animated objects in real time. Animated object is the core part of the entire process, an animated object may be a point, an object, an animal, a person, or a natural scene, and our instance is a natural scene (standing in the snow in the snow. Lover, they hug together, the words in the heart become text slowly moved up in the snow, more romantic!). In our instance cartoon picture is the background, while the fluttering snowflakes and moving subtitles are animated objects. The best way to produce animation is to discharge the movie. Replace 24 consecutive pictures per second can be deceived, which makes people think that the picture is continuous, and the principle of computer animation is in essence and put movies. the same. The application quickly continuously draws and displays a series of associated still images in a range of regular images.

two. Snowing realization principle

Tcanvas (canvas objects) and Tbitmap provided with VCL are easy to implement, in this case two memory bit map IMGBK (used to store background images), SRCIMG (used to generate new frames) . The formation flow of the animation is shown below:

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

New Post(0)