Yes I'm using Canvas.Polygon(Points).
I set
var
  Points:array[0..99] of TPoint;
Now if my procedure call is to use say only the first 20 points it goes
ahead and uses the rest of the points as well. If there was data there
from a previous call, what a mess. So, as I said, to get around it,  I
just filled in the remainder of the points with the values for the last
point.
It works.
I tried using an open array but it would not compile.


----- Original Message ----- 
From: "Stephen Posey" <[EMAIL PROTECTED]>
To: "Borland's Delphi Discussion List" <[email protected]>
Sent: Wednesday, July 26, 2006 10:26 AM
Subject: Re: Polygon with variable array


> Whitehat wrote:
> > I solved it by setting the array size to the maximum size I would need.
> > Then after loading in the needed points I set all the points beyond that
> > to the last needed point. It's not very elegant but it works.
> >
> >> Whitehat wrote:
> >>> I want to draw a polygon using an array of points. The size of the
> >>> array can vary from 10 to 100. How do I get the Polygon procedure to
> >>> work with a variable size array?
>
> By the "Polygon" procedure, I'm assuming you mean TCanvas.Polygon?
>
> If so, a dynamic array ought to just work, what sort of trouble are you
> having?
>
> Stephen Posey
> [EMAIL PROTECTED]
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 268.10.3/395 - Release Date: 7/21/2006
>
>

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to