我想畫一個bmp圖像是進入的方法在C#中使用的DrawLine方法如何在圖片上畫線?
public void DrawLineInt(Bitmap bmp)
{
Pen blackPen = new Pen(Color.Black, 3);
int x1 = 100;
int y1 = 100;
int x2 = 500;
int y2 = 100;
// Draw line to screen.
e.Graphics.DrawLine(blackPen, x1, y1, x2, y2);
}
這給予error.So我想知道如何在這裏包括油漆事件上線 (PaintEventArgs的é )
當我們調用drawmethod時,還想知道如何傳遞參數? 例如
DrawLineInt(Bitmap bmp);
此提供以下錯誤
「這給了一個錯誤」。什麼錯誤? – Oded 2012-07-09 20:48:55