Summary of the invention
The present invention provides a kind of file cartoon display method and device; Can the front cover of the file form with animation be shown in broadcast interface; Cartoon display method provided by the invention shows the front cover of musical works when being not limited only to be used for playing back music with device, also be used for the file demonstration of other types such as books.
A kind of file cartoon display method provided by the invention comprises:
At the root layer background frame is set;
A container floor is set on the root layer;
On said container floor top the document display area territory is set, and in this document viewing area, the file display layer is set;
In said container floor bottom the information display area territory is set, and in this information display area territory, the fileinfo layer is set;
According to the order that receives, choose this order corresponding file, place it in the said file display layer, carry out animation display in said document display area territory with the form of picture; And the information that said file is corresponding is placed in the said fileinfo layer, in said information display area territory, shows.
Wherein, on said layer, be provided for spurring the sub-background frame of the scroll bar of file.
Wherein, the document display area territory is set, comprises on said container floor top:
On said container floor, be provided with one be used for handling the picture animation above that the picture rolling layer;
Said container floor be provided with one with the overlapping color gradient layer of said picture rolling layer, this color gradient layer is used to make and presents the color-grading effect when file shows.
Wherein, the said file display layer that in the document display area territory, is provided with comprises:
Picture layer is used for the form display file with picture;
The picture box rack-layer is used to hold said picture layer;
Picture inverted image layer is used to hold the inverted image of file;
Picture inverted image ccf layer is used to hold said picture inverted image layer.
Wherein, the order that said foundation receives, a plurality of files are placed on said file display layer after, also comprise:
Calculate the position of selected file, and calculate its sense of rotation and angle at said file display layer.
Accordingly, the present invention also provides a kind of file animation display device, comprising:
Background frame is provided with module, is used at the root layer background frame being set;
Container floor is provided with module, is used on the root layer, being provided with a container floor;
File shows module is set, and the container floor top that is used for being provided with at said container floor the module setting is provided with the document display area territory, and in this document viewing area, the file display layer is set;
Information shows module is set, and the container floor bottom that is used for being provided with at said container floor the module setting is provided with the information display area territory, and in this information display area territory, the fileinfo layer is set;
File animation display module is used for choosing this order corresponding file according to the order that receives, and places it in the said file display layer, carries out animation display in said document display area territory with the form of picture; And the information that said file is corresponding is placed in the said fileinfo layer, in said information display area territory, shows.
Wherein, file animation display device also comprises:
Sub-background frame is provided with module, is used on said layer, being provided for spurring the sub-background frame of the scroll bar of file.
Wherein, said file demonstration is provided with module, comprising:
The picture rolling layer is provided with the unit, be used on said container floor is provided with the container floor of module setting, being provided with one be used for handling the picture animation above that the picture rolling layer;
The color gradient layer is provided with the unit, be used on said container floor is provided with the container floor of module setting, being provided with one with the overlapping color gradient layer of said picture rolling layer, this color gradient layer is used to make and presents the color-grading effect when file shows.
Wherein, said file demonstration is provided with module, also comprises:
Picture layer is provided with the unit, and the container floor that is used for being provided with at said container floor the module setting is provided for the picture layer with the form display file of picture;
The picture box rack-layer is provided with the unit, and the container floor that is used for being provided with at said container floor the module setting is provided with the picture box rack-layer hold said picture layer;
Picture inverted image layer is provided with the unit, is used for being provided for holding at the container floor that said container floor is provided with the module setting picture inverted image layer of the inverted image of file;
Picture inverted image ccf layer is provided with the unit, is used for being provided for holding at the container floor that said container floor is provided with the module setting picture inverted image ccf layer of said picture inverted image layer.
Said file animation display device also comprises:
Computing module is used for receiving when choosing the order that said file shows in said file animation display module, calculates the position of selected file at said file display layer, and calculates its sense of rotation and angle.
File cartoon display method and device that embodiment of the present invention provides; The front cover of the file form with picture is placed in the zone of a plurality of layer buildings; This zone is divided into document display area territory and information display area territory; This document viewing area dynamically represents the front cover of file with the mode of picture, and the information display area territory represents the relevant information of file with static relatively mode.Embodiment of the present invention can dynamically show the front cover of the file that need the to show form with picture, to the user good experience is provided.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer, will combine the embodiment of the invention below, to the technical scheme in the embodiment of the invention carry out clear, intactly describe.Need to prove that in accompanying drawing or instructions, similar or components identical is used identical Reference numeral.
The present invention provides a kind of file cartoon display method and device; Can the front cover of the file form with animation be shown in broadcast interface; Cartoon display method provided by the invention shows the front cover of musical works when being not limited only to be used for playing back music with device, also be used for the file demonstration of other types such as books.
Referring to Fig. 1, be the schematic flow sheet of a kind of file cartoon display method embodiment one provided by the invention.
The method that present embodiment one provides comprises:
Step 100 is provided with background frame at the root layer;
Concrete, the relevant layers structures such as CALayer that employing cocoa provides among the present invention are as main body frame.On root (root) layer that CALayer layer structure provides, background frame (background view) is set.The synoptic diagram of background frame is as shown in Figure 2.
Step 101 is provided with a container floor on the root layer;
Concrete, a container (container) layer is set on the root layer, this container layer is used to handle file animation display effect.
Step 102 is provided with the document display area territory on said container floor top, and in this document viewing area, the file display layer is set;
Particularly, a document display area territory is set on the top of container layer, and the file display layer is set in this document viewing area.All files are placed in the file display layer with the form of picture, and in the document display area territory roll display.When file is disc; Be placed in the file display layer with the form of picture front cover disc; Follow-up it is shown in the document display area territory treating; When file is e-book, be placed in the file display layer with the form of picture front cover e-book, follow-up it is shown in the document display area territory treating.
Step 103 is provided with the information display area territory in said container floor bottom, and in this information display area territory, the fileinfo layer is set;
Concrete, in the bottom of container layer an information display area territory being set, this information display area territory also is provided with a fileinfo layer, and this document Information Level is used for the relevant information of display file.For example when file is disc, show the singer of this disc, songwriter, composer or the like.When file is e-book, show author, the summary info of this e-book.
Step 104 according to the order that receives, is chosen this order respective file, places it in the said file display layer, carries out animation display in said document display area territory with the form of picture; And the information that said file is corresponding is placed in the said fileinfo layer, in said information display area territory, shows.
Concrete, file to be shown is a plurality of, and the order that receives is the operation of carrying out to some files, therefore, need order according to this, selects corresponding file, then the front cover of this document is presented at the file display layer with the form of picture.
In some embodiments, said method also comprises:
On said layer, be provided for spurring the sub-background frame of the scroll bar of file.
Concrete, a sub-background (view) frame also is set on the root layer, this sub-view frame is used to be provided with a scroll bar, and this scroll bar is used for realizing spurring the operation of file.
Concrete, scroll bar adopts the drawrect method to be drawn in the zone of sub-view frame, can handle click, pulls the operations such as click of both sides button.When click on scroll bar is not put, can also make cover document that the effect of the rolling quickened is arranged.
In the concrete realization of the present invention, the interface of some response external message also is provided, and click, the keyboard right and left key, key in the mouse is to represent present selected state.
Referring to Fig. 3, be the schematic flow sheet of file cartoon display method embodiment two provided by the invention.
The file cartoon display method that present embodiment two provides will be described in detail in the flow process that container floor top is provided with the document display area territory, comprise:
Step 200, on said container floor, be provided with one be used for handling the picture animation above that the picture rolling layer.
Step 201, said container floor be provided with one with the overlapping color gradient layer of said picture rolling layer, this color gradient layer is used to make and presents the color-grading effect when file shows.
Concrete, on the container layer, place a CAScrollLayer and be used for being provided with picture rolling layer and color gradient layer in the above.
Said picture rolling layer is specifically as shown in Figure 4, and when showing, this layer is sightless.Said color gradient layer is as shown in Figure 5, and this color gradient layer presents the fade effect that is bleached by black by both sides to the centre, and its effect is to make the picture on the CAScrollLayer seem middle the brightest, and then darkness deepens on more past both sides.Certainly in other embodiment, color also can be other gradual manner.
Need to prove that picture rolling layer and color gradient layer are overlapping, they belong to the container layer.
In the embodiment of the invention, the front cover of file adopts CAAnimation to specify animation to realize in the animation effect of file display layer, and the rotation of picture adopts CATransform3D to specify the anglec of rotation to realize.
CAScrollLayer is as a unlimited scroll zones, and the just viewable portion that on the file display screen, shows also need be provided with the sublayer above and be used for display file.To be described in detail below.
Referring to Fig. 6, be the schematic flow sheet of file cartoon display method embodiment three provided by the invention.
The file cartoon display method that present embodiment three provides will specifically describe the flow process that the file display layer is set in the document display area territory, comprising:
Step 300, setting is with the picture layer of the form display file of picture in the document display area territory;
Step 301 is provided for holding the picture box rack-layer of said picture layer in the document display area territory;
Step 302 is provided for holding the picture inverted image layer of the inverted image of file in the document display area territory;
Step 303 is provided for holding the picture inverted image ccf layer of said picture inverted image layer in the document display area territory.
When realizing the animation effect of file, picture layer, picture box rack-layer, picture inverted image layer, these four layers of picture inverted image ccf layer are to move together.
And the fileinfo layer is positioned at the information display area territory of bottom, document display area territory; Specifically as shown in Figure 7; This document Information Level can be one or two above layers, layer with layer between do not overlap, just be used to represent the corresponding information of cover document picture with the current demonstration of file display layer.When the cover document of file display layer moved, the fileinfo layer did not move, and just the information of layer the inside interpolation can be changed along with cover document, and the cover document that shows in information that add layer the inside and the file display layer is a binding relationship.
Need to prove, in the file display layer provided by the invention, can place the front cover of a plurality of files, in the process of animation display, have only the front cover of a file can be in the middle in document display area territory.Work as filesselected, the method that the realization rolling effect provides through the calayer class on the document display area territory is calculated the position of selected file at said file display layer, and calculates its sense of rotation and angle, is specially:
Calculate and the position of every pictures layer on CAScrollLayer of arranging, and define their yawing moment and angle.
In the preferred embodiment, when cover document was a lot, the cover document that adopts dynamic demonstration to choose was the center, and interface is provided, and the radius of viewing area is set, such as 20 cover documents.Then final display effect is that 20 cover documents of about the cover document that is positioned at the center, respectively arranging amount to 41.
The file cartoon display method that embodiment of the present invention provides; The front cover of the file form with picture is placed in the zone of a plurality of layer buildings; This zone is divided into document display area territory and information display area territory; This document viewing area dynamically represents the front cover of file with the mode of picture, and the information display area territory represents the relevant information of file with static relatively mode.Concrete effect is as shown in Figure 8.
Embodiment of the present invention can dynamically show the front cover of the file that need the to show form with picture, to the user good experience is provided.
Referring to Fig. 9, be the structural representation of a kind of file animation display device embodiment one provided by the invention.
A kind of file animation display device that present embodiment one provides comprises:
Background frame is provided with module 10, is used at the root layer background frame being set;
Concrete, the relevant layers structures such as CALayer that employing cocoa provides among the present invention are as main body frame.Background frame is provided with module 10 and on root (root) layer that CALayer layer structure provides, background frame (background view) is set, and the synoptic diagram of background frame is referring to Fig. 2.
Container floor is provided with module 11, is used on the root layer, being provided with a container floor;
Concrete, said container floor is provided with module 11 container (container) layer is set on the root layer, and this container layer is used to handle file animation display effect.
File shows module 12 is set, and the container floor top that is used for being provided with at said container floor the module setting is provided with the document display area territory, and in this document viewing area, the file display layer is set;
Particularly, the file demonstration is provided with module 12, a document display area territory is set on the top of container layer, and the file display layer is set in this document viewing area.All files are placed in the file display layer with the form of picture, and in the document display area territory roll display.When file is disc; Be placed in the file display layer with the form of picture front cover disc; Follow-up it is shown in the document display area territory treating; When file is e-book, be placed in the file display layer with the form of picture front cover e-book, follow-up it is shown in the document display area territory treating.
Information shows module 13 is set, and the container floor bottom that is used for being provided with at said container floor the module setting is provided with the information display area territory, and in this information display area territory, the fileinfo layer is set;
Concrete, information shows that module 13 is set is provided with an information display area territory in the bottom of container layer, and this information display area territory also is provided with a fileinfo layer, and this document Information Level is used for the relevant information of display file.For example when file is disc, show the singer of this disc, songwriter, composer or the like.When file is e-book, show author, the summary info of this e-book.
File animation display module 14 is used for choosing this order corresponding file according to the order that receives, and places it in the said file display layer, carries out animation display in said document display area territory with the form of picture; And the information that said file is corresponding is placed in the said fileinfo layer, in said information display area territory, shows.
Concrete; File to be shown is a plurality of; The order that file animation display device receives is the operation of carrying out to some files, and therefore, file animation display module 14 need be ordered according to this; Select corresponding file, then the front cover of this document is presented at the file display layer with the form of picture.
Wherein, sub-background frame is provided with module 15, is used on said layer, being provided for spurring the sub-background frame of the scroll bar of file.
Concrete, sub-background frame is provided with module 15 a sub-background (view) frame also is set on the root layer, and this sub-view frame is used to be provided with a scroll bar, and this scroll bar is used for realizing spurring the operation of file.Concrete, scroll bar adopts the drawrect method to be drawn in the zone of sub-view frame, can handle click, pulls the operations such as click of both sides button.When click on scroll bar is not put, can also make cover document that the effect of the rolling quickened is arranged.In concrete the realization, the interface of some response external message is provided also at file animation display device of the present invention, and click, the keyboard right and left key, key in the mouse is to represent present selected state.
Referring to Figure 10, be the structural representation of file animation display device embodiment two provided by the invention.
The file animation display device that present embodiment two provides will be described file in detail and show function and the structure that module is set.
The file demonstration that present embodiment provides is provided with module 12, comprising:
The picture rolling layer is provided with unit 120, be used for said container floor be provided be provided with on the container floor that module 11 is provided with one be used for handling the picture animation above that the picture rolling layer;
The color gradient layer is provided with unit 121, be used for said container floor be provided be provided with on the container floor that module 11 is provided with one with the overlapping color gradient layer of said picture rolling layer, this color gradient layer is used to make and presents the color-grading effect when file shows.
Concrete, on the container layer, place a CAScrollLayer, the picture rolling layer is provided with unit 120 and is used for being provided with the picture rolling layer in the above, and the color gradient layer is provided with unit 121 and is used for being provided with the color gradient layer in the above.
Said picture rolling layer is specifically as shown in Figure 4, and when showing, this layer is sightless.Said color gradient layer is as shown in Figure 5, and this color gradient layer presents the fade effect that is bleached by black by both sides to the centre, and its effect is to make the picture on the CAScrollLayer seem middle the brightest, and then darkness deepens on more past both sides.Certainly in other embodiment, color also can be other gradual manner.
Need to prove that picture rolling layer and color gradient layer are overlapping, they belong to the container layer.
In the embodiment of the invention, the front cover of file adopts CAAnimation to specify animation to realize in the animation effect of file display layer, and the rotation of picture adopts CATransform3D to specify the anglec of rotation to realize.
CAScrollLayer is as a unlimited scroll zones, and the just viewable portion that on the file display screen, shows also need be provided with the sublayer above and be used for display file.To be described in detail below.
Wherein, said file demonstration is provided with module 12, also comprises:
Picture layer is provided with unit 122, is used at said container floor the container floor that module 11 is provided with being set and is provided for the picture layer with the form display file of picture;
The picture box rack-layer is provided with unit 123, is used at said container floor the picture box rack-layer that container floor setting that module 11 is provided with is held said picture layer being set;
Picture inverted image layer is provided with unit 124, is used at said container floor the picture inverted image layer that container floor that module 11 is provided with is provided for holding the inverted image of file being set;
Picture inverted image ccf layer is provided with unit 125, is used at said container floor the picture inverted image ccf layer that container floor that module 11 is provided with is provided for holding said picture inverted image layer being set.
When realizing the animation effect of file, picture layer, picture box rack-layer, picture inverted image layer, these four layers of picture inverted image ccf layer are to move together.
And the fileinfo layer is positioned at the information display area territory of bottom, document display area territory; Specifically as shown in Figure 7; This document Information Level can be one or two above layers, layer with layer between do not overlap, just be used to represent the corresponding information of cover document picture with the current demonstration of file display layer.When the cover document of file display layer moved, the fileinfo layer did not move, and just the information of layer the inside interpolation can be changed along with cover document, and the cover document that shows in information that add layer the inside and the file display layer is a binding relationship.
Need to prove, in the file display layer provided by the invention, can place the front cover of a plurality of files, in the process of animation display, have only the front cover of a file can be in the middle in document display area territory.
Referring to Figure 11, be the structural representation of file animation display device embodiment three provided by the invention.
The file animation display device that present embodiment three provides each module in comprising embodiment one, also comprises:
Computing module 16 is used for receiving when choosing the order that said file shows in said file animation display module 14, calculates the position of selected file at said file display layer, and calculates its sense of rotation and angle, is specially:
Computing module 16 calculates and the position of every pictures layer on CAScrollLayer of arranging, and defines their yawing moment and angle.
In the preferred embodiment, when cover document was a lot, the cover document that computing module 16 adopts dynamic demonstration to choose was the center, and interface is provided, and the radius of viewing area is set, such as 20 cover documents.Then final display effect is that 20 cover documents of about the cover document that is positioned at the center, respectively arranging amount to 41.
The file animation display device that embodiment of the present invention provides; The front cover of the file form with picture is placed in the zone of a plurality of layer buildings; This zone is divided into document display area territory and information display area territory; This document viewing area dynamically represents the front cover of file with the mode of picture, and the information display area territory represents the relevant information of file with static relatively mode.Embodiment of the present invention can dynamically show the front cover of the file that need the to show form with picture, to the user good experience is provided.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that previous embodiment is put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.