PACKETepsonfxplotDEFINESdrawingarea,beginplot,clear,endplot,plotend,stdhoehe,stdbreite,move,draw,pen,zeichensatz,plotterkanal:LEThorpixelmaxdurch24=97,bit14=16384,nameofspooltask="PRINTER",namederbitmap="Plotter",esc="�",modus="L",schrifttyp="P",formfeed="�",zeilenvorschub="J�",minivorschub="J�",cr=" ";INT VARhorpixel,verpixel,horpixeldurch24,ausgewaehlt,groesstexkoord,groessteykoord;TEXT VARneueanzahldernadelspalten;REAL VARhorfaktor,vertfaktor,faktor;INT VARi,plotterchannel:=15;horpixel:=2328;verpixel:=905;horfaktor:=85.03937;vertfaktor:=47.24409;horpixeldurch24:=horpixelDIV24;neueanzahldernadelspalten:=code(verpixelMOD256)+code(verpixelDIV256);LET GRUPPE=STRUCT(ROW3TEXTspalte);BOUND ROWhorpixelmaxdurch24GRUPPE VARbitmap;INT VARprinterchannel:=15,xpos,ypos,xfak,yfak,nextpointnr,linienraster,linientyp;REAL VARbuchstabenhoehe:=0.7662334,buchstabenbreite:=0.3421944;BOOL VARloeschstift,characterdefined:=FALSE;LET ZEICHENSATZ=STRUCT(ROW255TEXTchar,INTwidth,height);ROW3ZEICHENSATZ VARzeichen;PROCdrawingarea(REAL VARxcm,ycm,INT VARxpixel,ypixel):xcm:=real(horpixel)/horfaktor;ycm:=real(verpixel)/vertfaktor;xpixel:=horpixel-1;ypixel:=verpixel-1;END PROCdrawingarea;REAL PROCstdhoehe:buchstabenhoeheEND PROCstdhoehe;REAL PROCstdbreite:buchstabenbreiteEND PROCstdbreite;PROCstdhoehe(REAL CONSThoehe):buchstabenhoehe:=hoeheEND PROCstdhoehe;PROCstdbreite(REAL CONSTbreite):buchstabenbreite:=breiteEND PROCstdbreite;PROCbeginplot:xpos:=0;ypos:=0;pen(0,1,0,1)ENDPROCbeginplot;PROCendplot:ENDPROCendplot;PROCdrucken:INT CONSTmeinkanal:=channel;INT VARi,j;bitmap:=old("Plotter");druckerkanalankoppeln;druckervoreinstellen;bitmapdrucken;seitenvorschub;gibdruckerkanalfrei.druckerkanalankoppeln:spoolcontrolpassword("");waitforhalt(/nameofspooltask);continue(plotterchannel).druckervoreinstellen:out(esc+schrifttyp).seitenvorschub:out(formfeed+cr).gibdruckerkanalfrei:break(quiet);spoolcontrolpassword("");startspool(/nameofspooltask).bitmapdrucken:neueanzahldernadelspalten:=code(zeilenbeginnMOD256)+code(zeilenbeginnDIV256);FORiFROM(groesstexkoordDIV24)+1DOWNTO1REP FORjFROM3DOWNTO1REPdruckeeinespalteeinergruppe;PER;vorschubPER.druckeeinespalteeinergruppe:out(esc+modus+neueanzahldernadelspalten);teilzeileausgeben;out(esc+minivorschub+cr).zeilenbeginn:groessteykoord+1.anzahldernadelspalten:verpixel.teilzeileausgeben:outsubtext(bitmap(i).spalte(j),vontextpos,bistextpos).vontextpos:(anzahldernadelspalten-zeilenbeginn)+1.bistextpos:anzahldernadelspalten.vorschub:out(esc+zeilenvorschub+cr).END PROCdrucken;PROCplotend:drucken;forget(namederbitmap,quiet);END PROCplotend;PROCclear:richtebitmapein;loeschebitmap;.richtebitmapein:forget(namederbitmap,quiet);bitmap:=new(namederbitmap);groesstexkoord:=0;groessteykoord:=0.loeschebitmap:INT VARi,j;TEXT CONSTleer:=verpixel*"�";FORiFROM1UPTOhorpixeldurch24REP FORjFROM1UPTO3REPbitmap(i).spalte(j):=leerPER PER.END PROCclear;PROCpen(INT CONSTbackground,foreground,thickness,linetype):linientyp:=linetype;linienraster:=neueslinienraster;nextpointnr:=0;loeschstift:=foreground=0.neueslinienraster:SELECTlinientypOF CASE2:819CASE3:975CASE4:255CASE5:3711OTHERWISE0END SELECT.END PROCpen;PROCmove(INT CONSTx,y):xpos:=x;ypos:=yEND PROCmove;PROCdraw(INT CONSTgoalx,goaly):ueberpruefeaktuellekoordinatenmitbishergroessten;IFlinientyp<>0THENzeichnelinieFI;xpos:=goalx;ypos:=goaly;ueberpruefeaktuellekoordinatenmitbishergroessten;korrigierenextpointnr.ueberpruefeaktuellekoordinatenmitbishergroessten:IFxpos>groesstexkoordTHENgroesstexkoord:=xposFI;IFypos>groessteykoordTHENgroessteykoord:=yposFI.zeichnelinie:bereitezeichnenvor;verteilegeradeundschraegeschrittemoeglichstgleichmaessig.bereitezeichnenvor:INT VARdx:=goalx-xpos,dy:=goaly-ypos,xdir:=sign(dx),ydir:=sign(dy),xsteps:=abs(dx),ysteps:=abs(dy),totalsteps,biassteps,horstep,verstep;IFxsteps>ystepsTHENtotalsteps:=xsteps;biassteps:=ysteps;horstep:=xdir;verstep:=0ELSEtotalsteps:=ysteps;biassteps:=xsteps;horstep:=0;verstep:=ydirFI.verteilegeradeundschraegeschrittemoeglichstgleichmaessig:INT VARs:= totalstepsDIV2,x:=xpos,y:=ypos;INT VARi;FORiFROM0UPTOtotalstepsREPzeichneaktuellenpunktderlinie;sINCRbiassteps;IFs0ANDcharacterdefinedTHENdrawgraphiccharacterFI.drawgraphiccharacter:INT CONSTxstep:=characterxstep,ystep:=characterystep;INT VARxposition:=xpos,yposition:=ypos,i,n,x,y;BOOL VARmoveorder;setcharacterheightandwidth;zeichensatzauswaehlen;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.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)0CANDyfakDIV(n*matrixhoehe)>0REPqualitaet(i):=(xfak-n*matrixbreite)+(yfak-n*matrixhoehe);nINCR1PER;matrixfaktor(i):=real(n-1);IFn=1THENmatrixfaktor(i):=verkleinerungsfaktorFI PER.verkleinerungsfaktor:IF(matrixbreite-xfak)>(matrixhoehe-yfak)THENreal(xfak)/real(matrixbreite)ELSEreal(yfak)/real(matrixhoehe)FI.freizeilen:SELECTiOF CASE1:0CASE2:0CASE3:1OTHERWISE0END SELECT.drawcharacteri:REAL VARdiff:=0.0;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;PROCplotpixel(INT CONSTx,y):IFgueltigerpunktTHEN IFloeschstiftTHENplot(x,y,FALSE)ELSEplot(x,y,TRUE)FI FI.gueltigerpunkt:x