Entwickler-Ecke

Delphi Language (Object-Pascal) / CLX - overload


Green - So 04.06.06 21:35
Titel: overload
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???

Delphi-Quelltext
1:
procedure Pie(X, Y, W, H, Angle, AngleLength: Integer); overload;                    


mfg Green


Born-to-Frag - So 04.06.06 21:40

Image1.Canvas.Pie();

Da musst du keine Prozedur deklarieren ;)


greetz


Green - 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 - 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. - Mo 05.06.06 22:47

Hier geht es weiter: http://www.delphi-forum.de/viewtopic.php?t=61057

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