Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Graphics Device Interface + (GDI+) is a graphical subsystem of Windows that consists of an application programming interface (API) to display graphics and formatted text on both video display and printer.
GDI+ acts as an intermediate layer between applications and device drivers for rendering two-dimensional graphics, images and text.
GDI was the tool by which the what you see is what you get (WYSIWYG) capability was provided in Windows applications. GDI+ is an enhanced C++-based version of GDI. GDI+ helps the developer to write device-independent applications by hiding the details of graphic hardware. It also provides graphic services in a more optimized manner than earlier versions. Due to its object-oriented structure and statelessness, GDI+ provides an easy and flexible interface developers can use to interact with an application's graphical user interface (GUI). Although GDI+ is slightly slower than GDI, its rendering quality is better.
The GDI+ services can be categorized into 2D vector graphics, imaging and typography. Vector graphics include drawing primitives like rectangles, lines and curves. These primitives are drawn using objects of a specific class, which has all the information required. Imaging involves displaying complex images that cannot be displayed using vector graphics and performing image operations such as stretching and skewing. Simple text can be printed in multiple fonts, sizes and colors using typography services of GDI+.
GDI+ has an internal structure that consists of about 40 extensible managed classes, 50 enumerations and six structures. GDI+ uses the concept of graphics context, which is similar to the device context used by GDI. Graphics context is represented by classes and graphics containing details of drawing in a window, but not the information about font, color, etc. By passing the required formatting information to a graphics object's methods for drawing, there is no need to maintain the state, which helps to optimize rendering performance.
The features included in GDI+ are: