[Gs-devel] "page devices in C" design, partial draft

Russell Lang gsview at ghostgum.com.au
Fri Sep 7 02:45:29 PDT 2001


Peter,

> > I recommend that the bitmap sizing be independent of the X (or other
> > window system) window size so that subsequent resizing operations that
> > make the window larger always 'succeed' without needing replay from the
> > input data.
> 
> I agree.  This is the case for the X driver now: I haven't checked the MS
> Windows driver.

I'm not clear what exactly this is about.  Are we talking about 
window size or image size?
The window size is unrelated to the image size - it can be larger or 
smaller.  MS-Windows will cause a repaint if the window size changes,
which bit blits the image to the display.
OS/2 is the same.  For X11 and Gtk+ I'm not sure what happens - there 
will be an expose event for the new areas, but I'm not sure if it 
would include the already drawn area.
If you resize the image (not the window), then the display device 
will notifiy the caller not to touch the bitmap, allocate a new 
bitmap, erase it then notify the caller of the new bitmap details.
The caller may repaint immediately, or it may wait until the next 
sync/page.

> Note that devices will need width and height values separate from, but
> normally computed from, the page device parameters.

Fine.  Windows has always used this method, and the 'display' device 
continues to use this method.  Using PostScript code you set the page 
size, and the device then notifies the caller of the exact pixel 
dimensions of the bitmap.

> ---- From Russell:
> 
> > I would like the ability from PostScript code to ask a device to list its
> > available resolutions, page sizes and other pertinent information
> > (e.g. Bitmap/Printer, Duplex, Tumble).  My reading of your design suggests
> > that this will be possible, but I just wanted to make sure.
> 
> See above regarding the OutputDevice resource category.  I think all of this
> information should come back from an initial call to currentpagedevice, or
> rather, a similar interface that can be applied even to an unopened device.

I can't remember if I explained why I wanted this information. At the 
moment GSview keeps a list of resolutions and parameters for many 
printers.  It would like to be able to obtain this information 
automatically.  So being able to know whether Duplex is supported by 
a printer, or whether a device is for a printer or a bitmap would 
allow me to interrogate Ghostscript and provide an accurate list.
I would even like to know the list of valid options.
For example, pdfwrite might say that it has a parameter
/MonoImageFilter which supports the parameters
[ /CCITTFaxEncode /DCTEncode ]



Russell Lang                   gsview at ghostgum.com.au
Ghostgum Software Pty Ltd      http://www.ghostgum.com.au/




More information about the gs-devel mailing list