int Line::firstPointPosition(int x, int y)
{
x1 = x;
y1 = y;
frm1->Canvas->MoveTo(x,y);
}
int Line::lastPointPosition(int x, int y)
{
x2 = x;
y2 = x;
frm1->Canvas->LineTo(x,y);
}
void __fastcall Tfrm1::MouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y)
{
line.firstPointPosition(0, 0);
line.lastPointPosition(X, Y);
}
//---------------------------------------------------------------------------
void __fastcall Tfrm1::MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
line.firstPointPosition(0, 0);
line.lastPointPosition(X, Y);
}
//---------------------------------------------------------------------------
Анналог AutoreDraw(vb6) в С++ Builder есть?
Код:
Заранее спасибо за помощь!