Claims
- 1. In a computing environment, a system comprising:
a mechanism that interprets markup to construct an element tree of elements, at least some of the elements in the element tree having associated property data and corresponding to an element object model; a scene graph interface layer, comprising a set of at least one interface that populates a scene graph with objects in response to requests to create the objects, the objects corresponding to a scene graph object model; and a translator that translates at least some of the elements and property data in the element tree into requests to the scene graph interface layer to create objects in the scene graph.
- 2. The system of claim 1 wherein the elements of the element object model substantially correlate with the objects of the scene graph object model.
- 3. The system of claim 1 wherein the markup includes inline text including a string that defines an element property, and the translator communicates with a type converter to convert the string to an object property.
- 4. The system of claim 1 wherein the markup includes inline text comprising complex property syntax.
- 5. The system of claim 4 wherein the inline text is identified with a reference that is referred to at another location in the markup.
- 6. The system of claim 4 wherein the inline text is identified with a reference that refers to a file.
- 7. The system of claim 4 wherein the inline text is identified with a reference that corresponds to a file that may be downloaded from a remote location in a network.
- 8. The system of claim 1 wherein the markup includes inline text comprising complex property syntax corresponding to a graphical resource.
- 9. The system of claim 8 wherein the graphical resource describes a visual brush object, the translator providing resource level data for directly communicating with the scene graph interface layer to create a visual paint object corresponding to the element described by the complex property syntax.
- 10. The system of claim 9 wherein the resource level data is identified with a reference that is referred to at another location in the markup.
- 11. The system of claim 9 wherein the resource level data is identified with a reference that refers to a file.
- 12. The system of claim 9 wherein the resource level data is identified with a reference that refers to a file that may be downloaded from a remote location in a network.
- 13. The system of claim 1 wherein one of the elements of the element object model comprises an image element.
- 14. The system of claim 1 wherein one of the elements of the element object model comprises a video element.
- 15. The system of claim 1 wherein one of the elements of the element object model comprises a canvas element that contains a shape element.
- 16. The system of claim 1 wherein one of the elements of the element object model comprises a shape element.
- 17. The system of claim 16 wherein the shape element comprises a rectangle element.
- 18. The system of claim 16 wherein the shape element comprises a polyline element.
- 19. The system of claim 16 wherein the shape element comprises a polygon element.
- 20. The system of claim 16 wherein the shape element comprises a path element.
- 21. The system of claim 16 wherein the shape element comprises a line element.
- 22. The system of claim 16 wherein the shape element comprises an ellipse element.
- 23. The system of claim 16 wherein the shape element comprises a circle element.
- 24. The system of claim 16 wherein the shape element includes fill property data.
- 25. The system of claim 16 wherein the shape element includes stroke property data.
- 26. The system of claim 16 wherein the shape element includes clipping property data.
- 27. The system of claim 16 wherein the shape element includes transform property data.
- 28. The system of claim 16 wherein the shape element includes effect data.
- 29. The system of claim 16 wherein the shape element includes opacity data.
- 30. The system of claim 16 wherein the shape element includes blend mode data.
- 31. The system of claim 1 further comprising an engine that processes the scene graph data structure and provides commands to at least one lower level graphics component.
- 32. The system of claim 31 wherein the engine traverses the scene graph data structure.
- 33. The system of claim 31 wherein the engine transmits the scene graph data structure.
- 34. The system of claim 1 wherein the translator requests instantiation of at least one builder to create the objects.
- 35. A computer-implemented method, comprising:
parsing markup, the markup including tags and associated property data according to an object model; interpreting a tag in the markup to determine whether the tag is directed to an element level or to a resource level; and
a) if the tag is directed to the element level, creating an element based on the tag and property data associated with the tag and adding the element to an element tree for later translation into a scene graph object in a scene graph data structure; and b) if the tag is directed to the resource level, providing data to directly create a scene graph object in the scene graph data structure via an interface to the scene graph data structure.
- 36. The method of claim 35 wherein objects of the element object model substantially correlate with objects in the scene graph data structure.
- 37. The method of claim 35 wherein the markup includes inline text for a tag property value and further comprising, communicating with a type converter to convert the inline text to an object property.
- 38. The method of claim 35 wherein the markup includes inline text for a tag property value having a reference to other text in the markup, and wherein interpreting the tag property value comprises interpreting the other text.
- 39. The method of claim 35 wherein the markup includes tags comprising complex property syntax for an element, and wherein interpreting the tags comprises interpreting the complex property syntax to determine that the tags are directed to the element level.
- 40. The method of claim 35 wherein the markup includes tags specifying complex property syntax for an element, and wherein interpreting the tags comprises interpreting the complex property syntax to determine that the element is directed to the resource level.
- 41. The method of claim 40 wherein interpreting the complex property syntax comprises detecting that the complex property syntax describes a property corresponding to a visual brush object.
- 42. The method of claim 40 wherein tags defining a visual brush object are referenced by an element in the element tree.
- 43. A computer-readable medium having computer-executable instructions for performing the method of claim 35.
- 44. A computer-readable medium having stored thereon a data structure, comprising:
a first set of data comprising a first set of tags and property data, in which the context in which the first set of tags is interpreted indicates that the first set of tags is directed to an element level; a second set of data comprising a second set of tags and second property data, in which the context in which the second set of tags is interpreted corresponds to complex property syntax and indicates that the second set of tags is directed to a resource level; and when the data structure is interpreted, the first set of data results in data corresponding to the first set of tags being created and inserted into an element-level tree based on the first information in the first set of text, and the second set of data results in data corresponding to the second set of tags being provided to directly create a scene graph object in a scene graph data structure at the resource level via an interface to the scene graph data structure, based on the second information in the second set of text.
- 45. The data structure of claim 44 further comprising a third set of data comprising a string corresponding to a property value.
- 46. The data structure of claim 44 wherein the first set of tags specify an identifier, and further comprising a third set of data that references the identifier.
- 47. The data structure of claim 46 wherein when interpreted, the third set of data results in data corresponding to the first set of tags being added to the element-level tree in a tree location for the third set of data.
- 48. The data structure of claim 44 wherein the second set of tags includes an identifier, and further comprising a third set of data that references the identifier.
- 49. The data structure of claim 44 wherein the second set of tags includes data formatted in a complex property syntax inline in markup.
- 50. The data structure of claim 49 wherein the complex property syntax describes a resource level element having a fill property corresponding to a visual paint object.
- 51. The data structure of claim 49 wherein the complex property syntax describes properties of an image element.
- 52. The data structure of claim 49 wherein the complex property syntax describes properties of a video element.
- 53. The data structure of claim 44 wherein the first set of tags describes properties of a shape element.
- 54. The data structure of claim 53 further comprising data in the data structure that describes a canvas element that contains the shape element.
- 55. The data structure of claim 53 wherein the properties of the shape element comprise fill property data.
- 56. The data structure of claim 53 wherein the properties of the shape element comprise stroke property data.
- 57. The data structure of claim 44 wherein the properties of the first element include clipping data.
- 58. The data structure of claim 44 wherein the properties of the first element include transform data
- 59. The data structure of claim 44 wherein the properties of the first element include opacity data.
- 60. The data structure of claim 44 wherein the properties of the first element include blend mode data.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] The present invention is related to the following copending U.S. patent applications: Ser. No. 10/184,795 entitled Multiple-Level Graphics Processing System and Method; Ser. No. 10/184,796, entitled Generic Parameterization for a Scene Graph; Ser. No. 10/185,775 entitled “Intelligent Caching Data Structure for Immediate Mode Graphics;” each filed on Jun. 27, 2002; and United States patent application entitled “Visual and Scene Graph Interfaces” (Attorney Docket No. 3470), filed concurrently herewith. Each related application is assigned to the assignee of the present patent application and hereby incorporated by reference in its entirety.