[gs-devel] beginpage and the vector device

Ray Johnston Ray.Johnston at Artifex.com
Fri Nov 2 09:35:48 PDT 2007


Ralph Giles wrote:
> Is there a general page_begin event that I've missed? If
> not I guess we just have to make all the gdevvec.c routines check
> in_page themselves. More code, but less surprise.
As Ken mentioned, the "logical" start of a page is when the page
is first marked with non-white (actually non-background). Along
with the DSC comments that Ken mentioned that may be caught and
processed (with the ProcessDSCComments proc), many PS files will
perform several 'setpagedevice' actions at the beginning of the
page, each of which erases the page (calls the zfillpage func).

One efficient method for a device to catch the first marking
operation is to hook all of the device marking procedures to
one set of routines that signals 'page has been marked', then
after performing the start of page stuff, set all of the
procedures to the regular procs. This avoids performance penalty
once the page is marked.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ghostscript.com/pipermail/gs-devel/attachments/20071102/5946ff0c/attachment.htm

More information about the gs-devel mailing list