Printer driver with compact representation of drawing environment changes
First Claim
1. Using a computer having a memory system, a method for use in producing a graphic image using a set of graphics primitives each of which is executed in accordance with a current state of a graphics environment at a time when a command invoking the graphics primitive was received, the current state of the graphics environment including a plurality of state elements and being changed at times by an image source, the method comprising the steps of:
- each time a state element has changed from when a previous command involving a graphics primitive was received to when a current command involving a graphics primitive was received;
saving in the memory system an instance of that state element containing current information for that state element; and
saving in the memory system a graphics state object including for each of said plurality of state elements a pointer to a most recently saved instance of that state element;
wherein each graphics state object includes a pointer to only one instance of a given state element, and at least some instances of state elements are pointed to by multiple graphics state objects.
1 Assignment
0 Petitions
Accused Products
Abstract
A printer driver, for example a QuickDraw printer driver, keeps track of changes in a drawing environment (specified by a GrafPort) by saving State records. Rather than filling up the State with the contents of each pattern and clip region, references to each of these members are stored in the State. This referencing allows each component of a State to be saved separately while still allowing the State to be reproduced precisely when it is time to draw. Referencing can greatly reduce disk accesses and file size, thereby accelerating printing. Referencing also allows significant time to be saved during state comparison. Whereas previous drivers have required a State to GrafPort comparison at translation (drawing) time, in the present method, each reference in the current state may be compared with references from the previous state to see which fields have changed. Comparing references, which may be stored in four bytes, is much faster than comparing large patterns and regions.
15 Citations
3 Claims
-
1. Using a computer having a memory system, a method for use in producing a graphic image using a set of graphics primitives each of which is executed in accordance with a current state of a graphics environment at a time when a command invoking the graphics primitive was received, the current state of the graphics environment including a plurality of state elements and being changed at times by an image source, the method comprising the steps of:
-
each time a state element has changed from when a previous command involving a graphics primitive was received to when a current command involving a graphics primitive was received;
saving in the memory system an instance of that state element containing current information for that state element; and
saving in the memory system a graphics state object including for each of said plurality of state elements a pointer to a most recently saved instance of that state element;
wherein each graphics state object includes a pointer to only one instance of a given state element, and at least some instances of state elements are pointed to by multiple graphics state objects. - View Dependent Claims (2, 3)
reading back and maintaining a record of a previous state of the graphics environment;
reading back a subsequent state of the graphics environment;
comparing pointers of each of said plurality of state elements of the subsequent state of the graphics environment to corresponding pointers of the previous state;
for each such comparison, if the pointers do not coincide, thereby indicating that the corresponding state element was changed, modifying the record of the previous state of the graphics environment to reflect the changed state element.
-
-
3. The method of claim 2, wherein the plurality of state elements include a Clipping Region, a Visible Region, a Pen Pattern, a Fill Pattern and a Background Pattern.
Specification