Claims
- 1. A computer-implemented method for automating a draw order of entities output from a computer, comprising:
examining a drawing output from the computer to identify two or more entities; and automatically determining a drawing order for the two or more entities based on a set of one or more predefined rules.
- 2. The method of claim 1 wherein the drawing output is examined to identify two or more entities that overlap.
- 3. The method of claim 1 wherein the set of one or more predefined rules provide that the drawing order is based on areas of the two or more entities.
- 4. The method of claim 1 further comprising obtaining a directed acyclic graph that designates the drawing order for the two or more overlapping entities in accordance with the determination.
- 5. The method of claim 4 wherein the directed acyclic graph nay be traversed from multiple start entities to be drawn first towards multiple end entities to be drawn last.
- 6. The method of claim 1 wherein one or more of the predefined rules provide for drawing a first entity prior to a second entity when the first entity contains the second entity.
- 7. The method of claim 1 wherein obtaining a directed acyclic graph comprises:
obtaining a directed cyclic graph that designates a drawing order for the two or more overlapping entities in accordance with the determination; assigning priorities to the drawing order; and breaking the directed cyclic graph based on the assigned priorities.
- 8. The method of claim 7 wherein the priorities are assigned based on strengths assigned to the one or more predefined rules.
- 9. The method of claim 1 wherein one or more of the predefined rules comprise:
determining that a first entity is drawn prior to a second entity if the first entity obscures the second entity more than the second entity obscures the first entity; and determining that the second entity is drawn prior to the first entity if the second entity obscures the first entity more than the first entity obscures the second entity.
- 10. The method of claim 9 wherein the one or more predefined rules determine whether the first entity obscures the second entity more than the second entity obscures the first entity by:
obtaining an area of intersection where the first entity overlaps with the second entity; obtaining a first entity intersection percentage as the area of intersection over an area of the first entity; obtaining a second entity intersection percentage as the area of intersection over an area of the second entity; comparing the first entity intersection percentage to the second entity intersection percentage; determining that the first entity obscures the second entity more than the second entity obscures the first entity when the first entity intersection percentage is higher than the second entity intersection percentage; and determining that the second entity obscures the first entity more than the first entity obscures the second entity when the second entity intersection percentage is higher than the first entity intersection percentage.
- 11. The method of claim 1 wherein one or more of the predefined rules are absolute.
- 12. The method of claim 1 wherein one or more of the predefined rules are relative.
- 13. The method of claim 1 wherein one or more of the predefined rules may be combined using a logical operator.
- 14. The method of claim 1 further comprising:
receiving input from a user; and adjusting the drawing order based on the input.
- 15. The method of claim 14 wherein adjusting the drawing order comprises modifying the one or more rules based on observations of the input.
- 16. The method of claim 1 wherein the one or more predefined rules may be modified by a user.
- 17. A computer-implemented system for automating a draw order of entities, comprising:
(a) a computer having an output device attached thereto; (b) a computer graphics program executing on the computer, wherein the computer graphics program is configured to output two or more entities to an output device; (c) means, performed by the computer graphics program, for examining a drawing output from the computer to identify two or more entities; and (d) means, performed by the computer graphics program, for automatically determining a drawing order for the two or more entities based on a set of one or more predefined rules.
- 18. The system of claim 17 wherein the drawing output is examined to identify two or more entities that overlap.
- 19. The system of claim 17 wherein the set of one or more predefined rules provide that the drawing order is based on areas of the two or more entities.
- 20. The system of claim 17 further comprising means, performed by the computer graphics program, for obtaining a directed acyclic graph that designates the drawing order for the two or more overlapping entities in accordance with the determination.
- 21. The system of claim 20 wherein the directed acyclic graph may be traversed from multiple start entities to be drawn first towards multiple end entities to be drawn last.
- 22. The system of claim 17 wherein one or more of the predefined rules provide for drawing a first entity prior to a second entity when the first entity contains the second entity.
- 23. The system of claim 17 wherein the means for obtaining a directed acyclic graph comprises:
means, performed by the computer graphics program, for obtaining a directed cyclic graph that designates a drawing order for the two or more overlapping entities in accordance with the determination; means, performed by the computer graphics program, for assigning priorities to the drawing order; and means, performed by the computer graphics program, for breaking the directed cyclic graph based on the assigned priorities.
- 24. The system of claim 23 wherein the priorities are assigned based on strengths assigned to the one or more predefined rules.
- 25. The system of claim 17 wherein one or more of the predefined rules comprise:
means, performed by the computer graphics program, for determining that a first entity is drawn prior to a second entity if the first entity obscures the second entity more than the second entity obscures the first entity; and means, performed by the computer graphics program, for determining that the second entity is drawn prior to the first entity if the second entity obscures the first entity more than the first entity obscures the second entity.
- 26. The system of claim 25 wherein the one or mote predefined rules determine whether the first entity obscures the second entity more than the second entity obscures the first entity by:
obtaining an area of intersection where the first entity overlaps with the second entity; obtaining a first entity intersection percentage as the area of intersection over an area of the first entity; obtaining a second entity intersection percentage as the area of intersection over an area of the second entity; comparing the first entity intersection percentage to the second entity intersection percentage; determining that the first entity obscures the second entity more than the second entity obscures the first entity when the first entity intersection percentage is higher than the second entity intersection percentage; and determining that the second entity obscures the first entity more than the first entity obscures the second entity when the second entity intersection percentage is higher than the first entity intersection percentage.
- 27. The system of claim 17 wherein one or more of the predefined rules are absolute.
- 28. The system of claim 17 wherein one or more of the predefined rules are relative.
- 29. The system of claim 17 wherein one or more of the predefined rules may be combined using a logical operator.
- 30. The system of claim 17 further comprising:
means, performed by the computer graphics program, for receiving input from a user; and means, performed by the computer graphics program, for adjusting the drawing order based on the input.
- 31. The system of claim 30 wherein the means for adjusting the drawing order comprises means, performed by the computer graphics program, for modifying the one or more rules based on observations of the input.
- 32. The system of claim 17 wherein the one or more predefined rules may be modified by a user.
- 33. An article of manufacture embodying logic for performing a method for automating a draw order of entities output from a computer, the method comprising:
examining a drawing output from the computer to identify two or more entities; and automatically determining a drawing order for the two or more entities based on a set of one or more predefined rules.
- 34. The article of manufacture of claim 33 wherein the method examines the drawing output to identify two or more entities that overlap.
- 35. The article of manufacture of claim 33 wherein the set of one or more predefined rules provide that the drawing order is based on areas of the two or more entities.
- 36. The article of manufacture of claim 33, the method further comprising obtaining a directed acyclic graph that designates the drawing order for the two or more overlapping entities in accordance with the determination.
- 37. The article of manufacture of claim 33 wherein the directed acyclic graph may be traversed from multiple start entities to be drawn first towards multiple end entities to be drawn last.
- 38. The article of manufacture of claim 33 wherein one or more of the predefined rules provide for drawing a first entity prior to a second entity when the first entity contains the second entity.
- 39. The article of manufacture of claim 33 wherein obtaining a directed acyclic graph comprises:
obtaining a directed cyclic graph that designates a drawing order for the two or more overlapping entities in accordance with the determination; assigning priorities to the drawing order; and breaking the directed cyclic graph based on the assigned priorities.
- 40. The article of manufacture of claim 39 wherein the priorities are assigned based on strengths assigned to the one or more predefined rules.
- 41. The article of manufacture of claim 33 wherein one or more of the predefined rules comprise:
determining that a first entity is drawn prior to a second entity if the first entity obscures the second entity more than the second entity obscures the first entity; and determining that the second entity is drawn prior to the first entity if the second entity obscures the first entity more than the first entity obscures the second entity.
- 42. The article of manufacture of claim 41 wherein the one or more predefined rules determine whether the first entity obscures the second entity more than the second entity obscures the first entity by:
obtaining an area of intersection where the first entity overlaps with the second entity; obtaining a first entity intersection percentage as the area of intersection over an area of the first entity; obtaining a second entity intersection percentage as the area of intersection over an area of the second entity; comparing the first entity intersection percentage to the second entity intersection percentage; determining that the first entity obscures the second entity more than the second entity obscures the first entity when the first entity intersection percentage is higher than the second entity intersection percentage; and determining that the second entity obscures the first entity more than the first entity obscures the second entity when the second entity intersection percentage is higher than the first entity intersection percentage.
- 43. The article of manufacture of claim 33 wherein one or more of the predefined rules are absolute.
- 44. The article of manufacture of claim 33 wherein one or more of the predefined rules are relative.
- 45. The article of manufacture of claim 33 wherein one or more of the predefined rules may be combined using a logical operator.
- 46. The article of manufacture of claim 33, the method further comprising:
receiving input from a user; and adjusting the drawing order based on the input.
- 47. The article of manufacture of claim 46 wherein adjusting the drawing order comprises modifying the one or more rules based on observations of the input.
- 48. The article of manufacture of claim 33 wherein the one or more predefined rules may be modified by a user.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to the following co-pending and commonly-assigned patent application, which application is incorporated by reference herein:
[0002] U.S. patent application Ser. No. 09/226,690, entitled “DRAW ORDER PRESERVATION IN A COMPUTER-IMPLEMENTED GRAPHICS SYSTEM”, by Robert E. Bou, et. al., Attorney Docket No. 30566.68-US-01, filed on Jan. 7, 1999.