(Gast)
n/a Beiträge
|
Re: Polygon
19. Mär 2009, 18:42
Delphi-Quellcode:
type
TPolygon = Array of TPoint;
...
procedure CreateTriangle( var Polygon: TPolygon; const Edge1, Edge2, Edge3: TPoint );
begin
SetLength( Polygon, 3 );
Polygon[0] := Edge1;
Polygon[1] := Edge2;
Polygon[2] := Edge3;
end;
//formcreate:
CreateTriangle( Dreieck, Point( 100, 100 ), Point( 150, 50 ), Point( 200, 100 ) );
//formpaint
Canvas.Polygon( Dreieck );
|
|
Zitat
|