00001
00002 c
00003 c Copyright (c) 1986,1987,1988,1989,1990,1991,1992,1993,
00004 c by Steve McMillan, Drexel University, Philadelphia, PA.
00005 c
00006 c All rights reserved.
00007 c
00008 c Redistribution and use in source and binary forms are permitted
00009 c provided that the above copyright notice and this paragraph are
00010 c duplicated in all such forms and that any documentation,
00011 c advertising materials, and other materials related to such
00012 c distribution and use acknowledge that the software was developed
00013 c by the author named above.
00014 c
00015 c THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
00016 c IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
00017 c WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 c
00019 c
00020 c
00021 subroutine xyencode(r,s,vec)
00022 save
00023 c
00024 c Encode a Tektronix-type vector.
00025 c
00026 character*1 vec(*)
00027 common /framesize/ nxpix,nx0,xfac,nypix,ny0,yfac
00028 common /plot origin/ ro,so
00029 c
00030 i=nx0+xfac*(r+ro)
00031 j=ny0+yfac*(s+so)
00032 if(nxpix.gt.1023)then
00033 i4=i/4
00034 ii=i-4*i4
00035 j4=j/4
00036 jj=j-4*j4
00037 vec(2)=char(96+ii+4*jj)
00038 i=i4
00039 j=j4
00040 else
00041 vec(2)='`'
00042 end if
00043 j32=j/32
00044 vec(1)=char(32+j32)
00045 vec(3)=char(96+(j-32*j32))
00046 i32=i/32
00047 vec(4)=char(32+i32)
00048 vec(5)=char(64+(i-32*i32))
00049
00050 end