Einzelnen Beitrag anzeigen

marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#10

Re: Progess Bar soll laden während sich ein tImage aufbaut

  Alt 15. Mai 2005, 15:15
Gerade beim Berechenen von Fraktalen kommt es darauf an, dass man der Maschine keine Rechenzeit stielt, also habe ich deinen Code so angepasst, dass er nur pro Spalte einen Arbeitsfortschritt zeigt. Habe deinen Code allerdings nicht getestet.

Delphi-Quellcode:
const
  CMAXCOLS = 500;
  CMAXLINES = 400;
var
  I: Integer;
begin
  PRB_Laden.Min := 0;
  PRB_Laden.Max := CMAXCOLS;

  xmax := strtofloat(FRM_Options.EDT_xmax.text);
  xmin := strtofloat(FRM_Options.EDT_xmin.text);
  ymax := strtofloat(FRM_Options.EDT_ymax.text);
  ymin := strtofloat(FRM_Options.EDT_ymin.text);
  kmax := strtoint(FRM_Options.EDT_kmax.text);
  rmax := strtoint(FRM_Options.EDT_rmax.Text);
  creal := strtofloat(FRM_Options.EDT_creal.text);
  cimag := strtofloat(FRM_Options.EDT_cimag.text);

  dx := (xmax - xmin) / CMAXCOLS;
  dy := (ymax - ymin) / CMAXLINES;

  for x_bild := 0 to CMAXCOLS - 1 do
    for y_bild := 0 to CMAXLINES - 1 do begin
      iteration (x_bild, y_bild);
      with PRB_Laden do Position := Position + 1;
    end;
  end;
marabu
  Mit Zitat antworten Zitat