Курсовая работа: Система координат канви
void TBilliardTable::Draw(){
{ int i;
pBall *b;
pLose *lz;
char* WhoIsIt;
Canvas->Brush->Color = clBlack;
Canvas->Pen->Color = clBlack;
Canvas->Rectangle(0,0,Width, Height);
Canvas->Brush->Color = $336699;
Canvas->Pen->Color = clYellow;
Canvas->Rectangle(BilliardTable->Left - LoseSize, BilliardTable->Top - LoseSize,
BilliardTable->Right + LoseSize, BilliardTable->Bottom + LoseSize);
Canvas->Brush->Color = clGreen;
Canvas->Rectangle(BilliardTable->Left, BilliardTable->Top, BilliardTable->Right, BilliardTable->Bottom);
Canvas->Pen->Color = clYellow;
Canvas->Pen->Color = clBlack;
Canvas->Ellipse(BilliardTable->Left + (3 * BilliardTable->Width / 4)-2,
BilliardTable->Top + (BilliardTable->Height / 2)-2,
BilliardTable->Left + (3 * BilliardTable->Width / 4)+2,
BilliardTable->Top + (BilliardTable->Height / 2)+2);
Canvas->Brush->Color = $336699;
Canvas->Font->Color = clYellow;
Canvas->Font->Style = [];
if(Player == 0
then WhoIsIt = "Игрок";
if(Player == 1
then WhoIsIt = "Компьютер";
Canvas->TextOut(BilliardTable->Left+30, dh + 1,
"Ход: "+WhoIsIt+"а");