Claims
- 1. A method for pre-shaping a resulting graphics region, comprising:
determining the source graphics region, said source graphics region comprising one or more rectangles; for each rectangle in said source graphics region:
calculating a resulting graphics region corresponding to said rectangle; finding a bounding box for said resulting graphics region; and adding said bounding box to a destination graphics region.
- 2. The method of claim 1, wherein said method is performed upon receipt of command creating or copying an RGB image or images.
- 3. The method of claim 2, wherein said resulting graphics region is a graphics region formed by applying said command.
- 4. The method of claim 2, wherein said source graphics region is a rectangle defined in call parameters if said command is a put image command.
- 5. The method of claim 2, wherein said source graphics region is a region of a source pixmap translated to destination coordinates if said command is a copy area command.
- 6. The method of claim 2, wherein said source graphics region is a region of a destination pixmap before said command is applied if said command is a PolyFillRect command.
- 7. The method of claim 1, wherein said calculating includes intersecting a clip region with said source graphics region.
- 8. The method of claim 1, wherein said bounding box is a region created by choosing the smallest shape that would completely surround the desired graphic.
- 9. A method for handling a put image command defining a source graphics region, wherein the source graphics region is a rectangle defined in call parameters, the method comprising the following for each rectangle in the source graphics region:
calculating a resulting graphics region corresponding to said source graphics region; finding a bounding box for said resulting graphics region; and adding said bounding box to a destination graphics region.
- 10. The method of claim 9, wherein said bounding box is a region created by choosing the smallest shape that would completely surround the desired graphic.
- 11. The method of claim 9, wherein said calculating includes intersecting a clip region with said source graphics region.
- 12. A method for handling a copy area command defining a source graphics region, wherein the source graphics region is a region of a source pixmap translated to destination coordinates, the method comprising the following for each rectangle in the source graphics region:
calculating a resulting graphics region corresponding to said source graphics region; finding a bounding box for said resulting graphics region; and adding said bounding box to a destination graphics region.
- 13. The method of claim 12, wherein said bounding box is a region created by choosing the smallest shape that would completely surround the desired graphic.
- 14. The method of claim 12, wherein said calculating includes intersecting a clip region with said source graphics region.
- 15. A method for handling a PolyFillRect command defining a source graphics region, wherein the source graphics region is a region of a destination pixmap before said PolyFillrect command is applied, the method comprising the following for each rectangle in the source graphics region:
calculating a resulting graphics region corresponding to said source graphics region; finding a bounding box for said resulting graphics region; and adding said bounding box to a destination graphics region.
- 16. The method of claim 15, wherein said bounding box is a region created by choosing the smallest shape that would completely surround the desired graphic.
- 17. The method of claim 15, wherein said calculating includes intersecting a clip region with said source graphics region.
- 18. A method for post-shaping a graphics region, said graphics region including rectangles, the method comprising:
determining if combining two or more of said rectangles would result in reduced bandwidth usage upon transmission of said graphics region; and combining two or more of said rectangles if said combination results in reduced bandwidth usage upon transmission of said graphics region.
- 19. The method of claim 18, wherein said determining comprises:
using a typical cost per pixel in bandwidth usage and a cost per rectangle in bandwidth usage to arrive at a predicted cost for a first rectangle, a second rectangle, and a region combining said first rectangle and said second rectangle.
- 20. The method of claim 19, wherein said combining comprises:
combining said first rectangle and said second rectangle if a sum of said predicted cost for said first rectangle and said second rectangle is greater than or equal to the predicted cost for said region combining said first rectangle and said second rectangle.
- 21. A method for post-shaping a graphics region, said graphics region including rectangles, the method comprising:
determining if any two rectangles are touching; and combining any two rectangles that are touching each other.
- 22. The method of claim 21, further comprising:
determining if any two rectangles are nearby each other; and combining any two rectangles that are nearby each other.
- 23. The method of claim 22, wherein two rectangles are nearby if they are within a preset number of pixels from each other.
- 24. The method of claim 22, wherein two rectangles are nearby if they are within a preset distance proportional to their areas.
- 25. A method for reducing the memory used to store or transmit a graphics image in a computer system, comprising:
recording a put image command executed to create a portion of the graphics image in a pixmap; for each rectangle in said pixmap:
calculating a resulting graphics region corresponding to said rectangle; finding a bounding box for said resulting graphics region; adding said bounding box to a destination graphics region; using said put image command to update a data structure associated with said pixmap with information; and compressing one or more sub-images of the graphics image using a compression scheme, each of said sub-images having a location, said location and said compression scheme for each of said sub-images chosen based on said information in said data structure.
- 26. The method of claim 25, wherein said data structure associated with said pixmap is a series of partially-transparent overlap layers.
- 27. The method of claim 25, wherein said data structure associated with said pixmap identifies the portion of the pixmap image that corresponds to a reshaped destination region for a specific drawing command.
- 28. The method of claim 27, wherein said data structure associated with said pixmap is a bitmask identifying which pixels are in said reshaped destination region for a specific drawing command.
- 29. The method of claim 27, wherein said data structure associated with said pixmap is a list of rectangles specifying which pixels are in said reshaped destination region for a specific drawing command.
- 30. The method of claim 25, wherein said compression scheme is an RGB codec.
- 31. A method for reducing the memory used to store or transmit a graphics image in a computer system, comprising:
adding a drawn-to region to an RGB region when a put image command is executed; for each rectangle in said RGB region:
calculating a resulting graphics region corresponding to said rectangle; finding a bounding box for said resulting graphics region; adding said bounding box to a destination graphics region; compressing said destination graphics region using a compression scheme, said compression scheme optimized for use with RGB images.
- 32. The method of claim 31, further comprising intersecting said RGB region with a clip region before said compressing.
- 33. The method of claim 31, further comprising storing said RGB region in an RGB-tagging structure
- 34. The method of claim 33, wherein said storing comprises storing said RGB region as a list of rectangles in an RGB-tagging data structure.
- 35. A method for reducing the memory used to store or transmit a graphics image in a computer system, comprising:
recording a put image command executed to create a portion of the graphics image in a pixmap; using said put image command to update a data structure associated with said pixmap with information; determining if any two rectangles in said pixmap are touching; combining any two rectangles that are touching each other; and compressing one or more sub-images of the graphics image using a compression scheme, each of said sub-images having a location, said location and said compression scheme for each of said sub-images chosen based on said information in said data structure.
- 36. The method of claim 35, wherein said data structure associated with said pixmap is a series of partially-transparent overlap layers.
- 37. The method of claim 35, wherein said data structure associated with said pixmap identifies the portion of the pixmap image that corresponds to a reshaped destination region for a specific drawing command.
- 38. The method of claim 37, wherein said data structure associated with said pixmap is a bitmask identifying which pixels are in said reshaped destination region for a specific drawing command.
- 39. The method of claim 37, wherein said data structure associated with said pixmap is a list of rectangles specifying which pixels are in said reshaped destination region for a specific drawing command.
- 40. The method of claim 35, wherein said compression scheme is an RGB codec.
- 41. A method for reducing the memory used to store or transmit a graphics image in a computer system, comprising:
adding a drawn-to region to an RGB region when a put image command is executed; removing a drawn-to region from said RGB region when an opaque fill command is executed; determining if any two rectangles in said RGB region are touching each other; combining any two rectangles that are touching each other; and compressing said RGB region using a compression scheme, said compression scheme optimized for use with RGB images.
- 42. The method of claim 41, further comprising intersecting said RGB region with a clip region before said compressing.
- 43. The method of claim 41, further comprising storing said RGB region in an RGB-tagging structure
- 44. The method of claim 43, wherein said storing comprises storing said RGB region as a list of rectangles in an RGB-tagging data structure.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] The present application is a continuation-in-part of co-pending application Ser. No. 10/194,123, filed on Jul. 11, 2002, by Thomas G. O'Neill and Jordan M. Slott, entitled “TAGGING MULTICOLOR IMAGES FOR IMPROVED COMPRESSION”, attorney docket no. SUN-P7082 and of co-pending application Ser. No. 10/247,907, filed on Sep. 20, 2002, by Thomas G. O'Neill and Jordan M. Slott, entitled “TAGGING SINGLE COLOR IMAGES FOR IMPROVED COMPRESSION”, attorney docket no. SUN-P7083, herein incorporated by reference.
Continuation in Parts (2)
|
Number |
Date |
Country |
| Parent |
10194123 |
Jul 2002 |
US |
| Child |
10319048 |
Dec 2002 |
US |
| Parent |
10247907 |
Sep 2002 |
US |
| Child |
10319048 |
Dec 2002 |
US |