Ben Dugan on 24 Jan 2005 17:18:52 -0000


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

[PLUG] Postscript/Ghostscript question



I've been using handwritten postscript to make gray-scale wheels that are printed on film. They work as I'd intended, but now I'd like to do the same thing but using halftones to make the 'grays', because this will mean I can get them printed on high-contrast films that have some properties that are preferable.


From what I can see it shouldn't be hard to get halftones, but what I've tried hasn't worked. I'm pasting in a simple example that doesn't work for me, wondering if anybody's got a tip.

I'm sorry if this seems off-topic. I think I recall some past postscript questions, but maybe I'm wrong...

It seems to me this example should show giant (5 per inch) halftone cells in, for example, gv. But instead I see nice smooth grays.

-- example

%!PS-Adobe-3.0

% bwd 2005-01-24
% experiments to get halftones instead of grays

/inch { 72 mul } def

4.0 inch 10.0 inch moveto 1.0 inch 2.0 inch lineto
5.5 inch 1.5 inch lineto closepath

/DeviceGray setcolorspace
5 45 {dup mul exch dup mul add 1 exch sub} setscreen

gsave 0.333 setcolor fill
grestore 0.0 setcolor stroke
4.0 inch 10.0 inch moveto 7.5 inch 3.0 inch lineto
5.5 inch 1.5 inch lineto closepath
gsave 0.667 setcolor fill
grestore 0.0 setcolor stroke

showpage


%%EOF

-- end of example


Thanks in advance!

Ben


___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug