[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is my printing so jagged?
- To: email@example.com
- Subject: Re: Why is my printing so jagged?
- From: th@tyger.Princeton.EDU (Thomas Herbig)
- Date: Mon, 6 Mar 1995 10:31:52 +0500
- In-reply-to: <firstname.lastname@example.org>
- Sender: email@example.com
Rob Browning writes:
> I have a routine that graphs a line by "connecting the dots" using a
> #_MoveTo and #_LineTo for each segment. While this looks fine on screen,
> when I print it to a laserwriter (using print-u.lisp and letting the driver
> handle Quickdraw->PostScript translation) it looks ugly. The line is very
> lumpy even though I know that the endpoints of adjacent segments are on top
> of one other.
> Why is this, and is there a straghtforward fix?
It happens because the screen and the printer have different
resolutions. Unless you set the resolution in the print record
explicitly, a resolution of 72 dpi will be used: a one-point coordinate
increment will result in a step of 1/72 inches.
I have an ugly way to get around this, but it works. In my plotting
package, I have a settings variable *draw-scale*, which is set to 4. I
then draw my plot to a Quickdraw picture, drawing it a factor of
*draw-scale* too large (make sure that the overall dimensions are
divisble by *draw-scale*; Quickdraw allows only integers). Pictures are
advantageous, because they can be replayed very easily (for redrawing
your window or printing a graph that was already drawn on the screen),
without explicitly re-plotting your entire graph.
I can then draw the picture to the screen by giving it a bounding rect
that is a factor of *draw-scale* smaller, letting Quickdraw scale the
picture down for me as it draws it. This also allows me to zoom into
the picture, by redrawing the window with a differently-scaled bounding
box. This is very fast.
When I want to print the picture, I simply give it to print-u with the
unscaled (large) bounding rect. When I also set the print scaling (in
the Page Setup dialog) to 25%, the graph will print at 288 dpi (unless I
forget, in which case I get 16 pages). Currently, I still have to set
the print scaling manually, but it should be set to 1/*draw-scale*
automatically. Once you set the print scaling for a non-Fred window, it
will remain set for all non-Fred windows during that MCL session.
Of course, you can set the variable *draw-scale* to any integer, if your
CalComp plotter is at a different resolution.
> (An aside: I was looking through the info in IM:Imaging and I was stunned
> by how poorly abstracted the printing vs screen drawing issues were. (...)
Yup. Thought so, too. Everything on the Mac was perfectly consistent
and truly WYSIWYG when printing was only possible at 72 dpi (thank god
that's over). High resolution printing issues are still inconsistent,
because you can get more than what you can see on the screen.
PS. Let me know if you need any code.