CN103345534B - A kind of Dynamic Graph processing method and processing device - Google Patents
A kind of Dynamic Graph processing method and processing device Download PDFInfo
- Publication number
- CN103345534B CN103345534B CN201310320850.5A CN201310320850A CN103345534B CN 103345534 B CN103345534 B CN 103345534B CN 201310320850 A CN201310320850 A CN 201310320850A CN 103345534 B CN103345534 B CN 103345534B
- Authority
- CN
- China
- Prior art keywords
- node
- composite
- animation
- canvas
- correspondence
- 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.)
- Active
Links
Landscapes
- Processing Or Creating Images (AREA)
Abstract
This application discloses a kind of Dynamic Graph processing method and processing device, described Dynamic Graph includes that canvas element, graphic element and animated element, described method include resolving canvas element, graphic element and the animated element comprised in described Dynamic Graph;According to the analysis result of described canvas element, graphic element and animated element, set up the node tree of XML data format, each element in described Dynamic Graph is represented with the form of described node tree node;Wherein: described canvas element includes the painting canvas property value of canvas object and correspondence thereof;Described graphic element includes Drawing Object and graph of a correspondence property value thereof;Described animated element includes the animation attributes value of animation object and correspondence thereof.The embodiment of the present application is by representing each element in Dynamic Graph with the node tree form of XML data format, and the data of XML data format can be read by universal application software, add the range of application of Dynamic Graph, and improve the reading efficiency that Dynamic Graph reads.
Description
Technical field
The application relates to technical field of industrial control, particularly to a kind of Dynamic Graph processing method and processing device.
Background technology
In industrial control field, need to use Dynamic Graph to represent production procedure etc..Dynamic Graph is generally with painting canvas as base
Plinth, arranges multiple Drawing Object in this painting canvas, it is also possible to include the composite figure object etc. containing multiple Drawing Objects, painting canvas
In by arranging the dynamic change state etc. that its property value determines between Drawing Object and composite figure object, formed Dynamic Graph.
And each Drawing Object is provided with multiple animation object, each Drawing Object all can determine it in the way of arranging its property value
The contained dynamical state between animation object, each animation object all has its respective property value, such as color, size, position
Put.
The existing form that Dynamic Graph related content is preserved general employing stream file.
Stream file format refers to needing the Content Transformation preserved to become the data block of regular length to be written in specified file,
This form does not has the form of any agreement to file itself;I.e. stream file does not has structured file exactly.
Due to the form using stream file format not fix when the related content of Dynamic Graph is preserved, the most unfavorable
Dynamic Graph is resolved by the application software in application Dynamic Graph.
Summary of the invention
Technical problems to be solved in this application are to provide a kind of Dynamic Graph processing method and processing device, in order to solve existing skill
When art using stream file format Dynamic Graph is processed, it is unfavorable for owing to file structure is single applying the multiple of Dynamic Graph to answer
Carry out resolving the technical problem read to Dynamic Graph with software.
This application provides a kind of Dynamic Graph processing method, described Dynamic Graph includes canvas element, graphic element and animation
Element, described method includes:
Resolve canvas element, graphic element and the animated element comprised in described Dynamic Graph;
According to the analysis result of described canvas element, graphic element and animated element, set up the node of XML data format
Tree, represents each element in described Dynamic Graph with the form of described node tree node;
Wherein:
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof.
Said method, it is preferred that the described node tree setting up XML data format, including:
Painting canvas property value to described canvas object and correspondence thereof carries out the conversion of XML data format, by described painting canvas pair
The transformation result of elephant is as the root node of described node tree, using the transformation result of described painting canvas property value as described root node
Slave node;
Described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data format, by described figure pair
The transformation result of elephant is as the slave node of described root node, using the transformation result of described graphic attribute value as the figure of its correspondence
The slave node of shape Object node;
Animation attributes value to described animation object and correspondence thereof carries out the conversion of XML data format, by described animation pair
The transformation result of elephant is as the slave node of Drawing Object node belonging to it, using the transformation result of described animation attributes value as it
The slave node of affiliated animation Object node.
Said method, it is preferred that described Dynamic Graph also includes composite figure element, composite figure daughter element and combined animation
Daughter element, described composite figure element includes the composite attribute value of composite figure object and correspondence thereof, described composite figure unit
Element includes that the composite figure property value of composite figure subobject and correspondence thereof, described combined animation daughter element include combined animation
The combined animation property value of object and correspondence thereof, wherein, described method also includes:
Set up composite figure element described in described node tree, composite figure daughter element and combined animation daughter element the most right
The node answered, particularly as follows:
The composite attribute value of described composite figure object and correspondence thereof is carried out XML data format conversion, by described combination
The transformation result of Drawing Object is as the slave node of described root node, using right as it for the transformation result of described composite attribute value
Answer the slave node of composite figure Object node;
Composite figure property value to described composite figure subobject and correspondence thereof carries out the conversion of XML data format, will
The transformation result of described composite figure subobject is as the slave node of its corresponding composite figure Object node, by described constitutional diagram
The transformation result of shape property value is as the slave node of the composite figure subobject node of its correspondence;
Combined animation property value to described combined animation subobject and correspondence thereof carries out the conversion of XML data format, will
The transformation result of described combined animation subobject is as the slave node of composite figure subobject node belonging to it, by described combination
The transformation result of animation attributes value is as the slave node of the combined animation subobject node of its correspondence.
Present invention also provides another kind of Dynamic Graph processing method, described Dynamic Graph presented in described node tree,
Described node tree includes that the node of XML data format, described method include:
Travel through the node in described node tree;
According to each node in described node tree, reduce described Dynamic Graph;
Wherein:
Described Dynamic Graph includes canvas element, graphic element, animated element;
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof.
Said method, it is preferred that the described Dynamic Graph of described reduction, including:
Root node in described node tree is carried out the conversion of object data format, the transformation result of described root node is made
Canvas object for described Dynamic Graph;
Slave node to described canvas object node carries out the conversion of object data format, by described canvas object node
Slave node in the transformation result of image object node as the Drawing Object in described canvas object, by described canvas object
In the slave node of node, the transformation result of painting canvas property value node is as painting canvas property value corresponding to described canvas object;
Slave node to described image object node carries out the conversion of object data format, by described Drawing Object node
Slave node in the transformation result of animation Object node as the animation object in Drawing Object belonging to it, by described figure pair
As in the slave node of node the transformation result of graphic attribute value node as Drawing Object graph of a correspondence property value belonging to it;
Slave node to described animation Object node carries out the conversion of object data format, by described animation Object node
The transformation result of slave node as animation attributes value corresponding to animation object belonging to it.
Said method, it is preferred that described Dynamic Graph also includes composite figure element, composite figure daughter element and combined animation
Daughter element, described composite figure element includes the composite attribute value of composite figure object and correspondence thereof, described composite figure unit
Element includes that the composite figure property value of composite figure subobject and correspondence thereof, described combined animation daughter element include combined animation
The combined animation property value of object and correspondence thereof, wherein, described method also includes:
Reduce the composite figure element in described Dynamic Graph, composite figure daughter element, combined animation daughter element, particularly as follows:
Slave node to described canvas object node carries out the conversion of object data format, by described canvas object node
Slave node in the transformation result of composite figure Object node as the composite figure object in described canvas object;
Slave node to described composite figure Object node carries out the conversion of object data format, by described composite figure
In the slave node of Object node, the transformation result of combination image subobject node is as the combination in described composite figure object
Figure subobject, using the transformation result of composite attribute value node in the slave node of described composite figure Object node as described
The composite attribute value that composite figure object is corresponding;
Slave node to described combination image subobject node carries out the conversion of object data format, by described constitutional diagram
In the slave node of shape subobject node, the transformation result of combined animation subobject node is as composite figure subobject belonging to it
In combined animation subobject, by the slave node of described composite figure subobject node composite figure property value node turn
Change result as composite figure property value corresponding to composite figure subobject belonging to it;
Slave node to described combined animation subobject node carries out the conversion of object data format, described combination is moved
Draw the transformation result of slave node of subobject node as combined animation property value corresponding to combined animation subobject belonging to it.
Present invention also provides a kind of Dynamic Graph processing means, described Dynamic Graph includes canvas element, graphic element and moves
Drawing element, described device includes:
Element resolution unit, for resolving canvas element, graphic element and the animated element comprised in described Dynamic Graph;
Node tree sets up unit, for according to described canvas element, graphic element and animated element, sets up XML data lattice
The nodes of formula, represents each element in described Dynamic Graph with the form of described node tree node;
Wherein:
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof.
Said apparatus, it is preferred that described node tree is set up unit and included:
Primary nodal point conversion subelement, for carrying out XML data to the painting canvas property value of described canvas object and correspondence thereof
The conversion of form, using the transformation result of described canvas object as the root node of described node tree, by described painting canvas property value
Transformation result is as the slave node of described root node;
Secondary nodal point conversion subelement, for carrying out XML data to described Drawing Object and graph of a correspondence property value thereof
The conversion of form, using the transformation result of described Drawing Object as the slave node of described root node, by described graphic attribute value
Transformation result as the slave node of its graph of a correspondence Object node;
3rd node conversion subelement, for carrying out XML data to the animation attributes value of described animation object and correspondence thereof
The conversion of form, using the transformation result of described animation object as the slave node of Drawing Object node belonging to it, by described dynamic
Draw the transformation result of property value as the slave node of animation Object node it described.
Said apparatus, it is preferred that described Dynamic Graph also includes composite figure element, composite figure daughter element and combined animation
Daughter element, described composite figure element includes the composite attribute value of composite figure object and correspondence thereof, described composite figure unit
Element includes that the composite figure property value of composite figure subobject and correspondence thereof, described combined animation daughter element include combined animation
The combined animation property value of object and correspondence thereof, wherein:
Described node tree is set up unit and is also included:
Fourth node conversion subelement, for carrying out XML to the composite attribute value of described composite figure object and correspondence thereof
Data Format Transform, using the transformation result of described composite figure object as the slave node of described root node, by described combination
The transformation result of property value is as the slave node of its corresponding composite figure Object node;
5th node conversion subelement, for entering the composite figure property value of described composite figure subobject and correspondence thereof
The conversion of row XML data format, using the transformation result of described composite figure subobject as its corresponding composite figure Object node
Slave node, using the transformation result of described composite figure property value as the subordinate of the composite figure subobject node of its correspondence
Node;
6th node conversion subelement, for entering the combined animation property value of described combined animation subobject and correspondence thereof
The conversion of row XML data format, saves the transformation result of described combined animation subobject as composite figure subobject belonging to it
Point slave node, using the transformation result of described combined animation property value as its correspondence combined animation subobject node from
Belong to node.
Present invention also provides another kind of Dynamic Graph processing means, described Dynamic Graph presented in described node tree,
Described node tree includes that the node of XML data format, described device include:
Node traverses unit, for traveling through the node in described node tree;
Dynamic Graph reduction unit, for according to each node in described node tree, reduces described Dynamic Graph;
Wherein:
Described Dynamic Graph includes canvas element, graphic element, animated element;
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof.
Said apparatus, it is preferred that described Dynamic Graph reduction unit includes:
First goes back atomic unit, for the root node in described node tree carries out the conversion of object data format, by institute
State the transformation result canvas object as described Dynamic Graph of root node;
Second goes back atomic unit, for the slave node of described canvas object node carries out turning of object data format
Change, using the transformation result of image object node in the slave node of described canvas object node as the figure in described canvas object
Shape object, using the transformation result of painting canvas property value node in the slave node of described canvas object node as described canvas object
Corresponding painting canvas property value;
3rd goes back atomic unit, for the slave node of described image object node carries out turning of object data format
Change, using the transformation result of animation Object node in the slave node of described Drawing Object node as in Drawing Object belonging to it
Animation object, using the transformation result of graphic attribute value node in the slave node of described Drawing Object node as figure belonging to it
Object graph of a correspondence property value;
4th goes back atomic unit, for the slave node of described animation Object node carries out turning of object data format
Change, using the transformation result of the slave node of described animation Object node as animation attributes value corresponding to animation object belonging to it.
Said apparatus, it is preferred that described Dynamic Graph also includes composite figure element, composite figure daughter element and combined animation
Daughter element, described composite figure element includes the composite attribute value of composite figure object and correspondence thereof, described composite figure unit
Element includes that the composite figure property value of composite figure subobject and correspondence thereof, described combined animation daughter element include combined animation
The combined animation property value of object and correspondence thereof, wherein:
Described Dynamic Graph reduction unit also includes:
5th goes back atomic unit, for the slave node of described canvas object node carries out turning of object data format
Change, using the transformation result of composite figure Object node in the slave node of described canvas object node as in described canvas object
Composite figure object;
6th goes back atomic unit, for the slave node of described composite figure Object node is carried out object data format
Conversion, using the transformation result of combination image subobject node in the slave node of described composite figure Object node as described group
Close the composite figure subobject in Drawing Object, by composite attribute value node in the slave node of described composite figure Object node
Transformation result as composite attribute value corresponding to described composite figure object;
7th goes back atomic unit, for the slave node of described combination image subobject node is carried out object data format
Conversion, using the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as it
Combined animation subobject in affiliated composite figure subobject, will combine in the slave node of described composite figure subobject node
The transformation result of graphic attribute value node is as composite figure property value corresponding to composite figure subobject belonging to it;
8th goes back atomic unit, for the slave node of described combined animation subobject node is carried out object data format
Conversion, using the transformation result of the slave node of described combined animation subobject node as combined animation subobject pair belonging to it
The combined animation property value answered.
From such scheme, a kind of Dynamic Graph processing method and processing device that the application provides, by by Dynamic Graph
Each element represents with the node tree form of XML data format, and the data of XML data format can be by universal application software
Read, described Dynamic Graph is follow-up store after, conveniently can not only be read by multiple Dynamic Graph application software, and
And without resolving any configuration file etc., add the range of application of Dynamic Graph, and improve the reading efficiency that Dynamic Graph reads.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present application, in embodiment being described below required for make
Accompanying drawing be briefly described, it should be apparent that, the accompanying drawing in describing below is only some embodiments of the application, for
From the point of view of those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to obtain it according to these accompanying drawings
His accompanying drawing.
The flow chart of a kind of Dynamic Graph processing method embodiment one that Fig. 1 provides for the application;
The partial process view of a kind of Dynamic Graph processing method embodiment two that Fig. 2 provides for the application;
Fig. 3 is the dynamic schematic diagram that the embodiment of the present application two is run;
The flow chart of a kind of Dynamic Graph processing method embodiment three that Fig. 4 provides for the application;
The partial process view of a kind of Dynamic Graph processing method embodiment four that Fig. 5 provides for the application;
Fig. 6 is the application example figure of the embodiment of the present application four;
The structural representation of a kind of Dynamic Graph processing means embodiment five that Fig. 7 provides for the application;
The part-structure schematic diagram of a kind of Dynamic Graph processing means 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 Graph processing means embodiment seven that Figure 10 provides for the application;
The part-structure schematic diagram of a kind of Dynamic Graph processing means embodiment eight that Figure 11 provides for the application;
Figure 12 is another part structural representation of the embodiment of the present application eight.
Detailed description of the invention
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 carried out clear, complete
Describe, it is clear that described embodiment is only some embodiments of the present application rather than whole embodiments wholely.Based on
Embodiment in the application, it is every other that those of ordinary skill in the art are obtained under not making creative work premise
Embodiment, broadly falls into the scope of the application protection.
With reference to Fig. 1, for the flow chart of a kind of Dynamic Graph processing method embodiment one that the application provides, described method is suitable for
In the application that the motion graphics being in Dynamic Announce is processed, in the embodiment of the present application, with to described Dynamic Graph
As a example by preservation, described method may comprise steps of:
Step 101: resolve canvas element, graphic element and the animated element comprised in described Dynamic Graph.
Wherein, as described in the text, described Dynamic Graph is in the presence of Dynamic Announce state, based on painting canvas, and described picture
It is provided with figure on cloth, figure is provided with animation.The dynamic effect of the figure of described Dynamic Graph is realized by the value of variable, as
The dynamical state (position or color value etc.) that the title of variable, minima, maximum and minima are corresponding with maximum, example
As, Drawing Object Rect1 comprises the dynamic of horizontal displacement, the left side of this Drawing Object when the minima of variable OPCTAG2 is 0
Position is 20, and when OPCTAG2 reaches maximum 100, the left position of Drawing Object is 420, as follows specific to physical record
In shown code, matrix object moves horizontally shown in animation.
Being, described Dynamic Graph includes that canvas element, described canvas element include that the painting canvas of canvas object and correspondence thereof belongs to
Property value, described Dynamic Graph also includes graphic element, and described graphic element is based on described canvas object, by described painting canvas attribute
Value defines the equivalent and contained graphic element of length and width shape attribute of described canvas object performance shape in described canvas object
Formula, such as the position relationship etc. between each graphic element.Described graphic element includes Drawing Object and graph of a correspondence object thereof
And graph of a correspondence property value, described Dynamic Graph also includes in animated element, each described animated element and described Dynamic Graph
The Drawing Object of a graphic element there is membership, described animated element based on the Drawing Object that it is affiliated, by
Described graphic attribute value define the horizontal displacement dynamic value of its graph of a correspondence object, the left side away from, top margin, width and height etc.
And the form of expression that contained animated element is in described Drawing Object, as in described Drawing Object between each animated element
Position relationship etc..Described animated element includes the animation attributes value of animation object and correspondence thereof, described animation attributes value define
The property values such as the position of described animation object, size.
Wherein, the analysis result in described step 101 is, the canvas object in the described Dynamic Graph got and picture thereof
Drawing Object in cloth property value, described canvas object and graphic attribute value thereof, animation object in described image object and
Animation attributes value.
Step 102: according to the analysis result of described canvas element, graphic element and animated element, set up XML data format
Node tree, each element in described Dynamic Graph 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 format.Described
After step 102 has performed, described Dynamic Graph with the text representation figure of XML data format and dynamically, by Dynamic Graph painting canvas
The variable associated in the rendering parameter of Drawing Object such as length, width and coordinate etc., dynamic effect in object and the value of variable
Corresponding dynamic parameter preserves to XML file, reaches to represent the purpose of exclusive data with general format.
From in such scheme, in a kind of Dynamic Graph processing method embodiment one that the application provides, by by dynamically
Each element in figure represents with the node tree form of XML data format, and the data of XML data format can be answered by universal
Read with software, described Dynamic Graph is follow-up store after, can not only be carried out conveniently by multiple Dynamic Graph application software
Read, and without resolving any configuration file etc., add the range of application of Dynamic Graph, and improve the reading that Dynamic Graph reads
Take efficiency.
With reference to Fig. 2, for the flow process of step 102 described in a kind of Dynamic Graph processing method embodiment two that the application provides
Figure, described step 102, when setting up the node tree of XML data format, may comprise steps of realization:
Step 201: the painting canvas property value of described canvas object and correspondence thereof is carried out the conversion of XML data format, by institute
State the transformation result root node as described node tree of canvas object, using the transformation result of described painting canvas property value as described
The slave node of root node.
Wherein, the execution result of described step 201 is: set up the root node in described node tree and painting canvas property value pair
The slave node answered, 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 format, by institute
State the transformation result slave node as described root node of Drawing Object, the transformation result of graphic attribute value is corresponding as it
The slave node of Drawing Object node.
Wherein, the execution result of described step 102 is: set up the Drawing Object pair in canvas object in described node tree
The node answered, as the slave node of root node, and sets up the node of described graphic attribute value, corresponding as this graphic attribute value
The slave node of Drawing Object node, as shown in Figure 3.
Step 203: the animation attributes value of described animation object and correspondence thereof is carried out the conversion of XML data format, by institute
State the transformation result of animation object as the slave node of Drawing Object node belonging to it, by the Change-over knot of described animation attributes value
Fruit is as the slave node of animation Object node belonging to it.
Wherein, the execution result of described step 203 is: set up the animation pair in each Drawing Object in described node tree
As corresponding node, as the slave node of Drawing Object node belonging to it, and set up the node of described animation attributes value, as
The slave node of this animation attributes value correspondence animation Object node, as shown in Figure 3.
It should be noted that during the execution of described step 201 to described step 203 it can be understood as:
Initially set up the root node that described canvas object is corresponding, and set up the joint that each described painting canvas property value is corresponding successively
Point, as the slave node of described root node, is melted into XML data format by the root node having built up and slave node sequence thereof
Text preserve;
Secondly, travel through each described Drawing Object in described canvas object successively, set up each described Drawing Object pair
The node answered, as the slave node of described root node, travels through the graphic attribute value of each described Drawing Object, sets up each institute
State the node that graphic attribute value is corresponding, as the slave node of this graphic attribute value correspondence figure Object node, the figure that will set up
The text of the node of shape object and slave node sequence chemical conversion XML data format thereof preserves;
Again, travel through each described animation object in described Drawing Object successively, set up each described animation object pair
The node answered, as the slave node of Drawing Object node belonging to it, travels through the animation attributes value of each described animation object, builds
The node that vertical each described animation attributes value is corresponding, as the slave node of this animation attributes value object animation Object node, will
The text of the node of the animation object set up and slave node sequence chemical conversion XML data format thereof preserves.
That is, in described step 102 when setting up the node tree of XML data format, foundation can be layered successively by root node
Each slave node layer, it is also possible to by root node, the root node with the slave node of described root node as subtree is built successively
Vertical subtree, such as, after setting up root node, set up the subtree with each Drawing Object node as root node successively, final with
Hereinbefore reach identical purpose, complete the foundation to node tree.
It should be noted that described step 102 is when setting up described node tree, can be layered successively by canvas element
Contribute, it is also possible to by canvas element, successively each graphic element and animated element thereof are contribute.In Fig. 3, by saving
The root node of some tree starts to set up to lower leaf, or starts to build to making from left to right or from the right side by the root node of node tree
Vertical.It is below the partial code example in the embodiment of the present application after the conversion of a certain Drawing Object:
<object ObjectType=" INDEX_RECT ">// canvas object INDEX_RECT "
<objectName xml:space=“preserve”>rECT1</ObjectName>// Drawing Object RECT1
<left>-3</Left>// left position-3
<top>-1</Top>// peak-1+1
<width>1280</Width>// width 1280
<height>133</Height>// highly 133
<visible>true</Visible>// visible
<layer>0</Layer>// 0+1 layer
<rotateCenterX>637.000000</RotateCenterX>//X-coordinate 637
<rotateCenterY>65.500000</RotateCenterY>//Y coordinate 65.5
<gradientColor>16777215,12632064</GradientColor>gradient color gamut
<gradientStyle>gsVCENTER_121</GradientStyle>//Gradient model code
gsVCENTER_121
<gradientStep>8</GradientStep>gradient grade 8
<backgroundColor>12632064</BackgroundColor>// background color code 12632064
<backgroundStyle>bgSOLIDFILL</BackgroundStyle>// backstyle code
bgSOLIDFILL
<issemiTransparent>false</IssemiTransparent>// non-the superlative degree
<edgeColor>0</EdgeColor>// rib color value 0
<edgeStyle>esNOLINE</EdgeStyle>// rib pattern
<edgeWidth>1</EdgeWidth>// rib is wide by 1
<nodeList>(-3 ,-1), (-3,132), (1277,132), (1277 ,-1)</NodeList>// node coordinate
<nodeListFormat xml:space=“preserve”>13, true</NodeListFormat>// node
List framework
</object>
It is below the partial code example in the embodiment of the present application after the conversion of a certain Dynamic Graph:
It addition, can also include composite figure element in described Dynamic Graph, described composite figure element includes constitutional diagram
The composite attribute value of shape object and correspondence thereof, described Dynamic Graph also includes composite figure daughter element, described composite figure daughter element
Show based on described composite figure object, described composite attribute value define the shape attribute etc. of described composite figure object
Value and the contained composite figure daughter element form of expression in described composite figure object, as each composite figure daughter element it
Between position relationship etc..Described composite figure daughter element includes the composite figure property value of composite figure subobject and correspondence thereof
(described composite figure subobject Drawing Object as described previously can be the object of similar structures, in the embodiment of the present application
In be distinguish between with different titles), described Dynamic Graph also includes combined animation daughter element, and described combined animation daughter element is with institute
Show, by the shape attribute of composite figure subobject described in described composite figure attribute definition based on stating composite figure subobject
Equivalence, as horizontal displacement dynamic value, the left side away from, top margin, width etc., and contained combined animation daughter element is at described constitutional diagram
Form of expression property value in shape subobject, such as the position relationship etc. between each combined animation daughter element.Described combined animation
Daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, described in described combined animation attribute value definition
The property values such as the position of combined animation subobject, size.
Thus, described method can also include:
Set up composite figure element described in described node tree, composite figure daughter element and combined animation daughter element the most right
The node answered, particularly as follows:
The composite attribute value of described composite figure object and correspondence thereof is carried out XML data format conversion, by described combination
The transformation result of Drawing Object is as the slave node of described root node, using right as it for the transformation result of described composite attribute value
Answer the slave node of composite figure Object node;
Composite figure property value to described composite figure subobject and correspondence thereof carries out the conversion of XML data format, will
The transformation result of described composite figure subobject is as the slave node of its corresponding composite figure Object node, by described constitutional diagram
The transformation result of shape property value is as the slave node of the composite figure subobject node of its correspondence;
Combined animation property value to described combined animation subobject and correspondence thereof carries out the conversion of XML data format, will
The transformation result of described combined animation subobject is as the slave node of composite figure subobject node belonging to it, by described combination
The transformation result of animation attributes value is as the slave node of the combined animation subobject node of its correspondence.
It should be noted that the above-mentioned process of composite figure object corresponding node described in described node tree of setting up is with above
The middle process setting up node tree is similar to, and is not described in detail at this.
In actual applications, outside the Dynamic Announce contents processing above two content combination of described Dynamic Graph, it is also possible to
Having herein below to combine, e.g., described Dynamic Graph includes described canvas element, described composite figure element, described composite figure
Outside daughter element and combined animation daughter element, described graphic element and described animated element can not be included, and with foregoing
The described Dynamic Graph that compound mode exists, when setting up described node tree, can initially set up described painting canvas as being hereinbefore similar to
Root node that in element, canvas object is corresponding and slave node corresponding to the painting canvas property value of correspondence thereof, the most again according to the application
It is corresponding with combined animation daughter element that content in embodiment two sets up described composite figure element, described composite figure daughter element
Node.Detailed process, with similar, does not repeats them here.
With reference to Fig. 4, for the flow chart of a kind of Dynamic Graph processing method embodiment three that the application provides, described method is suitable for
In the application that the motion graphics being in Dynamic Announce is processed, in the embodiment of the present application, with to described Dynamic Graph
As a example by reading, described Dynamic Graph is presented in described node tree, and described node tree includes the node of XML data format, institute
The method of stating may comprise steps of:
Step 401: travel through the node in described node tree.
Wherein, described node tree exists with the text of XML data format, and the node in described node tree includes described
The node that in Dynamic Graph, canvas element corresponding node, graphic element Object node and animated element are corresponding.
Step 402: according to each node in described node tree, reduces described Dynamic Graph;
Wherein, described step 402 is the inverse process of step 102 described above, to the node tree of described Dynamic Graph
Unserializing process, it is also possible to be understood as, carries out the text of XML data format object data and is converted to the dynamic of Dynamic Announce
The process of state figure.
From such scheme, a kind of Dynamic Graph processing method embodiment three that the application provides, will be with XML data format
The node tree that exists of text be reduced into the Dynamic Graph of Dynamic Announce, it is not necessary to configuration file is parsed by prior art
Journey, improves the reading efficiency that Dynamic Graph reads.
It should be noted that in described step 402, can carry out being reduced into correspondence successively to each node traversed
Dynamic Graph in element, such as canvas element, graphic element, animated element etc., and then obtain the Dynamic Graph of reduction.
With reference to Fig. 5, for the flow process of step 402 described in a kind of Dynamic Graph processing method embodiment four that the application provides
Figure, described step 402 is reduced described Dynamic Graph time can be realized by following steps:
Step 501: the root node in described node tree is carried out the conversion of object data format, turning described root node
Change the result canvas object as described Dynamic Graph.
Step 502: the slave node of described canvas object node is carried out the conversion of object data format, by described painting canvas
In the slave node of Object node, the transformation result of image object node is as the Drawing Object in described canvas object, by described
In the slave node of canvas object node, the transformation result of painting canvas property value node belongs to as the painting canvas that described canvas object is corresponding
Property value;
Step 503: the slave node of described image object node is carried out the conversion of object data format, by described figure
In the slave node of Object node, the transformation result of animation Object node is as the animation object in Drawing Object belonging to it, by institute
State the transformation result of graphic attribute value node in the slave node of Drawing Object node as figure corresponding to Drawing Object belonging to it
Shape property value;
Step 504: the slave node of described animation Object node is carried out the conversion of object data format, by described animation
The transformation result of the slave node of Object node is as animation attributes value corresponding to animation object belonging to it.
As shown in Figure 6, for the exemplary plot in described step 401 to described step 402.
It should be noted that described step 402 is when reducing described Dynamic Graph, can be layered successively by canvas element
Reduction, it is also possible to by canvas element, successively each graphic element and animated element thereof are reduced.In Fig. 3, by saving
The root node of some tree starts to reduce to lower leaf, or from left to right or starts to go back from the right side to work by the root node of node tree
Former.
It addition, described node tree can also include composite figure element, composite figure daughter element, combined animation daughter element
Each self-corresponding node, therefore, described method can also include:
Reduce the composite figure element in described Dynamic Graph, composite figure daughter element, combined animation daughter element, particularly as follows:
Slave node to described canvas object node carries out the conversion of object data format, by described canvas object node
Slave node in the transformation result of composite figure Object node as the composite figure object in described canvas object;
Slave node to described composite figure Object node carries out the conversion of object data format, by described composite figure
In the slave node of Object node, the transformation result of combination image subobject node is as the combination in described composite figure object
Figure subobject, using the transformation result of composite attribute value node in the slave node of described composite figure Object node as described
The composite attribute value that composite figure object is corresponding;
Slave node to described combination image subobject node carries out the conversion of object data format, by described constitutional diagram
In the slave node of shape subobject node, the transformation result of combined animation subobject node is as composite figure subobject belonging to it
In combined animation subobject, by the slave node of described composite figure subobject node composite figure property value node turn
Change result as composite figure property value corresponding to composite figure subobject belonging to it;
Slave node to described combined animation subobject node carries out the conversion of object data format, described combination is moved
Draw the transformation result of slave node of subobject node as combined animation property value corresponding to combined animation subobject belonging to it.
After reduction completes, described Dynamic Graph can also include composite figure element, in described composite figure element
Including the composite attribute value of composite figure object and correspondence thereof, described Dynamic Graph also includes composite figure daughter element, described combination
Figure daughter element shows based on described composite figure object, described composite attribute value define described composite figure object
The shape attribute equivalent and contained composite figure daughter element form of expression in described composite figure object, such as each constitutional diagram
Position relationship etc. between shape daughter element.Described composite figure daughter element includes the constitutional diagram of composite figure subobject and correspondence thereof
(described composite figure subobject Drawing Object as described previously can be the object of similar structures to shape property value, in this Shen
Embodiment please be distinguish between with different titles), described Dynamic Graph also includes combined animation daughter element, described combined animation
Element shows based on described composite figure subobject, by composite figure subobject described in described composite figure attribute definition
Shape attribute is equivalent, as horizontal displacement dynamic value, the left side away from, top margin, width etc., and contained combined animation daughter element is in institute
State the form of expression property value in composite figure subobject, such as the position relationship etc. between each combined animation daughter element.Described
Combined animation daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, by described combined animation property value
Define the property values such as the position of described combined animation subobject, size.
It should be noted that composite figure element, composite figure daughter element, combination described in the described Dynamic Graph of above-mentioned reduction
The process of animation daughter element, with hereinbefore to reduce the process of Dynamic Graph similar, is not described in detail at this.
In actual applications, outside the Dynamic Announce contents processing above two content combination of described Dynamic Graph, it is also possible to
Having herein below to combine, e.g., described Dynamic Graph includes described canvas element, described composite figure element, described composite figure
Outside daughter element and combined animation daughter element, described graphic element and described animated element can not be included, and with foregoing
The described Dynamic Graph that compound mode exists,
When reducing described Dynamic Graph, can first reduce the picture of described canvas element and correspondence thereof as being hereinbefore similar to
Cloth property value, afterwards, then according to the content described composite figure element of reduction in the embodiment of the present application four, described composite figure
Element and combined animation daughter element, detailed process, with similar, does not repeats them here.
With reference to Fig. 7, for the structural representation of a kind of Dynamic Graph processing means embodiment five that the application provides, described device
Be applicable to the application that the motion graphics being in Dynamic Announce is processed, in the embodiment of the present application, with to described dynamically
As a example by the preservation of figure, described Dynamic Graph includes that canvas element, graphic element and animated element, described device may include that
Element resolution unit 701, for resolving canvas element, graphic element and the animation unit comprised in described Dynamic Graph
Element.
Wherein, as described in the text, described Dynamic Graph is in the presence of Dynamic Announce state, based on painting canvas, and described picture
It is provided with figure on cloth, figure is provided with animation.The dynamic effect of the figure of described Dynamic Graph is realized by the value of variable, as
The dynamical state (position or color value etc.) that the title of variable, minima, maximum and minima are corresponding with maximum, example
As, Drawing Object Rect1 comprises the dynamic of horizontal displacement, the left side of this Drawing Object when the minima of variable OPCTAG2 is 0
Position is 20, and when OPCTAG2 reaches maximum 100, the left position of Drawing Object is 420, the most front specific to physical record
In literary composition, matrix object moves horizontally shown in animation code.Being, described Dynamic Graph includes canvas element, described canvas element bag
Including the painting canvas property value of canvas object and correspondence thereof, described Dynamic Graph also includes graphic element, and described graphic element is with described picture
Based on cloth object, by the equivalent and contained figure of length and width shape attribute of canvas object described in described painting canvas attribute value definition
The element form of expression in described canvas object, such as the position relationship etc. between each graphic element.Described graphic element bag
Including Drawing Object and graph of a correspondence object thereof and graph of a correspondence property value thereof, described Dynamic Graph also includes animated element, often
Individual described animated element has membership, described animated element with the Drawing Object of a graphic element in described Dynamic Graph
Based on the Drawing Object that it is affiliated, described graphic attribute value the horizontal displacement defining its graph of a correspondence object is dynamic
Value, the left side away from, top margin, width and height etc. and the contained animated element form of expression in described Drawing Object, such as institute
State the position relationship etc. between each animated element in Drawing Object.Described animated element includes the dynamic of animation object and correspondence thereof
Draw property value, described animation attributes value define the property values such as the position of described animation object, size.
Wherein, the analysis result in described element resolution unit 701 is, the painting canvas pair in the described Dynamic Graph got
As and painting canvas property value, described canvas object in Drawing Object and graphic attribute value, the animation in described image object
Object and animation attributes value thereof.
Node tree sets up unit 702, for according to described canvas element, graphic element and animated element, sets up XML data
The nodes of form, represents each element in described Dynamic Graph with the form of described node tree node;
Wherein:
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof.
Wherein, described node tree sets up the running of unit 702, is described dynamic diagram sequences and turns to XML data lattice
The process of the text of formula.Setting up after unit 702 run at described node tree, described Dynamic Graph is with XML data format
Text representation figure, with dynamically, by the rendering parameter of Drawing Object in Dynamic Graph canvas object such as length, width and coordinate etc., moves
In state effect, the variable of association and dynamic parameter corresponding to the value of variable preserve to XML file, reach with general format table
Show the purpose of exclusive data.
From in such scheme, in a kind of Dynamic Graph processing means embodiment five that the application provides, by by dynamically
Each element in figure represents with the node tree form of XML data format, and the data of XML data format can be answered by universal
Read with software, described Dynamic Graph is follow-up store after, can not only be carried out conveniently by multiple Dynamic Graph application software
Read, and without resolving any configuration file etc., add the range of application of Dynamic Graph, and improve the reading that Dynamic Graph reads
Take efficiency.
With reference to Fig. 8, set up unit for node tree described in a kind of Dynamic Graph processing means embodiment six that the application provides
The structural representation of 702, wherein, described node tree is set up unit and be may include that
Primary nodal point conversion subelement 721, for carrying out XML number to the painting canvas property value of described canvas object and correspondence thereof
According to the conversion of form, using the transformation result of described canvas object as the root node of described node tree, by described painting canvas property value
Transformation result as the slave node of described root node.
Wherein, the operation result of described primary nodal point conversion subelement 721 is: set up the root node in described node tree
And the slave node that painting canvas property value is corresponding, as shown in Figure 3.
Secondary nodal point conversion subelement 722, for carrying out XML number to described Drawing Object and graph of a correspondence property value thereof
According to the conversion of form, using the transformation result of described Drawing Object as the slave node of described root node, by described graphic attribute
The transformation result of value is as the slave node of its graph of a correspondence Object node.
Wherein, the operation result of described secondary nodal point conversion subelement 722 is: set up canvas object in described node tree
In node corresponding to Drawing Object, as the slave node of root node, and set up the node of described graphic attribute value, as this
The slave node of graphic attribute value correspondence figure Object node, as shown in Figure 3.
3rd node conversion subelement 723, for carrying out XML number to the animation attributes value of described animation object and correspondence thereof
According to the conversion of form, using the transformation result of described animation object as the slave node of Drawing Object node belonging to it, by described
The transformation result of animation attributes value is as the slave node of animation Object node it described.
Wherein, the operation result of described 3rd node conversion subelement 723 is: set up each figure in described node tree
The node that animation object in object is corresponding, as the slave node of Drawing Object node belonging to it, and sets up described animation and belongs to
The node of property value, as the slave node of this animation attributes value correspondence animation Object node, as shown in Figure 3.
It should be noted that at described primary nodal point conversion subelement 721 to described 3rd node conversion subelement 723
In running it can be understood as:
Initially set up the root node that described canvas object is corresponding, and set up the joint that each described painting canvas property value is corresponding successively
Point, as the slave node of described root node, is melted into XML data format by the root node having built up and slave node sequence thereof
Text preserve;
Secondly, travel through each described Drawing Object in described canvas object successively, set up each described Drawing Object pair
The node answered, as the slave node of described root node, travels through the graphic attribute value of each described Drawing Object, sets up each institute
State the node that graphic attribute value is corresponding, as the slave node of this graphic attribute value correspondence figure Object node, the figure that will set up
The text of the node of shape object and slave node sequence chemical conversion XML data format thereof preserves;
Again, travel through each described animation object in described Drawing Object successively, set up each described animation object pair
The node answered, as the slave node of Drawing Object node belonging to it, travels through the animation attributes value of each described animation object, builds
The node that vertical each described animation attributes value is corresponding, as the slave node of this animation attributes value object animation Object node, will
The text of the node of the animation object set up and slave node sequence chemical conversion XML data format thereof preserves.
That is, described node tree sets up unit 702 when setting up the node tree of XML data format, can by root node successively
Each slave node layer is set up in layering, it is also possible to by root node, successively with the slave node of described root node as subtree
Root node sets up subtree, such as, after setting up root node, set up the son with each Drawing Object node as root node successively
Tree, finally and hereinbefore reaches identical purpose, completes the foundation to node tree.
It should be noted that described node tree sets up unit 702 when setting up described node tree, can be opened by canvas element
Begin to be layered achievement successively, it is also possible to by canvas element, successively each graphic element and animated element thereof are contribute.As
In Fig. 3, set up to lower leaf by the root node of node tree, or by the root node of node tree from left to right or from the right side to
Begin setting up.
It addition, can also include composite figure element in described Dynamic Graph, described composite figure element includes constitutional diagram
The composite attribute value of shape object and correspondence thereof, described Dynamic Graph also includes composite figure daughter element, described composite figure daughter element
Show based on described composite figure object, described composite attribute value define the shape attribute etc. of described composite figure object
Value and the contained composite figure daughter element form of expression in described composite figure object, as each composite figure daughter element it
Between position relationship etc..Described composite figure daughter element includes the composite figure property value of composite figure subobject and correspondence thereof
(described composite figure subobject Drawing Object as described previously can be the object of similar structures, in the embodiment of the present application
In be distinguish between with different titles), described Dynamic Graph also includes combined animation daughter element, and described combined animation daughter element is with institute
Show, by the shape attribute of composite figure subobject described in described composite figure attribute definition based on stating composite figure subobject
Equivalence, as horizontal displacement dynamic value, the left side away from, top margin, width etc., and contained combined animation daughter element is at described constitutional diagram
Form of expression property value in shape subobject, such as the position relationship etc. between each combined animation daughter element.Described combined animation
Daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, described in described combined animation attribute value definition
The property values such as the position of combined animation subobject, size.
Thus, as it is shown in figure 9, be another part structural representation of the embodiment of the present application six, described node tree is set up single
Unit 702 can also include:
Fourth node conversion subelement 724, for carrying out the composite attribute value of described composite figure object and correspondence thereof
XML data format is changed, using the transformation result of described composite figure object as the slave node of described root node, by described group
Close the transformation result slave node as its corresponding composite figure Object node of property value;
5th node conversion subelement 725, for described composite figure subobject and the composite figure attribute of correspondence thereof
Value carries out the conversion of XML data format, using the transformation result of described composite figure subobject as its corresponding composite figure object
The slave node of node, using the transformation result of described composite figure property value as the composite figure subobject node of its correspondence
Slave node;
6th node conversion subelement 726, for described combined animation subobject and the combined animation attribute of correspondence thereof
Value carries out the conversion of XML data format, and the transformation result of described combined animation subobject is right as composite figure belonging to it
As the slave node of node, using the transformation result of described combined animation property value as the combined animation subobject node of its correspondence
Slave node.
It should be noted that the above-mentioned process of composite figure object corresponding node described in described node tree of setting up is with above
The middle process setting up node tree is similar to, and is not described in detail at this.
In actual applications, outside the Dynamic Announce contents processing above two content combination of described Dynamic Graph, it is also possible to
Having herein below to combine, e.g., described Dynamic Graph includes described canvas element, described composite figure element, described composite figure
Outside daughter element and combined animation daughter element, described graphic element and described animated element can not be included, and with foregoing
Compound mode exist described Dynamic Graph, described node tree set up unit 702 set up described node tree time, can be as hereinbefore
Similar, initially set up the subordinate that the painting canvas property value of root node that in described canvas element, canvas object is corresponding and correspondence thereof is corresponding
Node, sets up described composite figure element, described composite figure daughter element according to the content in the embodiment of the present application six the most again
The node corresponding with combined animation daughter element.Detailed process, with similar, does not repeats them here.
With reference to Figure 10, for the structural representation of a kind of Dynamic Graph processing means embodiment seven that the application provides, described side
Method is be applicable to the application processing the motion graphics being in Dynamic Announce, in the embodiment of the present application, with to described dynamic
As a example by the reading of state figure, described Dynamic Graph is presented in described node tree, and described node tree includes the joint of XML data format
Point, described device includes:
Node traverses unit 1001, for traveling through the node in described node tree.
Wherein, described node tree exists with the text of XML data format, and the node in described node tree includes described
The node that in Dynamic Graph, canvas element corresponding node, graphic element Object node and animated element are corresponding.
Dynamic Graph reduction unit 1002, for according to each node in described node tree, reduces described Dynamic Graph;
Wherein:
Described Dynamic Graph includes canvas element, graphic element, animated element;
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof.
Wherein, described Dynamic Graph reduction unit 1002 is node tree described above and sets up the inverse process of unit 702, right
The unserializing process of the node tree of described Dynamic Graph, it is also possible to be understood as, carries out object data by the text of XML data format
It is converted to the process of the Dynamic Graph of Dynamic Announce.
From such scheme, a kind of Dynamic Graph processing means embodiment seven that the application provides, will be with XML data format
The node tree that exists of text be reduced into the Dynamic Graph of Dynamic Announce, it is not necessary to configuration file is parsed by prior art
Journey, improves the reading efficiency that Dynamic Graph reads.
With reference to Figure 11, for Dynamic Graph reduction unit described in a kind of Dynamic Graph processing means embodiment eight that the application provides
The structural representation of 1002, described Dynamic Graph reduction unit 1002 includes:
First goes back atomic unit 1021, for the root node in described node tree being carried out the conversion of object data format,
Using the transformation result of described root node as the canvas object of described Dynamic Graph.
Second goes back atomic unit 1022, for the slave node of described canvas object node is carried out object data format
Conversion, using the transformation result of image object node in the slave node of described canvas object node as in described canvas object
Drawing Object, using the transformation result of painting canvas property value node in the slave node of described canvas object node as described painting canvas pair
As corresponding painting canvas property value.
3rd goes back atomic unit 1023, for the slave node of described image object node is carried out object data format
Conversion, using the transformation result of animation Object node in the slave node of described Drawing Object node as in Drawing Object belonging to it
Animation object, using the transformation result of graphic attribute value node in the slave node of described Drawing Object node as belonging to it scheme
Shape object graph of a correspondence property value.
4th goes back atomic unit 1024, for the slave node of described animation Object node is carried out object data format
Conversion, using the transformation result of the slave node of described animation Object node as animation attributes corresponding to animation object belonging to it
Value.
As shown in Figure 6, go back atomic unit 1021 for described first and go back the example in atomic unit 1024 to the described 4th
Figure.
It should be noted that described Dynamic Graph reduction unit 1002 is when reducing described Dynamic Graph, can be by canvas element
Start to be layered reduction successively, it is also possible to by canvas element, successively each graphic element and animated element thereof are reduced.
In Fig. 3, reduce to lower leaf by the root node of node tree, or from left to right or from the right side by the root node of node tree
Reduction is started to work.
It addition, described Dynamic Graph also includes composite figure element, composite figure daughter element and combined animation daughter element, because of
This, with reference to Figure 12, for the structural representation of Dynamic Graph reduction unit 1002 described in the embodiment of the present application eight, described Dynamic Graph is also
Former unit 1002 can also include:
5th goes back atomic unit 1025, for the slave node of described canvas object node is carried out object data format
Conversion, using the transformation result of composite figure Object node in the slave node of described canvas object node as described canvas object
In composite figure object;
6th goes back atomic unit 1026, for the slave node of described composite figure Object node is carried out object data lattice
The conversion of formula, using the transformation result of combination image subobject node in the slave node of described composite figure Object node as institute
State the composite figure subobject in composite figure object, by composite attribute value in the slave node of described composite figure Object node
The transformation result of node is as composite attribute value corresponding to described composite figure object;
7th goes back atomic unit 1027, for the slave node of described combination image subobject node is carried out object data
The conversion of form, makees the transformation result of combined animation subobject node in the slave node of described composite figure subobject node
Combined animation subobject in composite figure subobject belonging to it, by the slave node of described composite figure subobject node
The transformation result of composite figure property value node is as composite figure property value corresponding to composite figure subobject belonging to it;
8th goes back atomic unit 1028, for the slave node of described combined animation subobject node is carried out object data
The conversion of form, using right as combined animation belonging to it for the transformation result of the slave node of described combined animation subobject node
As corresponding combined animation property value.
After reduction completes, described Dynamic Graph can also include composite figure element, in described composite figure element
Including the composite attribute value of composite figure object and correspondence thereof, described Dynamic Graph also includes composite figure daughter element, described combination
Figure daughter element shows based on described composite figure object, described composite attribute value define described composite figure object
The shape attribute equivalent and contained composite figure daughter element form of expression in described composite figure object, such as each constitutional diagram
Position relationship etc. between shape daughter element.Described composite figure daughter element includes the constitutional diagram of composite figure subobject and correspondence thereof
(described composite figure subobject Drawing Object as described previously can be the object of similar structures to shape property value, in this Shen
Embodiment please be distinguish between with different titles), described Dynamic Graph also includes combined animation daughter element, described combined animation
Element shows based on described composite figure subobject, by composite figure subobject described in described composite figure attribute definition
Shape attribute is equivalent, as horizontal displacement dynamic value, the left side away from, top margin, width etc., and contained combined animation daughter element is in institute
State the form of expression property value in composite figure subobject, such as the position relationship etc. between each combined animation daughter element.Described
Combined animation daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, by described combined animation property value
Define the property values such as the position of described combined animation subobject, size.
It should be noted that composite figure element, composite figure daughter element, combination described in the described Dynamic Graph of above-mentioned reduction
The process of animation daughter element, with hereinbefore to reduce the process of Dynamic Graph similar, is not described in detail at this.
In actual applications, outside the Dynamic Announce contents processing above two content combination of described Dynamic Graph, it is also possible to
Having herein below to combine, e.g., described Dynamic Graph includes described canvas element, described composite figure element, described composite figure
Outside daughter element and combined animation daughter element, described graphic element and described animated element can not be included, and with foregoing
The described Dynamic Graph that compound mode exists,
When reducing described Dynamic Graph, can first reduce the picture of described canvas element and correspondence thereof as being hereinbefore similar to
Cloth property value, afterwards, then according to the content described composite figure element of reduction in the embodiment of the present application eight, described composite figure
Element and combined animation daughter element, detailed process, with similar, does not repeats them here.
It should be noted that each embodiment in this specification all uses the mode gone forward one by one to describe, each embodiment weight
Point explanation is all the difference with other embodiments, and between each embodiment, identical similar part sees mutually.
Finally, in addition it is also necessary to explanation, in this article, the relational terms of such as first and second or the like be used merely to by
One entity or operation separate with another entity or operating space, and not necessarily require or imply these entities or operation
Between exist any this reality relation or order.And, term " includes ", " comprising " or its any other variant meaning
Containing comprising of nonexcludability, so that include that the process of a series of key element, method, article or equipment not only include that
A little key elements, but also include other key elements being not expressly set out, or also include for this process, method, article or
The key element that equipment is intrinsic.In the case of there is no more restriction, statement " including ... " key element limited, do not arrange
Except there is also other identical element in including the process of described key element, method, article or equipment.
Above a kind of Dynamic Graph processing method and processing device provided by the present invention is described in detail, used herein
Principle and the embodiment of the present invention are set forth by specific case, and the explanation of above example is only intended to help to understand
The method of the present invention and core concept thereof;Simultaneously for one of ordinary skill in the art, according to the thought of the present invention, at tool
All will change on body embodiment and range of application, in sum, this specification content should not be construed as the application
Restriction.
Claims (8)
1. a Dynamic Graph processing method, it is characterised in that described Dynamic Graph includes canvas element, graphic element and animation unit
Element, described method includes:
Resolve canvas element, graphic element and the animated element comprised in described Dynamic Graph;
According to the analysis result of described canvas element, graphic element and animated element, set up the node tree of XML data format, will
Each element in described Dynamic Graph represents with the form of described node tree node;
Wherein:
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof;
Wherein, the described node tree setting up XML data format, including:
Painting canvas property value to described canvas object and correspondence thereof carries out the conversion of XML data format, by described canvas object
Transformation result is as the root node of described node tree, using the transformation result of described painting canvas property value as the subordinate of described root node
Node;
Described Drawing Object and graph of a correspondence property value thereof are carried out the conversion of XML data format, by described Drawing Object
Transformation result is as the slave node of described root node, using the transformation result of described graphic attribute value as its graph of a correspondence pair
Slave node as node;
Animation attributes value to described animation object and correspondence thereof carries out the conversion of XML data format, by described animation object
Transformation result is as the slave node of Drawing Object node belonging to it, using the transformation result of described animation attributes value as belonging to it
The slave node of animation Object node.
Method the most according to claim 1, it is characterised in that described Dynamic Graph also includes composite figure element, constitutional diagram
Shape daughter element and combined animation daughter element, described composite figure element includes the composite attribute of composite figure object and correspondence thereof
Value, described composite figure daughter element includes the composite figure property value of composite figure subobject and correspondence thereof, described combined animation
Daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, and wherein, described method also includes:
Set up composite figure element described in described node tree, composite figure daughter element and combined animation daughter element each self-corresponding
Node, particularly as follows:
The composite attribute value of described composite figure object and correspondence thereof is carried out XML data format conversion, by described composite figure
The transformation result of object is as the slave node of described root node, using the transformation result of described composite attribute value as its corresponding group
Close the slave node of Drawing Object node;
Composite figure property value to described composite figure subobject and correspondence thereof carries out the conversion of XML data format, by described
Described composite figure, as the slave node of its corresponding composite figure Object node, is belonged to by the transformation result of composite figure subobject
The transformation result of property value is as the slave node of the composite figure subobject node of its correspondence;
Combined animation property value to described combined animation subobject and correspondence thereof carries out the conversion of XML data format, by described
The transformation result of combined animation subobject is as the slave node of composite figure subobject node belonging to it, by described combined animation
The transformation result of property value is as the slave node of the combined animation subobject node of its correspondence.
3. a Dynamic Graph processing method, it is characterised in that described Dynamic Graph presented in node tree, described node tree bag
Including the node of XML data format, described method includes:
Travel through the node in described node tree;
According to each node in described node tree, reduce described Dynamic Graph;
Wherein:
Described Dynamic Graph includes canvas element, graphic element, animated element;
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof;
Wherein, the described Dynamic Graph of described reduction, including:
Root node in described node tree is carried out the conversion of object data format, using the transformation result of described root node as institute
State the canvas object of Dynamic Graph;
Slave node to described canvas object node carries out the conversion of object data format, by described canvas object node from
In genus node, the transformation result of image object node is as the Drawing Object in described canvas object, by described canvas object node
Slave node in the transformation result of painting canvas property value node as painting canvas property value corresponding to described canvas object;
Slave node to described image object node carries out the conversion of object data format, by described Drawing Object node from
Belong to the transformation result of animation Object node in node, as the animation object in Drawing Object belonging to it, to be saved by described Drawing Object
In the slave node of point, the transformation result of graphic attribute value node is as Drawing Object graph of a correspondence property value belonging to it;
Slave node to described animation Object node carries out the conversion of object data format, by described animation Object node from
Belong to the transformation result of node as animation attributes value corresponding to animation object belonging to it.
Method the most according to claim 3, it is characterised in that described Dynamic Graph also includes composite figure element, constitutional diagram
Shape daughter element and combined animation daughter element, described composite figure element includes the composite attribute of composite figure object and correspondence thereof
Value, described composite figure daughter element includes the composite figure property value of composite figure subobject and correspondence thereof, described combined animation
Daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, and wherein, described method also includes:
Reduce the composite figure element in described Dynamic Graph, composite figure daughter element, combined animation daughter element, particularly as follows:
Slave node to described canvas object node carries out the conversion of object data format, by described canvas object node from
In genus node, the transformation result of composite figure Object node is as the composite figure object in described canvas object;
Slave node to described composite figure Object node carries out the conversion of object data format, by described composite figure object
In the slave node of node, the transformation result of combination image subobject node is as the composite figure in described composite figure object
Subobject, using the transformation result of composite attribute value node in the slave node of described composite figure Object node as described combination
The composite attribute value that Drawing Object is corresponding;
Slave node to described combination image subobject node carries out the conversion of object data format, by described composite figure
In the slave node of Object node, the transformation result of combined animation subobject node is as in composite figure subobject belonging to it
Combined animation subobject, by the Change-over knot of composite figure property value node in the slave node of described composite figure subobject node
Really as the composite figure property value that composite figure subobject belonging to it is corresponding;
Slave node to described combined animation subobject node carries out the conversion of object data format, by described combined animation
The transformation result of the slave node of Object node is as combined animation property value corresponding to combined animation subobject belonging to it.
5. a Dynamic Graph processing means, it is characterised in that described Dynamic Graph includes canvas element, graphic element and animation unit
Element, described device includes:
Element resolution unit, for resolving canvas element, graphic element and the animated element comprised in described Dynamic Graph;
Node tree sets up unit, for according to described canvas element, graphic element and animated element, sets up XML data format
Nodes, represents each element in described Dynamic Graph with the form of described node tree node;
Wherein:
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof;
Wherein, described node tree is set up unit and is included:
Primary nodal point conversion subelement, for carrying out XML data format to the painting canvas property value of described canvas object and correspondence thereof
Conversion, using the transformation result of described canvas object as the root node of described node tree, by the conversion of described painting canvas property value
Result is as the slave node of described root node;
Secondary nodal point conversion subelement, for carrying out XML data format to described Drawing Object and graph of a correspondence property value thereof
Conversion, using the transformation result of described Drawing Object as the slave node of described root node, turning described graphic attribute value
Change the result slave node as its graph of a correspondence Object node;
3rd node conversion subelement, for carrying out XML data format to the animation attributes value of described animation object and correspondence thereof
Conversion, using the transformation result of described animation object as the slave node of Drawing Object node belonging to it, described animation is belonged to
The transformation result of property value is as the slave node of animation Object node it described.
Device the most according to claim 5, it is characterised in that described Dynamic Graph also includes composite figure element, constitutional diagram
Shape daughter element and combined animation daughter element, described composite figure element includes the composite attribute of composite figure object and correspondence thereof
Value, described composite figure daughter element includes the composite figure property value of composite figure subobject and correspondence thereof, described combined animation
Daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, wherein:
Described node tree is set up unit and is also included:
Fourth node conversion subelement, for carrying out XML data to the composite attribute value of described composite figure object and correspondence thereof
Form is changed, using the transformation result of described composite figure object as the slave node of described root node, by described composite attribute
The transformation result of value is as the slave node of its corresponding composite figure Object node;
5th node conversion subelement, for carrying out the composite figure property value of described composite figure subobject and correspondence thereof
The conversion of XML data format, using the transformation result of described composite figure subobject as its corresponding composite figure Object node
Slave node, saves the transformation result of described composite figure property value as the subordinate of the composite figure subobject node of its correspondence
Point;
6th node conversion subelement, for carrying out the combined animation property value of described combined animation subobject and correspondence thereof
The conversion of XML data format, using the transformation result of described combined animation subobject as composite figure subobject node belonging to it
Slave node, using the transformation result of described combined animation property value as the subordinate of the combined animation subobject node of its correspondence
Node.
7. a Dynamic Graph processing means, it is characterised in that described Dynamic Graph presented in node tree, described node tree bag
Including the node of XML data format, described device includes:
Node traverses unit, for traveling through the node in described node tree;
Dynamic Graph reduction unit, for according to each node in described node tree, reduces described Dynamic Graph;
Wherein:
Described Dynamic Graph includes canvas element, graphic element, animated element;
Described canvas element includes the painting canvas property value of canvas object and correspondence thereof;
Described graphic element includes Drawing Object and graph of a correspondence property value thereof;
Described animated element includes the animation attributes value of animation object and correspondence thereof;
Wherein, described Dynamic Graph reduction unit includes:
First goes back atomic unit, for the root node in described node tree carries out the conversion of object data format, by described
The transformation result of node is as the canvas object of described Dynamic Graph;
Second goes back atomic unit, for the slave node of described canvas object node being carried out the conversion of object data format, and will
In the slave node of described canvas object node, the transformation result of image object node is as the figure pair in described canvas object
As, the transformation result of painting canvas property value node in the slave node of described canvas object node is corresponding as described canvas object
Painting canvas property value;
3rd goes back atomic unit, for the slave node of described image object node being carried out the conversion of object data format, and will
In the slave node of described Drawing Object node, the transformation result of animation Object node is as the animation in Drawing Object belonging to it
Object, using the transformation result of graphic attribute value node in the slave node of described Drawing Object node as Drawing Object belonging to it
Graph of a correspondence property value;
4th goes back atomic unit, for the slave node of described animation Object node being carried out the conversion of object data format, and will
The transformation result of the slave node of described animation Object node is as animation attributes value corresponding to animation object belonging to it.
Device the most according to claim 7, it is characterised in that described Dynamic Graph also includes composite figure element, constitutional diagram
Shape daughter element and combined animation daughter element, described composite figure element includes the composite attribute of composite figure object and correspondence thereof
Value, described composite figure daughter element includes the composite figure property value of composite figure subobject and correspondence thereof, described combined animation
Daughter element includes the combined animation property value of combined animation subobject and correspondence thereof, wherein:
Described Dynamic Graph reduction unit also includes:
5th goes back atomic unit, for the slave node of described canvas object node being carried out the conversion of object data format, and will
In the slave node of described canvas object node, the transformation result of composite figure Object node is as the group in described canvas object
Close Drawing Object;
6th goes back atomic unit, for the slave node of described composite figure Object node carries out turning of object data format
Change, using the transformation result of combination image subobject node in the slave node of described composite figure Object node as described combination
Composite figure subobject in Drawing Object, by composite attribute value node in the slave node of described composite figure Object node
Transformation result is as composite attribute value corresponding to described composite figure object;
7th goes back atomic unit, for the slave node of described combination image subobject node carries out turning of object data format
Change, using the transformation result of combined animation subobject node in the slave node of described composite figure subobject node as belonging to it
Combined animation subobject in composite figure subobject, by composite figure in the slave node of described composite figure subobject node
The transformation result of property value node is as composite figure property value corresponding to composite figure subobject belonging to it;
8th goes back atomic unit, for the slave node of described combined animation subobject node carries out turning of object data format
Change, using corresponding as combined animation subobject belonging to it for the transformation result of the slave node of described combined animation subobject node
Combined animation property value.
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 CN103345534A (en) | 2013-10-09 |
CN103345534B true 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) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN107102832B (en) * | 2016-02-19 | 2019-11-12 | 阿里巴巴集团控股有限公司 | The display methods and device of figure in chart |
CN106095364B (en) * | 2016-06-03 | 2018-10-23 | 积成电子股份有限公司 | A kind of loading method of the ultra-large graphic file of power distribution network |
CN106484416B (en) * | 2016-09-30 | 2021-02-05 | 腾讯科技(北京)有限公司 | Information processing method and terminal |
CN110636105B (en) * | 2019-08-14 | 2021-02-12 | 北京金堤科技有限公司 | Tree graph obtaining method and device, storage medium and electronic equipment |
Citations (4)
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 |
-
2013
- 2013-07-26 CN CN201310320850.5A patent/CN103345534B/en active Active
Patent Citations (4)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN103345534A (en) | 2013-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103345534B (en) | A kind of Dynamic Graph processing method and processing device | |
Forlano | Decentering the human in the design of collaborative cities | |
Fan et al. | The application of computer graphics processing in visual communication design | |
Yau | Colored operads | |
CN102509350B (en) | Cube-based sports event information visualization method | |
Lin et al. | Structure-preserving retargeting of irregular 3d architecture | |
CN106683189B (en) | A method of the rendering type in three-dimensional scenic | |
CN103927424B (en) | Simplify the method for building three-dimensional model structure using volume mesh | |
CN104658033A (en) | Method and device for global illumination rendering under multiple light sources | |
Xu et al. | Art inheritance: an education course on traditional pattern morphological generation in architecture design based on digital sculpturism | |
CN102163262A (en) | Middle school solid geometry intelligent teaching system applied to electronic double plate | |
Chen | Research on the application of digital media art in animation control based on Maya MEL language | |
CN102572305B (en) | Method of video image processing and system | |
CN107562763A (en) | The display methods and device of data variation | |
Hinze et al. | Equational reasoning with lollipops, forks, cups, caps, snakes, and speedometers | |
CN107563958A (en) | Hologram image conversion method and system | |
CN103942819A (en) | Method and device for drawing geologic symbols | |
Knight et al. | Visualising software-a key research area | |
CN105404759A (en) | Three-dimensional or two-dimensional design method for welding structural parts | |
CN105335159A (en) | Anychart chart display method | |
Sbarski et al. | Visualizing argument structure | |
Yanbo et al. | Review of information visualization. | |
Davidson et al. | Placing Poetry | |
CN105740414A (en) | Database-based self-described data model structure | |
Kermik | Design and craft-a changing relationship at the heart of design education |
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 for 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 |