Now it’s time to use GDI+ in Web applications. First we’ll write some code, and then we’ll discuss how GDI+ Web applications work.
In this application we will draw a few simple graphics objects, including lines and rectangles. First we create a Web Application using Visual Studio .NET. After creating a Web application, we need to add a GDI+-related namespace to the project. We import namespaces as follows:
using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging;
See Chapter 1 to learn more about GDI+ namespaces and classes. If you use Visual Studio .NET to create your Web application, the wizard will add System and System.Drawing namespace references automatically.