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

Home » Public Forums » archive » Re: PostScript with smooth lines from object graphics?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: PostScript with smooth lines from object graphics? [message #25835] Fri, 20 July 2001 08:34 Go to next message
kschultz is currently offline  kschultz
Messages: 2
Registered: July 2001
Junior Member
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
Re: PostScript with smooth lines from object graphics? [message #25915 is a reply to message #25835] Tue, 24 July 2001 09:09 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
While we are on this lovely subject, I'll ask a ? too. How does OG
create a PS vector output so that the entire rendered OG visual is one
object? What I mean, when you draw to PS device from DG and open it in a
vector image application like Illustrator, you can access individual
characters, axes, plots etc. When you use clipboard object with /Vector,
everything is together and there seems to be no way to separate PS
items. This in fact limited my use of OG, so I had to write something up
to dump the results of OG visual into DG and then use the PS device.
Of course, all the above stems from my lack of dedication to make IDL
figures perfectly fitted for publications. While it is ok to write code
for data *analyses*, I dislike re-writing the code to try to get correct
CMYK output and scale figures. There are programs that allow a lot more
intuitive control of that.
Cheers,
Pavel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Huge HDF files
Next Topic: Multiple widget_draw's and bad convert_coord

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

Current Time: Wed Oct 08 18:39:29 PDT 2025

Total time taken to generate the page: 0.00447 seconds