[net.text] Pic Anomalies

isaac@mungunni.OZ (Isaac Balbin) (07/08/85)

In response to a query I posted to the net, I received the following
reply. I am re-posting it at the authors wish because he hit R instead 
of F while he was in rn. My only comment now is that in fact I was
running ditroff onto an imagen laser printer, and so, one might
have thought the Berkeley hacks would work. They didn't!

In article <371@mungunni.OZ> you write:
 > I had this flow chart type of graph. I wanted to alter it by
 > changing all the dashed boxes to ellipses (with a thickened edge).
 > So, I used the following definition of a thickened ellipse ...
 > 
 > define teli	_	"\D't 8u'"
 > ellipse $1
 > "\D't 3u'"	_
 > 
 > where,
 > $1 was some text inside the ellipse,
 > \D is a PIC lowlevel thing.
 > Now, I borrowed the \D't 8u' construct from the PIC user manual by BWK
 > revised edition March 1982. This gives an example to make thickened
 > concentric circles on or about page 15 in my copy.

This is yet another Berkelisme. The people in berkeley really seems to want
to break everything.
Apparently the \D't 8u' request sets the
amount of dots to the pixel used for drawing. It is specially made for
laser printers and the like. It will fail horribly on real typesetters. If
you ask me, it is pretty useless. They also changed more things.
See their description of the intermediate language which follows here:
(The defines for BERK are added by me)

	/***********************************************************************

    	output language from troff:
    	all numbers are character strings

	#..\n	comment
	sn	size in points
	fn	font as number from 1 to n
	#ifdef BERK
	in	stipple as number from 1 to n
	#endif BERK
	cx	ascii character x
	Cxyz	funny char \(xyz. terminated by white space
	Hn	go to absolute horizontal position n
	Vn	go to absolute vertical position n (down is positive)
	hn	go n units horizontally (relative)
	vn	ditto vertically
	nnc	move right nn, then print c (exactly 2 digits!)
			(this wart is an optimization that shrinks output file size
		 	about 35% and run-time about 15% while preserving ascii-ness)
	pn	new page begins (number n) -- set v to 0
	#ifdef BERK
	P	spread ends -- output it. (Put in by vsort).
	#endif
	nb a	end of line (information only -- no action needed)
		b = space before line, a = after
	w	paddable word space -- no action needed

	Dt ..\n	draw operation 't':
	#ifdef BERK
		Dt d		set line thickness to d pixels
		Ds d		set line style mask to d
		Dg x y x y ...	gremlin spline curve by x,y then x,y ...
		Dq d n miny maxy [p dx dy curx endy]	polygon filled with d, has n
		Dl x y		line from here by x,y
	#endif BERK
	#ifndef BERK
		Dl x y .	line from here by x,y (drawing char .)
	#endif BERK
		Dc d		circle of diameter d with left side here
		De x y		ellipse of axes x,y with left side here
		Da x y r	arc counter-clockwise by x,y of radius r
		D~ x y x y ...	B-spline curve by x,y then x,y ...
				vectors, with extents from miny to maxy (no border)

	x ..\n	device control functions:
	     x i	init
	     x T s	name of device is s
	     x r n h v	resolution is n/inch h = min horizontal motion, v = min vert
	     x p	pause (can restart)
	     x s	stop -- done for ever
	     x t	generate trailer
	     x f n s	font position n contains font s
	     x H n	set character height to n
	     x S n	set slant to N

		Subcommands like "i" are often spelled out like "init".

	****************************************************************/

It seems pretty weird that they changed the User Manual, without telling
that it is a non-standard feature. It is not in my PIC manual at all.

 > However, the result was unexpected. Whilst the ellipse came out thicker,
 > the positioning was all wrong.
 > I mailed BWK about it, but he seems never to have heard of the
 > \D't 8n' construct! He says he knows of \D'e and \D'c but none alter the 
 > thickness. I suppose that I could change the point size, but .....

As you can see, I send a copy of this letter to bwk, to inform him.
You can change the pointsize.

 > has anyone done this before ... Do your manuals also have \D't ?
 > Is this a bug with ditroff maybe? (maybe a typo in my manual)
 > 


Hope this solves the mistery.

	jaap akkerhuis (...mcvax!jaap)