DrawSpline, help
Tomasz Sienkiewicz
azgaard at poczta.onet.pl
Fri Aug 4 14:22:48 PDT 2006
Hi,
could you, please, tell me what am I doing wrong with DrawSpline ?
Straight line is all i can achieve.
My code:
Gathering points from onmotion (dragging) event
public: wxList point_list;
....
wxClientDC dc(this);
wxPoint *point = new wxPoint ;
point->x = (int) event.GetPosition().x;
point->y = (int) event.GetPosition().x;
point_list.Append((wxObject*)point);
.....
int pointsCount = point_list.GetCount();
double x1, y1;
wxPoint pointy[pointsCount-1];
wxPoint *p;
wxList::compatibility_iterator node = point_list.GetFirst();
int uu = 0;
while (node)
{
p =(wxPoint *)node->GetData();
x1 = p->x;
y1 = p->y;
wxPoint pkt = wxPoint((int)x1,(int)y1);
pointy[uu]=pkt;
node = node->GetNext();
uu++;
}
dc.DrawSpline(WXSIZEOF(pointy),pointy);
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
More information about the wx-users
mailing list