[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PostScript with smooth lines from object graphics?



Benno Puetz <puetz@mpipsykl.mpg.de> wrote in message news:<3B57D379.3060906@mpipsykl.mpg.de>...
> I have been using object graphics to create a streamline display that 
> the user can rotate to find a nice viewing angle.
> 
> If I print that view to a PostScript file, though, I found no way so far 
> to get smooth lines. I rather end up with a pixelated rendering.
> 
> Is this the way it is supposed to work or am I missing something?

Hmm, are you using the IDLgrPrinter or IDLgrClipboard object?

You might try, in either case, using vector output to improve the
appearance of the output.  Do this by setting VECTOR=1 on the Draw
method to either the IDLgrPrinter or IDLgrClipboard objects.

Here is what is happening:

When Vector=0, the default, we render the image into a bitmap and then
place that bitmap in the PostScript file as an image.  If you later
resize the image somehow, as in magnifying it to print larger or
something, the bitmap is scaled upwards and that causes the coarse
appearance of the lines.

Now if you set Vector=1, the geometry is written into the PostScript
file as vectors instead of as rendered bitmaps.  So, any subsequent
scaling of the image will result in smoother lines, since the lines
are re-rasterized at the new size.

The main difference between the clipboard and the printer objects in
this context is that the size of the clipboard image will be the same
size as the window, whereas the size of the printer bitmap will be
quite a bit larger.  So, the effect you are seeing would probably be
worse with the clipboard.  If you are using the clipboard, you might
try the printer object instead if you need to not use vector mode. 
The larger bitmap size may be enough.

There are other trade-offs between bitmap and vector mode.  If the
image is composed with a small amount of geometry, a vector file will
be a lot smaller than the corresponding bitmap file.  But you cannot
get some effects like shading in a vector format file.

Hope this helps,
Karl