Draw Image - CSharp System.Drawing

CSharp examples for System.Drawing:Graphics

Description

Draw Image

Demo Code


using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Drawing;
using System;//  w w  w  .  j  ava 2  s .  c om

public class Main{
        public static void DrawImage(Graphics g, Image image, int x1, int y1, int width1, int height1, int x2, int y2, int width2, int height2)
        {
            g.DrawImage(image, new Rectangle(x1, y1, width1, height1), x2, y2, width2, height2, GraphicsUnit.Pixel);
        }
}

Related Tutorials