CN103177465A - Animation control method and system - Google Patents

Animation control method and system Download PDF

Info

Publication number
CN103177465A
CN103177465A CN2011104424220A CN201110442422A CN103177465A CN 103177465 A CN103177465 A CN 103177465A CN 2011104424220 A CN2011104424220 A CN 2011104424220A CN 201110442422 A CN201110442422 A CN 201110442422A CN 103177465 A CN103177465 A CN 103177465A
Authority
CN
China
Prior art keywords
animation
time
next frame
periodicity
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011104424220A
Other languages
Chinese (zh)
Other versions
CN103177465B (en
Inventor
李昶博
彭勇
龚云华
李安琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201110442422.0A priority Critical patent/CN103177465B/en
Publication of CN103177465A publication Critical patent/CN103177465A/en
Application granted granted Critical
Publication of CN103177465B publication Critical patent/CN103177465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

An animation control method comprises the steps of obtaining animation start time and animation current time; calculating played time of an animation; judging whether the played time is smaller than the total animation duration and/or whether the position of a next frame of animation exceeds an animation ending position; if the played time of the animation is larger than or equal to the total animation duration and/or the position of the next frame of animation exceeds the animation ending position, drawing an animation ending frame and quitting, or else carrying out the next frame of animation. According to the animation control method, the animation is controlled within the fixed time, the ending frame is drawn at the animation ending position and quitting is performed, so that animation integrity and time controllability can be guaranteed, and animation effect is good. In addition, the invention further provides an animation control system.

Description

Animation control methods and system
[technical field]
The present invention relates to field of computer technology, relate in particular to a kind of animation control methods.
[background technology]
Opening is the inexorable trend of internet development, also uses more and more extensive based on the open platform of instant messaging.Open platform can pass through a large amount of third party of AppStore (application market) access to be used, and the user can install the application of oneself as required.
Switch at interface in open platform, be exactly in fact with the interface from the screen left side toward the right or the process of sliding toward the left side from the right, add the animation special efficacy in the process of slip, for example at the uniform velocity, even deceleration texts.Traditional animation is need to all draw every frame just to finish animation, and like this, on the machine of low configuration, the time of drawing every frame can be very long, and the time is uncontrollable, causes animation to be experienced poor.
[summary of the invention]
Given this, be necessary to provide a kind of animation duration controlled, the animation control methods that animation effect is good.
A kind of animation control methods comprises the following steps:
Obtain animation start time and animation current time;
Calculate animation reproduction time;
Judge whether whether reproduction time exceed the animation final position less than the total duration of animation and/or next frame animation position;
If animation reproduction time exceeds the animation final position more than or equal to the total duration of animation and/or next frame animation position, draw the animation ending frame and withdraw from, otherwise carrying out the next frame animation.
In addition, also be necessary to provide a kind of animation duration controlled, the animation control system that animation effect is good.
A kind of animation control system comprises:
Time-obtaining module is used for obtaining animation start time and current time;
The Time Calculation module is connected with described time-obtaining module, calculates animation reproduction time;
Judge module is connected with described Time Calculation module, is used for judging whether whether reproduction time exceed the animation final position less than the total duration of animation and/or next frame animation position;
Control module is connected with described judge module, if animation reproduction time exceed the animation final position more than or equal to the total duration of animation and/or next frame animation position, draw the animation ending frame and withdraw from, otherwise carrying out the next frame animation.
Above-mentioned animation control methods and system are controlled in setting time with animation, draw ending frame in the animation final position and withdraw from, and like this, can guarantee that the integrality of animation and time are controlled, and animation effect is good.
[description of drawings]
Fig. 1 is the method flow diagram that the described a kind of interface cartoon of the embodiment of the present invention one moves;
Fig. 2 is the process flow diagram that obtains the animation start time;
Fig. 3 is for calculating the animation process flow diagram of reproduction time;
Fig. 4 is for calculating the process flow diagram of next frame animation position;
Fig. 5 is the method flow diagram that the described a kind of interface cartoon of the embodiment of the present invention two moves;
Fig. 6 is the process flow diagram that obtains the animation start time;
Fig. 7 is for calculating the animation process flow diagram of reproduction time;
Fig. 8 is for calculating the process flow diagram of next frame animation position;
The process flow diagram of Fig. 9 for drawing the animation ending frame and withdrawing from;
Figure 10 is the animation control system module map of an embodiment;
Figure 11 is the animation control system module map of another embodiment.
[embodiment]
As Fig. 1~shown in Figure 4, the process flow diagram of a kind of animation control methods that provides for embodiment one comprises the following steps:
S102: obtain the animation start time.Animated content can be the animations of the interfaces such as advertisement, playlet, window or desktop when switching.The animation effect when animation in the present embodiment can be the desktop switching, the animation effect when for example the desktop of application platform and operating system desktop switch.
In a preferred embodiment, step S102 comprises step S1021 and step S1022:
Periodicity when beginning to animation after S1021: accumulation calculating CPU powers on.This periodicity can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceCounter in API (Application Programming Interface, application programming interfaces) to obtain.
S1022: with the ratio of periodicity and cpu frequency as the animation start time.Cpu frequency can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceFrequency in API to obtain.
The accurate timing of periodicity when beginning to animation after step S1021 and step S1022 use CPU to power on, the accurate Calculation of each frame of assurance animation.Due to the count value of the timer that has adopted CPU, for high-frequency CPU of modern times, each count cycle can obtain the high-precision time in nanosecond, thereby is convenient to accurately control animation.
S103: obtain the animation current time, and calculate animation reproduction time.
In a preferred embodiment, step S103 comprises step S1031, step S1032 and step S1033:
After powering on, arrives S1031: accumulation calculating CPU the periodicity of current animation.This periodicity can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceCounter in API (Application Programming Interface, application programming interfaces) to obtain.
S1032: with the ratio of the periodicity of current animation and cpu frequency as the animation current time.Cpu frequency can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceFrequency in API to obtain.
S1033: with the difference of animation current time and animation start time as animation reproduction time.
The accurate timing of periodicity when beginning to animation after step S1031, step S1032 and step S1033 use CPU to power on, the accurate Calculation of each frame of assurance animation.Due to the count value of the timer that has adopted CPU, for high-frequency CPU of modern times, each count cycle can obtain the high-precision time in nanosecond, thereby is convenient to accurately control animation.
S104: judge that whether reproduction time is less than the total duration of animation.
S105: if animation reproduction time less than the total duration of animation, calculate next frame animation position, otherwise jump to the step that S108 draws the animation ending frame and withdraws from.
In a preferred embodiment, step S105 comprises step S1051 and step S1052:
S1051: obtain animation position rendering logic.Rendering logic can be set as required, such as uniform motion, accelerated motion and retarded motion etc.Animation position rendering logic can be controlled from the distance that animation begins residing location of pixels by the residing location of pixels of animation.
S1052: calculate the residing location of pixels of next frame animation according to described rendering logic.For example, in the animation steering logic of uniform motion, the residing location of pixels of next frame animation begins being directly proportional apart from S and animation reproduction time t and the animation final position pixel count distance W to the animation starting position of residing location of pixels from animation, and is inversely proportional to the total duration T of animation.Wherein, the amount of t for changing can adopt aforesaid way to obtain.T and W namely determine after animation is good.Be appreciated that, animation position rendering logic can also be other modes, this depends on needs for which type of animation effect, if need index accelerated motion effect, can adopt following animation position rendering logic: the residing location of pixels of next frame animation from animation begin residing location of pixels apart from S for the ratio of animation reproduction time t and the total duration T of animation is arrived the index of the pixel count distance W of animation starting position as the animation final position.Usually, in actual applications, for example in the animation that desktop switches, W is the width pixel count of our computer screen, namely is used for computer screen interface switching is realized the animation effect that computer desktop is slided.
S106: judge whether next frame animation position exceeds the animation final position.
S107: if next frame animation position does not exceed the animation final position, carry out the next frame animation, otherwise jump to the step that S108 draws the animation ending frame and withdraws from.In the animation that switch at the interface, carry out the next frame animation and can be interface movement to position that the next frame animation should be in.In other animations, carry out the next frame animation and can be that element in the interface changes etc.
S108: draw the animation ending frame and withdraw from.In preferred embodiment, draw the animation ending frame and withdraw from before only carry out the order of animation and do not do other any operations, be to use the control program of block type in said process, the drawing process that guarantees animation is not processed any irrelevant thing (SendMessage, PostMessage, the message that quits a program, the operation of user's mouse-keyboard, the drafting that has nothing to do and Timer message etc.), thereby guarantees the fluency of animation.
Periodicity when in other embodiments, the described step of obtaining the animation start time begins to animation afterwards for powering on the corresponding interface of system (for example in windows operating system, can adopt QueryPerformanceCounter) acquisition CPU;
The described step of animation current time of obtaining is for obtaining the periodicity of current C PU with the corresponding interface of system (for example in windows operating system, can adopt QueryPerformanceCounter);
Described judgement reproduction time whether less than the step of the total duration of animation for the periodicity that judges current C PU whether less than the end period number, described end period number is the product that the periodicity of animation when beginning adds animation duration and cpu frequency.If the periodicity of current C PU less than the end period number, shows reproduction time less than the total duration of animation, vice versa.
By above-mentioned compute mode, the acquisition ratio in step S1032 multiplication can be replaced by, thereby operand can be reduced, further make in animation operation process more smooth.
As Fig. 5~shown in Figure 9, the process flow diagram of a kind of animation control methods that provides for embodiment 2, in the present embodiment, animated content is the animations of the interfaces such as window or desktop when switching, this animation control methods comprises the following steps:
S202: will need mobile original interface sectional drawing.
S203: hide original interface, replace original interface with sectional drawing.
Step S202 and step 203 do not need each element in each frame animation frame is drawn because use original interface sectional drawing to replace original interface, have improved the fluency of animation.In traditional animation, for example when the desktop of application platform and operating system desktop switch, can show after need to drawing one by one the icon on desktop, font, background picture etc., only need to draw sectional drawing by sectional drawing, reduce treatment capacity, thereby improved the fluency of animation.
S204: obtain the animation start time.The animation effect when animation in the present embodiment can be the desktop switching, the animation effect when for example the desktop of application platform and operating system desktop switch.
In a preferred embodiment, step S204 comprises step S2041 and step S2042:
Periodicity when beginning to animation after S2041: accumulation calculating CPU powers on.This periodicity can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceCounter in API (Application Programming Interface, application programming interfaces) to obtain.
S2042: the frequency of removing CPU with periodicity draws the animation start time.With the ratio of periodicity and cpu frequency as the animation start time.Cpu frequency can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceFrequency in API to obtain.
The accurate timing of periodicity when beginning to animation after step S2041 and step S2042 use CPU to power on, the accurate Calculation of each frame of assurance animation.Due to the count value of the timer that has adopted CPU, for high-frequency CPU of modern times, each count cycle can obtain the high-precision time in nanosecond, thereby is convenient to accurately control animation.
S205: obtain the animation current time, and calculate animation reproduction time;
In a preferred embodiment, step S205 comprises step S2051, step S2052 and step S2053:
After powering on, arrives S2051: accumulation calculating CPU the periodicity of current animation.This periodicity can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceCounter in API (Application Programming Interface, application programming interfaces) to obtain.
S2052: with the ratio of the periodicity of current animation and cpu frequency as the animation current time.Cpu frequency can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceFrequency in API to obtain.
S2053: with the difference of animation current time and animation start time as animation reproduction time.
The accurate timing of periodicity when beginning to animation after step S2051, step S2542 and step S2053 use CPU to power on, the accurate Calculation of each frame of assurance animation.Due to the count value of the timer that has adopted CPU, for high-frequency CPU of modern times, each count cycle can obtain the high-precision time in nanosecond, thereby is convenient to accurately control animation.
S206: judge that whether reproduction time is less than the total duration of animation.
S207: if animation reproduction time less than the total duration of animation, calculate next frame animation position, otherwise jump to the step that S210 draws the animation ending frame and withdraws from.
In a preferred embodiment, step S207 comprises step S2071 and step S2072:
S2071: obtain animation position rendering logic.Rendering logic can be set as required, such as uniform motion, accelerated motion and retarded motion etc.Animation position rendering logic can be controlled from the distance that animation begins residing location of pixels by the residing location of pixels of animation.
S2072: calculate the residing location of pixels of next frame animation according to described rendering logic.For example, in the animation steering logic of uniform motion, the residing location of pixels of next frame animation begins being directly proportional apart from S and animation reproduction time t and the animation final position pixel count distance W to the animation starting position of residing location of pixels from animation, and is inversely proportional to the total duration T of animation.Wherein, the amount of t for changing can adopt aforesaid way to obtain.T and W namely determine after animation is good.Be appreciated that, animation position rendering logic can also be other modes, this depends on needs for which type of animation effect, if need index accelerated motion effect, can adopt following animation position rendering logic: the residing location of pixels of next frame animation from animation begin residing location of pixels apart from S for the ratio of animation reproduction time t and the total duration T of animation is arrived the index of the pixel count distance W of animation starting position as the animation final position.Usually, in actual applications, for example in the animation that desktop switches, W is the width pixel count of our computer screen, namely is used for computer screen interface switching is realized the animation effect that computer desktop is slided.
S208: judge whether next frame animation position exceeds the animation final position.
S209: if next frame animation position does not exceed the animation final position, carry out the next frame animation, otherwise jump to the step that S210 draws the animation ending frame and withdraws from.In the animation that switch at the interface, carry out the next frame animation and can be interface movement to position that the next frame animation should be in.
S210: draw the animation ending frame and withdraw from.
In a preferred embodiment, step S210 comprises step S2101 and step S2102:
S2101: show original interface;
S2102: deletion sectional drawing.
Periodicity when in other embodiments, the described step of obtaining the animation start time begins to animation afterwards for powering on the corresponding interface of system (for example in windows operating system, can adopt QueryPerformanceCounter) acquisition CPU;
The described step of animation current time of obtaining is for obtaining the periodicity of current C PU with the corresponding interface of system (for example in windows operating system, can adopt QueryPerformanceCounter);
Described judgement reproduction time whether less than the step of the total duration of animation for the periodicity that judges current C PU whether less than the end period number, described end period number is the product that the periodicity of animation when beginning adds animation duration and cpu frequency.If the periodicity of current C PU less than the end period number, shows reproduction time less than the total duration of animation, vice versa.
By above-mentioned compute mode, the acquisition ratio in step S1032 multiplication can be replaced by, thereby operand can be reduced, further make in animation operation process more smooth.
In above-described embodiment, by whether first judging reproduction time less than the total duration of animation, then judge that mode that whether next frame animation position exceeds the animation final position controls animation and finish in the final position and finish in the total duration of animation.In other embodiments, can only judge that also whether reproduction time control animation less than the total duration of animation and finish or only judge whether next frame animation position exceeds the animation final position and control animation and finish in the final position in total duration.In addition, can also judge first whether next frame animation position exceeds the animation final position, then judge that whether reproduction time is less than the total duration of animation.The animation control methods of above-mentioned various embodiments can be summarized as following steps:
Obtain animation start time and animation current time;
Calculate animation reproduction time;
Judge whether whether reproduction time exceed the animation final position less than the total duration of animation and/or next frame animation position;
If animation reproduction time exceeds the animation final position more than or equal to the total duration of animation and/or next frame animation position, draw the animation ending frame and withdraw from, otherwise carrying out the next frame animation.
In concrete the application, can animation effect as required determine rendering logic.But there is defective in traditional rendering logic, and for example interface cartoon arrives the final position in advance, does not perhaps always arrive terminal point.Like this, interface cartoon is experienced just bad.The animation control methods of above-mentioned embodiment can make animation one fix on the final position end and finish in the total duration of animation.
Above-mentioned animation control methods is drawn the animation ending frame when the total duration of animation arrives or when arriving the animation final position, avoided drawing in the prior art in each frame animation due to the low reason of equipment configuration, the time of drawing every frame can be very long, and the time is uncontrollable, causes animation to experience poor situation.Above-mentioned animation control methods can effectively be completed whole animation, and the interface is parked on the animation final position at last.
Adopted the count value of the timer of CPU, except can being used for accurately controlling animation frame whole residing position, can also be used for accurately controlling position and/or the shape of element between animation frame, for example position and/or the shape of the position of A element and/or shape A element in the n frame in the 1st frame, the variation of identity element different frame position and/or shape has just formed the movement locus of interframe element.For high-frequency CPU of modern times, each count cycle can obtain the high-precision time in nanosecond, thereby is convenient to accurately control the movement locus of element between the animation display frame, specifically comprises the steps:
Steps A is obtained the time dependent position of interframe element and/or shape steering logic.This steering logic can be conventional steering logic, certain motion of point track of interframe element for example, the rectilinear motion X pixel since the 2nd second to the 5th second.
Step B obtains the product of the total duration of interframe element and cpu frequency in described steering logic.By top example as can be known, total duration is 3 seconds, and it is different that the frequency of CPU is looked computing power, 1GHz for example, and product is 3G.
Step C, with described product as the position of interframe element and/or the status number of shape.Namely the state for certain point has 3G, owing to being uniform motion, can obtain the corresponding location of pixels of each state.
Step D, acquisition time is poor, the described mistiming be described interframe element start frame to the mistiming of present frame, the described mistiming by start frame cpu cycle number and present frame cpu cycle number the difference of periodicity represent.For example the mistiming of start frame to the present frame of 4 seconds of beginning in the 2nd second is 2 seconds, this mistiming can be used poor (Y-X) expression of cpu cycle number (for example X) with the periodicity of the cpu cycle number (for example Y) of present frame of start frame, if the frequency of CPU is 1GHz, Y-X is 2G.
Step e, position and/or the shape of determining described interframe element according to difference and the described status number of described periodicity.Easily understand, for above-mentioned example, 2G is corresponding to the 2G in 3G state of above-mentioned certain point.
Step F shows described interframe element according to described position and/or shape.Due to the position and/or the shape that have obtained the interframe element, just can show and realize animation effect.
By above-mentioned interframe element control method as can be known, by utilizing the split-second precision information of CPU, can accurately control position and/or the shape of element between animation frame.Certainly, if hardware can't be realized high-precision animation like this, for example screen resolution can't reach so high precision, the processing that can be similar to.
In addition, as shown in figure 10, also provide a kind of animation control system, comprised time-obtaining module, Time Calculation module, judge module and control module.
Time-obtaining module is used for obtaining animation start time and current time.Animated content can be the animations of the interfaces such as advertisement, playlet, window or desktop when switching.The animation effect when animation in the present embodiment can be the desktop switching, the animation effect when for example the desktop of application platform and operating system desktop switch.Time-obtaining module is obtained the animation start time can be in the following way: the periodicity when beginning to animation after accumulation calculating CPU powers on.This periodicity can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceCounter in API (Application Programming Interface, application programming interfaces) to obtain.With the ratio of periodicity and cpu frequency as the animation start time.Cpu frequency can obtain by the corresponding interface of system.For example in windows operating system, can adopt the QueryPerformanceFrequency in API to obtain.Similarly, can obtain the current time.The accurate timing of periodicity when beginning to animation after using CPU to power on, the accurate Calculation of each frame of assurance animation.Due to the count value of the timer that has adopted CPU, for high-frequency CPU of modern times, each count cycle can obtain the high-precision time in nanosecond, thereby is convenient to accurately control animation.
The Time Calculation module is connected with described time-obtaining module, is used for calculating animation reproduction time.The Time Calculation module calculate animation the mode of reproduction time can adopt and calculate the animation step of reproduction time in above-mentioned animation control methods, do not repeat them here.
Judge module is connected with described Time Calculation module, is used for judging whether whether reproduction time exceed the animation final position less than the total duration of animation and/or next frame animation position.
Control module is connected with described judge module, if animation reproduction time exceed the animation final position more than or equal to the total duration of animation and/or next frame animation position, draw the animation ending frame and withdraw from, otherwise carrying out the next frame animation.
Above-mentioned animation control system is drawn the animation ending frame when the total duration of animation arrives or when arriving the animation final position, avoided drawing in the prior art in each frame animation due to the low reason of equipment configuration, the time of drawing every frame can be very long, and the time is uncontrollable, causes animation to experience poor situation.Above-mentioned animation control system can effectively be completed whole animation, and the interface is parked on the animation final position at last.
In a preferred embodiment, as shown in figure 11, above-mentioned animation control system also comprises the memory module that is connected with described judge module, described memory module is used for storage animation position rendering logic, described judge module comprises position calculation unit, and described position calculation unit is used for calculating the residing location of pixels of next frame animation according to described rendering logic.For example, in the animation steering logic of uniform motion, the residing location of pixels of next frame animation begins being directly proportional apart from S and animation reproduction time t and the animation final position pixel count distance W to the animation starting position of residing location of pixels from animation, and is inversely proportional to the total duration T of animation.Wherein, the amount of t for changing can adopt aforesaid way to obtain.T and W namely determine after animation is good.Be appreciated that, animation position rendering logic can also be other modes, this depends on needs for which type of animation effect, if need index accelerated motion effect, can adopt following animation position rendering logic: the residing location of pixels of next frame animation from animation begin residing location of pixels apart from S for the ratio of animation reproduction time t and the total duration T of animation is arrived the index of the pixel count distance W of animation starting position as the animation final position.Usually, in actual applications, for example in the animation that desktop switches, W is the width pixel count of our computer screen, namely is used for computer screen interface switching is realized the animation effect that computer desktop is slided.
In a preferred embodiment, described time-obtaining module is obtained the periodicity of animation start time when obtaining to begin to animation after CPU powers on; Described time-obtaining module is obtained the current time for obtaining the periodicity of current C PU; Described judge module judge reproduction time whether less than the total duration of animation for the periodicity that judges current C PU whether less than the end period number, described end period number is the product that the periodicity of animation when beginning adds animation duration and cpu frequency.Due to the count value of the timer that has adopted CPU, for high-frequency CPU of modern times, each count cycle can obtain the high-precision time in nanosecond, thereby is convenient to accurately control animation.And by above-mentioned compute mode, can avoid using division, thereby can reduce operand, further make in animation operation process more smooth.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.Should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (16)

1. an animation control methods, is characterized in that, comprises the following steps:
Obtain animation start time and animation current time;
Calculate animation reproduction time;
Judge whether whether reproduction time exceed the animation final position less than the total duration of animation and/or next frame animation position;
If animation reproduction time exceeds the animation final position more than or equal to the total duration of animation and/or next frame animation position, draw the animation ending frame and withdraw from, otherwise carrying out the next frame animation.
2. animation control methods according to claim 1, is characterized in that, judges that the step whether next frame animation position exceeds the animation final position comprises the step of calculating next frame animation position, and the step of described calculating next frame animation position comprises:
Obtain animation position rendering logic;
Calculate the residing location of pixels of next frame animation according to described rendering logic.
3. animation control methods according to claim 2, it is characterized in that, to be the residing location of pixels of the next frame animation distance that begins residing location of pixels from animation be directly proportional to animation reproduction time and the animation final position pixel count distance to the animation starting position described rendering logic, and be inversely proportional to the total duration of animation.
4. animation control methods according to claim 2, it is characterized in that, the described rendering logic distance that to be the residing location of pixels of next frame animation begin residing location of pixels from animation is for arriving the ratio of animation reproduction time and the total duration of animation the index of the pixel count distance of animation starting position as the animation final position.
5. animation control methods according to claim 1, is characterized in that, before carrying out the next frame animation, also comprises:
The original interface sectional drawing that needs are moved;
Hide original interface, replace original interface with sectional drawing.
6. animation control methods according to claim 5, is characterized in that, described drafting animation ending frame and the step that withdraws from comprise:
Show original interface;
The deletion sectional drawing.
7. animation control methods according to claim 1, is characterized in that,
The periodicity of the described step of obtaining the animation start time when obtaining to begin to animation after CPU powers on, the described step of current time of obtaining is the periodicity of acquisition current C PU;
Described judgement reproduction time whether less than the step of the total duration of animation for the periodicity that judges current C PU whether less than the end period number, described end period number is the product that the periodicity of animation when beginning adds animation duration and cpu frequency.
8. animation control methods according to claim 1, is characterized in that, the described step of obtaining the animation start time comprises:
Periodicity when beginning to animation after accumulation calculating CPU powers on;
With the ratio of periodicity and cpu frequency as the animation start time.
9. animation control methods according to claim 8, is characterized in that, described obtaining the animation current time, and calculate animation the step of reproduction time comprise:
After powering on, arrives accumulation calculating CPU the periodicity of current animation;
With the ratio of the periodicity of current animation and cpu frequency as the animation current time;
With the difference of animation current time and animation start time as animation reproduction time.
10. animation control methods according to claim 1, is characterized in that, draw the animation ending frame and withdraw from before only carry out the order of animation and do not do other any operations.
11. animation control methods according to claim 1 is characterized in that, also comprises the step of the movement locus of element between display frame, the step of the movement locus of described calculating interframe element comprises:
Obtain the time dependent position of interframe element and/or shape steering logic;
Obtain the product of the total duration of interframe element and cpu frequency in described steering logic;
With described product as the position of interframe element and/or the status number of shape;
Acquisition time is poor, the described mistiming be described interframe element start frame to the mistiming of present frame, the described mistiming by start frame cpu cycle number and present frame cpu cycle number the difference of periodicity represent;
Position and/or the shape of determining described interframe element according to difference and the described status number of described periodicity;
Show described interframe element according to described position and/or shape.
12. an animation control system is characterized in that, comprising:
Time-obtaining module is used for obtaining animation start time and current time;
The Time Calculation module is connected with described time-obtaining module, calculates animation reproduction time;
Judge module is connected with described Time Calculation module, is used for judging whether whether reproduction time exceed the animation final position less than the total duration of animation and/or next frame animation position;
Control module is connected with described judge module, if animation reproduction time exceed the animation final position more than or equal to the total duration of animation and/or next frame animation position, draw the animation ending frame and withdraw from, otherwise carrying out the next frame animation.
13. animation control system according to claim 12, it is characterized in that, also comprise the memory module that is connected with described judge module, described memory module is used for storage animation position rendering logic, described judge module comprises position calculation unit, and described position calculation unit is used for calculating the residing location of pixels of next frame animation according to described rendering logic.
14. animation control system according to claim 13, it is characterized in that, to be the residing location of pixels of the next frame animation distance that begins residing location of pixels from animation be directly proportional to animation reproduction time and the animation final position pixel count distance to the animation starting position described rendering logic, and be inversely proportional to the total duration of animation.
15. animation control system according to claim 13, it is characterized in that, the described rendering logic distance that to be the residing location of pixels of next frame animation begin residing location of pixels from animation is for arriving the ratio of animation reproduction time and the total duration of animation the index of the pixel count distance of animation starting position as the animation final position.
16. animation control system according to claim 12 is characterized in that,
Described time-obtaining module is obtained the periodicity of animation start time when obtaining to begin to animation after CPU powers on;
Described time-obtaining module is obtained the current time for obtaining the periodicity of current C PU;
Described judge module judge reproduction time whether less than the total duration of animation for the periodicity that judges current C PU whether less than the end period number, described end period number is the product that the periodicity of animation when beginning adds animation duration and cpu frequency.
CN201110442422.0A 2011-12-26 2011-12-26 Animation control methods and system Active CN103177465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110442422.0A CN103177465B (en) 2011-12-26 2011-12-26 Animation control methods and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110442422.0A CN103177465B (en) 2011-12-26 2011-12-26 Animation control methods and system

Publications (2)

Publication Number Publication Date
CN103177465A true CN103177465A (en) 2013-06-26
CN103177465B CN103177465B (en) 2016-04-13

Family

ID=48637293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110442422.0A Active CN103177465B (en) 2011-12-26 2011-12-26 Animation control methods and system

Country Status (1)

Country Link
CN (1) CN103177465B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485771A (en) * 2015-08-27 2017-03-08 博雅网络游戏开发(深圳)有限公司 Animation performance detection method and system
CN107015788A (en) * 2016-10-19 2017-08-04 阿里巴巴集团控股有限公司 Animation shows the method and apparatus of image on the mobile apparatus
CN107193515A (en) * 2017-04-10 2017-09-22 腾讯科技(深圳)有限公司 Animation shows monitoring method, device and its equipment of fluency
CN110007831A (en) * 2019-03-29 2019-07-12 珠海豹好玩科技有限公司 A kind of flipping-over control method, device and terminal device
CN113902609A (en) * 2021-03-17 2022-01-07 广州市保伦电子有限公司 Method and device for smoothly rendering control animation based on OpenGL embedded device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1203494A (en) * 1997-06-24 1998-12-30 三星电子株式会社 Method for displaying TV program progress time and device thereof
CN1369862A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 Method and system for creating animation
US7003154B1 (en) * 2000-11-17 2006-02-21 Mitsubishi Electric Research Laboratories, Inc. Adaptively processing a video based on content characteristics of frames in a video
US20060114327A1 (en) * 2004-11-26 2006-06-01 Fuji Photo Film, Co., Ltd. Photo movie creating apparatus and program
CN101193250A (en) * 2006-11-27 2008-06-04 三星电子株式会社 System, method and medium generating frame information for moving images
CN101207822A (en) * 2006-12-22 2008-06-25 上海晨兴电子科技有限公司 Method for synchronization of audio frequency and video frequency of stream media terminal
CN101266693A (en) * 2008-03-31 2008-09-17 康佳集团股份有限公司 A method for dynamic control of animation operation process
CN101923425A (en) * 2009-06-10 2010-12-22 中国移动通信集团公司 Method and device thereof for realizing window switching based on sliding terminal screen
CN102075792A (en) * 2010-12-23 2011-05-25 华为技术有限公司 Video file playing method and system, user equipment and server equipment
CN102082774A (en) * 2009-12-01 2011-06-01 新奥特(北京)视频技术有限公司 Stream media data playing method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1203494A (en) * 1997-06-24 1998-12-30 三星电子株式会社 Method for displaying TV program progress time and device thereof
US7003154B1 (en) * 2000-11-17 2006-02-21 Mitsubishi Electric Research Laboratories, Inc. Adaptively processing a video based on content characteristics of frames in a video
CN1369862A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 Method and system for creating animation
US20060114327A1 (en) * 2004-11-26 2006-06-01 Fuji Photo Film, Co., Ltd. Photo movie creating apparatus and program
CN101193250A (en) * 2006-11-27 2008-06-04 三星电子株式会社 System, method and medium generating frame information for moving images
CN101207822A (en) * 2006-12-22 2008-06-25 上海晨兴电子科技有限公司 Method for synchronization of audio frequency and video frequency of stream media terminal
CN101266693A (en) * 2008-03-31 2008-09-17 康佳集团股份有限公司 A method for dynamic control of animation operation process
CN101923425A (en) * 2009-06-10 2010-12-22 中国移动通信集团公司 Method and device thereof for realizing window switching based on sliding terminal screen
CN102082774A (en) * 2009-12-01 2011-06-01 新奥特(北京)视频技术有限公司 Stream media data playing method and system
CN102075792A (en) * 2010-12-23 2011-05-25 华为技术有限公司 Video file playing method and system, user equipment and server equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485771A (en) * 2015-08-27 2017-03-08 博雅网络游戏开发(深圳)有限公司 Animation performance detection method and system
CN107015788A (en) * 2016-10-19 2017-08-04 阿里巴巴集团控股有限公司 Animation shows the method and apparatus of image on the mobile apparatus
US10573053B2 (en) 2016-10-19 2020-02-25 Alibaba Group Holding Limited Method and apparatus for animating images on mobile devices
CN107193515A (en) * 2017-04-10 2017-09-22 腾讯科技(深圳)有限公司 Animation shows monitoring method, device and its equipment of fluency
CN107193515B (en) * 2017-04-10 2023-03-14 腾讯科技(深圳)有限公司 Method, device and equipment for monitoring animation display fluency
CN110007831A (en) * 2019-03-29 2019-07-12 珠海豹好玩科技有限公司 A kind of flipping-over control method, device and terminal device
CN113902609A (en) * 2021-03-17 2022-01-07 广州市保伦电子有限公司 Method and device for smoothly rendering control animation based on OpenGL embedded device

Also Published As

Publication number Publication date
CN103177465B (en) 2016-04-13

Similar Documents

Publication Publication Date Title
CN103177465B (en) Animation control methods and system
CN106156066B (en) Page switching method, device and client
CN102915194B (en) Based on the implementation method of the video preview of mobile device, device and mobile terminal
CN107181976A (en) A kind of barrage display methods and electronic equipment
JP6708734B2 (en) Navigation image drawing method, device and storage medium
CN106303729B (en) Exchange method, interactive device and user equipment based on barrage
CN102945116A (en) Interface switching display method and device, and mobile terminal
CN108900854A (en) Connect wheat room switching method, storage medium, equipment and system in live streaming
CN112565868B (en) Video playing method and device and electronic equipment
CN109286835A (en) Direct broadcasting room interactive element display methods, storage medium, equipment and system
CN107071556A (en) A kind of interface rendering intent and device
CN104881207A (en) Display method and terminal
CN103544245A (en) Ranking list generating method and server
CN107526499A (en) Message treatment method and device
CN109117237A (en) A kind of barrage display methods, device and electronic equipment
US20140028701A1 (en) Modifying transition sequences in a user interface depending on frequency of use
CN111915639A (en) Target detection tracking method and device, electronic equipment and storage medium
CN101976195B (en) Method and device for setting user interface
CN104049867B (en) A kind of information processing method and electronic equipment
CN103365559B (en) A kind of method and mobile terminal for drawing sliding trace
CN103248736B (en) The method and device of display session information
CN104598023A (en) Method and device for selecting files through gesture recognition
CN107798718B (en) Animation playback method and device
CN103217897B (en) Method and system for optimizing screen refresh rate of touch-screen smart mobile terminal
CN103076874A (en) Method and system for improving high delay of computer-vision-based somatosensory input equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant