comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Color Printer limitations - Postscript resolution
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Color Printer limitations - Postscript resolution [message #2011 is a reply to message #2006] Fri, 13 May 1994 07:36 Go to previous messageGo to previous message
sigut is currently offline  sigut
Messages: 12
Registered: February 1994
Junior Member
In article <2qtlak$im1@spool.cs.wisc.edu> frp@ssec.wisc.edu (Francois Pomport) writes:

I am trying to print some filled contour graphics on a color
printer, but the printer seems to ignore them. Each time IDL warns
us that the number of polygon vertices may exceed some printer
capabilities when it is generating the postscript file. I have
tried to reduce the number of contour levels up to 7 (which is
not very much) in order to be below the limitations but it
doesn't work. Does anyone have encountered this warning message
before? How did you succeed in printing your files? I know that my
problem is related to the printer (Tektronix Pahser II). Do you
have any other references for new color printers with an estimated
price?

Francois
frp@ssec.wisc.edu
University of Wisconsin

Hi there,

I believe that your problem is NOT related to your printer, but to
the POLYFILL routine used by CONTOUR,/FILL or POLYCONTOUR.

This routine takes each closed contour as a polygon and sends it
to the PostScript device to be filled. When the POLYFILL routine
was developed, there was (and perhaps still is) a limit as to the
number of vertices the PostScript device would be able to handle.
If it is larger then 750 (or somesuch), it gives you a warning
and might do anything between ignoring the request and breaking off,
depending on the software version.

I wrote a hack to avoid this problem in the PV-Wave version of the
POLYCONTOUR routine, which could be reworked easily for IDL. The only
problem is, that in IDL you are discouraged to use POLYCONTOUR, because
it was replaced by the /FILL option to CONTOUR. Of course, the source
for CONTOUR is not available...

Anyway, since I started let's have a look. The tested change for
PV-Wave looks as follows:

pro polycontour, ...

...
if col ge 100 then col = 199-col ;Drawing index = 1 less than orig
col = color_index(col+1)

; This add-on was written to avoid the problem with
; "Too many vertices for PostScript polygon fill."
; The solution is to "thin out" the polygon and hope
; that it will still look the same.
sec_dim=size(xyarr)
gms_siz=sec_dim(2)
if gms_siz gt 750 then begin
gms_siz = gms_siz/2
while gms_siz gt 750 do gms_siz = gms_siz/2
xyarr=congrid(xyarr,2,gms_siz)
endif
; end-of-the-hack

if n_elements(pat) ne 0 then begin
s = size(pat)
if s(0) ne 3 then message, 'Pattern array not 3d.'
...

(you can find easily where to plug it in)

The UNTESTED version for IDL would look as follows:

pro polycontour, ...

...
if col ge 100 then col = 199-col ;Drawing index = 1 less than orig
col = color_index(col+1)

; This add-on was written to avoid the problem with
; "Too many vertices for PostScript polygon fill."
; The solution is to "thin out" the polygon and hope
; that it will still look the same.
sec_dim=size(xyarr)
gms_siz=sec_dim(1)
if gms_siz gt 750 then begin
gms_siz = gms_siz/2
while gms_siz gt 750 do gms_siz = gms_siz/2
xyarr=congrid(xyarr,gms_siz,2)
endif
; end-of-the-hack

if n_elements(pat) ne 0 then begin
s = size(pat)
if s(0) ne 3 then message, 'Pattern array not 3d.'
...

The file polycontour.pro can be found for Wave in .../wave/lib/std
and for IDL in .../idl/lib/userlib

Well, that's all.

Good luck,

George

------------------------------------------------------------ ------------------
George M.Sigut ETH Informatikdienste, Beratung & Schulung, CH-8092 Zurich
Swiss Federal Inst. of Technology, Computing Services, User Support & Training
email: sigut@bs.id.ethz.ch Phone: +41 1 632 5763 Fax: +41 1 252 8243
>>>> >>>>> in case of email problems send the mail to "sigut@acm.org" <<<<<<<<<
------------------------------------------------------------ ------------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Wavelet Routines
Next Topic: color for tvscl

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 10:41:59 PST 2025

Total time taken to generate the page: 2.87194 seconds