Graphics device interface
The Graphics Device Interface (GDI) is a component of the Windows operating system . It serves as a programming interface to logical graphics devices and encapsulates the complexity of the hardware ( hardware abstraction ). These logic devices are graphics in GDI device context (Engl. DeviceContext called) in some programming languages for the designation Canvas (Engl. Screen) use. In addition to the output via physical devices ( graphics card or printer ), the output can also take place as a raster graphic in the memory or as a type of step log file ( WMF / EMF , used as vector graphic format under Windows ).
GDI is responsible for tasks such as drawing lines and curves (vector graphics), displaying characters and bitmaps and managing color palettes . The components DIB engine ( device-independent bitmap ) and the ICM color subsystem allow device-independent processing of bitmaps or colors. If a program needs information about device-specific properties ( screen resolution , screen type ), it can obtain it from the device context. However, the GDI calls are largely independent of the device context. A program that outputs a graphic to the screen, for example, could output it to a printer with minimal adjustments. Vector graphics and font commands are not rasterized by GDI when outputting directly to a printer device context , so that any physical printer outputs them in its optimal resolution and graphics are taken from documents created by a virtual printer (e.g. PDF or XPS ) and text is possible.
Since most of the routines for drawing work on the processor and not on the graphics card, the graphics output from GDI is relatively slow. In Windows Vista , the graphics output from GDI is completely taken over by the CPU , which makes it even slower than in earlier Windows operating systems. Since Windows 7 , the Windows "Display Driver Model v1.1" accelerates a few drawing operations from the graphics card. DirectX and OpenGL were created for applications that require a faster 3D graphics interface, especially for games and CAx applications .
- About the GDI Print API , MSDN, accessed June 7, 2019.
- Comparing Direct2D and GDI Hardware Acceleration - Availability of Hardware Acceleration. Retrieved April 3, 2014 .
- GDI Hardware Acceleration. Retrieved April 3, 2014 .