Subject Re: Structure Array Question
From Pablo Botella <>
Date Tue, 29 Mar 2016 13:43:47 +0300
Newsgroups ot4xb.public

AUGE_OHR <AUGE_OHR*AT*WEB.DE> Wrote:

> i like to paint a Polygon
>
> POINT pts[8] = { {xx+dx, yy}, {xx, yy+dy}, {xx, yy+cy-dy}, {xx+dx, yy+cy},
>       {xx+cx-dx, yy+cy}, {xx+cx, yy+cy-dy}, {xx+cx, yy+dy}, {xx+cx-dx,
> yy} };
> pDC->Polygon( pts, 8 );
>
> how is the right Syntax with ot4xb which have Structure POINT ?
>
> greetings by OHR
> Jimmy
>
>

as POINT members are {LONG x;   LONG y;}

quick way will be

pts := { xx+dx, yy, xx, yy+dy, xx, yy+cy-dy, xx+dx, yy+cy,
       xx+cx-dx, yy+cy, xx+cx, yy+cy-dy, xx+cx, yy+dy,xx+cx-dx, yy}

for more complex structures you need to allocate a big buffer and
o:_link_( o:_addressof_() + ( o:_sizeof_() * (nElement -1) ) ,.F.)







Recent messages in this thread
 
-# Structure Array Question AUGE_OHR <AUGE_OH... 28-Mar-2016 01:18 am
.-# Re: Structure Array Question (Current message) Pablo Botella <> 29-Mar-2016 11:43 am
..\# Re: Structure Array Question AUGE_OHR <AUGE_OH... 29-Mar-2016 09:04 pm