Thema: Delphi Zeilen kommentieren

Einzelnen Beitrag anzeigen

safak67

Registriert seit: 22. Mär 2009
87 Beiträge
 
#1

Zeilen kommentieren

  Alt 27. Mär 2009, 16:07
hi ich habe mal ne frage, habe leider null ahnung von delphi und würde gern wissen was die untenstehenden Zieln zu bedeuten haben.? Ich hoffe ihr könnt mir weiterhelfen.

Delphi-Quellcode:

  RAdius:=StrToFloat(LabeledEdit5.Text);
  Winkel1:=round(90+StrTofloat(LabeledEdit1.Text)/2);
  Winkel2:=round(90-StrToFloat(LabeledEdit1.Text)/2);

  Point2.X:=Round(Mittex+Radius*sin(pi*(90-Winkel2)/180));
  Point2.Y:=round(MitteY-Radius*cos(pi*(90-winkel2)/180));

  Point3.X:=Round(Mittex+Radius*sin(pi*(90-Winkel1)/180));
  Point3.Y:=round(MitteY-Radius*cos(pi*(90-winkel1)/180));

  if Point2.x=Point3.X then
  begin
    Point2.X:=Point2.X+1;
    Point3.X:=Point3.X-1;
  end;

  Bmp:=TBitMap.Create;
  Bmp.Width:=Image1.Width;
  Bmp.Height:=Image1.Height;

  With Bmp do
  begin
    Canvas.Pen.Width:=2;
    Canvas.Pen.Color:=ClBlack;
    Canvas.Brush.Color:=ClWhite;
   // Canvas.Ellipse(Rand,Height-Rand, Width-Rand,Rand);

    Canvas.Pen.Width:=2;

    Canvas.Brush.Color:=ClSkyBlue;
    Canvas.Pie(Round(Mittex-Radius),Round(MitteY+Radius), Round(Mittex+Radius),Round(MitteY-Radius), Point2.X,Point2.Y,Point3.X,Point3.Y);


    Canvas.Pen.Color:=ClBlack;
    Canvas.MoveTo(Point1.X,Point1.Y);
    Canvas.LineTo(Point2.X,Point2.Y);
    
    Canvas.MoveTo(Point1.X,Point1.Y);
    Canvas.LineTo(Point3.X,Point3.Y);

    Canvas.Pen.Color:=ClBlue;
    Canvas.LineTo(Point2.X,Point2.Y);

    Canvas.Pen.Color:=ClRed;
    Canvas.Arc(Round(Mittex-Radius),Round(MitteY+Radius), Round(Mittex+Radius),Round(MitteY-Radius), Point2.X,Point2.Y,Point3.X,Point3.Y);

  end;
  Image1.Picture.Bitmap.Assign(Bmp);
  Bmp.Free;
end;

end.
  Mit Zitat antworten Zitat