CN103345534A - Dynamic graph processing method and device - Google Patents

Dynamic graph processing method and device Download PDF

Info

Publication number
CN103345534A
CN103345534A CN2013103208505A CN201310320850A CN103345534A CN 103345534 A CN103345534 A CN 103345534A CN 2013103208505 A CN2013103208505 A CN 2013103208505A CN 201310320850 A CN201310320850 A CN 201310320850A CN 103345534 A CN103345534 A CN 103345534A
Authority
CN
China
Prior art keywords
node
composite
canvas
subobject
transformation result
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
CN2013103208505A
Other languages
Chinese (zh)
Other versions
CN103345534B (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.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon Technology 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 Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN201310320850.5A priority Critical patent/CN103345534B/en
Publication of CN103345534A publication Critical patent/CN103345534A/en
Application granted granted Critical
Publication of CN103345534B publication Critical patent/CN103345534B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a dynamic graph processing method and a dynamic graph processing device. A dynamic graph comprises canvas elements, graphic elements and animation elements. The method comprises the steps of analyzing the canvas elements, the graphic elements and the animation elements in the dynamic graph; and according to analyzing results of the canvas elements, the graphic elements and the animation elements, establishing an XML-data-format node tree, and expressing each element in the dynamic graph in a mode of a node in the node tree, wherein the canvas elements include a canvas object and a corresponding canvas attribute value thereof, the graphic elements include a graphic object and a corresponding graphic attribute value thereof, and the animation elements include an animation object and a corresponding animation attribute value thereof. According to the embodiment of the invention, through expressing each element in the dynamic graph in a mode of an XML-data-format node tree, and XML-data-format data can be read by common application software, and therefore, the application scope of the dynamic graph is increased, and the reading efficiency of dynamic graph reading is improved.

Description

A kind of dynamic figure disposal route and device
Technical field
The application relates to the industrial control technology field, particularly a kind of dynamic figure disposal route and device.
Background technology
In industrial control field, need use dynamic figure to represent production procedure etc.Dynamically figure is usually based on painting canvas, a plurality of Drawing Objects are set in this painting canvas, can also comprise the composite figure object that contains a plurality of Drawing Objects etc., determine dynamic change state etc. between Drawing Object and the composite figure object to form dynamically figure by its property value is set in the painting canvas.And be provided with a plurality of animate objects in each Drawing Object, each Drawing Object all can be determined dynamical state between its animate object that is contained in the mode that its property value is set, each animate object all has its property value separately, as color, size, position etc.
The existing form that the preservation of dynamic figure related content is generally adopted stream file.
Stream file format refers to that the data block that the content that needs are preserved is converted to regular length is written in the specified file, and this form is to the form of file without any agreement itself; Be that stream file is exactly the file that does not have structure.
Owing to there is not set form when adopting stream file format that the related content of dynamic figure is preserved, be unfavorable for that therefore the application software of using dynamic figure resolves dynamic figure.
Summary of the invention
The application's technical matters to be solved provides a kind of dynamic figure disposal route and device, when in order to solve the available technology adopting stream file format dynamic figure being handled, because the single a plurality of application software of using dynamic figure that are unfavorable for of file structure are resolved the technical matters that reads to dynamic figure.
The application provides a kind of dynamic figure disposal route, and described dynamic figure comprises canvas element, graphic element and animated element, and described method comprises:
Resolve the canvas element, graphic element and the animated element that comprise among the described dynamic figure;
According to the analysis result of described canvas element, graphic element and animated element, set up the node tree of XML data layout, each element among the described dynamic figure is represented with the form of described node tree node;
Wherein:
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
Said method, preferred, the described node tree of setting up the XML data layout comprises:
Described canvas object and corresponding painting canvas property value thereof are carried out the conversion of XML data layout, with the transformation result of the described canvas object root node as described node tree, with the transformation result of the described painting canvas property value slave node as described root node;
Described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data layout, with the transformation result of the described Drawing Object slave node as described root node, with the transformation result of the described graphic attribute value slave node as its graph of a correspondence Object node;
Described animate object and corresponding animation attributes value thereof are carried out the conversion of XML data layout, with the transformation result of the described animate object slave node as Drawing Object node under it, with the transformation result of the described animation attributes value slave node as animate object node under it.
Said method, preferably, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, and wherein, described method also comprises:
Set up each self-corresponding node of composite figure element described in the described node tree, composite figure daughter element and combined animation daughter element, be specially:
Described composite figure object and corresponding composite attribute value thereof are carried out the XML Data Format Transform, with the transformation result of the described composite figure object slave node as described root node, with the transformation result of the described composite attribute value slave node as its corresponding composite figure Object node;
Described composite figure subobject and corresponding composite figure property value thereof are carried out the conversion of XML data layout, with the transformation result of the described composite figure subobject slave node as its corresponding composite figure Object node, with the transformation result of the described composite figure property value slave node as its corresponding composite figure subobject node;
Described combined animation subobject and corresponding combined animation property value thereof are carried out the conversion of XML data layout, with the transformation result of the described combined animation subobject slave node as composite figure subobject node under it, with the transformation result of the described combined animation property value slave node as its corresponding combined animation subobject node.
The application also provides another kind of dynamic figure disposal route, and described dynamic figure exists with the form of described node tree, and described node tree comprises the node of XML data layout, and described method comprises:;
Travel through the node in the described node tree;
According to each node in the described node tree, reduce described dynamic figure;
Wherein:
Described dynamic figure comprises canvas element, graphic element, animated element;
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
Said method, preferred, the described dynamic figure of described reduction comprises:
Root node in the described node tree is carried out the conversion of object data form, with the transformation result of the described root node canvas object as described dynamic figure;
The slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of image object node in the slave node of described canvas object node as the Drawing Object in the described canvas object, with the transformation result of painting canvas property value node in the slave node of the described canvas object node painting canvas property value as described canvas object correspondence;
The slave node of described image object node is carried out the conversion of object data form, with the transformation result of animate object node in the slave node of described Drawing Object node as the animate object in the Drawing Object under it, with the transformation result of graphic attribute value node in the slave node of described Drawing Object node as Drawing Object graph of a correspondence property value under it;
The slave node of described animate object node is carried out the conversion of object data form, with the transformation result of the slave node of the described animate object node animation attributes value as animate object correspondence under it.
Said method, preferably, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, and wherein, described method also comprises:
Reduce composite figure element, composite figure daughter element, combined animation daughter element among the described dynamic figure, be specially:
The slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of composite figure Object node in the slave node of described canvas object node as the composite figure object in the described canvas object;
The slave node of described composite figure Object node is carried out the conversion of object data form, with the transformation result of combination image subobject node in the slave node of described composite figure Object node as the composite figure subobject in the described composite figure object, with the transformation result of composite attribute value node in the slave node of the described composite figure Object node composite attribute value as described composite figure object correspondence;
Slave node to described combination image subobject node carries out the conversion of object data form, with the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as the combined animation subobject in the composite figure subobject under it, with the transformation result of composite figure property value node in the slave node of the described composite figure subobject node composite figure property value as composite figure subobject correspondence under it;
Slave node to described combined animation subobject node carries out the conversion of object data form, with the transformation result of the slave node of the described combined animation subobject node combined animation property value as combined animation subobject correspondence under it.
The application also provides a kind of dynamic figure treating apparatus, and described dynamic figure comprises canvas element, graphic element and animated element, and described device comprises:
The element resolution unit is used for resolving canvas element, graphic element and the animated element that described dynamic figure comprises;
Node tree is set up the unit, is used for setting up the node number of XML data layout according to described canvas element, graphic element and animated element, and each element among the described dynamic figure is represented with the form of described node tree node;
Wherein:
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
Said apparatus, preferred, described node tree is set up the unit and is comprised:
First node conversion subelement, be used for described canvas object and corresponding painting canvas property value thereof are carried out the conversion of XML data layout, with the transformation result of the described canvas object root node as described node tree, with the transformation result of the described painting canvas property value slave node as described root node;
Section Point conversion subelement, be used for described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data layout, with the transformation result of the described Drawing Object slave node as described root node, with the transformation result of the described graphic attribute value slave node as its graph of a correspondence Object node;
The 3rd node conversion subelement, be used for described animate object and corresponding animation attributes value thereof are carried out the conversion of XML data layout, with the transformation result of the described animate object slave node as Drawing Object node under it, with the transformation result of the described animation attributes value slave node as its described animate object node.
Said apparatus, preferably, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, wherein:
Described node tree is set up the unit and is also comprised:
The 4th node conversion subelement, be used for described composite figure object and corresponding composite attribute value thereof are carried out the XML Data Format Transform, with the transformation result of the described composite figure object slave node as described root node, with the transformation result of the described composite attribute value slave node as its corresponding composite figure Object node;
The 5th node conversion subelement, be used for described composite figure subobject and corresponding composite figure property value thereof are carried out the conversion of XML data layout, with the transformation result of the described composite figure subobject slave node as its corresponding composite figure Object node, with the transformation result of the described composite figure property value slave node as its corresponding composite figure subobject node;
The 6th node conversion subelement, be used for described combined animation subobject and corresponding combined animation property value thereof are carried out the conversion of XML data layout, with the transformation result of the described combined animation subobject slave node as composite figure subobject node under it, with the transformation result of the described combined animation property value slave node as its corresponding combined animation subobject node.
The application also provides another kind of dynamic figure treating apparatus, and described dynamic figure exists with the form of described node tree, and described node tree comprises the node of XML data layout, and described device comprises:
Node traversal unit is for the node of the described node tree of traversal;
Dynamically the figure reduction unit is used for each node according to described node tree, reduces described dynamic figure;
Wherein:
Described dynamic figure comprises canvas element, graphic element, animated element;
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
Said apparatus, preferred, described dynamic figure reduction unit comprises:
First goes back atomic unit, is used for the root node of described node tree is carried out the conversion of object data form, with the transformation result of the described root node canvas object as described dynamic figure;
Second goes back atomic unit, be used for the slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of image object node in the slave node of described canvas object node as the Drawing Object in the described canvas object, with the transformation result of painting canvas property value node in the slave node of the described canvas object node painting canvas property value as described canvas object correspondence;
The 3rd goes back atomic unit, be used for the slave node of described image object node is carried out the conversion of object data form, with the transformation result of animate object node in the slave node of described Drawing Object node as the animate object in the Drawing Object under it, with the transformation result of graphic attribute value node in the slave node of described Drawing Object node as Drawing Object graph of a correspondence property value under it;
The 4th goes back atomic unit, is used for the slave node of described animate object node is carried out the conversion of object data form, with the transformation result of the slave node of the described animate object node animation attributes value as animate object correspondence under it.
Said apparatus, preferably, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, wherein:
Described dynamic figure reduction unit also comprises:
The 5th goes back atomic unit, be used for the slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of composite figure Object node in the slave node of described canvas object node as the composite figure object in the described canvas object;
The 6th goes back atomic unit, be used for the slave node of described composite figure Object node is carried out the conversion of object data form, with the transformation result of combination image subobject node in the slave node of described composite figure Object node as the composite figure subobject in the described composite figure object, with the transformation result of composite attribute value node in the slave node of the described composite figure Object node composite attribute value as described composite figure object correspondence;
The 7th goes back atomic unit, be used for the slave node of described combination image subobject node is carried out the conversion of object data form, with the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as the combined animation subobject in the composite figure subobject under it, with the transformation result of composite figure property value node in the slave node of the described composite figure subobject node composite figure property value as composite figure subobject correspondence under it;
The 8th goes back atomic unit, be used for the slave node of described combined animation subobject node is carried out the conversion of object data form, with the transformation result of the slave node of the described combined animation subobject node combined animation property value as combined animation subobject correspondence under it.
By such scheme as can be known, a kind of dynamic figure disposal route and device that the application provides, by each element among the dynamic figure is represented with the node tree form of XML data layout, and the data of XML data layout can be read by general application software, after follow-up storage of described dynamic figure, not only can conveniently be read by multiple dynamic figure application software, and need not to resolve any configuration file etc., increase the range of application of dynamic figure, and improved the reading efficiency that dynamic figure reads.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiment of the application, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The process flow diagram of a kind of dynamic figure disposal route embodiment one that Fig. 1 provides for the application;
The part process flow diagram of a kind of dynamic figure disposal route embodiment two that Fig. 2 provides for the application;
Fig. 3 is the dynamic schematic diagram of the embodiment of the present application two operations;
The process flow diagram of a kind of dynamic figure disposal route embodiment three that Fig. 4 provides for the application;
The part process flow diagram of a kind of dynamic figure disposal route embodiment four that Fig. 5 provides for the application;
Fig. 6 is the application exemplary plot of the embodiment of the present application four;
The structural representation of a kind of dynamic figure treating apparatus embodiment five that Fig. 7 provides for the application;
The part-structure synoptic diagram of a kind of dynamic figure treating apparatus embodiment six that Fig. 8 provides for the application;
Fig. 9 is another part structural representation of the embodiment of the present application six;
The structural representation of a kind of dynamic figure treating apparatus embodiment seven that Figure 10 provides for the application;
The part-structure synoptic diagram of a kind of dynamic figure treating apparatus embodiment eight that Figure 11 provides for the application;
Figure 12 is another part structural representation of the embodiment of the present application eight.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment only is the application's part embodiment, rather than whole embodiment.Based on the embodiment among the application, those of ordinary skills are not making the every other embodiment that obtains under the creative work prerequisite, all belong to the scope of the application's protection.
With reference to figure 1, the process flow diagram of a kind of dynamic figure disposal route embodiment one that provides for the application, described method is applicable in the application that the motion graphics that is in dynamic demonstration is handled, in the embodiment of the present application, with the example that saves as to described dynamic figure, described method can may further comprise the steps:
Step 101: resolve the canvas element, graphic element and the animated element that comprise among the described dynamic figure.
Wherein, as described in the text, described dynamic figure is when dynamically show state exists, and based on painting canvas, described painting canvas is provided with figure, and figure is provided with animation.The dynamic figures effect of described dynamic figure realizes by the value of variable, dynamical state (position or color value etc.) as title, minimum value, maximal value and minimum value and the maximal value correspondence of variable, for example, Drawing Object Rect1 comprises the dynamic of horizontal shift, the left position of this Drawing Object is 20 when the minimum value of variable OPCTAG2 is 0, when OPCTAG2 reaches maximal value 100, the left position of Drawing Object is 420, specific to moving horizontally shown in the animation of matrix object in the physical record code as follows.
Figure BDA00003574513500091
Figure BDA00003574513500101
Be, described dynamic figure comprises canvas element, described canvas element comprises canvas object and corresponding painting canvas property value thereof, described dynamic figure also comprises graphic element, described graphic element is based on described canvas object, define the equivalent and form of expression of contained graphic element in described canvas object of length and width shape attribute of described canvas object by described painting canvas property value, as the position relation between each graphic element etc.Described graphic element comprises Drawing Object and graph of a correspondence object and graph of a correspondence property value thereof, described dynamic figure also comprises animated element, the Drawing Object of a graphic element among each described animated element and the described dynamic figure has membership, described animated element is based on the Drawing Object under it, horizontal shift dynamic value by described its graph of a correspondence object of graphic attribute value defined, left side distance, top margin, width and highly waiting and the form of expression of contained animated element in described Drawing Object, the position relation between each animated element etc. in the Drawing Object as described.Described animated element comprises animate object and corresponding animation attributes value thereof, by property values such as the position of the described animate object of described animation attributes value defined, sizes.
Wherein, the analysis result in the described step 101 is, Drawing Object and graphic attribute value thereof, the animate object in the described image object and animation attributes value thereof in the canvas object in the described dynamic figure that gets access to and painting canvas property value thereof, the described canvas object.
Step 102: according to the analysis result of described canvas element, graphic element and animated element, set up the node tree of XML data layout, each element among the described dynamic figure is represented with the form of described node tree.
Wherein, described step 102 is the process that described dynamic diagram sequences turns to the text of XML data layout.After described step 102 is complete, described dynamic figure with the text representation figure of XML data layout and dynamically, the dynamic parameter of the value correspondence of variable related in the rendering parameter of Drawing Object in the dynamic figure painting canvas object such as length, width and coordinate etc., the dynamic effect and variable is saved in the XML file, reaches the purpose of representing exclusive data with general format.
By in the such scheme as can be known, among a kind of dynamic figure disposal route embodiment one that the application provides, by each element among the dynamic figure is represented with the node tree form of XML data layout, and the data of XML data layout can be read by general application software, after follow-up storage of described dynamic figure, not only can conveniently be read by multiple dynamic figure application software, and need not to resolve any configuration file etc., increase the range of application of dynamic figure, and improved the reading efficiency that dynamic figure reads.
With reference to figure 2, the process flow diagram of step 102 described in a kind of dynamic figure disposal route embodiment two that provides for the application, described step 102 can may further comprise the steps realization when setting up the node tree of XML data layout:
Step 201: described canvas object and corresponding painting canvas property value thereof are carried out the conversion of XML data layout, with the transformation result of the described canvas object root node as described node tree, with the transformation result of the described painting canvas property value slave node as described root node.
Wherein, the execution result of described step 201 is: set up root node in the described node tree and the slave node of painting canvas property value correspondence, as shown in Figure 3.
Step 202: described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data layout, with the transformation result of the described Drawing Object slave node as described root node, with the transformation result of the graphic attribute value slave node as its graph of a correspondence Object node.
Wherein, the execution result of described step 102 is: the node of setting up the Drawing Object correspondence in the canvas object in the described node tree, slave node as root node, and set up the node of described graphic attribute value, as the slave node of the corresponding figure Object node of this graphic attribute value, as shown in Figure 3.
Step 203: described animate object and corresponding animation attributes value thereof are carried out the conversion of XML data layout, with the transformation result of the described animate object slave node as Drawing Object node under it, with the transformation result of the described animation attributes value slave node as animate object node under it.
Wherein, the execution result of described step 203 is: the node of setting up the animate object correspondence in each Drawing Object in the described node tree, slave node as Drawing Object node under it, and set up the node of described animation attributes value, as the slave node of the corresponding animate object node of this animation attributes value, as shown in Figure 3.
Need to prove,, to the implementation of described step 203, can be understood as in described step 201:
At first set up the root node of described canvas object correspondence, and set up the node of each described painting canvas property value correspondence successively, as the slave node of described root node, the text that the root node set up and slave node sequence thereof change into the XML data layout is preserved;
Secondly, travel through each the described Drawing Object in the described canvas object successively, set up the node of each described Drawing Object correspondence, slave node as described root node, travel through the graphic attribute value of each described Drawing Object, set up the node of each described graphic attribute value correspondence, as the slave node of the corresponding figure Object node of this graphic attribute value, the node of the Drawing Object set up and the text that the slave node sequence changes into the XML data layout thereof are preserved;
Again, travel through each the described animate object in the described Drawing Object successively, set up the node of each described animate object correspondence, slave node as Drawing Object node under it, travel through the animation attributes value of each described animate object, set up the node of each described animation attributes value correspondence, as the slave node of this animation attributes value object animate object node, the node of the animate object set up and the text that the slave node sequence changes into the XML data layout thereof are preserved.
Namely, in the described step 102 when setting up the node tree of XML data layout, can set up each slave node layer by root node layering successively, also can be begun by root node, be that the root node of subtree is set up subtree with the slave node of described root node, for example successively, after setting up root node, setting up with each Drawing Object node successively is the subtree of root node, finally with in the preamble reaches identical purpose, finishes the foundation to node tree.
Need to prove that described step 102 can begin layering successively by canvas element and contribute, and also can be begun by canvas element, successively each graphic element and animated element thereof is contribute when setting up described node tree.In Fig. 3, begun to set up to lower leaf by the root node of node tree, or begin from left to right or begin to set up from the right side to doing by the root node of node tree.Below be the partial code example after a certain Drawing Object conversion in the embodiment of the present application:
Figure BDA00003574513500131
Figure BDA00003574513500141
In addition, can also comprise the composite figure element among the described dynamic figure, comprise composite figure object and corresponding composite attribute value thereof in the described composite figure element, described dynamic figure also comprises the composite figure daughter element, described composite figure daughter element serves as that the basis shows with described composite figure object, equivalent and the form of expression of contained composite figure daughter element in described composite figure object by the shape attribute of the described composite figure object of described composite attribute value defined is as the position relation between each composite figure daughter element etc.Described composite figure daughter element comprises that (Drawing Object described in described composite figure subobject and the preamble can be the object of similar structures for composite figure subobject and corresponding composite figure property value thereof, distinguished with different titles in the embodiment of the present application), described dynamic figure also comprises the combined animation daughter element, described combined animation daughter element serves as that the basis shows with described composite figure subobject, shape attribute equivalence by the described composite figure subobject of described composite figure attribute definition, as the horizontal shift dynamic value, left side distance, top margin, width etc., and the form of expression property value of contained combined animation daughter element in described composite figure subobject, as position relation between each combined animation daughter element etc.Described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, is defined the property values such as position, size of described combined animation subobject by described combined animation property value.
Thus, described method can also comprise:
Set up each self-corresponding node of composite figure element described in the described node tree, composite figure daughter element and combined animation daughter element, be specially:
Described composite figure object and corresponding composite attribute value thereof are carried out the XML Data Format Transform, with the transformation result of the described composite figure object slave node as described root node, with the transformation result of the described composite attribute value slave node as its corresponding composite figure Object node;
Described composite figure subobject and corresponding composite figure property value thereof are carried out the conversion of XML data layout, with the transformation result of the described composite figure subobject slave node as its corresponding composite figure Object node, with the transformation result of the described composite figure property value slave node as its corresponding composite figure subobject node;
Described combined animation subobject and corresponding combined animation property value thereof are carried out the conversion of XML data layout, with the transformation result of the described combined animation subobject slave node as composite figure subobject node under it, with the transformation result of the described combined animation property value slave node as its corresponding combined animation subobject node.
Need to prove that the process of setting up node tree in the above-mentioned process of setting up the corresponding node of composite figure object described in the described node tree and the preamble is similar, is not described in detail at this.
In actual applications, the dynamic displaying contents of described dynamic figure is handled outside above-mentioned two kinds of contents combination, following content combination can also be arranged, as, comprise described canvas element among the described dynamic figure, described composite figure element, outside described composite figure daughter element and the combined animation daughter element, can not comprise described graphic element and described animated element, and the described dynamic figure that exists with the foregoing array mode, when setting up described node tree, can be as similar in the preamble, at first set up the root node of canvas object correspondence in the described canvas element and the slave node of corresponding painting canvas property value correspondence thereof, set up described composite figure element according to the content in the embodiment of the present application two more afterwards, the node of described composite figure daughter element and combined animation daughter element correspondence.Similar in detailed process and the preamble, do not repeat them here.
With reference to figure 4, the process flow diagram of a kind of dynamic figure disposal route embodiment three that provides for the application, described method is applicable in the application that the motion graphics that is in dynamic demonstration is handled, in the embodiment of the present application, with the example that is read as to described dynamic figure, described dynamic figure exists with the form of described node tree, and described node tree comprises the node of XML data layout, and described method can may further comprise the steps:
Step 401: travel through the node in the described node tree.
Wherein, described node tree exists with the text of XML data layout, and the node in the described node tree comprises the node of canvas element corresponding node, graphic element Object node and animated element correspondence among the described dynamic figure.
Step 402: according to each node in the described node tree, reduce described dynamic figure;
Wherein, described step 402 is the anti-process of step 102 described in the preamble, and the unserializing process to the node tree of described dynamic figure it is also understood that into, and the text of XML data layout is carried out the process that object data is converted to the dynamic figure of dynamic demonstration.
By such scheme as can be known, a kind of dynamic figure disposal route embodiment three that the application provides, the node tree that will exist with the text of XML data layout is reduced into the dynamic figure of dynamic demonstration, need not in the prior art resolving of configuration file is improved the reading efficiency that dynamic figure reads.
Need to prove that in the described step 402, each node to traversing is reduced into element among the corresponding dynamic figure successively, as canvas element, graphic element, animated element etc., and then the dynamic figure that obtains reducing.
With reference to figure 5, the process flow diagram of step 402 described in a kind of dynamic figure disposal route embodiment four that provides for the application, can realize by following steps during the described dynamic figure of reduction in the described step 402:
Step 501: the root node in the described node tree is carried out the conversion of object data form, with the transformation result of the described root node canvas object as described dynamic figure.
Step 502: the slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of image object node in the slave node of described canvas object node as the Drawing Object in the described canvas object, with the transformation result of painting canvas property value node in the slave node of the described canvas object node painting canvas property value as described canvas object correspondence;
Step 503: the slave node of described image object node is carried out the conversion of object data form, with the transformation result of animate object node in the slave node of described Drawing Object node as the animate object in the Drawing Object under it, with the transformation result of graphic attribute value node in the slave node of described Drawing Object node as Drawing Object graph of a correspondence property value under it;
Step 504: the slave node of described animate object node is carried out the conversion of object data form, with the transformation result of the slave node of the described animate object node animation attributes value as animate object correspondence under it.
As shown in Figure 6, be the exemplary plot of described step 401 to the described step 402.
Need to prove that described step 402 can begin the reduction of layering successively by canvas element when the described dynamic figure of reduction, also can be begun by canvas element, successively each graphic element and animated element thereof is reduced.In Fig. 3, begun to the lower leaf reduction by the root node of node tree, by the root node of node tree begin from left to right or from the right side to doing to begin reduction.
In addition, can also comprise composite figure element, composite figure daughter element, each self-corresponding node of combined animation daughter element in the described node tree, therefore, described method can also comprise:
Reduce composite figure element, composite figure daughter element, combined animation daughter element among the described dynamic figure, be specially:
The slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of composite figure Object node in the slave node of described canvas object node as the composite figure object in the described canvas object;
The slave node of described composite figure Object node is carried out the conversion of object data form, with the transformation result of combination image subobject node in the slave node of described composite figure Object node as the composite figure subobject in the described composite figure object, with the transformation result of composite attribute value node in the slave node of the described composite figure Object node composite attribute value as described composite figure object correspondence;
Slave node to described combination image subobject node carries out the conversion of object data form, with the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as the combined animation subobject in the composite figure subobject under it, with the transformation result of composite figure property value node in the slave node of the described composite figure subobject node composite figure property value as composite figure subobject correspondence under it;
Slave node to described combined animation subobject node carries out the conversion of object data form, with the transformation result of the slave node of the described combined animation subobject node combined animation property value as combined animation subobject correspondence under it.
After reduction is finished, can also comprise the composite figure element among the described dynamic figure, comprise composite figure object and corresponding composite attribute value thereof in the described composite figure element, described dynamic figure also comprises the composite figure daughter element, described composite figure daughter element serves as that the basis shows with described composite figure object, equivalent and the form of expression of contained composite figure daughter element in described composite figure object by the shape attribute of the described composite figure object of described composite attribute value defined is as the position relation between each composite figure daughter element etc.Described composite figure daughter element comprises that (Drawing Object described in described composite figure subobject and the preamble can be the object of similar structures for composite figure subobject and corresponding composite figure property value thereof, distinguished with different titles in the embodiment of the present application), described dynamic figure also comprises the combined animation daughter element, described combined animation daughter element serves as that the basis shows with described composite figure subobject, shape attribute equivalence by the described composite figure subobject of described composite figure attribute definition, as the horizontal shift dynamic value, left side distance, top margin, width etc., and the form of expression property value of contained combined animation daughter element in described composite figure subobject, as position relation between each combined animation daughter element etc.Described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, is defined the property values such as position, size of described combined animation subobject by described combined animation property value.
Need to prove, described in the described dynamic figure of above-mentioned reduction in the process of composite figure element, composite figure daughter element, combined animation daughter element and the preamble reduction dynamic figure process similar, be not described in detail at this.
In actual applications, the dynamic displaying contents of described dynamic figure is handled outside above-mentioned two kinds of contents combination, following content combination can also be arranged, as, comprise among the described dynamic figure outside described canvas element, described composite figure element, described composite figure daughter element and the combined animation daughter element, can not comprise described graphic element and described animated element, and the described dynamic figure that exists with the foregoing array mode
When the described dynamic figure of reduction, can be as similar in the preamble, at first reduce described canvas element and corresponding painting canvas property value thereof, afterwards, reduce described composite figure element, described composite figure daughter element and combined animation daughter element according to the content in the embodiment of the present application four again, similar in detailed process and the preamble, do not repeat them here.
With reference to figure 7, the structural representation of a kind of dynamic figure treating apparatus embodiment five that provides for the application, described device is applicable in the application that the motion graphics that is in dynamic demonstration is handled, in the embodiment of the present application, with the example that saves as to described dynamic figure, described dynamic figure comprises canvas element, graphic element and animated element, and described device can comprise:
Element resolution unit 701 is used for resolving canvas element, graphic element and the animated element that described dynamic figure comprises.
Wherein, as described in the text, described dynamic figure is when dynamically show state exists, and based on painting canvas, described painting canvas is provided with figure, and figure is provided with animation.The dynamic figures effect of described dynamic figure realizes by the value of variable, dynamical state (position or color value etc.) as title, minimum value, maximal value and minimum value and the maximal value correspondence of variable, for example, Drawing Object Rect1 comprises the dynamic of horizontal shift, the left position of this Drawing Object is 20 when the minimum value of variable OPCTAG2 is 0, when OPCTAG2 reaches maximal value 100, the left position of Drawing Object is 420, specific to physical record moving horizontally shown in the animation code as matrix object in the preamble.Be, described dynamic figure comprises canvas element, described canvas element comprises canvas object and corresponding painting canvas property value thereof, described dynamic figure also comprises graphic element, described graphic element is based on described canvas object, define the equivalent and form of expression of contained graphic element in described canvas object of length and width shape attribute of described canvas object by described painting canvas property value, as the position relation between each graphic element etc.Described graphic element comprises Drawing Object and graph of a correspondence object and graph of a correspondence property value thereof, described dynamic figure also comprises animated element, the Drawing Object of a graphic element among each described animated element and the described dynamic figure has membership, described animated element is based on the Drawing Object under it, horizontal shift dynamic value by described its graph of a correspondence object of graphic attribute value defined, left side distance, top margin, width and highly waiting and the form of expression of contained animated element in described Drawing Object, the position relation between each animated element etc. in the Drawing Object as described.Described animated element comprises animate object and corresponding animation attributes value thereof, by property values such as the position of the described animate object of described animation attributes value defined, sizes.
Wherein, analysis result in the described element resolution unit 701 is, Drawing Object and graphic attribute value thereof, the animate object in the described image object and animation attributes value thereof in canvas object in the described dynamic figure that gets access to and painting canvas property value thereof, the described canvas object.
Node tree is set up unit 702, is used for setting up the node number of XML data layout according to described canvas element, graphic element and animated element, and each element among the described dynamic figure is represented with the form of described node tree node;
Wherein:
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
Wherein, described node tree is set up the operational process of unit 702, is the process that described dynamic diagram sequences turns to the text of XML data layout.Set up after unit 702 operation finishes at described node tree, described dynamic figure with the text representation figure of XML data layout and dynamically, the dynamic parameter of the value correspondence of variable related in the rendering parameter of Drawing Object in the dynamic figure painting canvas object such as length, width and coordinate etc., the dynamic effect and variable is saved in the XML file, reaches the purpose of representing exclusive data with general format.
By in the such scheme as can be known, among a kind of dynamic figure treating apparatus embodiment five that the application provides, by each element among the dynamic figure is represented with the node tree form of XML data layout, and the data of XML data layout can be read by general application software, after follow-up storage of described dynamic figure, not only can conveniently be read by multiple dynamic figure application software, and need not to resolve any configuration file etc., increase the range of application of dynamic figure, and improved the reading efficiency that dynamic figure reads.
With reference to figure 8, node tree is set up the structural representation of unit 702 described in a kind of dynamic figure treating apparatus embodiment six that provides for the application, and wherein, described node tree is set up the unit and can be comprised:
First node conversion subelement 721, be used for described canvas object and corresponding painting canvas property value thereof are carried out the conversion of XML data layout, with the transformation result of the described canvas object root node as described node tree, with the transformation result of the described painting canvas property value slave node as described root node.
Wherein, the operation result of described first node conversion subelement 721 is: set up root node in the described node tree and the slave node of painting canvas property value correspondence, as shown in Figure 3.
Section Point conversion subelement 722, be used for described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data layout, with the transformation result of the described Drawing Object slave node as described root node, with the transformation result of the described graphic attribute value slave node as its graph of a correspondence Object node.
Wherein, the operation result of described Section Point conversion subelement 722 is: the node of setting up the Drawing Object correspondence in the canvas object in the described node tree, slave node as root node, and set up the node of described graphic attribute value, as the slave node of the corresponding figure Object node of this graphic attribute value, as shown in Figure 3.
The 3rd node conversion subelement 723, be used for described animate object and corresponding animation attributes value thereof are carried out the conversion of XML data layout, with the transformation result of the described animate object slave node as Drawing Object node under it, with the transformation result of the described animation attributes value slave node as its described animate object node.
Wherein, the operation result of described the 3rd node conversion subelement 723 is: the node of setting up the animate object correspondence in each Drawing Object in the described node tree, slave node as Drawing Object node under it, and set up the node of described animation attributes value, as the slave node of the corresponding animate object node of this animation attributes value, as shown in Figure 3.
Need to prove,, to the operational process of described the 3rd node conversion subelement 723, can be understood as at described first node conversion subelement 721:
At first set up the root node of described canvas object correspondence, and set up the node of each described painting canvas property value correspondence successively, as the slave node of described root node, the text that the root node set up and slave node sequence thereof change into the XML data layout is preserved;
Secondly, travel through each the described Drawing Object in the described canvas object successively, set up the node of each described Drawing Object correspondence, slave node as described root node, travel through the graphic attribute value of each described Drawing Object, set up the node of each described graphic attribute value correspondence, as the slave node of the corresponding figure Object node of this graphic attribute value, the node of the Drawing Object set up and the text that the slave node sequence changes into the XML data layout thereof are preserved;
Again, travel through each the described animate object in the described Drawing Object successively, set up the node of each described animate object correspondence, slave node as Drawing Object node under it, travel through the animation attributes value of each described animate object, set up the node of each described animation attributes value correspondence, as the slave node of this animation attributes value object animate object node, the node of the animate object set up and the text that the slave node sequence changes into the XML data layout thereof are preserved.
Namely, described node tree is set up unit 702 when setting up the node tree of XML data layout, can set up each slave node layer by root node layering successively, also can be begun by root node, be that the root node of subtree is set up subtree with the slave node of described root node, for example successively, after setting up root node, setting up with each Drawing Object node successively is the subtree of root node, finally with in the preamble reaches identical purpose, finishes the foundation to node tree.
Need to prove that described node tree is set up unit 702 when setting up described node tree, can begin layering successively by canvas element and contribute, also can be begun by canvas element, successively each graphic element and animated element thereof are contribute.In Fig. 3, begun to set up to lower leaf by the root node of node tree, or begin from left to right or begin to set up from the right side to doing by the root node of node tree.
In addition, can also comprise the composite figure element among the described dynamic figure, comprise composite figure object and corresponding composite attribute value thereof in the described composite figure element, described dynamic figure also comprises the composite figure daughter element, described composite figure daughter element serves as that the basis shows with described composite figure object, equivalent and the form of expression of contained composite figure daughter element in described composite figure object by the shape attribute of the described composite figure object of described composite attribute value defined is as the position relation between each composite figure daughter element etc.Described composite figure daughter element comprises that (Drawing Object described in described composite figure subobject and the preamble can be the object of similar structures for composite figure subobject and corresponding composite figure property value thereof, distinguished with different titles in the embodiment of the present application), described dynamic figure also comprises the combined animation daughter element, described combined animation daughter element serves as that the basis shows with described composite figure subobject, shape attribute equivalence by the described composite figure subobject of described composite figure attribute definition, as the horizontal shift dynamic value, left side distance, top margin, width etc., and the form of expression property value of contained combined animation daughter element in described composite figure subobject, as position relation between each combined animation daughter element etc.Described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, is defined the property values such as position, size of described combined animation subobject by described combined animation property value.
Thus, as shown in Figure 9, be another part structural representation of the embodiment of the present application six, described node tree is set up unit 702 and can also be comprised:
The 4th node conversion subelement 724, be used for described composite figure object and corresponding composite attribute value thereof are carried out the XML Data Format Transform, with the transformation result of the described composite figure object slave node as described root node, with the transformation result of the described composite attribute value slave node as its corresponding composite figure Object node;
The 5th node conversion subelement 725, be used for described composite figure subobject and corresponding composite figure property value thereof are carried out the conversion of XML data layout, with the transformation result of the described composite figure subobject slave node as its corresponding composite figure Object node, with the transformation result of the described composite figure property value slave node as its corresponding composite figure subobject node;
The 6th node conversion subelement 726, be used for described combined animation subobject and corresponding combined animation property value thereof are carried out the conversion of XML data layout, with the transformation result of the described combined animation subobject slave node as composite figure subobject node under it, with the transformation result of the described combined animation property value slave node as its corresponding combined animation subobject node.
Need to prove that the process of setting up node tree in the above-mentioned process of setting up the corresponding node of composite figure object described in the described node tree and the preamble is similar, is not described in detail at this.
In actual applications, the dynamic displaying contents of described dynamic figure is handled outside above-mentioned two kinds of contents combination, following content combination can also be arranged, as, comprise described canvas element among the described dynamic figure, described composite figure element, outside described composite figure daughter element and the combined animation daughter element, can not comprise described graphic element and described animated element, and the described dynamic figure that exists with the foregoing array mode, when described node tree is set up unit 702 and is set up described node tree, can be as similar in the preamble, at first set up the root node of canvas object correspondence in the described canvas element and the slave node of corresponding painting canvas property value correspondence thereof, set up described composite figure element according to the content in the embodiment of the present application six more afterwards, the node of described composite figure daughter element and combined animation daughter element correspondence.Similar in detailed process and the preamble, do not repeat them here.
With reference to Figure 10, the structural representation of a kind of dynamic figure treating apparatus embodiment seven that provides for the application, described method is applicable in the application that the motion graphics that is in dynamic demonstration is handled, in the embodiment of the present application, with the example that is read as to described dynamic figure, described dynamic figure exists with the form of described node tree, and described node tree comprises the node of XML data layout, and described device comprises:
Node traversal unit 1001 is for the node of the described node tree of traversal.
Wherein, described node tree exists with the text of XML data layout, and the node in the described node tree comprises the node of canvas element corresponding node, graphic element Object node and animated element correspondence among the described dynamic figure.
Dynamically figure reduction unit 1002 is used for each node according to described node tree, reduces described dynamic figure;
Wherein:
Described dynamic figure comprises canvas element, graphic element, animated element;
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
Wherein, described dynamic figure reduction unit 1002 is the anti-process that node tree described in the preamble is set up unit 702, unserializing process to the node tree of described dynamic figure it is also understood that into, and the text of XML data layout is carried out the process that object data is converted to the dynamic figure of dynamic demonstration.
By such scheme as can be known, a kind of dynamic figure treating apparatus embodiment seven that the application provides, the node tree that will exist with the text of XML data layout is reduced into the dynamic figure of dynamic demonstration, need not in the prior art resolving of configuration file is improved the reading efficiency that dynamic figure reads.
With reference to Figure 11, the dynamic structural representation of figure reduction unit 1002 described in a kind of dynamic figure treating apparatus embodiment eight that provides for the application, described dynamic figure reduction unit 1002 comprises:
First goes back atomic unit 1021, is used for the root node of described node tree is carried out the conversion of object data form, with the transformation result of the described root node canvas object as described dynamic figure.
Second goes back atomic unit 1022, be used for the slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of image object node in the slave node of described canvas object node as the Drawing Object in the described canvas object, with the transformation result of painting canvas property value node in the slave node of the described canvas object node painting canvas property value as described canvas object correspondence.
The 3rd goes back atomic unit 1023, be used for the slave node of described image object node is carried out the conversion of object data form, with the transformation result of animate object node in the slave node of described Drawing Object node as the animate object in the Drawing Object under it, with the transformation result of graphic attribute value node in the slave node of described Drawing Object node as Drawing Object graph of a correspondence property value under it.
The 4th goes back atomic unit 1024, is used for the slave node of described animate object node is carried out the conversion of object data form, with the transformation result of the slave node of the described animate object node animation attributes value as animate object correspondence under it.
As shown in Figure 6, go back atomic unit 1021 to the described the 4th exemplary plot of going back in the atomic unit 1024 for described first.
Need to prove that described dynamic figure reduction unit 1002 can begin the reduction of layering successively by canvas element when the described dynamic figure of reduction, also can be begun by canvas element, successively each graphic element and animated element thereof is reduced.In Fig. 3, begun to the lower leaf reduction by the root node of node tree, by the root node of node tree begin from left to right or from the right side to doing to begin reduction.
In addition, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, therefore, and with reference to Figure 12, be the structural representation of dynamic figure reduction unit 1002 described in the embodiment of the present application eight, described dynamic figure reduction unit 1002 can also comprise:
The 5th goes back atomic unit 1025, be used for the slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of composite figure Object node in the slave node of described canvas object node as the composite figure object in the described canvas object;
The 6th goes back atomic unit 1026, be used for the slave node of described composite figure Object node is carried out the conversion of object data form, with the transformation result of combination image subobject node in the slave node of described composite figure Object node as the composite figure subobject in the described composite figure object, with the transformation result of composite attribute value node in the slave node of the described composite figure Object node composite attribute value as described composite figure object correspondence;
The 7th goes back atomic unit 1027, be used for the slave node of described combination image subobject node is carried out the conversion of object data form, with the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as the combined animation subobject in the composite figure subobject under it, with the transformation result of composite figure property value node in the slave node of the described composite figure subobject node composite figure property value as composite figure subobject correspondence under it;
The 8th goes back atomic unit 1028, be used for the slave node of described combined animation subobject node is carried out the conversion of object data form, with the transformation result of the slave node of the described combined animation subobject node combined animation property value as combined animation subobject correspondence under it.
After reduction is finished, can also comprise the composite figure element among the described dynamic figure, comprise composite figure object and corresponding composite attribute value thereof in the described composite figure element, described dynamic figure also comprises the composite figure daughter element, described composite figure daughter element serves as that the basis shows with described composite figure object, equivalent and the form of expression of contained composite figure daughter element in described composite figure object by the shape attribute of the described composite figure object of described composite attribute value defined is as the position relation between each composite figure daughter element etc.Described composite figure daughter element comprises that (Drawing Object described in described composite figure subobject and the preamble can be the object of similar structures for composite figure subobject and corresponding composite figure property value thereof, distinguished with different titles in the embodiment of the present application), described dynamic figure also comprises the combined animation daughter element, described combined animation daughter element serves as that the basis shows with described composite figure subobject, shape attribute equivalence by the described composite figure subobject of described composite figure attribute definition, as the horizontal shift dynamic value, left side distance, top margin, width etc., and the form of expression property value of contained combined animation daughter element in described composite figure subobject, as position relation between each combined animation daughter element etc.Described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, is defined the property values such as position, size of described combined animation subobject by described combined animation property value.
Need to prove, described in the described dynamic figure of above-mentioned reduction in the process of composite figure element, composite figure daughter element, combined animation daughter element and the preamble reduction dynamic figure process similar, be not described in detail at this.
In actual applications, the dynamic displaying contents of described dynamic figure is handled outside above-mentioned two kinds of contents combination, following content combination can also be arranged, as, comprise among the described dynamic figure outside described canvas element, described composite figure element, described composite figure daughter element and the combined animation daughter element, can not comprise described graphic element and described animated element, and the described dynamic figure that exists with the foregoing array mode
When the described dynamic figure of reduction, can be as similar in the preamble, at first reduce described canvas element and corresponding painting canvas property value thereof, afterwards, reduce described composite figure element, described composite figure daughter element and combined animation daughter element according to the content in the embodiment of the present application eight again, similar in detailed process and the preamble, do not repeat them here.
Need to prove that each embodiment in this instructions all adopts the mode of going forward one by one to describe, what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.
At last, also need to prove, in this article, relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint and have the relation of any this reality or in proper order between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby make and comprise that process, method, article or the equipment of a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.Do not having under the situation of more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
More than a kind of dynamic figure disposal route provided by the present invention and device are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (12)

1. a dynamic figure disposal route is characterized in that, described dynamic figure comprises canvas element, graphic element and animated element, and described method comprises:
Resolve the canvas element, graphic element and the animated element that comprise among the described dynamic figure;
According to the analysis result of described canvas element, graphic element and animated element, set up the node tree of XML data layout, each element among the described dynamic figure is represented with the form of described node tree node;
Wherein:
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
2. method according to claim 1 is characterized in that, the described node tree of setting up the XML data layout comprises:
Described canvas object and corresponding painting canvas property value thereof are carried out the conversion of XML data layout, with the transformation result of the described canvas object root node as described node tree, with the transformation result of the described painting canvas property value slave node as described root node;
Described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data layout, with the transformation result of the described Drawing Object slave node as described root node, with the transformation result of the described graphic attribute value slave node as its graph of a correspondence Object node;
Described animate object and corresponding animation attributes value thereof are carried out the conversion of XML data layout, with the transformation result of the described animate object slave node as Drawing Object node under it, with the transformation result of the described animation attributes value slave node as animate object node under it.
3. method according to claim 2, it is characterized in that, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, and wherein, described method also comprises:
Set up each self-corresponding node of composite figure element described in the described node tree, composite figure daughter element and combined animation daughter element, be specially:
Described composite figure object and corresponding composite attribute value thereof are carried out the XML Data Format Transform, with the transformation result of the described composite figure object slave node as described root node, with the transformation result of the described composite attribute value slave node as its corresponding composite figure Object node;
Described composite figure subobject and corresponding composite figure property value thereof are carried out the conversion of XML data layout, with the transformation result of the described composite figure subobject slave node as its corresponding composite figure Object node, with the transformation result of the described composite figure property value slave node as its corresponding composite figure subobject node;
Described combined animation subobject and corresponding combined animation property value thereof are carried out the conversion of XML data layout, with the transformation result of the described combined animation subobject slave node as composite figure subobject node under it, with the transformation result of the described combined animation property value slave node as its corresponding combined animation subobject node.
4. a dynamic figure disposal route is characterized in that, described dynamic figure exists with the form of described node tree, and described node tree comprises the node of XML data layout, and described method comprises:;
Travel through the node in the described node tree;
According to each node in the described node tree, reduce described dynamic figure;
Wherein:
Described dynamic figure comprises canvas element, graphic element, animated element;
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
5. method according to claim 4 is characterized in that, the described dynamic figure of described reduction comprises:
Root node in the described node tree is carried out the conversion of object data form, with the transformation result of the described root node canvas object as described dynamic figure;
The slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of image object node in the slave node of described canvas object node as the Drawing Object in the described canvas object, with the transformation result of painting canvas property value node in the slave node of the described canvas object node painting canvas property value as described canvas object correspondence;
The slave node of described image object node is carried out the conversion of object data form, with the transformation result of animate object node in the slave node of described Drawing Object node as the animate object in the Drawing Object under it, with the transformation result of graphic attribute value node in the slave node of described Drawing Object node as Drawing Object graph of a correspondence property value under it;
The slave node of described animate object node is carried out the conversion of object data form, with the transformation result of the slave node of the described animate object node animation attributes value as animate object correspondence under it.
6. method according to claim 5, it is characterized in that, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, and wherein, described method also comprises:
Reduce composite figure element, composite figure daughter element, combined animation daughter element among the described dynamic figure, be specially:
The slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of composite figure Object node in the slave node of described canvas object node as the composite figure object in the described canvas object;
The slave node of described composite figure Object node is carried out the conversion of object data form, with the transformation result of combination image subobject node in the slave node of described composite figure Object node as the composite figure subobject in the described composite figure object, with the transformation result of composite attribute value node in the slave node of the described composite figure Object node composite attribute value as described composite figure object correspondence;
Slave node to described combination image subobject node carries out the conversion of object data form, with the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as the combined animation subobject in the composite figure subobject under it, with the transformation result of composite figure property value node in the slave node of the described composite figure subobject node composite figure property value as composite figure subobject correspondence under it;
Slave node to described combined animation subobject node carries out the conversion of object data form, with the transformation result of the slave node of the described combined animation subobject node combined animation property value as combined animation subobject correspondence under it.
7. a dynamic figure treating apparatus is characterized in that, described dynamic figure comprises canvas element, graphic element and animated element, and described device comprises:
The element resolution unit is used for resolving canvas element, graphic element and the animated element that described dynamic figure comprises;
Node tree is set up the unit, is used for setting up the node number of XML data layout according to described canvas element, graphic element and animated element, and each element among the described dynamic figure is represented with the form of described node tree node;
Wherein:
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
8. device according to claim 7 is characterized in that, described node tree is set up the unit and comprised:
First node conversion subelement, be used for described canvas object and corresponding painting canvas property value thereof are carried out the conversion of XML data layout, with the transformation result of the described canvas object root node as described node tree, with the transformation result of the described painting canvas property value slave node as described root node;
Section Point conversion subelement, be used for described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data layout, with the transformation result of the described Drawing Object slave node as described root node, with the transformation result of the described graphic attribute value slave node as its graph of a correspondence Object node;
The 3rd node conversion subelement, be used for described animate object and corresponding animation attributes value thereof are carried out the conversion of XML data layout, with the transformation result of the described animate object slave node as Drawing Object node under it, with the transformation result of the described animation attributes value slave node as its described animate object node.
9. device according to claim 8, it is characterized in that, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, wherein:
Described node tree is set up the unit and is also comprised:
The 4th node conversion subelement, be used for described composite figure object and corresponding composite attribute value thereof are carried out the XML Data Format Transform, with the transformation result of the described composite figure object slave node as described root node, with the transformation result of the described composite attribute value slave node as its corresponding composite figure Object node;
The 5th node conversion subelement, be used for described composite figure subobject and corresponding composite figure property value thereof are carried out the conversion of XML data layout, with the transformation result of the described composite figure subobject slave node as its corresponding composite figure Object node, with the transformation result of the described composite figure property value slave node as its corresponding composite figure subobject node;
The 6th node conversion subelement, be used for described combined animation subobject and corresponding combined animation property value thereof are carried out the conversion of XML data layout, with the transformation result of the described combined animation subobject slave node as composite figure subobject node under it, with the transformation result of the described combined animation property value slave node as its corresponding combined animation subobject node.
10. a dynamic figure treating apparatus is characterized in that, described dynamic figure exists with the form of described node tree, and described node tree comprises the node of XML data layout, and described device comprises:
Node traversal unit is for the node of the described node tree of traversal;
Dynamically the figure reduction unit is used for each node according to described node tree, reduces described dynamic figure;
Wherein:
Described dynamic figure comprises canvas element, graphic element, animated element;
Described canvas element comprises canvas object and corresponding painting canvas property value thereof;
Described graphic element comprises Drawing Object and graph of a correspondence property value thereof;
Described animated element comprises animate object and corresponding animation attributes value thereof.
11. device according to claim 10 is characterized in that, described dynamic figure reduction unit comprises:
First goes back atomic unit, is used for the root node of described node tree is carried out the conversion of object data form, with the transformation result of the described root node canvas object as described dynamic figure;
Second goes back atomic unit, be used for the slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of image object node in the slave node of described canvas object node as the Drawing Object in the described canvas object, with the transformation result of painting canvas property value node in the slave node of the described canvas object node painting canvas property value as described canvas object correspondence;
The 3rd goes back atomic unit, be used for the slave node of described image object node is carried out the conversion of object data form, with the transformation result of animate object node in the slave node of described Drawing Object node as the animate object in the Drawing Object under it, with the transformation result of graphic attribute value node in the slave node of described Drawing Object node as Drawing Object graph of a correspondence property value under it;
The 4th goes back atomic unit, is used for the slave node of described animate object node is carried out the conversion of object data form, with the transformation result of the slave node of the described animate object node animation attributes value as animate object correspondence under it.
12. device according to claim 11, it is characterized in that, described dynamic figure also comprises composite figure element, composite figure daughter element and combined animation daughter element, described composite figure element comprises composite figure object and corresponding composite attribute value thereof, described composite figure daughter element comprises composite figure subobject and corresponding composite figure property value thereof, described combined animation daughter element comprises combined animation subobject and corresponding combined animation property value thereof, wherein:
Described dynamic figure reduction unit also comprises:
The 5th goes back atomic unit, be used for the slave node of described canvas object node is carried out the conversion of object data form, with the transformation result of composite figure Object node in the slave node of described canvas object node as the composite figure object in the described canvas object;
The 6th goes back atomic unit, be used for the slave node of described composite figure Object node is carried out the conversion of object data form, with the transformation result of combination image subobject node in the slave node of described composite figure Object node as the composite figure subobject in the described composite figure object, with the transformation result of composite attribute value node in the slave node of the described composite figure Object node composite attribute value as described composite figure object correspondence;
The 7th goes back atomic unit, be used for the slave node of described combination image subobject node is carried out the conversion of object data form, with the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as the combined animation subobject in the composite figure subobject under it, with the transformation result of composite figure property value node in the slave node of the described composite figure subobject node composite figure property value as composite figure subobject correspondence under it;
The 8th goes back atomic unit, be used for the slave node of described combined animation subobject node is carried out the conversion of object data form, with the transformation result of the slave node of the described combined animation subobject node combined animation property value as combined animation subobject correspondence under it.
CN201310320850.5A 2013-07-26 2013-07-26 A kind of Dynamic Graph processing method and processing device Active CN103345534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310320850.5A CN103345534B (en) 2013-07-26 2013-07-26 A kind of Dynamic Graph processing method and processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310320850.5A CN103345534B (en) 2013-07-26 2013-07-26 A kind of Dynamic Graph processing method and processing device

Publications (2)

Publication Number Publication Date
CN103345534A true CN103345534A (en) 2013-10-09
CN103345534B CN103345534B (en) 2016-12-28

Family

ID=49280329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310320850.5A Active CN103345534B (en) 2013-07-26 2013-07-26 A kind of Dynamic Graph processing method and processing device

Country Status (1)

Country Link
CN (1) CN103345534B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123742A (en) * 2014-07-21 2014-10-29 徐才 Method and player for translating static cartoon picture into two dimensional animation
CN104142820A (en) * 2014-02-12 2014-11-12 腾讯科技(深圳)有限公司 Animation production method, device and system
CN105786893A (en) * 2014-12-24 2016-07-20 北京国际系统控制有限公司 XML(Extensive Markup Language)-based dynamic picture display method and system
CN106095364A (en) * 2016-06-03 2016-11-09 积成电子股份有限公司 A kind of loading method of the ultra-large graphic file of power distribution network
CN106484416A (en) * 2016-09-30 2017-03-08 腾讯科技(北京)有限公司 A kind of information processing method and terminal
CN107102832A (en) * 2016-02-19 2017-08-29 阿里巴巴集团控股有限公司 The display methods and device of figure in chart
CN110636105A (en) * 2019-08-14 2019-12-31 北京金堤科技有限公司 Tree graph obtaining method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1950767A (en) * 2004-05-04 2007-04-18 费舍-柔斯芒特系统股份有限公司 Dynamic procedure graph based on marker language on process plant user interface
CN1967575A (en) * 2005-11-14 2007-05-23 英福达科技股份有限公司 XML vector graphics technology based electron file and window online signing method
TW200917056A (en) * 2007-10-08 2009-04-16 Webi Co Ltd On-line editing system based on vector graphic object
CN103176954A (en) * 2013-03-27 2013-06-26 重庆市科学技术研究院 Mathematical formula display method and mathematical formula display system based on hypertext markup language (HTML) 5 canvas

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1950767A (en) * 2004-05-04 2007-04-18 费舍-柔斯芒特系统股份有限公司 Dynamic procedure graph based on marker language on process plant user interface
CN1967575A (en) * 2005-11-14 2007-05-23 英福达科技股份有限公司 XML vector graphics technology based electron file and window online signing method
TW200917056A (en) * 2007-10-08 2009-04-16 Webi Co Ltd On-line editing system based on vector graphic object
CN103176954A (en) * 2013-03-27 2013-06-26 重庆市科学技术研究院 Mathematical formula display method and mathematical formula display system based on hypertext markup language (HTML) 5 canvas

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142820A (en) * 2014-02-12 2014-11-12 腾讯科技(深圳)有限公司 Animation production method, device and system
CN104142820B (en) * 2014-02-12 2016-03-16 腾讯科技(深圳)有限公司 A kind of animation method, device and system
CN104123742A (en) * 2014-07-21 2014-10-29 徐才 Method and player for translating static cartoon picture into two dimensional animation
CN105786893A (en) * 2014-12-24 2016-07-20 北京国际系统控制有限公司 XML(Extensive Markup Language)-based dynamic picture display method and system
CN107102832A (en) * 2016-02-19 2017-08-29 阿里巴巴集团控股有限公司 The display methods and device of figure in chart
CN107102832B (en) * 2016-02-19 2019-11-12 阿里巴巴集团控股有限公司 The display methods and device of figure in chart
CN106095364A (en) * 2016-06-03 2016-11-09 积成电子股份有限公司 A kind of loading method of the ultra-large graphic file of power distribution network
CN106095364B (en) * 2016-06-03 2018-10-23 积成电子股份有限公司 A kind of loading method of the ultra-large graphic file of power distribution network
CN106484416A (en) * 2016-09-30 2017-03-08 腾讯科技(北京)有限公司 A kind of information processing method and terminal
CN106484416B (en) * 2016-09-30 2021-02-05 腾讯科技(北京)有限公司 Information processing method and terminal
CN110636105A (en) * 2019-08-14 2019-12-31 北京金堤科技有限公司 Tree graph obtaining method and device, storage medium and electronic equipment
CN110636105B (en) * 2019-08-14 2021-02-12 北京金堤科技有限公司 Tree graph obtaining method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN103345534B (en) 2016-12-28

Similar Documents

Publication Publication Date Title
CN103345534A (en) Dynamic graph processing method and device
CN109636887B (en) Two-dimensional electronic technology drawing format conversion and vectorization interaction system
CN109145352B (en) Data set for learning a function taking an image as input
CN108664999A (en) A kind of training method and its device, computer server of disaggregated model
CN104391991B (en) A kind of conversion method from AutoCAD data to GIS spatial data
Hop et al. Using Hierarchical Edge Bundles to visualize complex ontologies in GLOW
Shen et al. The influence of artificial intelligence on art design in the digital age
CN104820677A (en) Layer display method and system of discipline
Limberger et al. Advanced visual metaphors and techniques for software maps
CN104008122A (en) Dynamic multi-stage pie chart display method of layering data
Dinkla et al. Comparison of multiple weighted hierarchies: visual analytics for microbe community profiling
CN103942819A (en) Method and device for drawing geologic symbols
Wei et al. An evolutional model for operation-driven visualization design
Abello Hierarchical graph maps
Heydt D3. js by example
Tian et al. An approach to generate spatial Voronoi Treemaps for points, lines, and polygons
Paluszek et al. MATLAB graphics
AU2015203217B2 (en) System and method for interactively visualizing rules and exceptions
Zabiniako et al. Supporting visual techniques for graphs data analysis in three-dimensional space
Cooper et al. Learning Constrained Graph Layout for Content Generation.
Fitzpatrick et al. Redefining System Boundaries
Erik Interactive Visualization of Network Models in JavaScript/TypeScript for Web-based Applications
CN103530116B (en) Allow Chrome browser support COM type component method
Ma Research on Three-Dimensional Modeling and Algorithm of Torus in Packaging Structure Design
Liu et al. Stripe-Based Futurism-like Image—A New Type of Art and Its Application to Covert Communication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Tan Zhang

Inventor after: Zhang Chuan

Inventor after: Luo Xingming

Inventor after: Cai Qixing

Inventor before: Zhang Chuan

Inventor before: Luo Xingming

Inventor before: Cai Qixing

Inventor before: Tan Zhang

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: ZHANG CHUAN LUO XINGMING CAI QIXING TAN ZHANG TO: TAN ZHANG ZHANG CHUAN LUO XINGMING CAI QIXING

C14 Grant of patent or utility model
GR01 Patent grant