⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alignment.f

📁 Intro/: Directory containing introductory examples. HelloWorld.c A simple program that draws a bo
💻 F
字号:
$alias fdopen='fdopen'(%val,%ref)      include 'phigs.f1.h'			! get the HP-PHIGS aliases      program Alignment				! file "Alignment.f"      include 'phigs.f2.h'			! get the HP-PHIGS constants      integer*4	WorkstnID			! workstation identifier      parameter (WorkstnID=1)			! value chosen by the user      integer*4	ConnID				! connection identifier      integer*4	WorkstnType			! workstation type      parameter (WorkstnType=POIDDX)		! out/in, direct, dbl bfr, X      real	H, V				! temporary time savers      integer*4	Halign, Valign			! loop control variables      integer*4 fdopen				! to get file descriptor      call popph(fdopen(fnum(7), 'w'//char(0)), 0)	! open phigs      call pue004('/dev/screen/phigs_window', ConnID)	! get connection ID      call popwk(WorkstnID, ConnID, WorkstnType)! open workstation      call popst(1)				! open display list structure      !--- do top labels -----------------------------------------------+-----      call pschh(0.015)				! set character height      call pstxal(PACENT, PACAP)		! set text alignment      call ptx(.1, 1., "PATOP")			! \      call ptx(.3, 1., "PACAP")			!  \  do labels for vertical      call ptx(.5, 1., "PAHALF")		!   > alignment along the top      call ptx(.7, 1., "PABASE")		!  /  of the plot (more room)      call ptx(.9, 1., "PABOTT")		! /      !--- do left labels ----------------------------------------------+-----      call pstxal(PALEFT, PAHALF)		! set text alignment      call ptx(0., .25, "PALEFT")		! \  do labels for horizontal      call ptx(0., .55, "PACENT")		!  > alignment along the left      call ptx(0., .85, "PARITE")		! /  edge of the plot      !--- do letters in the middle ------------------------------------+-----      call pschh(.03)				! set character height      call pschxp(.8)				! set char. expansion factor      do Valign=PATOP,PABOTT			! for each vert. alignment...	  do Halign=PALEFT, PARITE		! for each horiz. alignment...	      V=Valign*.2-.1			! calculate X value	      H=Halign*.3-.1			! calculate Y value	      call DoLine(V+.01, H+.01, V-.01, H-.01)	! line from NE to SW	      call DoLine(V+.01, H-.01, V-.01, H+.01)	! line from SE to NW              call pstxal(Halign, Valign)	! set text alignment              call ptx(V, H, "Test")		! plot the text          end do      end do      call pclst				! close display list structure      call ppost(WorkstnID, 1, 1.)		! send picture to display      call puwk(WorkstnID, PPERFO)		! update the workstation      call pclwk(WorkstnID)			! close workstation      call pclph				! close phigs      stop					! stop processing      end					! end of program!***********************************************************************+*****      subroutine DoLine(X1, Y1, X2, Y2)      real	X1, Y1, X2, Y2			! endpoints of line      real	X(2), Y(2)			! arrays for polyline            X(1)=X1					! \      Y(1)=Y1					!  \  put simple values      X(2)=X2					!  /  into arrays      Y(2)=Y2					! /      call ppl(2, X, Y)				! polyline      return					! return to calling context      end					! of subroutine

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -