1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62:
| 1: PROCEDURE apf_beliebiger_ausschnitt; 2: VAR m,n,i:longint; 3: p:pbytearray; 4: xwert,ywert,x_konst,x1_konst,y_konst,y2wert,xqu,yqu,summe, 5: deltax,deltay:extended; 6: BEGIN 7: ausschnitt_check:=true; 8: deltax:=(c_reel2-c_reel1)/639; 9: deltay:=(c_imag2-c_imag1)/479; 10: y_konst:=c_imag1-deltay; 11: m:=0; 12: REPEAT 13: p:=a_bild.ScanLine[m]; 14: y_konst:=y_konst+deltay; 15: x_konst:=c_reel1-deltax; 16: FOR n:=0 TO 639 DO 17: BEGIN 18: x1_konst:=x_konst+deltax; 19: x_konst:=x1_konst; 20: xwert:=0.0; 21: ywert:=0.0; 22: xqu:=0.0; 23: yqu:=0.0; 24: color:=0; 25: REPEAT 26: y2wert:=xwert*ywert; 27: ywert:=y2wert+y2wert-y_konst; 28: xwert:=xqu-yqu-x_konst; 29: xqu:=xwert*xwert; 30: yqu:=ywert*ywert; 31: summe:=xqu+yqu; 32: color:=succ(color) 33: UNTIL (summe > maxsum) OR (color = colormax); 34: IF form7.checkbox6.checked THEN 35: BEGIN 36: IF (color >= colormin) OR (color = colormax) THEN 37: begin 38: i:=3*n; 39: p[i]:=farbe_blau; 40: p[i+1]:=farbe_gruen; 41: p[i+2]:=farbe_rot; 42: form7.canvas.pixels[n,m]:=farben 43: end 44: END ELSE 45: BEGIN 46: IF (color <= colormin) OR (color = colormax) THEN 47: begin 48: i:=3*n; 49: p[i]:=farbe_blau; 50: p[i+1]:=farbe_gruen; 51: p[i+2]:=farbe_rot; 52: form7.canvas.pixels[n,m]:=farben 53: end 54: END 55: END; 56: m:=succ(m); 57: Application.processMessages 58: UNTIL (m = 480) or ende; 59: daten_aktualisieren(werte_apf_alt); 60: BitBlt(bild_apf.canvas.handle,0,0,640,480, 61: a_bild.canvas.handle,0,0,SRCCOPY) 62: END; |