program primer include 'phigsdef.f' real x(4) /-200.0, 350.0, 250.0, -200.0/ real y(4) /-200.0, 300.0, -250.0, -200.0/ real okx(5) /-298.0, -298.0, 398.0, 398.0, -298.0/ real oky(5) /-298.0, 398.0, 398.0, -298.0, -298.0/ real ViewMappingMatrix(3,3) real WindowLimits(4) /-300.0, 400.0, -300.0, 400.0/ real ViewportLimits(4) /0.2, 0.8, 0.2, 0.8/ real ClipLimits(4) /0.0, 1.0, 0.0, 1.0/ integer wkid, ErrorReturn, i, j c Odpre PHIGS ( PhigsOPenPHigs ) call popph(1,0) c Odpre delovno postajo ( Phigs OPen WorKstation ) wkid = 1 call popwk(wkid,"",WK17800) call pevmm(WindowLimits, ViewportLimits, * ErrorReturn, ViewMappingMatrix) do 50 i=1,3 do 60 j=1,3 write(*,*) ViewMappingMatrix(i,j) 60 continue 50 continue c Nastavitev uporabniskega koordinatnega sistema c ( PhigsSetWorKstationWindow ) c ( wkid, xmin, xmax, ymin, ymax ) call pswkw(wkid, 0.0, 1.0, 0.0, 1.0) c Nastavitev zaslonskih koordinat c ( PhigsSetWorKstationViewport ) call pswkv(wkid, 0.0, 0.5, 0.0, 0.5) c Dolocitev barve crte c ( PhigsSetPolyLineColorIndex ) c ( PhigsSetPolyLineColorIndex ) c Indeksi: c 1 = bela, 2 = rdeca, 3 = rumena, c 4 = zelena, 5 = svetlo modra, 6 = modra, c 7 = violicna, 8 = crna (ozadje) call psplci(4) c Izris trikotnika c ( PhigsPolyLine ) call ppl(4, x, y) call psplci(6) c Izris okvirja call ppl(5, okx, oky) c Dolocitev barve teksta c ( PhigsSetTeXtColorIndex ) call pstxci(2) c Dolocitev visine teksta c ( PhigsSetCHaracterHeight ) call pschh (40.0) c Dolocitev poravnave texta c ( PhigsSetTeXtALignment ) call pstxal(PACENT, 0) c Izris texta c ( PhigsTeXt ) call ptx( 0.0, 300.0, 'PHIGS skeleton') pause c Zapre delovno postajo c ( PhigsCLoseWorKstation ) call pclwk(wkid) c Zapre PHIGS (zakljuci z graficnim nacinom dela) c ( PhigsCLosePHigs ) call pclph() end
Ljubljana, marec 1997
Typeset in LaTeX