Autor Beitrag
Green
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: So 04.06.06 21:35 
also ich hab nach einer Funktion gesucht um einen winkel zu zeichnen und bin dabei auf folgende Procedure gestossen:
(hier ein 'Zitat' aus der Delphi Hilfe)
Zitat:

TCanvas.Pie

Draws a pie-shaped the section of the ellipse bounded by the rectangle (X1, Y1) and (X2, Y2) on the canvas.

procedure Pie(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);overload;
procedure Pie(X, Y, W, H, Angle, AngleLength: Integer); overload;

Description

Use Pie to draw a pie-shaped wedge on the image. In the first form of Pie, the wedge is defined by the ellipse bounded by the rectangle determined by the points (X1, Y1) and X2, Y2). The section drawn is determined by two lines radiating from the center of the ellipse through the points (X3, Y3) and (X4, Y4).

Use the second form of Pie to draw a wedge that is defined by the ellipse bounded by the rectangle (X,Y,W,H), the start angle Angle and the arc length AngleLength.

The angles Angle and AngleLength are 1/16th of a degree. For example, a full circle equals 5760 (16*360). Positive values of Angle and AngleLength mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3'o clock position.

The wedge is outlined using Pen, and filled using Brush.


aber wie verwende ich jetzt diese Funktion: (also was muss ich jetzt machen???
ausblenden Delphi-Quelltext
1:
procedure Pie(X, Y, W, H, Angle, AngleLength: Integer); overload;					


mfg Green
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: So 04.06.06 21:40 
Image1.Canvas.Pie();

Da musst du keine Prozedur deklarieren ;)


greetz

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Green Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: So 04.06.06 21:59 
ja aber wenn ich diese (ja mit overload ;) ) proc haben will: procedure Pie(X, Y, W, H, Angle, AngleLength: Integer); overload; die ja nur 6 params hat dann muss ich das ja irgendwo deklarieren.

und wenn ich das so schreib bekomm ich 'not enough actual parameters':Image1.Canvas.Pie(10,10,20,20,45,30);
Green Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Mo 05.06.06 10:57 
oder was gibt es denn noch für möglichkeiten einen KreisBogen mit einem bestimmten Winkel zu zeichnen???
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 05.06.06 22:47 
Hier geht es weiter: www.delphi-forum.de/viewtopic.php?t=61057

Bitte keine zwei Threads zur selben Sache erstellen, steht auch in den Richtlinien. :roll:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Dieses Thema ist gesperrt, Du kannst keine Beiträge editieren oder beantworten.

Das Thema wurde von einem Team-Mitglied geschlossen. Wenn du mit der Schließung des Themas nicht einverstanden bist, kontaktiere bitte das Team.