12.2. Your First Graphics Web Application
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;
Note
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.
Get Graphics Programming with GDI+ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.