summaryrefslogtreecommitdiff
path: root/app/schulis-simulationssystem/3.0/src/mat.kyocera plot
diff options
context:
space:
mode:
Diffstat (limited to 'app/schulis-simulationssystem/3.0/src/mat.kyocera plot')
-rw-r--r--app/schulis-simulationssystem/3.0/src/mat.kyocera plot3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/schulis-simulationssystem/3.0/src/mat.kyocera plot b/app/schulis-simulationssystem/3.0/src/mat.kyocera plot
new file mode 100644
index 0000000..6e75223
--- /dev/null
+++ b/app/schulis-simulationssystem/3.0/src/mat.kyocera plot
@@ -0,0 +1,3 @@
+PACKETkyoceraplotDEFINESdrawingarea,plotterkanal,beginplot,endplot,plotend,stdhoehe,stdbreite,clear,pen,move,draw,zeichensatz:LETxcm=29.7,ycm=19.7,bit14=16384,plotterunitspercm=118.1102;LETinitcmd="!R! UNIT d; SPO L;";LETleavecmd="SPO P; EXIT;",separator=",",terminator=";",movecmd="MZP ",drawcmd="DZP ";INT CONSTxunits:=int(xcm*plotterunitspercm),yunits:=int(ycm*plotterunitspercm);INT VARterminalchannel,plotterchannel:=15;REAL VARbuchstabenhoehe:=ycm/25.0,buchstabenbreite:=xcm/80.0;INT VARhorpixel,verpixel,ausgewaehlt,groesstexkoord,groessteykoord;REAL VARhorfaktor,vertfaktor,faktor;INT VARi,printerchannel:=15;horpixel:=3507;verpixel:=2330;horfaktor:=300.0/2.54;vertfaktor:=300.0/2.54;INT VARxpos,ypos,xfak,yfak,nextpointnr,linienraster,linientyp;BOOL VARloeschstift,characterdefined:=FALSE;LET ZEICHENSATZ=STRUCT(ROW255TEXTchar,INTwidth,height);ROW3ZEICHENSATZ VARzeichen;PROCdrawingarea(REAL VARx1,y1,INT VARxpixel,ypixel):x1:=xcm;y1:=ycm;xpixel:=xunits;ypixel:=yunits;END PROCdrawingarea;REAL PROCstdhoehe:buchstabenhoeheEND PROCstdhoehe;REAL PROCstdbreite:buchstabenbreiteEND PROCstdbreite;PROCstdhoehe(REAL CONSThoehe):buchstabenhoehe:=hoeheEND PROCstdhoehe;PROCstdbreite(REAL CONSTbreite):buchstabenbreite:=breiteEND PROCstdbreite;PROCbeginplot:toplotterchannel;out(initcmd)ENDPROCbeginplot;PROCendplot:plotendENDPROCendplot;PROCplotend:IFchannel=plotterchannelTHENout(leavecmd);toterminalchannelEND IF ENDPROCplotend;PROCclear:END PROCclear;PROCpen(INT CONSTbackground,foreground,thickness,linetype):END PROCpen;PROCmove(INT CONSTx,y):verifyxy;movetoxy.verifyxy:INT VARxx,yy;xx:=max(0,x);xx:=min(xunits,xx);yy:=max(0,y);yy:=min(yunits,yy);IFxx<>xTHENout(" x out of range ")END IF;IFyy<>yTHENout(" y out of range ")FI.movetoxy:xpos:=xx;ypos:=yy;TEXT VARky:=movecmd;kyCATtext(xx);kyCATseparator;kyCATtext(verpixel-yy);kyCATterminator;out(ky)END PROCmove;PROCdraw(INT CONSTx,y):verifyxy;drawtoxy.verifyxy:INT VARxx,yy;xx:=max(0,x);xx:=min(xunits,xx);yy:=max(0,y);yy:=min(yunits,yy);IFxx<>xTHENout(" x out of range ")END IF;IFyy<>yTHENout(" y out of range ")FI.drawtoxy:xpos:=xx;ypos:=yy;TEXT VARky:=drawcmd;kyCATtext(xx);kyCATseparator;kyCATtext(verpixel-yy);kyCATterminator;out(ky)END PROCdraw;PROCzeichensatz(INT CONSTnr,TEXT CONSTname):IFexists(name)THEN BOUND ZEICHENSATZ VARneuerzeichensatz:=old(name);zeichen(nr):=neuerzeichensatz;characterdefined:=TRUE ELSEerrorstop("Der Zeichensatz ""+name+"" existiert nicht")FI END PROCzeichensatz;PROCdraw(TEXT CONSTrecord,REAL CONSTangle,height,width):REAL VARdiff:=0.0;setcharacterheightandwidth;zeichensatzauswaehlen;IFlinientyp<>0ANDcharacterdefinedTHENdrawgraphiccharacterFI.setcharacterheightandwidth:IFwidth=0.0ANDheight=0.0THENxfak:=zeichen(2).width;yfak:=zeichen(2).heightELSExfak:=int(horfaktor*width);yfak:=int(vertfaktor*height)FI.zeichensatzauswaehlen:beurteilenutzenderzeichensaetze;IFqualitaet(1)<qualitaet(2)THEN IFqualitaet(1)<=qualitaet(3)THENausgewaehlt:=1;faktor:=matrixfaktor(1)ELSEausgewaehlt:=3;faktor:=matrixfaktor(3)FI ELIFqualitaet(2)<=qualitaet(3)THENausgewaehlt:=2;faktor:=matrixfaktor(2)ELSEausgewaehlt:=3;faktor:=matrixfaktor(3)FI.beurteilenutzenderzeichensaetze:ROW6INT CONSTdimens:=ROW6INT:(6,10,8,8,8,16);ROW3INT VARqualitaet:=ROW3INT:(100,100,100);ROW3REAL VARmatrixfaktor:=ROW3REAL:(1.0,1.0,1.0);INT VARmatrixbreite,matrixhoehe;FORiFROM1UPTO3REPn:=1;matrixbreite:=dimens(2*i-1);matrixhoehe:=dimens(2*i)-freizeilen;WHILExfakDIV(n*matrixbreite)>0CANDyfakDIV(n*matrixhoehe)>0REPqualitaet(i):=(xfak-n*matrixbreite)+(yfak-n*matrixhoehe);nINCR1PER;matrixfaktor(i):=real(n-1);IFn=1THENmatrixfaktor(i):=verkleinerungsfaktorFI PER.freizeilen:SELECTiOF CASE1:0CASE2:0CASE3:1OTHERWISE0END SELECT.verkleinerungsfaktor:IF(matrixbreite-xfak)>(matrixhoehe-yfak)THENreal(xfak)/real(matrixbreite)ELSEreal(yfak)/real(matrixhoehe)FI.drawgraphiccharacter:INT CONSTxstep:=characterxstep,ystep:=characterystep;INT VARxposition:=xpos,yposition:=ypos,i,n,x,y;BOOL VARmoveorder;FORiFROM1UPTOlength(record)REPdrawcharacteriPER;move(
+xpos,ypos).characterxstep:REAL VARrundungsfehler:=0.0;IFwidth<>0.0THENrundungsfehler:=frac(cosd(angle)*horfaktor*width);int(cosd(angle)*horfaktor*width)ELSEint(cosd(angle)*real(zeichen(ausgewaehlt).width))FI.characterystep:IFheight<>0.0THENint(sind(angle)*vertfaktor*height)ELSEint(sind(angle)*real(zeichen(ausgewaehlt).height))FI.drawcharacteri:TEXT CONSTchar:=zeichen(ausgewaehlt).char[code(recordSUBi)];FORnFROM1UPTOlength(char)DIV4REPvalue(char,n,x,y,moveorder);IFmoveorderTHENmove(xposition+x,yposition+y)ELSEdraw(xposition+x,yposition+y)FI PER;diffINCRrundungsfehler;xpositionINCRxstep;IFdiff>1.0THENxpositionINCR1;diffDECR1.0FI;ypositionINCRystep.END PROCdraw;PROCdraw(TEXT CONSTrecord):draw(record,0.0,0.0,0.0)END PROCdraw;PROCvalue(TEXT CONSTchar,INT CONSTn,INT VARx,y,BOOL VARmove):x:=charISUBn+n-1;y:=charISUBn+n;IFx<0THEN IF(xANDbit14)<>0THENmove:=FALSE ELSEmove:=TRUE;x:=xXORbit14FI ELSE IF(xANDbit14)<>0THENmove:=TRUE;x:=xXORbit14ELSEmove:=FALSE FI FI;x:=int(real(x)*faktor);y:=int(real(y)*faktor)END PROCvalue;PROCtoplotterchannel:terminalchannel:=channel(myself);continue(plotterchannel);END PROCtoplotterchannel;PROCtoterminalchannel:disablestop;continue(terminalchannel);IFiserrorTHENclearerror;break(quiet)END IF;enablestopEND PROCtoterminalchannel;INT PROCplotterkanal:plotterchannelEND PROCplotterkanal;PROCplotterkanal(INT CONSTnr):plotterchannel:=nr;END PROCplotterkanal;END PACKETkyoceraplot;plotterkanal(15);zeichensatz(1,"ZEICHEN 6*10");zeichensatz(2,"ZEICHEN 8*8");zeichensatz(3,"ZEICHEN 8*16");
+