2013-08-29 57 views
0

我有一個圖片框控件,通過使用鼠標向下和鼠標移動事件,我使用點繪製圖像並將其存儲在我的數據庫中。 和在更新模式中我檢索字節並繪製圖像到圖片框控件中,現在我在圖片上添加了更多行,但要麼是新添加的行或舊圖片,但我希望兩者都是DrawLines在使用圖形在緊湊框架中的圖像

//rect is my picture box 
    Bitmap bmp = new Bitmap(rect.Width, rect.Height); 
      // Create compatible graphics 
      Graphics gxComp = Graphics.FromImage(bmp); 

//If i have a image 

      System.IO.MemoryStream memStream = new System.IO.MemoryStream(TmpSign); 
        Bitmap im = new Bitmap(memStream); 

TMP是我的我的形象

  gxComp.DrawLines(pen, _currentStroke.ToArray()); 

_currentStroke的字節數組點的名單。

回答

0

在圖形對象上創建圖像和繪製線的漸變已解決了我的問題。

  //Ref with above Code 

//創建圖像的圖形是否存在

 gxcomp=Graphics.FromImage(im); 

和 //寫上我的新繪製點到圖形

 gxComp.DrawLines(pen, _currentStroke.ToArray());