Einzelnen Beitrag anzeigen

ice.icewing

Registriert seit: 10. Feb 2005
17 Beiträge
 
#4

Re: graph

  Alt 23. Feb 2007, 12:57
Mit einem Bespiel versteht man immer schneller:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var i,j : integer;
begin
  with Paintbox1.Canvas do begin
    Pen.Color := clBlack;
    Pen.Width := 1;
    Pen.Style := psSolid;
    MoveTo(10,10);
    LineTo(10, PaintBox1.Height-10);
    LineTo(PaintBox1.Width-10, PaintBox1.Height-10);
    Pen.Color := clRed;
    Pen.Width := 2;
    Pen.Style := psSolid;
    for i := 11 to PaintBox1.Width-12 do begin
      if (i mod 4) = 0 then begin
        j := round(sin(i/20)*40)+PaintBox1.Height-80;
        Ellipse(i, j, i+5, j+5); //Kreis
      end;
    end;
  end;
end;
Mit der Ellipse ist nur Schow da tuts auch Pixels.

icewing
J. Renner
  Mit Zitat antworten Zitat