以下是利用Timage物件內部函數的簡單範例,可劃出類似示波器的背景:
/*填滿示波器內部*/
Image1->Canvas->Brush->Color = clBlack;
Image1->Canvas->Rectangle( TRect(0, 0,Image1->Width, Image1->Height));
/*劃一條示波器的中線*/
Image1->Canvas->Pen->Color = clRed;
Image1->Canvas->Pen->Width=2;
Image1->Canvas->MoveTo(0,Image1->Height/2);
Image1->Canvas->LineTo(Image1->Width,Image1->Height/2);
全站熱搜
留言列表