Thema: Delphi GDI+ und DrawPolygon

Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#6

Re: GDI+ und DrawPolygon

  Alt 7. Mär 2008, 13:31
Zitat von daschaos:
Zum DrawPolygon kommt er erst garnich, weil er mit AccessViolation abbricht bei der ersten Points[0].X Zuweisung... aber compilieren tut er jetzt, immerhin . Aber dann kann doch immer noch irgendetwas nich stimmen bei dem Array oder?
Ah ist klar

Du musst die Punkte erzeugen!

Delphi-Quellcode:
New(Points[0]); // <---
points[0]^.X := xBegin;
points[0]^.Y := y;
New(Points[1]); // <---
points[1]^.X := xEnd;
points[1]^.Y := y;
New(Points[2]); // <---
points[2]^.X := xEnd+xDelay;
points[2]^.Y := y-yDelay;
New(Points[3]); // <---
points[3]^.X := xBegin+xDelay;
points[3]^.Y := y-yDelay;
Ach ja ich bin immernoch für:

Graphics.DrawPolygon(@GdiPen,points[0],@Count); oder zumindest:

Graphics.DrawPolygon(GdiPen,points[0],@Count);
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat