Problem with Canvas->Polygon() in BCB4

Problem with Canvas->Polygon() in BCB4

Post by Delayen Lauren » Sun, 27 Jun 1999 04:00:00



this code was working in BCB3:

 POINT points[3];

    points[0] = Point(Source_x - Left , Source_y - Top + SourceWidth);
    points[1] = Point(Dest_x - Left, Dest_y - Top);
    points[2] = Point(Source_x - Left , Source_y - Top - SourceWidth);

 Canvas->Polygon(points, 2);

But with BCB4, i get:

Cannot convert 'tagPOINT *' tp 'const TPoint *'
Type mismatch in parameter 'Points' in call to '_fastcall
TCanvas::Polygon(const TPoint *, const int);

Searched about the new TPoint type, but the example provided with the
polygon definition is outdated.
Anybody could explain how to set up a new array of points using the TPoint *
type ?

thanks a lot,

-Laurent Delayen