コード例 #1
0
 public void DrawImage(string image, Rectangle destination)
 {
     using (var g = Graphics.FromImage(_image))
     {
         System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(destination.X, destination.Y, destination.Width, destination.Lenght);
         g.DrawImage(_textureFacoFactory.getTexture(image), rectangle);
         canvas.Invalidate();
     }
 }
コード例 #2
0
 public void DrawRectangle(Rectangle destination)
 {
     using (var g = Graphics.FromImage(_image))
     {
         System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(destination.X, destination.Y, destination.Width, destination.Lenght);
         g.FillRectangle(new SolidBrush(_color), rectangle);
         g.DrawRectangle(new Pen(_color), rectangle);
         canvas.Invalidate();
     }
     //throw new NotImplementedException();
 }