BCB画线里,Canvas画线颜色线条的颜色设置,[喝小酒的网摘]
Form1->Canvas->Pen->Color = clGreen;
Form1->Canvas->MoveTo(0,Form1->Height);
Form1->Canvas->LineTo(1000,Form1->Height);
Form1->Canvas->MoveTo(Form1->Width/2,0);
Form1->Canvas->LineTo(Form1->Width/2,1000);
Canvas-> Pen-> Color = clGreen; //设置线的颜色为绿色。
Canvas-> Brush-> Color = clRed; //设置填充颜色为红色。
//画一个矩形,线的颜色为绿色,内部的填充颜色为红色。
Canvas-> Rectangle(0, 0, 100, 100);
如果想要画一个空心的矩形,指定
Canvas-> Brush-> Style = bsClear;
[喝小酒的网摘]