Opentopia Directory Encyclopedia Tools

Graphics Device Interface

Encyclopedia : G : GR : GRA : Graphics Device Interface


The Graphics Device Interface (GDI, sometimes called Graphical Device Interface) is one of the three core components or "subsystems", together with the kernel and the user (window manager), of Microsoft Windows.

GDI is a Microsoft Windows standard for representing graphical objects and transmitting them to output devices such as monitors and printers.

GDI

GDI is responsible for tasks such as drawing lines and curves, rendering fonts and handling palettes. It is not directly responsible for drawing windows, menus, etc.: that task is reserved for the user subsystem. GDI is similar to Apple's classic QuickDraw.

Perhaps the most significant capability of GDI over more direct methods of accessing the hardware is its scaling capabilities, and abstraction of target devices. Using GDI, it is very easy to draw on multiple devices, such as a screen and a printer, and expect proper reproduction in each case. This capability is at the centre of all WYSIWYG applications for Microsoft Windows.

Simple games which do not require fast graphics rendering, such as Freecell or Minesweeper, use GDI. However, GDI cannot animate properly (no notion of synchronizing with the framebuffer) and lacks rasterization for 3D. Modern games use DirectX or OpenGL, which give programmers access to more hardware capabilities.

In Windows Vista, GDI applications running in the new compositing engine, Desktop Window Manager, will no longer be hardware-accelerated.

GDI printers

GDI printers (also known as Winprinters akin to Winmodems), in particular GDI laser printers, replace the traditional processing power of the printer itself with capabilities "borrowed" from the host computer. They work by rendering an image to a bitmap on the host computer and then sending the bitmap to the printer. This method has two advantages: The disadvantages are that: Most current model inkjet printers are GDI-based (largely for performance reasons, as the cost factor has primarily to do with lasers), but the trend is to add more flexibility: many offer Mac support, and the Linux community has become increasingly good at making Linux drivers available. Some (notably Epson) often also offer a more traditional emulation as a fallback.

In general, the cheapest current-model laser printers are GDI devices. Most manufacturers also produce more flexible models that add PCL compatibility, or PostScript, or both. In most cases it is only the very cheapest models in any given manufacturer's range that are GDI-only.

GDI+

With the introduction of Windows XP, GDI was deprecated in favor of its successor, the C++ based GDI+ subsystem. GDI+ is a "next generation" 2D graphics environment, adding advanced features such as alpha blending, gradient shading, more complex path management, intrinsic support for modern graphics-file formats like JPEG and PNG (which were conspicuously absent in GDI), and general support for composition of affine transformations in the 2D view pipeline. Use of these features is apparent in Windows XP's user interface, and their presence in the basic graphics layer greatly simplifies implementations of vector-graphics systems such as Flash or SVG. The GDI+ dynamic library can be shipped with an application and used under older versions of Windows.

The Microsoft .NET class library provides a managed interface for GDI+ via the System.Drawing namespace.

GDI+ is similar (in purpose and structure) to Apple's Quartz 2D subsystem, and the open-source libart and Cairo libraries.

See also

External links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: