CN103186917A - Method and device of achieving view cartoon display - Google Patents

Method and device of achieving view cartoon display Download PDF

Info

Publication number
CN103186917A
CN103186917A CN2011104542320A CN201110454232A CN103186917A CN 103186917 A CN103186917 A CN 103186917A CN 2011104542320 A CN2011104542320 A CN 2011104542320A CN 201110454232 A CN201110454232 A CN 201110454232A CN 103186917 A CN103186917 A CN 103186917A
Authority
CN
China
Prior art keywords
frame
view
image
drawing image
animation
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
CN2011104542320A
Other languages
Chinese (zh)
Other versions
CN103186917B (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 CN201110454232.0A priority Critical patent/CN103186917B/en
Publication of CN103186917A publication Critical patent/CN103186917A/en
Application granted granted Critical
Publication of CN103186917B publication Critical patent/CN103186917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method and a device of achieving view cartoon display. The method comprises the following steps: aiming at continuously displaying multiple frames, setting each frame in a view to draw an image; computing position of the view in each frame drawing the image according to a moving condition that view cartoon displays a corresponding view position; and drawing an image in each frame in the view according to the position. The method and the device of achieving view cartoon display can reduce calculated amount needed by achieving the view cartoon display.

Description

A kind of method and apparatus of realizing that the view animation shows
Technical field
The present invention relates to animation display technique field, relate in particular to a kind of method and apparatus of realizing that the view animation shows.
Background technology
The animation of view shows that refer to view in painting process, the image of the relative former frame of image of drawing in each frame carries out offset some small amount, and it is continuous that view is looked like.Existing view animation scheme is, at data object of each view maintenance, before view is drawn, pass to the data object current time, data object calculates the number percent that animation is finished according to animation zero-time and current time, thereby calculate view offset, according to this skew drawing view.
This mode all will be calculated view offset before every width of cloth image of drawing view, calculated amount is bigger.
Summary of the invention
The invention provides a kind of method and apparatus of realizing that the view animation shows, can be reduced to and realize that the view animation shows required calculated amount.
Technical scheme of the present invention is achieved in that
A kind of method that realizes that the view animation shows comprises:
For a plurality of frames of continuous demonstration, described view is set draws piece image at each frame;
Show the position that corresponding view position situation of movement calculates described view drawing image in each frame according to the view animation;
Draw the image of described view in each frame according to described position.
A kind of realization view animation device shown comprises:
Redraw message transmission module, be used for a plurality of frames for continuous demonstration, described view is set draws piece image at each frame;
Computing module is used for showing that according to the view animation corresponding view position situation of movement calculates described view in the position of each frame drawing image;
Drafting module is used for drawing described view at the image of each frame according to described position.
As seen, the method and apparatus that the present invention proposes is controlled the animation broadcast of view according to frame, in view unified position that obtains every width of cloth image before the image of each frame is drawn, thereby when drawing image, can directly draw according to self-position, reduce calculated amount.
Description of drawings
The method flow diagram that the realization view animation that Fig. 1 proposes for the present invention shows;
The realization view animation device shown structural representation that Fig. 2 proposes for the present invention.
Embodiment
The present invention proposes a kind of method that realizes that the view animation shows, is the method flow diagram that the present invention proposes as Fig. 1, comprising:
Step 101: for a plurality of frames of continuous demonstration, described view is set draws piece image at each frame;
Step 102: show the position that corresponding view position situation of movement calculates described view drawing image in each frame according to the view animation;
Step 103: draw the image of described view in each frame according to described position.
In the above-mentioned steps 101, arrange view each frame draw piece image mode can for: determine the time delay that the next frame image is drawn according to the duration of drawing image required time and a frame.
Particularly, if drawing image required time T1 more than or equal to the duration T 2 of a frame, draws the image of next frame immediately when then being arranged on each frame end;
If drawing image required time T1 less than the duration T 2 of a frame, then is arranged on after current drawing image finishes, the image of next frame is drawn in time-delay (T2-T1).
In the above-mentioned steps 102, described view position situation of movement can comprise: initial position, end position and the move mode of described view institute drawing image.Correspondingly, according to view position situation of movement calculate view position of drawing image in each frame mode can for: initial position and end position according to view institute drawing image calculate moving direction and displacement, calculate the position of view drawing image in each frame according to moving direction, displacement and move mode.
Below lifting specific embodiment introduces in detail.
Embodiment one:
Step 1:
When needs are drawn animation, after the image of view is drawn end, send and redraw message, sign forms the circulation of a drafting when front view need repaint image.Here in order to control frame number, when redrawing message, transmission adds time-delay.Particularly,
It is that (unit: millisecond), frame per second is F (unit: inferior/second) to T1, the duration T 2=1000/F of a frame (unit: millisecond) that note is drawn the consuming time of present image;
If T1 〉=T2 then directly sends when present frame finishes and redraws message;
If T1<T2, then after current drawing image was finished, time-delay (T2-T1) millisecond sent and redraws message.
By this set, under the enough situation of system resource, guaranteed F stable refreshing of per second.
Step 2:
By the setting of above-mentioned steps 1, the time that view is redrawn at every turn is fixed as T2, therefore can calculate the position at image place when at every turn drawing in advance, forms and preserve the coordinate sequence at this view.Like this, the animation of view is play and to be controlled according to frame exactly, rather than controls according to the time.
In the present embodiment, utilize 4 continuous frames to finish animation and show that the initial coordinate position of view institute drawing image is that (X1, Y), the end coordinate position is that (X2, Y), its move mode is uniform translation.Then, horizontal ordinate moves to X2 from X1, and mobile distance is D=X2-X1, the horizontal direction side-play amount of image is Xoffi=D/4 in each frame, the coordinate that then can obtain drawing view in the i frame for (X1+Xoffi * i, Y), the position that generates view drawing image in each frame is following sequence:
Frame[4]=[(X1+Xoff,Y),(X1+Xoff×2,Y),(X1+Xoff×3,Y),(X1+Xoff×4,Y)]
Step 3:
When drawing image, search above-mentioned sequence according to the numbering (just draw number of times, be designated as i) of frame under the image, can find the coordinate position of this image, thereby according to this position drawing image.
For example, count drawing number of times, for utilizing continuous 4 frames to finish the situation that animation shows, draw number of times i and be followed successively by 0,1,2,3, search above-mentioned sequence Frame[4 according to the value of i], can directly obtain the coordinate position of image, and according to this coordinate position drawing image.
Embodiment two:
Present embodiment can be applied to delete the situation of a plurality of application (APP) icon, when a plurality of APP icon of deletion, the animation of realizing a plurality of APP icons simultaneously shows, at the method that each APP icon adopts above-mentioned realization animation to show respectively, draws the image of each APP icon in each frame.A plurality of APP icons on the screen can realize shaking the animation effect of hash, i.e. identical the but shake starting point difference of the shake rule of each APP icon.
For example, at each APP icon, utilize 4 continuous frames to finish animation and show that the coordinate position that makes APP icon drawing image in each frame is following sequence:
Frame[4]=[(X1+Xoff,Y),(X1+Xoff×2,Y),(X1+Xoff×3,Y),(X1+Xoff×4,Y)]
In order to realize shaking the animation effect of hash, when the drafting number of times of APP icon is counted, can add a value that changes according to the APP icon to drawing number of times i, be designated as hash, calculate I=(i+hash) %4.Like this, for different APP icons, when the value of i was followed successively by 0,1,2,3, corresponding I value was followed successively by 0,1,2,3, and perhaps 1,2,3,0, perhaps 2,3,0,1, perhaps 3,0,1,2.Search above-mentioned sequence Frame[4 according to I], just can obtain the APP icon in the picture position of each frame.Because the I value of different APP icons is different, the picture position that gets access to is also inequality, has so just realized the animation effect of different APP icon shake hash.
The present invention also proposes a kind of realization view animation device shown, and as the apparatus structure synoptic diagram that Fig. 2 proposes for the present invention, this device comprises:
Redraw message transmission module 201, be used for a plurality of frames for continuous demonstration, described view is set draws piece image at each frame;
Computing module 202 is used for showing that according to the view animation corresponding view position situation of movement calculates described view in the position of each frame drawing image;
Drafting module 203 is used for drawing described view at the image of each frame according to described position.
In the said apparatus, redraw message transmission module 201 arrange view each frame draw piece image mode can for: determine the time delay that the next frame image is drawn according to the duration of drawing image required time and a frame.
Particularly, redraw message transmission module 201 according to the duration of drawing image required time and a frame determine the time delay that the next frame image is drawn mode can for:
If drawing image required time T1, then redraws message transmission module more than or equal to the duration T 2 of a frame and redraw message to drafting module 203 transmissions immediately when each frame end, require drafting module 203 to draw the image of next frames;
If drawing image required time T1 less than the duration T 2 of a frame, then redraws message transmission module after current drawing image is finished, time-delay (T2-T1) sends to drafting module 203 and redraws message, requires drafting module 203 to draw the image of next frame.
In the said system, view position situation of movement comprises: initial position, end position and the move mode of described view institute drawing image.
Computing module 202 according to view position situation of movement calculate view position of drawing image in each frame mode can for:
Initial position and end position according to view institute drawing image calculate moving direction and displacement, calculate the position of view drawing image in each frame according to moving direction, displacement and move mode.
As fully visible, the method and apparatus that the realization view animation that the present invention proposes shows, the animation broadcast of view is controlled according to frame, position at view every width of cloth image of unified calculation before the image of each frame is drawn, thereby can when drawing image, directly draw according to this positional information, reduce calculated amount.Because calculated amount is little, the method and apparatus that the present invention proposes can adapt to has a large amount of view needs to be plotted in the situation that the enterprising action picture of screen shows simultaneously, and can guarantee the fluency of animation.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (11)

1. method that realizes that the view animation shows is characterized in that described method comprises:
For a plurality of frames of continuous demonstration, described view is set draws piece image at each frame;
Show the position that corresponding view position situation of movement calculates described view drawing image in each frame according to the view animation;
Draw the image of described view in each frame according to described position.
2. method according to claim 1 is characterized in that, the described view that arranges in the mode of each frame drafting piece image is: the time delay of determining the drafting of next frame image according to the duration of drawing image required time and a frame.
3. method according to claim 2 is characterized in that, the described duration according to drawing image required time and a frame determines that the mode of the time delay that the next frame image is drawn is:
If drawing image required time T1 more than or equal to the duration T 2 of a frame, draws the image of next frame immediately when then being arranged on each frame end;
If drawing image required time T1 less than the duration T 2 of a frame, then is arranged on after current drawing image finishes, the image of next frame is drawn in time-delay (T2-T1).
4. method according to claim 1 is characterized in that, described view position situation of movement comprises: initial position, end position and the move mode of described view institute drawing image.
5. method according to claim 4 is characterized in that, the mode of calculating view position of drawing image in each frame according to view position situation of movement is:
Initial position and end position according to view institute drawing image calculate moving direction and displacement, calculate the position of view drawing image in each frame according to moving direction, displacement and move mode.
6. method according to claim 1 is characterized in that, when realizing the animation demonstration of a plurality of application icons simultaneously, at the method that each application icon adopts described realization view animation to show respectively, draws the image of each application icon in each frame.
7. realize view animation device shown for one kind, it is characterized in that described device comprises:
Redraw message transmission module, be used for a plurality of frames for continuous demonstration, described view is set draws piece image at each frame;
Computing module is used for showing that according to the view animation corresponding view position situation of movement calculates described view in the position of each frame drawing image;
Drafting module is used for drawing described view at the image of each frame according to described position.
8. device according to claim 7, it is characterized in that the described message transmission module that redraws arranges the mode that view draws piece image at each frame and is: determine the time delay that the next frame image is drawn according to the duration of drawing image required time and a frame.
9. device according to claim 8 is characterized in that, the described message transmission module that redraws determines that according to the duration of drawing image required time and a frame mode of the time delay that the next frame image is drawn is:
If drawing image required time T1, then redraws message transmission module more than or equal to the duration T 2 of a frame and redraw message to the drafting module transmission immediately when each frame end, require drafting module to draw the image of next frame;
If drawing image required time T1 less than the duration T 2 of a frame, then redraws message transmission module after current drawing image is finished, time-delay (T2-T1) sends to drafting module and redraws message, requires drafting module to draw the image of next frame.
10. device according to claim 7 is characterized in that, described view position situation of movement comprises: initial position, end position and the move mode of described view institute drawing image.
11. device according to claim 10 is characterized in that, described computing module according to the mode that view position situation of movement calculates view position of drawing image in each frame is:
Initial position and end position according to view institute drawing image calculate moving direction and displacement, calculate the position of view drawing image in each frame according to moving direction, displacement and move mode.
CN201110454232.0A 2011-12-30 2011-12-30 It is a kind of to realize the method and apparatus that view animation is shown Active CN103186917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110454232.0A CN103186917B (en) 2011-12-30 2011-12-30 It is a kind of to realize the method and apparatus that view animation is shown

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110454232.0A CN103186917B (en) 2011-12-30 2011-12-30 It is a kind of to realize the method and apparatus that view animation is shown

Publications (2)

Publication Number Publication Date
CN103186917A true CN103186917A (en) 2013-07-03
CN103186917B CN103186917B (en) 2017-09-22

Family

ID=48678074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110454232.0A Active CN103186917B (en) 2011-12-30 2011-12-30 It is a kind of to realize the method and apparatus that view animation is shown

Country Status (1)

Country Link
CN (1) CN103186917B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427358A (en) * 2015-12-23 2016-03-23 武汉斗鱼网络科技有限公司 View animation generation method and system based on Android
CN105474213A (en) * 2013-07-30 2016-04-06 柯达阿拉里斯股份有限公司 System and method for creating navigable views of ordered images

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369862A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 Method and system for creating animation
US6690376B1 (en) * 1999-09-29 2004-02-10 Sega Enterprises, Ltd. Storage medium for storing animation data, image processing method using same, and storage medium storing image processing programs
CN1949269A (en) * 2006-11-10 2007-04-18 北京金山软件有限公司 Cartoon realizing method and cartoon drawing system thereof
US20080074415A1 (en) * 2006-08-24 2008-03-27 Samsung Electronics Co., Ltd. Method, medium and apparatus rendering 3D graphic data
CN101615298A (en) * 2009-08-12 2009-12-30 腾讯科技(深圳)有限公司 The method and apparatus that a kind of animation is play

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6690376B1 (en) * 1999-09-29 2004-02-10 Sega Enterprises, Ltd. Storage medium for storing animation data, image processing method using same, and storage medium storing image processing programs
CN1369862A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 Method and system for creating animation
US20080074415A1 (en) * 2006-08-24 2008-03-27 Samsung Electronics Co., Ltd. Method, medium and apparatus rendering 3D graphic data
CN1949269A (en) * 2006-11-10 2007-04-18 北京金山软件有限公司 Cartoon realizing method and cartoon drawing system thereof
CN101615298A (en) * 2009-08-12 2009-12-30 腾讯科技(深圳)有限公司 The method and apparatus that a kind of animation is play

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105474213A (en) * 2013-07-30 2016-04-06 柯达阿拉里斯股份有限公司 System and method for creating navigable views of ordered images
CN105474213B (en) * 2013-07-30 2019-12-03 柯达阿拉里斯股份有限公司 For creating the system and method that can manipulate view
CN105427358A (en) * 2015-12-23 2016-03-23 武汉斗鱼网络科技有限公司 View animation generation method and system based on Android
CN105427358B (en) * 2015-12-23 2020-05-12 武汉斗鱼网络科技有限公司 View animation generation method and system based on android

Also Published As

Publication number Publication date
CN103186917B (en) 2017-09-22

Similar Documents

Publication Publication Date Title
US9704427B2 (en) Method and device for adjusting grayscale brightness and 3D display device
CN113849451A (en) Low power refresh during semi-active workloads
US10269287B2 (en) Power saving method and device for displaying content in display screen
CN105005427A (en) Window management method and apparatus
JP2000227775A (en) Device and method for preventing image persistence of display device
CN109375980B (en) Touch drawing method based on Andriod system
CN102929415A (en) Local monitor and mouse display synchronization method for local monitor and remote virtual machine
CN103853510A (en) Multi-screen projection display control system and method of handheld electronic device
CN103021007A (en) Animation playing method, device and equipment
US10134326B2 (en) Device for and method of saving power when refreshing a display screen when displayed content does not change
US9898982B2 (en) Display method, device and computer-readable medium
CN104090755B (en) The vertical scrolling display methods of long Apply Names in Android Launcher interfaces
CN104951117A (en) Image processing system and related method for generating corresponding information by utilizing image identification
WO2015196804A1 (en) Virtual desktop image processing method and device, virtual desktop server and thin terminal
CN112905134A (en) Method and device for refreshing display and electronic equipment
CN102486913A (en) Bistable-state display screen refreshing method and device
CN103186917A (en) Method and device of achieving view cartoon display
CN102169404A (en) Display method for article displacement on screen of electronic device
CN106970768A (en) Method and system of the support multiresolution without Zoom display based on android system
KR20180027721A (en) Display device and method for displaying image using display device
CN106796735A (en) For by the system of 3D rendering multi-screen real-time synchronization
CN102404526A (en) Display control method and terminal for 3D menu
US9947278B2 (en) Display method and device and computer-readable medium
CN107632804B (en) Tiled display system
KR101215021B1 (en) Display device having memory effect and driving method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant