Graphics Device Interface

The graphics device interface (GDI) is the GWES subsystem that controls the display of text and graphics. You use GDI to draw lines, curves, closed figures, text, and bitmapped images.

GDI uses a device context (DC) to store the information it needs to display text and graphics on a specified device. The graphic objects stored in a DC include a pen for line drawing, a brush for painting and filling, a font for text output, a bitmap for copying or scrolling, a palette for defining the available colors, and a region for clipping. Windows CE supports printer DCs for drawing on printers, display DCs for drawing on video displays, and memory displays for drawing in memory.

GDI features supported by Windows CE are described in the following table.

GDI feature Description
Raster and TrueType fonts Allows only one of these to be used on a specified system. TrueType fonts generate superior text output because they are scalable and rotatable.
Custom color palettes, and both palettized and nonpalettized color display devices Supports color formats of 1, 2, 4, 8, 16, 24, and 32 bits per pixel (bpp). The first two are unique to Windows CE.
Bit block transfer functions and raster operation codes Allows you to transform and combine bitmaps in a wide variety of ways.
Pens and brushes Supports dashed, wide, and solid pens, and patterned brushes.
Printing Supports full graphical printing.
Shape drawing functions Supports the ellipse, polygon, rectangle, and round rectangle shapes.