[comp.text.tex] XDVI and drawing CIRCLES, a solution

koen@prisma.cv.ruu.nl (Koen Vincken) (11/17/90)

A few weeks ago there was a discussion going on about circles (made with
the \circle command) viewed with xdvi.
The problem with some implementations was that each circle was broken
up into 4 pieces, of which only 1 part -- the bottom left part -- was 
displayed correctly on the screen. The other 3 parts always had a horizontal
offset.
Printing was no problem, but nobody came up with a (simple) solution to
view those circles correctly under xdvi.
(I don't remember what the problem was, I think something with fonts.)

What I use is a very simple shell script to produce 4 lines of Latex,
in fact nothing else than the 4 ovals that a circle consists of.
The result is exactly the same for printing, of course.

You can give any name to this script, I just called it `texcirc'. You can
even write a simple C-program for it, I just propose the idea.

Here's the code, hope it helps.


	Koen Vincken -- koen@cv.ruu.nl


--------------------8<-----------------8<----------------------------------
#! /bin/sh
#
# commando 'texcirc' creates the four lines needed to draw a circle
# correctly on the screen and on paper with TeX
#
#
case $# in
3)
	X=$1
	Y=$2
	DIAM=$3
	echo "\put($X,$Y){\oval($DIAM,$DIAM)[bl]}"
	echo "\put($X,$Y){\oval($DIAM,$DIAM)[br]}"
	echo "\put($X,$Y){\oval($DIAM,$DIAM)[tl]}"
	echo "\put($X,$Y){\oval($DIAM,$DIAM)[tr]}"
	exit
	;;
*)
	echo "Usage: texcirc x y diam"
	;;
esac
#